12-12-2008 12:18 PM
I need to acquire samples from 2 seperate M series (PCI-6254) DAQs. My master device receives an 8 KHz sample clock on PFI0. Is it possible to root this clock from the master to the slave device over an RTSI cable?
I have looked through the forum and through the example programs but have only found examples in which the Master device's onboard clock is passed to the slave.
Is it possibe to synchornize the slave device to the Master device's external sample clock?
Thanks,
Ant1
Solved! Go to Solution.
12-15-2008 01:45 PM
Ant1,
Not only is it possible, we have a LabVIEW shipping example that does just that. You can locate the example by selecting Help » Example Finder. Then switch to the "Search" tab and search on "RTSI". There will be an example called "Multi-Device Synch-Shared Ext Sample Clk". This example shows the basic configuration of a LabVIEW program that is sharing an external sample clock over a RTSI cable. Please let me know if you are using something other than LabVIEW or need any help with the example.
12-15-2008 02:03 PM
Seth B,
Thanks for the quick response. I am not using labview. I'm using the nidaqmx under linux
and I am programming in ansi c. I did read the Multi-Device examples in the ansi_c example
section but I think they only show how to sychronize the onboard clocks.
Thanks,
Ant1
12-16-2008 09:39 AM
Ant1,
Fortunately, for the most part anything that can be done in DAQmx in LabVIEW can be done in ANSI C using the proper function calls. I've listed the steps below from the LabVIEW sample program, and edited them to remove anything not relevant to the DAQmx setup. I'm pretty sure this should work for you.
Steps:
1. Create an analog input voltage channel for both the Master and Slave devices.
2. Set timing parameters. For the Master, select the source for the external Sample Clock. For the Slave, set the source to the ai/SampleClock of the Master device . (Note: The Master's Sample Clock is automatically routed through the RTSI cable.)
3. For the Slave, set the Source for the trigger to the ai/StartTrigger of the Master device. This will ensure both devices start sampling at the same time. (Note: The trigger is automatically routed through the RTSI cable.)
4. Call Start Task to start the acquisition. (Note: Start the Slave task before the Master task.)
6. Read all of the waveform data.
7. Call Clear Task to stop the acquisition and clear the task.
So, essentially, set the slave task up the same way as you would for synchronizing onboard clocks, but set the master task up like you would for an external clock. This will automatically share the external clock and trigger over the RTSI line.
12-16-2008 10:30 AM
Thank you Seth,
That worked well.
Ant1