Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

syncronous analog I/O

I have a cDAQ with modules 9215 and 9263.  I need to sync the analog I/O up exactly so they have the same time stamps.  I can't figure out how to trigger the AI to AO.

Please help
0 Kudos
Message 1 of 4
(2,788 Views)
Hi Mrochon,

If you are using LabVIEW, I would recommend taking a look at our synchronization examples.  These can be found by going to Help » Find Examples in LabVIEW.  I would take a look at the example entitled Multi-Function-Synch AI-AO.vi (Help » Find Examples » Hardware Input and Output » DAQmx » Synchronization » Multi-Function).  This uses a digital start trigger to ensure that both the analog output and input tasks start at the same time.  You will also need to ensure that both tasks are using the same sample clock source at the same rate.  This can be accomplished by wiring a control to the sample clock source pin of the DAQmx Timing.vi and using the same control for both rates.  I have attached a picture below that demonstrates how I modified the above example with these controls.



I hope this helps,
Paul C.


Message Edited by Paul C. on 12-07-2007 11:31 AM
0 Kudos
Message 2 of 4
(2,775 Views)
Thanks for the help.

I'm having some trouble with the time stamping issues.  The genrated signal is fine and starts at t=0 but the aquired signal starts at some HUGE number.

how do I sync the time stamps?


here's the VI

0 Kudos
Message 3 of 4
(2,737 Views)
Hi Mrochon,

I believe you might be looking at the wrong timestamp information.  The timestamp of the generation cannot be clearly identified.  The timestamp of the waveform created will not be the same as the one after the generation has started.  The timestamp is typically taken by using t0 (the start time) equal to the system time, dt (time between samples), and the total number of samples.  If we arbitrarily assume that t=0 to start, then they would always be synchronized.  In regards to the analog input, timestamps with our DAQmx read function are grabbed from the system time after you do your first DAQmx read.  In addition to all this,  I would like to state that the analog output and analog input task are actually starting nearly the same time.  The delay betweeen when the trigger is received and the task is started is on the nanosecond scale.   You could write an analog output directly into the analog input module and you should see the timestamps for the samples generated.  However, the analog input samples will likely be 1 sample behind considering taking and generation a sample on the same rising edge might cause a missed sample.

I hope this helps,
Paul C.
0 Kudos
Message 4 of 4
(2,719 Views)