LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lag on DAQmx continuous Outputs?

I'm trying to use DAQmx to set up an output that is "continuous".  By that I mean that it would keep going without stop but, I want to be able to control the magnitude of the signal.  I don't know why but when I try to change the output I get a lot of lag.  Does anyone know how to control lag levels on continuous Outputs?

 

drive.png

 

Download All
0 Kudos
Message 1 of 8
(3,555 Views)

I tryed to diable Regeneration, but then I got Error "Error -200621 occurred at DataLoop Rev1.5.vi"

 

drive2.png

 

drive2.png

0 Kudos
Message 2 of 8
(3,543 Views)

Hi Over_Nyquest, 


I tried running your code on my system and did not get the same underflow error that you are seeing. What device are you using? Have you tried reducing your sampling rate as suggested in the error message?

 

Also, below are some articles that discuss how to use the properties available in LabVIEW to tune latency:

 

http://www.ni.com/white-paper/3874/en

 

http://digital.ni.com/public.nsf/websearch/45A7AC6B59E026B386256F90006DAA49?OpenDocument

Catherine B.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 8
(3,514 Views)

I'm using the NI OEM USB 6221.

Some times it take several minuts for the error to pop up, before then it works just fine.

0 Kudos
Message 4 of 8
(3,499 Views)

Have you tried reducing the sampling rate as suggested in the error message? I'm curious as how low the sampling rate must be to prevent the underflow error. 

 

Also, LabVIEW has a shipping example that should allow you to change parameters while running. Can you try running this example to see if it throws the same error? The example can be located by going to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Output >> Voltage (non-regeneration) - Continuous Output.vi

 

Catherine B.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(3,478 Views)

I'm trying to avoid changing my rate, because I dont want to change the frequancy at witch my distorted sine wave is playing.  Also I'm only writing 1000 samples ever second, and that's way lower then what the limit on USB should be.

 

I opened this example and ran it on my hardware.

Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Output >> Voltage (non-regeneration) - Continuous Output.vi

I got the same lag here that I did on my own VI.  The software writes new data to the NI-USB-6221 with in .1 secondes, but it takes about 10 seconds for be to see the change on my voltage meter.

0 Kudos
Message 6 of 8
(3,471 Views)

There is lag but no underflow error with the example VI, is that correct? 

 

When trying to tune latency, the first parameter you have to change is the regeneration mode (from regeneration to non-regeneration, as you have done). The second parameter you can change is the data transfer request condition:

 

http://digital.ni.com/public.nsf/websearch/45A7AC6B59E026B386256F90006DAA49?OpenDocument

 

What happens if you add this property to the shipping example?

 

 

Catherine B.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(3,455 Views)

try with non regeneration  property node i hope it will help you

0 Kudos
Message 8 of 8
(3,129 Views)