From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple simultaneous AO tasks using 6221

I'm using Labiew 2011 with the PCI-6221 to generate signals on AO0 and AO1. Both of these signals are running continuoisly, and at the same rate. However, these signals are being run independant of each other. Ideally, I would like them to be on the same clock, but from what I've been reading that can't be done. First off, is tihs true? Second, I have other counters on this board. Can I just use one of those as a shared clock, or even a secondary clock?

 

Thanks,

 

Jordan

 

0 Kudos
Message 1 of 2
(3,106 Views)

Hi Jordan,

 

Notice in the figure below from the M Series User Manual, any source that you choose for analog output hardware timing will ultimately be routed to AO Sample Clock.  This means that multiple channel analog output from a single DAQ card requires use of the same AO Sample Clock source.  You will need to configure all of your AO channels in the same DAQmx AO Task, which by default will use the AO Sample Clock Timebase as a timing source.  To write different data to multiple channels, simply feed in a 2D array of data into the the DAQmx Write function.

 

M series analog output.JPG

 

I'm not exactly sure how you have your output configured now, but it should be returning an error if you are not using the same source.  If you are doing as I described above, your output should be in sync.

 

Brian

Brian G.
0 Kudos
Message 2 of 2
(3,092 Views)