Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing multiple DAQ cards at different sampling rates.

Solved!
Go to solution

I am having difficulty synchronizing 3 DAQ cards with different sampling rates. I am using 2 PXI-6259 boards set for 10,000 samples/sec and 1 PXI-6221 board to interface to my SCXI modules at 10 samples/second. The problem I have discovered is the time associated with the waveforms from the PXI-6221. When I run the code on a development computer utilizing virtual devices in MAX it operates as expected. When I run the same code on real hardware, the clock is running approximately 25X faster than normal. I have attached the code and the config I am using.

 

Any ideas?

 

 

0 Kudos
Message 1 of 3
(3,410 Views)
Solution
Accepted by topic author NNS-CAO

Hi NGNN CAO,

 

First let me say that your code looks very nice!

 

 

The issue is that you are using the fast sample clock for the device that is supposed to be slow:

 

2010-03-25_152013.png

 

 

Even though you specify the rate as 10 Hz, the clock itself is still at 10kHz (specifying the rate just allows the DAQmx Driver to figure out buffer size etc. and does not actually change the rate of your external sample clock--however, it does change the rate of the simulated device). 

 

 

My recommendation for synchronizing the devices would be to use the built-in PLL and lock to the 10 MHz reference clock of your PXI chassis.  Your devices would still share a start trigger but each would generate its own sample clock based off of its timebase which is locked to the 10 MHz Reference.

 

The code would look something like this:

 

2010-03-25_153335.png

 

 

I hope this helps, let me know if you have any questions!

 

 

Best Regards,

John Passiak
Message 2 of 3
(3,401 Views)

Thank You John P. Your solution works well.

 

I think the problem was my lack of understanding the difference between the ref clock and the source clock.

 

Smiley Very Happy

0 Kudos
Message 3 of 3
(3,379 Views)