Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Clocked FIFO for digital output

We are trying to configure the NI USB-6229 to supply a digital output as well as to perform analog acquisitions at a fixed interval. The attached diagram loosely depicts what we are trying to accomplish.

 

We would like to generate a non-uniform digital waveform that drives a digital output. The source of the waveform is a digital FIFO of “N” 1-bit samples. The samples are clocked out to digital output “DO” at 1Khz. The clock source MUST be a hardware timer as the timing must be reasonably accurate. The digital output FIFO would be filled before the 1Khz clock was started and would be configured to wrap-around once the FIFO pointer had reached the last sample.

 

We would also like to use the same clock source to trigger ADC acquisitions which would then feed into another FIFO that can be read by the LabView VI. Ideally we’d like to configure 3 ADCs in the same fashion. However, it would suffice to know how to wire up the first ADC.

 

All of the timing-specific control must be inside the ‘6229 as the PC cannot keep up with this data rate. The PC should be able to read data out of the output FIFO before it fills.

 

 

0 Kudos
Message 1 of 4
(3,123 Views)

Hi Sendtohen,

 

I would do something like this:

Correlated Digital Output with Analog Input Task in DAQmx (Finite)

 

The general idea is to:

1.  Configure Clocked Digital Output and Analog Input Tasks.  Select to use the AI Sample Clock for your Digital task.

2.  Write the digital data to an output buffer before starting.

3.  Start the Digital Task before the Analog task.  This way both tasks start on the first edge of the AI sample clock.

4.  Read data and wait until task is complete before clearing.  If you are reading more than ~10 seconds of data you will need to increase the timeout of your read or read the data in a loop instead.

 

Best Regards,

John Passiak
Message 2 of 4
(3,093 Views)

Thanks for the reply, correct me if I am wrong.  The example you gave does not address the first part of my problem where I need to output varied 1bit samples.

0 Kudos
Message 3 of 4
(3,084 Views)
Yeah you will have to replace the Ramp Pattern with whatever digital data you wanted to write to the device.
John Passiak
Message 4 of 4
(3,079 Views)