10-08-2012 08:59 AM
I have 6ea, PXIe-6358 cards in one chassie. It seems I can set up to acquire samples on all analog inputs at once under the same task but how can I be sure they are in sync? I would like them all to use the same sample clock. The only examples of syncing I have found have a seperate task for each card. I am on the latest version of Labview, DAQmx, NI chassie and 8133 embedded computer.
10-09-2012 06:34 PM
Hello bobausttex,
One good way to do this is to cascade the DAQmx Create Channel VIs. A good explanation of this is found on figure two in the following white paper:
http://www.ni.com/white-paper/11369/en
An example of this can also be found in the LabVIEW example files. Go to Help»Find Examples»Search. Enter the keyword "synchronization" and select the VI entitled "Analog input - Voltage and Thermocouple in a Single Task".
Hope this helps!
10-10-2012 02:41 PM - edited 10-10-2012 02:44 PM
Thanks Patrick,
I looked all this over and it sounds like on a multi device task that sync happens auto majiclly? Here is a quote from the text...
"Although the under-the-hood details of reference clock synchronization are complex, NI-DAQmx makes using this sophisticated synchronization technique easy. NI-DAQmx automatically performs reference clock synchronization (along with trigger skew correction) on supported devices anytime you create a multidevice task. This means that acquiring synchronized data from multiple devices is as simple as acquiring data from a single device."
If this is true great.
This does bring up a new problem for me though. I will open a new thread for it if I can not find the answer here but will mention it here for others.
I have several tasks running on the same card. I have two counters running, one making a free running single pulse to trigger several things and a second one taking the first counter output and delaying it. I also have the analog output producing waveforms. When ever I combine the devices analog inputs into one task I get error -89137 or that a specified route can not be satisfied. I will have to go find a work around for this?
10-10-2012 05:34 PM
I looked all this over and it sounds like on a multi device task that sync happens auto majiclly?
Yes, that should be true when you set it up on the same task, while cascading the create channel VIs.
10-10-2012 06:36 PM
Unless you need different channel settings (e.g. voltage ranges), you don't necessarily have to call multiple instances of DAQmx Create Channel. Something like this would work too:
As for the routing issue, the full text of the error message should give you more of a description about what route is being attempted and which routes are currently in use (it can be somewhat cryptic but would usually be helpful for people monitoring the forums).
However, I do believe I understand the problem you are seeing. Synchronization via a multidevice task will automatically configure the devices to use the 100 MHz oscillator from the PXIe chassis as a "Reference Clock" to ensure the clocks are phase-aligned (X series have an on-board PLL to achieve this). A device can only have one reference clock source, so if your AI task is trying to configure "PXIe_Clk100" and the other tasks are trying to configure "None" (which I believe should be the default) there will be a conflict.
Assuming this is indeed the issue, the fix would be to configure all of your tasks to use the same reference clock source. You may set (or read back) the reference clock source using a DAQmx Timing Property Node (if you need help with this let me know).
Best Regards,