04-02-2018 10:25 PM - edited 04-02-2018 10:40 PM
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.
LabVIEW Version 2017
Thanks for your help.
Solved! Go to Solution.
04-03-2018 06:09 AM
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.
04-03-2018 09:40 AM - edited 04-03-2018 09:46 AM
Thanks for the explanation Crossrulz
I resolved this by waiting until the output was complete before stopping the task