LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Abort in Event Struture

Hello Everyone
 
I am using Event struture in my code.
I need to perform a sequence of test in one of the event.
So i am placing a Sequence Structure in one of the Event.
In tun all of these sequences are TESTs which might take nearly 5-10 minutes to complete.
 
My questiion is that If I want To abort the Test how can i do it?
For Eg: I am in that event and the sequence had started Executing and if in the middle of the sequence I want ot abort the whloe test and stop the test.
 
Please give me some idea to do this.
 
Thanks in Advance
 
Avni
 
0 Kudos
Message 1 of 2
(2,381 Views)

Hi Avni there are some ways to abort your sequence. For instance you could use the stop VI, this works as the abort button of LabVIEW but you wont be closing task and for example if you are using the serial port it wont close the port and you might get some errors later. On the other hand you could replace your stack sequence with a state machine, this will give you chance to interrupt it between states.

Another possible way is place the code of each of the sequence in a case structure a use an abort button when you press this, you won’t execute the following cases.

I’m more on the state machine, but I hope these ideas help you

Best Regards

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 2 of 2
(2,378 Views)