LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistent timing with continuous analog output

Solved!
Go to solution

I am having an issue while trying to continuously stream analog output data using a USB-6212 with an output rate of 1000 Hz. I am splitting a very long data file into packets that are 1000 samples long then writing each packet. I expect that it will take approximately 1 second to execute DAQmx Write.vi every time a data packet is sent.

 

The issue I am running into is that when writing the first ~10k samples it only takes a few milliseconds for DAQmx Write.vi to write each data packet. After that DAQmx Write.vi executes with the expected timing. 

 

There is slightly different behavior when I use a simulated USB-6212. It only takes a few milliseconds to execute the first call to DAQmx Write.vi. All subsequent calls have the expected timing.

 

Continuous Analog Output FP.PNGContinuous Analog Output Snippit.png

LabVIEW Version 2017

Thanks for your help.

0 Kudos
Message 1 of 3
(2,173 Views)
Solution
Accepted by topic author alke1118

The DAQmx Write VI only run long enough to put data into the buffer.  The first time, the buffer is empty so all of your data goes into the buffer nearly instantly.  It will be this fast until the write buffer is full.  After that, the DAQmx Write has to wait for room on the buffer before it can put data into it.  So what you are seeing is expected.


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
Message 2 of 3
(2,142 Views)

Thanks for the explanation Crossrulz

 

I resolved this by waiting until the output was complete before stopping the task

 Continuous Analog Output Solution.png

 

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