Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I output 2 continuous waveforms with different tasks?

I have an M-series device and I need to output 2 continuous sine waves on 2 analog output channels.  When I try to create two tasks to do so, I recieve a "specified resource is reserved" error on trying to start the second analog output.

The reason I need them to output under two differnet tasks is that they need to have a phase angle difference.  My goal is to start one imediatly and have the other trigger some number of nano-seconds later from a counter timer.  If I use one task with 2 channels I can generate my two waveforms, but they always will perfectly overlap instead of having a custom offset.
0 Kudos
Message 1 of 4
(2,763 Views)

Hello tjjuggle,
As you've noticed, you can only have one analog output task at a time per DAQ device.  So, what you might want to consider, is putting both channels in one task, and simply shifting your array by one (or more) points.  With an M Series board, you probably won't be able to delay by nano-seconds (in fact you won't), but if you use the max output rate, and only shift your data by one point, you could be able to delay by a maybe a few hundred nano-seconds.  For example, a PCI-6251, with a max update rate of 2.8M.  You could delay about 350nano seconds or so.  For anything better than that, you might consider something from the signal generator family.   Hope this helps:)

-Alan A.

0 Kudos
Message 2 of 4
(2,749 Views)
We discovered that wheras the board has an output buffer memory of 8000+ points, we can actually output 2 waveforms with around 35000 points (I guess it's able to use a buffer in the computers memory and swap out with its on boardbuffer).  With that kind of resolution, we were able to get about 500ns per point resolution, which was just barely within the accuracy requirements we require.  So it's a happy ending! 
0 Kudos
Message 3 of 4
(2,741 Views)

tjjuggle,
Glad all is well.  FYI - You are absolutely correct about the buffers.  There are actually two buffers used, a PC buffer and an on board FIFO buffer (though not all DAQ boards have an output FIFO buffer).  So yes, the driver is able to load data to the onboard FIFO from computer memory during the generation.  Best of luck with future projects!

-Alan A.

0 Kudos
Message 4 of 4
(2,728 Views)