Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample and generated clocks out of phase

Hi,

I am using two PXIe 6368 to acquire analog signals. I am using LabVIEW 2014 x64. I am sampling analog signals at 2MHz. I have used the automatic synchronization provided by DAQmx between the cards and I am getting repeteadly leass than 4ns delay between the sample clocks of the two boards and no jitter on both clocks and in between clocks. Very impressive. I am also generating a 2MHz clock using an onboard counter. I made sure that the counter uses the same reference clock as the analog input. But I can't get the analog input 2MHz sample clock and my counter generated 2MHz clock to be in phase. Worst of all, the phase delay between the two clocks vary between software restart. Could you please guide me on how to get them to be in phase?

Thanks,

DV

0 Kudos
Message 1 of 3
(3,990 Views)

In addition to a shared reference clock, you'll need to use a start trigger to ensure the counter output starts synchronously with the AI task.

 

It's slightly more complicated in your case--with multiple X Series devices in the AI task, DAQmx will use trigger-skew correction (also referred to as Master-slave synchronization in some places, see this document).  So rather than just using the AI start trigger signal, you should also configure the counter to use trigger skew correction by setting the sync type to "slave"--this will sync the trigger with PXIe_Sync100 as is being done implicitly in the AI task.  Here is an example (please wire the error terminals if you use it):

 

AI_Counter_Sync.png

 

 

You might have to adjust the initial delay on the counter task or the delay from start trigger on the AI task--these parameters have minimum values (I believe 2 timebase ticks each... so it might be OK without explicitly setting them) and are adjustable in 10 ns resolution.

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 3
(3,967 Views)

I forgot to mention--you will need to start the counter task in software before the analog task for it to work correctly.

 


Best Regards,

John Passiak
0 Kudos
Message 3 of 3
(3,963 Views)