Converting and Calibrating CompactRIO Analog Input Values (FPGA Interface)

NI CompactRIO Device Drivers Help

Edition Date: December 2017

Part Number: 373197L-01

»View Product Info
Download Help (Windows Only)

Set the Calibration Mode to Calibrated in the C Series Module Properties dialog box for an analog input module if you want the FPGA I/O Node to return calibrated, fixed-point data for the module. If you set the Calibration Mode to Raw, the FPGA I/O Node returns uncalibrated, binary values for the following analog input modules:

If you set the Calibration Mode to Raw, you must convert the binary values into meaningful engineering units and apply calibration constants to achieve more accurate results. You must convert and calibrate these values in the host VI.

Note Note  After you convert the binary values to engineering units for the NI 9217, you can also convert the nominal resistance values into temperature values.
Note Note  The binary data returned by some modules is already calibrated. Refer to the topics listed in the following table for information about converting values into engineering units:

Module Link for More Information
NI 9202 Converting NI 9202 Data
NI 9207 Converting NI 9207 Data
NI 9208 Converting NI 9208 Data
NI 9211 Converting NI 9211 Data
NI 9212 Converting NI 9212 Data
NI 9213 Converting NI 9213 Data
NI 9214 Converting NI 9214 Data
NI 9219 Converting NI 9219 Data
NI 9224 Converting NI 9224 Data
NI 9228 Converting NI 9228 Data
NI 9231 Converting NI 9231 Data
NI 9242 Converting NI 9242 and NI 9244 Data
NI 9244 Converting NI 9242 and NI 9244 Data
NI 9250 Converting NI 9250 Data
NI 9251 Converting NI 9251 Data

Using a VI to Convert and Calibrate Values

For the NI 9205, you can also refer to the Binary to Nominal Polynomial (Host) VI in the labview\examples\CompactRIO\Module Specific\NI 9205\NI 9205 Linearization Coefficients\NI 9205 Linearization Coefficients.lvproj for an example of using the straight-line conversion algorithm along with the NI-MCal linearization correction to convert binary analog input values to calibrated engineering units. You can use the Binary to Nominal Polynomial (Host) VI as a subVI in the host VI.

For the NI 9206, you can also refer to the Binary to Nominal Polynomial (Host) VI in the labview\examples\CompactRIO\Module Specific\NI 9206\NI 9206 Linearization Coefficients\NI 9206 Linearization Coefficients.lvproj for an example of using the straight-line conversion algorithm along with the NI-MCal linearization correction to convert binary analog input values to calibrated engineering units. You can use the Binary to Nominal Polynomial (Host) VI as a subVI in the host VI.

Using an Equation to Convert and Calibrate Values

You can use the following equation in the host VI to convert binary analog input values to calibrated engineering units:

Input Engineering Units = (Binary Value × LSB WeightOffset)*

where Binary Value is the signed or unsigned value returned by the FPGA I/O Node
LSB Weight is the value returned by the LSB Weight property
Offset is the value returned by the Offset property.

The units of LSB Weight and Offset differ per module. Refer to the reference topic for the module you are using for the LSB Weight and Offset units. You can find the reference topic for the module by navigating on the Contents tab to FPGA Module»CompactRIO Reference and Procedures»Analog Input Modules»NI 9xxx.

To convert to calibrated engineering units, use the FPGA I/O Property Node to read the LSB Weight and Offset properties. If you do not want to read the LSB Weight and Offset values from the module, you can convert to uncalibrated engineering units by using the following values for Offset and LSB Weight:

Offset = 0

LSB Weight = Typical Input Span ÷ 2ADC Resolution 

where Typical Input Span is the value for the module in the table below
ADC Resolution is the ADC resolution value in the hardware documentation for the module

ModuleTypical Input Span
NI 920121.06 V
NI 9203 21.56 mA (unipolar), 43.12 mA (bipolar)
NI 920520.8 V
NI 920621.5 V
NI 921520.8 V
NI 9216100 Ω RTD
NI 9217100 Ω RTD
NI 9218Varies by mode
NI 922020.8 V
NI 9221125 V
NI 922221.2 V
NI 922321.2 V
NI 9225850 V
NI 92261000 Ω RTD
NI 922729.954 A
NI 9229125.28 V
NI 923063 V
NI 923263 V
NI 923410.2 V
NI 923552.6 mV/V
NI 923652.6 mV/V
NI 923750 mV/V
NI 9238 1.25 V
NI 923921.04 V
NI 924662.5 A
NI 9247294 A
NI 93815 V

*When converting and calibrating data acquired from the NI 9203 in ±20 mA range, the equation is:

Input Engineering Units = ((Binary Value – 32768) × LSB WeightOffset)

When calculating engineering units for the NI 9203 in ±20 mA range, Offset = 20 mA.

WAS THIS ARTICLE HELPFUL?

Not Helpful