Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do ensure that my analogue (current) inputs and outputs are comparable?

I am Writing 4-20 mA current using an SCXI_1124 and Reading current collected on an SCXI_1102. I keep doing this until they match. The SCXI_1124 has a handy SCXI_AO_Write function, but there is no SCXI_AI_Read equivalent. Whats the best way to read from the SCXI_1124 to ensure that the results is comparable? (Using C/C++ with the NiDAQ library).
0 Kudos
Message 1 of 3
(2,666 Views)
First, I don't interface with my NI-DAQ via C/C++; I use LabVIEW. But the calls to NI-DAQ should be the same no matter what language you use.

Lets first start by saying the SCXI-1124 is a voltage/current output, and can go from 0-20mA output. The 1124 has a handy function for writing current because it puts the card into current output mode for you.

I'm assuming that your question is how to you read current from the SCXI-1102, not the SCXI-1124. National Instruments sells a current resistor pack that is a bunch of 249 ohm resistors which can be soldered into the card, making those channels current input channels. The range of the channel would then be (10V / 249 ohms) or about +/- 40 mA. Therefore, you can use the standard analog input examples. In Lab
VIEW, you would just make the channel input "sc1!mdx!0:7", where sc1! is the scxi ID (default=1), mdx! is the slot where the module is located (x=slot #), and 0:7 is the channel (this would be channels 0-7. 0 would be channel 0)

Once you read the voltage, since V=IR, then I=V/R and your current would be V/249. Since your SCXI-1124 output is done in mA, multiply your input by 1000 to get mA. Then the 1102 input and 1124 output should be comparable (same units).

Mark
0 Kudos
Message 2 of 3
(2,666 Views)
I have a similar problem. I could not get solution to work for me.
0 Kudos
Message 3 of 3
(2,666 Views)