LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a Pause botton

Hello,

 

In my program I have two tabs, one ofr measurements in "continuous" and another for "pulsed" mode. In the pulsed more I would like to have a PAUSE botton which will be used by the user and pauses the acquisition while pressed. I don't want it to stop, I just want it to pause and then restart when theuser chooses (so the data will be copied in the same file).

 

I'm using a KEITHLEY High Voltage suply (model 248)  and KEITHLEY electrometer (model 6517A). And my LABVIEW version is 7.1.

 

thanks

 

 

0 Kudos
Message 1 of 4
(4,464 Views)

Hi,

 

   If you want to just pause the process put more while loop inside. If press pause button let this while stop and the other keep running if press again let the process continue.

Hope this may solve your problem.

 

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

The way I've always implemented a pause is to have a semaphore that a "pause loop" and "execute loop" share.  When your user clicks the pause button, it will trigger an event that acquires the semaphore, and when they click it again it will release the semaphore.

 

Then, in your execution loop, insert an acquire/release semaphore subvi between steps.  The actual program will execute as follows:

 

 

Your execution loop will run, acquire the semaphore, immediately release it, and execute an interation of the loop.

 

Your user presses pause, which acquires the semaphore and doesn't release it.

 

Execution loop runs, tries to acquire the semaphore and waits until something else releases it.

 

Eventually your user unpauses, which releases the semaphore.

 

Your execution loop can now acquire the semaphore and continues running.

Message 3 of 4
(4,424 Views)

Jeff,

 

I had a problem oppening your example, my version is 7.1.

 

Can you save it in a way I can open here? 

 

Thank you

0 Kudos
Message 4 of 4
(4,398 Views)