LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

priority of events

I have a VI that does some automation. It goes through about a dozen steps and monitors progress before going to the next step. There could be a situation where I need to stop the automation for various reasons and go to a known condition. I have a "stop automation" button on the fromt panel which puts a stop at each of the automation loops to cause them to stop and I also have an event structure that responds to the "stop automation" button as well. This event is used to set the equipment in a known condition. Well It is not cooperating very well and I wanted to know if anyone could tell me if using the event structure of the button may be overriding it's other use or vise-versa. I would like the automation loops to stop first and then go to a known condition but I don't know if you can control which happens first using only one front panel control.
Thanks to anyone who has the answer.
 
Lee
 
0 Kudos
Message 1 of 2
(2,159 Views)
The event case for the stop button shouldn't interfere in any way with the rest of the loops reading the true stop button value. I suppose you are reading the stop button value in your other loops using local variables for the stop button? If so, your stop button can't possibly have latching mechanical action. That means that it will stay true (depressed) until you manually click on it again or programmatically write its value back to true. Therefore, your loops should have no difficulty reading the true value for the control and terminating themselves.

You might look into some examples on Notifiers for a more robust way to send messages to various loops. Can you post some reduced example code that reproduces this issue? It won't help us to have your whole application, but if you can reproduce this with just two small loops or something, we might be able to recommend a direction to proceed in.
Jarrod S.
National Instruments
0 Kudos
Message 2 of 2
(2,132 Views)