LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx output data by reference / optimize DAQmx Write

Hi all,

 

I'm wondering if it's possible to output data to via DAQmx without the data having to first be copied. I'm trying to optimize my data output as much as possible since I need to output at a fast rate on a large number of channels, both analog and digital. I feel that data copying slows down the output rate; is there some workaround for this? If not, has anyone had similar issues that have been resolved?

 

Thanks!

0 Kudos
Message 1 of 3
(3,453 Views)

I could not quite understand what you mean by "data copying slows down the output rate" ?

 

If relevant, you can write your samples prior to update operations and then use an external hardware trigger to update your board outputs.

This is possible if your boards have sufficient memory and external triggering capability.

 

Maybe you can explain your application a little more?

Btw, this is CVI forum. DAQmx experts may answer you better in the related forum.

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 3
(3,448 Views)

Hello Djaunl,

 

I understand you would like to optimize the throughput of your DAQmx Generation application.  You are correct that for output operations, the Write function copies samples into a buffer in computer memory.  Here they wait for the data transfer mechanism to transfer them to your device.  Using Direct Memory Access (DMA) as the data transfer mechanism is the fastest option, and allows for higher throughput rates than other methods that rely on the CPU.  For more information, please refer to the NI-DAQmx Help (search for "data transfer mechanisms"). 

 

Also, using PCI Express or PXI Express device with a RAID array can improve throughput performance as well (assuming you need to stream from disk).  To utilize the maximum update rate of the device, simply call the Write function once and regenerate from the onboard memory (search "regeneration" in the NI-DAQmx Help).  A caveat is that Multifunction DAQ devices typically have limited FIFO (onboard memory) sizes.  This is where arbitrary waveform and function generators really shine.  Not only do they have the capability to generate at very fast clock rates, but they have deep onboard memory.  The caveat is that these devices are specialized to generating signals (you lose the multifunction capability) and are a bit pricier.  Also, they are programmed using the NI-FGEN driver.  Here are a few links for more information.

 

Streaming Gateway 

Signal Generators

Advantages of NI Signal Generators

 

 

In your post, you ask "has anyone had similar issues that have been resolved".  Do you have an existing application and are experiencing errors or throughput issues when generating from several channels at high rates?  If so, please respond with more information about your application.  It would be beneficial to know the DAQ hardware being used, number of channels, update rate, size of data set, etc.  The more information you can provide, the better.  Let me know if I can help.  Thanks!

Rod T.
0 Kudos
Message 3 of 3
(3,422 Views)