LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer data between the different states in "state machine"?

One tip I have seen is to create a dummy state called "blank" that wires all of the shift registers through.  When you need to create a new state, duplicate this one.  That way the new state already has things wired through and you can branch off or cut the wires that you are working with and leave the unused ones alone.  You never actually call the blank state, it is just a template for the new states as you create them.
Message 11 of 17
(1,659 Views)

robbieyang wrote "If I used the shift register, I need to wire the registers in all states."

I think in Labview 8.5 you don't need to do it... in previus versions Smiley Sad you need to.

0 Kudos
Message 12 of 17
(1,646 Views)
Yes... if you have Labview 8.5 you can use the feedback node instead of a shift register....
Message 13 of 17
(1,644 Views)


Pnt wrote:

robbieyang wrote "If I used the shift register, I need to wire the registers in all states."

I think in Labview 8.5 you don't need to do it... in previus versions Smiley Sad you need to.


This statement is a bit simplistic. If you want to share the data between different states, you need to wire it in all states. It does not matter if you use a shift register or a feedback node.
Message 14 of 17
(1,640 Views)
You are right.....
0 Kudos
Message 15 of 17
(1,620 Views)

There is one more option to wire the shift registers pass throughs...

Write your program first without bothering much about unconnected tunnels in some cases, and then run the tunnel wiring wizard. it will wire them up for you.

 

You can find Tunnel wiring wizard here

 

<LabVIEW8

http://forums.lavag.org/index.php?act=attach&type=post&id=121

LabVIEW8>

http://forums.lavag.org/index.php?act=attach&type=post&id=2056



Message Edited by Tushar Jambhekar on 12-03-2007 02:25 AM

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 16 of 17
(1,590 Views)

Here is an example of how to carry local variables in a cluster and pass them to each state using a shift register.  Only unbundle and bundle the variables your need.  If none are used in a particular state, just wire the cluster wire straight through.  You can add as many variables as you want to the cluster.  You don't have to put the cluster outside the loop.  You can create a dummy state that never gets called (as was mentioned before), and put the cluster there, just wire the cluster output to the right shift register (no wires from the left).  Even though it never gets called, the compiler will create space for these cluster elements.



Message Edited by tbob on 12-03-2007 08:51 AM
- tbob

Inventor of the WORM Global
0 Kudos
Message 17 of 17
(1,564 Views)