Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What commands are required for timebase synchronization?

I want to use timebase synchronization for the analogoutput on two boards. The output channels will run at very different sample rates (but be integer multiples of each other), so clock synchronization won't do.

Physically, I prefer to use RTSI (specifically RTSI7) to synchronize the two boards' timebases.

However, I find that the following two commands don't work to synchronize Dev1 and Dev3 (which are a 6110 and 6713, respectively), although both routing commands work properly.
DAQmxConnectTerms("/Dev1/20MHzTimebase","/Dev1/RTSI7",DAQmx_Val_DoNotInvertPolarity);
DAQmxConnectTerms("/Dev3/RTSI7,"/Dev3/MasterTimebase",DAQmx_Val_DoNotInvertPolarity);
I then added the following commands, pertaining to the task associated with Dev3:
DAQmxSetTimingAttribute(gTaskHandle2, DAQmx_SampClk_Timebase_Src, "RTSI7");
DAQmxSetTimingAttribute(gTaskHandle2,  DAQmx_SampClk_Timebase_Rate, 20e6);

This doesn't solve the problem. I am able to see that the 20MHz clock is correctly being exported on RTSI7 from Dev1, immediately after the first DAQmxConnectTerms command is executed. So, the exporting is fine. I just haven't figured out what the necessary/sufficient commands are to import a timebase on RTSI7 such that the board's internal clocks use it, rather than their own 20MHz oscillator.

Note that I would prefer a solution which is entirely programmatic, and does not rely on MAX.

Any help would be greatly appreciated.


Vijay Iyer
Janelia Farm Research Campus
Howard Hughes Medical Institute





0 Kudos
Message 1 of 2
(2,902 Views)
Hi Vijay,

You should only need to the following two commands to set the timebase for your slave card assuming that you have the RTSI cable configured (if these are PCI cards).

DAQmxSetTimingAttribute(gTaskHandle2, DAQmx_SampClk_Timebase_Src, "/Dev1/20MHzTimebase");
DAQmxSetTimingAttribute(gTaskHandle2,  DAQmx_SampClk_Timebase_Rate, 20e6);


In addition, a trigger is required to synchronize these two tasks if you also wanted them to start at the same time, just sharing the timebase will not be enough. For more information on timing and synchronization, you can check out this article.

Regards,
Kent
Applications Engineer
Message 2 of 2
(2,881 Views)