LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producer consumer continous data retrieval

Dear Bob_Schor,
Thank you for your reply.
As from your suggestion, i have implemented a while loop and case selector. But still the same problem. It checks for values again and again but incoming values are stopped (Generation of M1 and M2 is stopped as i press 'Standard test'). It is really embarrassing that i am asking these stupid questions and not getting exact point what you want to say.

Waiting for your kind reply.

Regards,

Khan

Download All
0 Kudos
Message 11 of 14
(876 Views)

While loops do not belong inside of state machines.  Your problem is you are using stale data that will never change in your loop.  So that inner loop will never stop.  Get rid of that loop and more the shift registers out to the outer loop.  If you have not achieved your desired values, then you have your state machine repeat the Standard Test state.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 14
(866 Views)

Start LabVIEW.  Click on New Project.  Find Simple State Machine.  You'll get this:

SSM.png

As you see, it comes with Documentation that should explain All You Ever Wanted To Ask About A Simple State Machine.  See the While Loop?  See the Case Structure inside it, with an Enum (having the initial State) wired to a Shift Register (that holds the Current/Next State) that goes to the Case (State) Selector?

 

Build this for yourself.  Study it.  Play with it until you understand it.  Now incorporate it into your Program.

 

Bob Schor

0 Kudos
Message 13 of 14
(858 Views)

@Bob_Schor wrote:

...

Build this for yourself.  Study it.  Play with it until you understand it.  Now incorporate it into your Program.

 

Bob Schor


Then look here.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 14
(848 Views)