NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing a "Pause" function

Hi All,

 

My main sequence has many steps.  Each step starts with an setup sequence in which a VI that monitors all sensors is run.  The monitoring VI keeps running as the other steps in the sub-sequence run.  Then, when all the steps have run, the sub-sequence terminates the monitoring VI.  The main sequence moves on the the next step and starts the monitoring VI is called again.  This pattern is repeated througout the main sequence.  This does not seem like a very efficient way to run the program flow, but I might be stuck with it for now.

 

I have been tasked with adding a "Pause" button to the monitoring subVI, which will cause the program to keep monitoring the sensors while pausing the overall progression of the main sequence.  I have some ideas of how to implement this, but if any of you can offer suggestions, I would appreciate it greatly.  Thanks!

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 1 of 2
(3,632 Views)

Pass the sequence context into your Monitor VI.  Then have an event for the pause button.  Inside of the event get the execution from the sequence context and call the Break method through an invoke node. 

 

Then for them to continue call the Resume method for a continue button.

 

Let me know if you need more details.  Should be simple and straight forward.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 2
(3,598 Views)