LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

sync usb 6008 and 9205 data

Hello,

 

I have a problem with a data time offset adquisition. 

 

I have a dac chassis 9172 with a 9205 AI (and two 9401 DI/DO) and out of the chassis I have a usb 6008 AI.

 

I'm using LabWindows. I have two tasks with same rate, continuous sampling. One task adquiring analog data from 9205 and other task adquiring analog data from 6008. And a thread reading both, like this:

 

StartTask(9205);

StartTask(6008);

while(1){

    ReadAnalogData(9205);

    ReadAnalogData(6008);

}

 

Over time, increases a time shift between 6008 data and 9205 data. Beeing 6008 data from the past.

 

I read different solutions for sync the two devices, like export the SampleClock to the USB 6008 using one 9401 or triggering the tasks's start of both with a digital line. 

 

If I increase the 6008 rate solve it? Any solution?

 

Thanks.

 

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

Hi diegoupc,

 

     Increasing the rate of the acquisition performed in theUSB 6008 won't solve the problem, you will have to export the analog acquisition sample clock from the USB 6008 into the cDAQ-9172 chassis through one of the NI 9401 modules. You may find the following links really helpful.

 

     Hope this helps,

David Oña
0 Kudos
Message 2 of 3
(3,057 Views)

Thanks David.

 

Then, I have to export the usb 6008 analog input internal clock and import into the cDAQ-9172 chassis through the NI 9401 module placed in the fifth or sixth slot (to access pfi chassis lines).The 9401 can be use for one more task (digital output task)? or only to import the clock?

 

I need a trigger to start the two tasks at the same time, correct?

If yes, I need one line connected from 6008 to 9401 module (to share the AI 6008 clock) and for the trigger... a line from a digital output (start trigger) connected to the 6008 and 9401.

Which pins I have to use to share the clock? PFI's?

 

And for the trigger, which inputs on 6008 and 9401? any digital input? or a specific input?

 

Can the same 9401 module send the start trigger for both? 

 

Thanks in advance.

Message Edited by diegoupc on 05-24-2010 08:43 AM
0 Kudos
Message 3 of 3
(3,021 Views)