Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronizing 2 devices VC++ (removing delay between 2 different devices)

Hi,
 
I have two PCMCIA devices:
NIDAQ 6062E measuring 3 channels
NIDAQ 6036E measuring 6 channels
 
and they are both hooked up via PCMCIA slots on my laptop. I had originally started with one, confirmed it worked (and channels all seem to measure at the same time), and now I have the 2nd one in, and it also is able to pick up data similarly. However, I do notice a delay between the 2 devices. At the moment in my code (VC++) each DAQ card is a seperate entity, and I am calling 2 read statements, one for each card.
 
I am interested in starting both devices at the same time, and then acquiring synchronized data at 1000Hz. I've been looking at documentation and some help forums, but I've been unable to find any help in terms of how to code it in VC++.
 
I'm sure I can't be the only one who's done this before; Any help would be appreciated. Thanks,
 
Mike Y.
Harvard BioRobotics Lab


Message Edited by mike2079 on 07-09-2008 05:08 PM
0 Kudos
Message 1 of 4
(6,858 Views)

Hi mike2079,

I would suggest looking at the Synchronization DAQ examples that can be found at: \Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\. There you will find Multi-Device Synchronization examples. Have a look at the AI Finite Acquisition example and hopefully that will be a good start. Please let us know if you have more specific questions.

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(6,831 Views)

Thanks Ana,

I found the example code for synchronization of 2 devices. I have used it as a template and have only changed a few lines in it to test my setup. When I try to run my program, I get the following error.

"DAQmx Error: No registered trigger lines could be found between the devices in the route.

If you have a PXI chassis, identify the chassis correctly in MAX, and make sure it has been cofigured properly. If you are using PCI devices, make sure they are connected with an RTSI cable and that the RTSI cable is registered in MAX. Otherwise, make sure there is an available trigger line on the trigger bus shared between the devices."

I'm using two PCMCIA cards --- I am a confused as to what they are trying to tell me. I know in MAX the devices are individually recognized, but I am not sure what they mean by trigger line and trigger bus with respect ot my set up.

Any help would be appreciated, thanks

Mike

0 Kudos
Message 3 of 4
(6,807 Views)
Hi Mike,

Since you are using PCMCIA cards, there is no inherent way for the synchronization signals to be passed between the two cards. One way to synchronize them will be to share a sample clock using the DAQmxSetExportedSampClkOutputTerm() function and export the signal to a digital line on the card. This line can be physically connected to a digital line on the second card where the clock source can be set to that digital line. The same can be done for the trigger if you choose to use one. The rest of the example should be applicable for what you are trying to do.

Regards,
Kent
Applications Engineer
0 Kudos
Message 4 of 4
(6,793 Views)