LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output power off with emergency stop button

I am using Labview 6.0.2 version, I have a state machine and within that state machine I have sequences, one sequence consist of "Auto" meaning when user press Auto button from the front panel the automated part of the program starts :basically I have alot of sequences within this sequence and using shift register the sequence numbers are passed to the next sequence and sequence number is compared outside the while loop and value defferece keeps my auto sequences running, the question is that I also have an emergency button but within the sequence I have dialog boxes show up for user to do certain things, if the user turn the power on of the device and hits the emergency stop button my sequence is taking precedence over emergen
cy stop so if anyone has any idea how to deal with this let me know. thanks
0 Kudos
Message 1 of 6
(3,444 Views)
If you're using sequence structures within a state machine, you're not realizing the full power and flexibility of a state machine. State machines in LabView are typically implimented with while loops and case structures. If you impliment your state machine with a loop and a case structure, create a state (a case) for your emergency stop. Then, wherever you're determining what the next state is, check the emergency stop button and goto the emergency stop state if stop was pressed. If you have nested state machines, you may need to stop the lower level and go back to the higher level to get to the stop state.
0 Kudos
Message 2 of 6
(3,444 Views)
I am sorry, I mean I am using case structures instead of sequence, whereever I have mentioned sequence I have ment case sequence.
Message 3 of 6
(3,444 Views)
I am not using nested state machine, my auto case structure has 56 case structures in it. each case referece the next one and using the shift register the value is compared outside and once determined to be unequal , it automatically goes to the next case structure within my auto case, so my question is that once this is going on and user decides press emergency stop, what happens is that my dialog box shows up before the output turns off but once user says either "yes" or "no" then the emergency is executed, how to go around that.. I want the emergecy to take precedence over dialog box.
0 Kudos
Message 4 of 6
(3,444 Views)
Inside your loop and outside the state machine case structure, in the wire going to the case selector of your state machine case structure, insert a Select function from the Comparison function palette. Wire the select input of that function to the emergency stop button. Connect the wire originally going to the case selector to the False input of the Select function. Wire a numeric constant with the case number of the stop case to the True input of the Select function.
This way, you'll check for Stop between each state. If you're using LabView dialog boxes to give instructions, etc., if the dialog box is already up, the user doesn't have access to the stop button on the main VI. You could use two button dialog boxes and make one button OK and the
other Stop. If you want to check the stop button on the main VI even if a dialog box is already up, you'll have to create your own dialog boxes (using sub-VIs) and use a global or control reference to check the Stop button.
Or you could use a string indicator on your main VI to give the user instructions rather than a dialog box so Stop will always be accessible.
0 Kudos
Message 5 of 6
(3,444 Views)
I can't claim to be an expert, but it sounds to me like you want to
lose that auto sequence and place it in new states in your state
machine. If you have states 0 - 4 in your machine right now, make
states 50 - 55 your auto sequence, having 1 call the next until
returning to the default state.

The drawback is you will have a loop delay between each step of your
now converted sequence.

The benefit is you can do a check of your E-stop after each step.

Hope this helps,

Gc.

Noman wrote in message news:<506500000008000000FE9A0000-1042324653000@exchange.ni.com>...
> I am using Labview 6.0.2 version, I have a state machine and within
> that state machine I have sequences, one sequence consist of "Auto"
> meaning when user press Auto button from the fron
t panel the automated
> part of the program starts :basically I have alot of sequences within
> this sequence and using shift register the sequence numbers are passed
> to the next sequence and sequence number is compared outside the while
> loop and value defferece keeps my auto sequences running, the question
> is that I also have an emergency button but within the sequence I have
> dialog boxes show up for user to do certain things, if the user turn
> the power on of the device and hits the emergency stop button my
> sequence is taking precedence over emergency stop so if anyone has any
> idea how to deal with this let me know. thanks
0 Kudos
Message 6 of 6
(3,444 Views)