Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How dynamically generate digital output data with NI-DAQmx

How dynamically generate digital output data with NI-DAQmx for NI PCI-6289 ? All DAQmx examples shows anly how to output once or infinitly repeat the initial digital data array.
0 Kudos
Message 1 of 2
(3,186 Views)
nikolsv,

In order to do continuous, correlated digital output without on-board regeneration, you must first fill the entire output buffer of your card with data before starting the task. For your card, this is 2047 samples. Afterwards, you can then perform digital writes in the same manner as analog output. Keep in mind, you must output the data in software as fast as the card empties it's buffer. Note: this method may be changed in future versions of the DAQ driver.

I have created a simple example which first fills the output buffer with all 0s, starts the task, then begins a loop which continuously updates the data 100 samples at a time. Because digital operations do not have their own clock, you will also need to set up a counter task to provide one.

Hope this helps,
Ryan V.
National Instruments


Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 2 of 2
(3,164 Views)