LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PAUSE a VI

Is it possible to PAUSE programmatically a VI ? (and after some time to
CONTINUE the execution)
0 Kudos
Message 1 of 7
(2,491 Views)
You can just use a state machine, and have one state in the case structure for pause, only having a while loop with no code on it (only a wait). The vi will only exit this sate when you click the restart button, leaving this sate and entering the normal function.
Hope this helps
0 Kudos
Message 2 of 7
(2,491 Views)
thx for idea ... the only problem is that my subVIs contain delays. For
example if I have a 20 seconds delay in one subvi, I want to be able to
continue with 12 seconds remained delay after pausing this vi for 8 seconds.

any idea?

"Gorka Larrea" wrote in message
news:5065000000050000001B410000-999158726000@exchange.ni.com...
> You can just use a state machine, and have one state in the case
> structure for pause, only having a while loop with no code on it (only
> a wait). The vi will only exit this sate when you click the restart
> button, leaving this sate and entering the normal function.
> Hope this helps
0 Kudos
Message 4 of 7
(2,491 Views)
You could use a state of 1 second delay, and repeat it 20 times if you need, or abort after 12 times, using some simple logic. If nothing is pressed, repeat twenty times using a counter if continue pressed, go for normal function.
Hope this helps
0 Kudos
Message 5 of 7
(2,491 Views)
thx for responses. The only thing I am thinking is that using this method,
when I have to wait hours my delays will be less accurate (if I am using a
delay of 10 hours is more accurate that 36000 seconds).

"Gorka Larrea" wrote in message
news:506500000005000000B4410000-999158726000@exchange.ni.com...
> You could use a state of 1 second delay, and repeat it 20 times if you
> need, or abort after 12 times, using some simple logic. If nothing is
> pressed, repeat twenty times using a counter if continue pressed, go
> for normal function.
> Hope this helps
0 Kudos
Message 6 of 7
(2,491 Views)
> thx for responses. The only thing I am thinking is that using this method,
> when I have to wait hours my delays will be less accurate (if I am using a
> delay of 10 hours is more accurate that 36000 seconds).
>
> "Gorka Larrea" wrote in message
> news:506500000005000000B4410000-999158726000@exchange.ni.com...
> > You could use a state of 1 second delay, and repeat it 20 times if you
> > need, or abort after 12 times, using some simple logic. If nothing is
> > pressed, repeat twenty times using a counter if continue pressed, go
> > for normal function.
> > Hope this helps

Actually, using the wait millisecond multiple, it will tend to correct
for additional delays that the OS may cause. The other way to take c
are
of this is to use the timeout value on something like a queue or an
occurrence. The normal situation will be for the timeout to occur to
throttle your application. When you wish to cancel the delays, you
can post an element in the queue or set the occurrence. The code
that wakes up will head for the exit rather than carrying out whatever
was waiting.

Greg McKaskle
0 Kudos
Message 7 of 7
(2,491 Views)
Hallo, BOX,

Du (cionida6431) meintest am 10.09.01 zum Thema PAUSE a VI:

> Is it possible to PAUSE programmatically a VI ? (and after some
> time to CONTINUE the execution)

Look for the "metronome".

Greetings!
Helmut

Please excuse my gerlish!
0 Kudos
Message 3 of 7
(2,491 Views)