08-06-2015 01:48 PM
I've been using the 6229 board for a while doing voltage measurements and digital I/O, but now I get to work with 4-20 mA inputs.
I'm using DAQmxCreateAICurrentChan to configure the channel/create the task. After a while I figured out the 6229 does not have an internal shunt resistor so I'll use an external 250-ish ohm resistor. With the channel configured as RSE I got the sotware to complie and run, but it really seems like this should be a differential channel. If I try that, using DAQmx_Val_InputTermCfg_Diff, I get errors saying this value is not supported.
It really seems like I need to be doing this in differential mode, else, what inputs do I connect the shunt resistor to?
And as long as I'm thinking I need a diff channel, why not just use a differential voltage channel, or two RSE voltage channels, hook up the shunt resistor, and calculate the current myself?
Also, when setting up a current channel, are Min and Max specified as voltages or current?
Sorry if I sound so clueless. The manuals are great at defining things and I've ben able to do a lot using them, but sometime a little more context helps.
Mike
P.S. The 4-20 mA devie I am using is - http://www.dwyer-inst.com/Product/Pressure/DifferentialPressure/Gage-Switches-Digital/SeriesDH3/Orde...
08-06-2015 01:55 PM
You will need to measure VOLTAGE, not current. What I have done for something similar is create a DAQmx Scale which does the calculation to current for me. So you use a voltage task with a scale that will give you the results in Amps (or mA if you so desire). Your max and min should be based on the values AFTER the scale.