Converting NI 9219 Data (FPGA Interface)

CompactRIO

Converting NI 9219 Data (FPGA Interface)

Set the Calibration Mode to Calibrated in the C Series Module Properties dialog box for the NI 9219 if you want the FPGA I/O Node to return calibrated, fixed-point data from the module. If you set the Calibration Mode to Calibrated and an NI 9219 channel is in Thermocouple mode, you must convert the fixed-point CJC data to binary CJC data and then convert the binary CJC data to temperature. Set the Calibration Mode to Raw if you want the FPGA I/O Node to return binary values from the module that are calibrated based on the range of the selected mode. If you set the Calibration Mode to Raw, you must convert the binary values to meaningful engineering units. If you set the Calibration Mode to Raw and an NI 9219 channel is in Thermocouple mode, you also must convert the binary CJC data to temperature. You must convert these values in the host VI.

Using a VI to Convert and Adjust Binary Values

Refer to the NI 9219 Binary to Nominal VI in the labview\examples\CompactRIO\Module Specific\NI 9219\NI 9219 Scaling Utility directory for an example of converting and adjusting binary input values. You can use the polymorphic NI 9219 Binary to Nominal VI as a subVI in the host VI to convert and adjust binary input values.

Using an Equation to Convert Binary Values

You can use the following equation in the host VI to convert the binary input values to engineering units for each channel:

Engineering Units* = Binary Value × (Range HighRange Low) ÷ 224

where Binary Value is the value returned by the FPGA I/O Node
Range High is the upper value of the input range
Range Low is the lower value of the input range.

*Engineering units are equivalent to the units of the mode input range in the NI 9219 Operating Instructions and Specifications.

Refer to the NI 9219 Operating Instructions and Specifications for the input ranges for each mode. For modes that have only one input range value, use 0 as the lower value of the input range.

Digital In

Digital In mode returns a Boolean value, where FALSE is equivalent to any voltage below the specified threshold and TRUE is equivalent to any voltage above the specified threshold.

Open Contact

Open Contact mode returns a Boolean value, where FALSE indicates a closed circuit and TRUE indicates a open circuit.

Using an Equation to Convert Fixed-Point CJC Data

You can use the following equation in the host VI to convert fixed-point CJC data to binary CJC data:

Binary CJC Data = (Fixed-Point CJC Data) ÷ (0.250 ÷ (224 – 1))

Using Equations to Convert Binary CJC Data

You can use the following equations in the host VI to convert binary CJC data to temperature:

Calculate the resistance of the thermistor:

RT = 10000 ÷ [(216 ÷ Binary CJC Data) – 1]

Calculate the CJC temperature:

T = [ 1 ÷ [A + B(ln(RT)) + C(ln(RT))3]] – 274.65

where T = temperature in °C
A = 1.2873851 × 10-3
B = 2.3575235 × 10-4
C = 9.4978060 × 10-8

Refer to the National Institute of Standards and Technology (NIST) Monograph 175 thermocouple reference tables for more information about converting and adjusting thermocouple values.