10-05-2012 09:56 AM - edited 10-05-2012 10:06 AM
basically all you are doing is stopping the vi and not properly shutting down your program or your equipment..
Caveats and Recommendations when Using Events,and look at NI LabVIEW 101
try posting your VI, so that we can understand exactly what's going on...
10-05-2012 10:21 AM
In the VI I posted, the string "STOP" signifiys me (trying to) shutting down the equipment properly. I use stop labview just to show what I am trying to do. Let me ask my question differently: is there a way to interupt the main state machine loop to power down and close equipment handles and end the program (and NOT resume the main loop)?
10-17-2012 01:36 PM
A state machine can be that flexible ONLY if each state in the machine executes in the shortest possible time.
ALways strive to get states at their bare minimum in terms of what they do and how long it takes to do it.
For query states or any state depending on an external resource (like a com port) the
timeout should be split up or made as short as possible.
By doing this your state machine will have more control over events and will respond more quickly.
Most hang ups are avoided by designing states carefully in the user interface part of it.
SOrri I could not be more specific in helping.\
10-17-2012 05:52 PM
It should also be noted that you may need to insert an emergency stop at teh front of the queue. You want to force it to be the next action to occur.