LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any suggestion how to pause my program?

Greetings me newbie,
I want to pause/resume my entire VI.Any suggestions?I haven include my Data acquiring VI.Maybe using another VI to control.
0 Kudos
Message 1 of 9
(3,608 Views)
Erm... can anyone pls give me some suggestions
0 Kudos
Message 2 of 9
(3,592 Views)
The quickest way to pause this specific VI would probably be to add another event case - a 'value change' for a boolean pause control and inside the case have a while loop running as long as the control is true. The outer loop will stop. just make sure you uncheck 'lock FP controls...'. If you have other VIs, it will be more complicated.

___________________
Try to take over the world!
0 Kudos
Message 3 of 9
(3,589 Views)
Also, put a delay timer (100mSec) inside your pause loop to allow the CPU time to do other processing.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 9
(3,572 Views)
Greetings me newbie,

Is this the way ?I not very sure...
0 Kudos
Message 5 of 9
(3,553 Views)
Close, but this is what I meant.

___________________
Try to take over the world!
0 Kudos
Message 6 of 9
(3,535 Views)
Sorry, that condition should be 'continue' and not 'stop'.

___________________
Try to take over the world!
0 Kudos
Message 7 of 9
(3,529 Views)
To add to what tst said, with the loop continue condition, make sure the pause button action is switched when pressed or released, with false as the default state. If you use either the OK, Cancel, or Stop button from the palette, these actions are defaulted to latched actions. You have to change the mechanical action to a switched action (right click - mechanical action).
- tbob

Inventor of the WORM Global
0 Kudos
Message 8 of 9
(3,504 Views)
The above suggestions have the serious disadvantage that they are "blocking" everything else, including the stop button.

I prefer to manipulate the event timeouts using a shift register. With this method, all other events can still occur without messing with the pause status. I have quickly composed a simple example, more details are on the FP.

(A quick note about the original VI:
General: PLEASE don't post VIs set to auto-run when opened. I prefer to look at the diagram first before deciding to run it. There could be malicious code out there!

Why do you use a "200ms wait" AND a 100ms even timeout in the same loop. Does not make sense!

Why do you set all these properties with every loop iteration? This needs to be done never (preferred) or once only. All the property nodes can be combined into one. Just resize and select the desired properties.)
Message 9 of 9
(3,484 Views)