07-25-2020 10:51 AM
I have two digital pattern cards, one in a desktop (PCI 6534) and one in a PXI chassis (PXIe 6535) that I would like to synchronise. I am using DAQmx in c#.
I have been trying to use the one in the desktop as the master card and then configure the second one to start outputting after a trigger from the first. This seems to be broadly working now. However, the timing of the pattern on the second card jumps around by up to 10 us (the period of my sample clock on both cards). To remedy this I think I need to make them share a sample clock.
How do I do this? Ideally I would like to somehow use the 10 MHz reference from the back of the PXI chassis to synchronise the PCI card with everything in the chassis. I have tried to set task.Timing.ReferenceClockSource but I always get the error "Specified property is not supported by the device or is not applicable to the task.". I have also tried configuring the PCI 6534 to output its SampleClockTimebase to PFI2 (using ConnectTerminals) but that is at 20 MHz so I'm not sure what it is useful for.
Any advice greatly appreciated.
L.
07-27-2020 08:47 AM
When you sync with trigger alone, tiny tolerances in the devices' internal clock frequencies will cause sample timing to slowly drift apart.
I tend to rely on sync via shared sample clocks alone whenever possible, triggers are often unnecessary. So whatever physical wiring & config you had in mind for trigger signal, ref clock signal, or sample clock timebase signal -- just do this with the sample clock itself from the PXI task. And then make sure you start the PCI task before starting the PXI task.
One little nuance, at least in the LabVIEW API: the DAQmx property name to query on the PXI side would be SampleClock.Terminal. The DAQmx property name to write to on the PCI side would be SampleClock.Source.
-Kevin P