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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay in output signal (unwanted)

Hello,

I'm new to labview.
I'm trying to make a program that will read an input, and if the input is 1 then it will output a sinusoidal wave or if it is zero it will output zero.

I am successfully reading the input, and  can output the sine wave, however when I am reading the signal on the oscilloscope, there is a 5-10 ms 'delay' once every second and if I change what the input signal is, it will only update after 1s. I have attached pictures of my program and the output.

Is there a way to output the signal continuously (without the delay)?

Is it possible to have the wave update in real time?

Thank you

 

 

0 Kudos
Message 1 of 5
(3,391 Views)

1. It is apparent that you are using the Run Continuously.  STOP THAT!!!  It is meant for debugging purposes, not for running your code.

2. Move your controls into the loop.  This way they will be continuously read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(3,375 Views)

I am not using run continuously. That is what occurs when I click 'Run'.

 

As seen in the first screenshot, the controls are in the loop, I just moved them out in the second to see if that made a difference. The program will change the amplitude, but it will still have the delay.

 

 

0 Kudos
Message 3 of 5
(3,371 Views)

Hi 

 

I think there is gap for improvement. Have you try to use the DAQmx API instead of the DAQ Assistant? By using the API there is more chance to improve the performance of your data gathering. Please refer here: http://www.ni.com/example/25859/en/

 

You will notice that using the Express VI will take more time to execute. If you have questions on how to code this, please check this other document: http://www.ni.com/product-documentation/2835/en/

 

Hope this helps.

Regards,

0 Kudos
Message 4 of 5
(3,326 Views)

I am trying to use DAQ mx but I havent got it working yet. 

0 Kudos
Message 5 of 5
(3,265 Views)