From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay/Wait a case and then breakout out of it when needed

Solved!
Go to solution

I need a block/case to wait for 1800 seconds (30 mins) and then run during the runtime. I am in the debugging phase where I am testing out the application with different parameters, in which case I need to stop the application in between. But due to the delay or wait, the application freezes or does not let me exit. How can i find a way to break out of the wait/delay?

0 Kudos
Message 1 of 3
(2,535 Views)
Solution
Accepted by topic author kaivan29

I often use single Event cases to handle situations like this:

Event without While.png

 

If nothing happens, the timeout case triggers and you move on normally.  In this example you stop early using the Stop button, but it could be any event that you send to the event case that stops it (a user-generated event, for instance).

 

Most times putting an event case in a While loop is near-automatic, but you can leave it off in cases like this.

0 Kudos
Message 2 of 3
(2,529 Views)

Awesome! That worked. Thank you 😄

0 Kudos
Message 3 of 3
(2,501 Views)