LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent the program from continuously running

Solved!
Go to solution

Labview gurus,

I have what I believe is a fairly simple question. I have a PXI 5152 system which I am using to acquire data. I have attached my sample coding. (Which incidentally, isn't much coding, it's just express VIs.)

I'd like to have a method of stopping this program while it is running without having to wait the timeout time. The reason why I would like to do this is that in my application I am using a laser to induce acoustic waves which are picked up by an ultrasonic transducer which is connected to the PXI 5152 system and I am collecting signals one at a time at unknown time intervals. Essentially I am manually pulsing the laser, but I do not know the exact times I will be pulsing it so I cannot know how long or how short to set the timeout without it either a) Timing out before I'm done or b) Timing out half an hour or more after I'm done.

I would like to be able to set the timeout to infiniti (or -1), but have a button that when I press it stops the entire process.

Thank you for your help,

0 Kudos
Message 1 of 4
(2,794 Views)

Please post your vi in 2009 version.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 4
(2,734 Views)
Solution
Accepted by topic author bravedonxiote

I cannot find a "timeout" in your code, so I am not really sure what you are talking about. I also don't have NI-scope, so I cannot see the express configuration.

 

Here's a simple way to switch between finite (e.g. 100ms) and infinite timeout, thus running or pausing the loop. Modify as needed.

 

 

Message 3 of 4
(2,727 Views)

Thank you so much for solving this altenbach! I hadn't even considered using an event structure, but I suppose I should start learning about them since I can see they are quite useful! I appreciate your help.

0 Kudos
Message 4 of 4
(2,693 Views)