LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping program without waiting for trigger

Hi everybody
 
I have a problem that I just can't get my head around. I have a program that I use to aquire data. The program goes through the motions of waiting for the trigger, aquiring the data on the appropriate channel, displaying it, and loops back to waiting for the trigger. The problem is That when I want to stop my program while it is waiting for a trigger I must wait for it to recieve a trigger before it will stop excution.
 
Is there a way for my program to stop the trigger vi when I select to end the program?
 
Thanks
 
Beaton
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 1 of 2
(2,274 Views)
Hi Beaton,

you have to split the 'wait for trigger time' into shorter sub-steps.
Let's say you wait 10sec for trigger signal. Make a loop instead waiting 1 second for 10 times! After each iteration you can check for: 'break the loop (end program)' or 'trigger received' or 'any other error occured'. This way you can stop your program very easily - you can also make your own error state saying 'Error number 123456: stopped by user'...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,266 Views)