PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly synchronize acquisition start times for multiple S-series and SC-series devices in a single PXI chassis?

Hello,

 

Running into what I hope is a fairly simple synchronization problem.  Sorry for the long description - just wanted to add enough detail to capture the question accurately.

 

Question 

How does one properly synchronize acquisition start times for multiple S-series and SC-series devices in a single PXI chassis?  Please also keep in mind that across the two device types we may want different sampling rates, so the idea is only to precisely synchronize the first sample times for the devices/channels.

 

What I Have Tried

1. First I tried specifying PXI_Clk10 as the reference clock source (RefClk.Src) using a DAQmx Timing Property Node with simulated PXI-6133 and PXI-4220 devices (used a property node instance for each task of course).  The result was "Error -200452 occurred at Property Node DAQmx Timing (arg 1)" with the explanation: "Specified property is not supported by the device or is not applicable to the task. Property: RefClk.Src".

 

2. Next I tried READING the master timebase source and rate from a DAQmx Timing Property Node for the PXI-6133's task, and then SETTING the master timebase source and rate using another DAQmx Timing Property Node for the PXI-4220's task.  Then I specify the PXI-6133's AI Start Trigger as the trigger source for the PXI-4220's task (using the - hopefully - relevant DAQmx VIs).  This doesn't produce an error, but I'm still seeing a little over 100ms difference in the first sample's time stamp.  To be clear, I am starting the PXI-4220's task first, and then the PXI-6133's task, so that the former is waiting for the latter to start and send the corresponding start trigger. The hope here is that using the same timebase will ensure the sample clocks for the devices are in phase, and any PLL action inside after sampling rate divide-downs (perhaps different across the two tasks/devices) will take care of ensuring that the first samples are aligned.

 

Here's a screenshot snippet of this attempt:

19705iE21247D2EE3D18EE

 

 

 

Follow Up Question

Supposing this is possible, my follow up question will be: Are there any restrictions when scaling this up to more devices?  For example, if I were to add additional S-series and SC-series devices to the mix, perhaps even additional PXI-6133 and PXI-4220 devices.  Still thinking single-chassis, but while we're at it if there are ideas about the multi-chassis case that would be interesting too 🙂

 

 

Thanks for any help out there!

 

 

 

 

 

0 Kudos
Message 1 of 4
(3,907 Views)

Hello,

 

Can you please post an image of your full code, or include the vi you are creating?  You seem to have the right set-up going here, and you can find more information about synchronization on these devices in the user manual of each: NI PXI-4220 User Manual and Specifications (Look at page 5-12 through 5-15)  S Series User Manual  (Look at page 10-4, less info here)

 

The only caveat of using greater than two devices is that you must choose a Master device and multiple Slave devices.  With two devices you have a single Master (in your case the 6133) and a single Slave (in your case the 4220).  When you add additional devices, one Master device must export its timebase and start trigger to all other Slave devices in the chassis. 

 

In the case of multiple chassis, you would typically need a timing and synchronization card.  PXI Timing and Synchronization

 

 

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 2 of 4
(3,884 Views)

Hi Kyle,

 

Thanks for getting back to me and sorry for the delay on my side.  Unfortunately I can't include the containing VI or additional code here 😞 

 

I was hoping that the description would clarify the goal and the attempts enough to distinguish here.  It's encouraging to hear that we're on the right track. 

 

Question: Can you verify that for those two devices, assuming a master device start trigger export and corresponding use as a start trigger for the slave device(s), that configuring the mastertimebase signal in that way will achieve the desired synchronization? 

 

It is a single-chassis consideration at this time - we're only at the multi-device level of complexity so far 🙂

 

Thanks again for your help here!

 

vm

0 Kudos
Message 3 of 4
(3,848 Views)

Hi vm,

 

The part of the code I'm most interested in is just the two parallel tasks, but expanded out to show the creation of the task all the way to the end where the task gets cleared.  I understand if you cannot provide that code.

 

For single-chassis multi-device synchronization, you need a synchronized timebase and start trigger.  By exporting and using an external timebase on the slave device from the master, you will achieve proper phase locking for your measurements.  By exporting the start trigger and triggering the slave task to start off of it, you verify that each acquisition begins at the same time.  One thing to mention here is you will need to use data flow control to start the slave device first before the master device task begins. 

 

Have you tried exporting a sample clock and seeing if you can get synchronization in that respect?  I know its not your final application, but it may be a good intermediary step to validate that the path you are taking is correct.  If the timing is off using an exported sample clock/start trigger, then there is something missing in the setup. 

 

I hope you have the best of luck setting up the application!

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 4 of 4
(3,840 Views)