LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to break an event structure?

"What I have is an event structure with 2 cases, within a while loop. Case 0 is triggered by a button and contains a very very long sequence and the other (case 1) I put it just to have an stop button and then stop the while loop with its boolean TRUE value.

What I need its to be able to stop the execution of case 0 at any time while the sequence (the sequence is made up of many subVIs and case estructures, some subVIs contains sequence structures but not the final sequence I'm dealing with) is running and stop the while loop right away (I need to let the vi finish, I dont want to abort it). Besides if the VI is waiting for an event and the abort button in case 1 is hit the VI should also finish (this is working fine). I want to do
these 2 actions with one single "abort" button

(My problem has nothing to do with front panel bloking)"


Thanks
0 Kudos
Message 1 of 2
(3,120 Views)
Hi,

I don't think there is any way to stop the execution of a sequence structure in your case 0 (well except hitting the LabVIEW Stop button). What you can do though is to use different program structure to implement the same thing. Seperate your sequences in case 0 into many individual cases in a while loop, like a state machine structure for example. This way by dividing them into different cases, you can decide exactly when an exit condition can be checked.

Hope this helps,
Dan
Message 2 of 2
(3,120 Views)