Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Run 2 PCI-6143S boards simultaneously from DAQmx

Hallo, We plan to buy 2 PCI-6143 boards and connect them via a RTSI cable internally to run 16 channels simultaneously.

 

Could anyone please give me a sample on how to set this up using the latest DAQmx driver, and please in C++ syntax, not VIs 🙂

 

-cpede

 

0 Kudos
Message 1 of 2
(2,923 Views)

Hi cpede,

 

This should actually be pretty easy for you to do, as DAQmx supports multi-device tasks for this device.  The first thing you'll need to do is let DAQmx know about the presence of the RTSI cable so that it can route signals between the two devices.  To do this, open Measurement and Automation Explorer, right click on 'Device and Interfaces', and select 'Create New'.   From the pop-up window, select RTSI cable.  This should cause the RTSI cable to show up in your list of devices.  Next, right click on the RTSI cable and select 'Add Device to RTSI Cable', then select each of your devices.  Once this configuration is done, DAQmx will be able to route signals over this cable to synchronize your devices.

 

The next step really should be as easy as running one of the shipping examples, found at:

Start->Programs->National Instruments->NI-DAQ->Text Based Code Support->ANSI C Examples. Select Analog In->Measure Voltage->Acq-Int Clk.  Here, in Acq-IntClk.c, you can simply change the following line:

DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));

to

DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0:7,Dev2/ai0:7","",DAQmx_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL));

 

In addition you'll need to make sure that you size the 'data'array to account for all your channels.  Once you've done this, DAQmx will handle routing the necessary signals to synchronize these to devices.  DAQmx Read will return data from both devices.

 

This can also be done by explicitly creating two tasks, sharing a start trigger and sample clock between the devices (essentially doing what DAQmx does implicitly in a multi-device task).  If you are interested in doing things yourself, have a look at the 'Synchronization->ContinuousAI', or 'Synchronization->FiniteAI' examples.

 

Hope that helps,
Dan

 

PS... You should be able to create two simulated 6143s and a simulated RTSI cable to play around with this.

Message 2 of 2
(2,914 Views)