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: 

Why does my simulated signal accelerate? and how to "pause" it?

Hi,
In my software I use a "simulated square signal" to control a solenoid valve.

This signal is generated and modified in a subVI, that I put in the mainVI inside a while loop. Inside the mainVI I have the digital output block.

I have a start/stop button for the while loop.

My problem is that when I stop the while loop, wait some seconds and then restart it, the signal runs at high speed until it regains all the time spent when it was stopped.

Is it normal? This behavior is very problematic for me!

 


Another question: This signal is in a subVI, and I need to "pause" it using a control in the main VI. I need that when I restart the signal after the pause, the signal is exactly at the same point where it was when I paused it. Is it possible?

 

Thanks in advance

0 Kudos
Message 1 of 3
(2,037 Views)

Hello danielpirovano,

 

If you put a wait function into the while loop and give a value of how many miliseconds you would like to wait until the next loop is executed you will have no problem.

 

In the attachment you will find an example of how to pause and continue from the stopping point 🙂

 

 

Antonios
0 Kudos
Message 2 of 3
(2,018 Views)

Thank you; tomorrow I will try that!

 

Daniele

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