LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Final State in State Machine

Solved!
Go to solution

I'm trying to figure out how to make a proper state machine and I am a little confused about how to wire the last state and how it excecutes.  See attachment for details.

0 Kudos
Message 1 of 2
(2,173 Views)
Solution
Accepted by topic author LarsUlrich

Put in anything you want.  That state will never execute because you are telling the loop to stop because of the comparison at the bottom.  Though I would probably pick either a default state that shows an error message since if it ever does run, you'll know something is wrong with your code because it shouldn't run.

 

Instead of comparing your shift register with a value at the bottom to determine when to stop, I would just put a boolean True constant in the Stop state and wire that directly to the stop condition terminal.  Set the tunnel for Use default if unwired so that you don't have to bother wiring False constants in all the other states.

Message 2 of 2
(2,159 Views)