LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data between states of the states machine

So I have two tables that I generate in one state of the state machine.  My question is what is a proper, aesthetic way to propogate these two tables into one another state of the state machine. Please see the attached  code.  State machines rock!Smiley Happy
0 Kudos
Message 1 of 6
(2,813 Views)
One nice way to pass data in a statemachine is to bundle up your controls in one cluster and your indicators in another cluster.  This way you just have to use two shift registers (one for each cluster) and bundle and unbundle as necessary.
Message 2 of 6
(2,810 Views)
But I need to pass only the data from one state to another. Wouldn't be the shift register an overkill becasue I will have to route  the signal through all states?
0 Kudos
Message 3 of 6
(2,806 Views)
The shift register is the right tool for this job.  It follows the left to right data flow paradigm, unlike other solutions (such as using a local variable).  I am sure you will get a few other opinions but I think that the shift register is the way to go.
Message 4 of 6
(2,804 Views)

The shift register IS the way to go. 

RayR

0 Kudos
Message 5 of 6
(2,774 Views)

Action Engines are a way of encapsulating a Shift Register.

There are some advantages to using an AE as apposed to a single cluster in a SR.

1) The data is availabel to other state machines running in parallel.

2) They reduce the clutter making your state machine easier to understand.

3) For large data sets a AE can perform better since it can make more efficient use of memory (provided you fallow all of the rules).

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 6
(2,767 Views)