Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using 2 DO waveform generators on a shared FIFO

Solved!
Go to solution
I have the M-series device (NI USB-6259) and would like to create 2 tasks, DO1 and DO2, using subsets of lines on Port 0. Both waveforms will be sinusoidals, which I will store on the device's DO FIFO. The two DO tasks will have different sample clocks from two PFI lines (one clock is 1000 times faster than the other). Moreover, the waveform sizes for two DO tasks will be different too. Once the tasks are started, I would like to send the waveform data to DO FIFO and set the RegenMode to True to eliminate continuous writes from the computer buffer to FIFO across the PCI/USB bus. My question is - does the M-series device allow reading from DO FIFO by two separate DO tasks running at different sample clocks? If the answer is NO, should I disable the FIFO for one or both of the tasks by setting UseOnlyOnBrdMem to True? Are there any non M-series devices that allow 2 FIFOed DO tasks? If the answer is YES, are there any parameters/options on DO that have to be set for this to work? I would prefer an example using Measurement Studio (DAQmx C API). Victor
0 Kudos
Message 1 of 4
(3,403 Views)
Solution
Accepted by topic author vicpik

Hi vicpik,

 

I'm not sure what you mean by sinusoidals when referring to digital output lines, do you mean that you want to output pulse trains with a 50% duty cycle?

 

The 6259 allows for correlated digital I/O on port 0, meaning that it is hardware timed but the clock must come from another source.  However, there is only one timing circuit for the digital output so you can't route signals from multiple locations to different lines.  Thus, two correlated digital output lines cannot have seperate sample clocks.

 

There is likely a way you can accomplish your goal with the 6259, but again I'm not clear on what you mean by sinusoids.  The standard way to write multiple digital lines at different rates on the same timing system would be to use the lowest common denominator for your clock rate and generate multiple samples as needed to create any arbitrary digital signal.  I hope this makes sense, but please let me know if not.

 

The other option if you needed to generate a simple square wave or pulse train would be to use the counter outputs of the 6259.  Any additional information you provide would be helpful to determine the best course of action.  Thanks for posting!

 

-John 

 

 

 

John Passiak
0 Kudos
Message 2 of 4
(3,375 Views)
John, thank you! As I suspected, I am limited to a single clock for DO tasks. Never mind the sinusoidals, I am generating 8-bit digital signal that becomes a sine after going through ADC. Are there any NI boards that support two sample clocks for DO ports? 
0 Kudos
Message 3 of 4
(3,365 Views)

Vicpik,

 

Unfortunately there are not boards that support two sample clocks for DO Ports. You would essentially need two different boards for two different timed DO output tasks. Like John said in his previous post, you could use the lowest common denominator for your clock rate and generate multiple samples to create an arbitrary digital signal.

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 4 of 4
(3,347 Views)