Converting NI 9219 Data (FPGA Interface)
- Updated2025-12-16
- 3 minute(s) read
- Convert the fixed-point CJC data to binary CJC data.
- Convert the binary CJC data to temperature.
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. 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
Use the following equation in the host VI to convert the binary input values to engineering units for each channel:
Engineering Units[1]1 Engineering units are equivalent to the units of the mode input range listed in the NI 9219 hardware documentation on ni.com/manuals. = Binary Value × (Range High – Range Low) ÷ 224
- Binary Value is the value returned by the FPGA I/O Node.
- Range High is the upper value of the input range [2]2 Refer to the NI 9219 hardware documentation on ni.com/manuals 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.
- Range Low is the lower value of the input range.
- FALSE is equivalent to any voltage below the specified threshold.
- TRUE is equivalent to any voltage above the specified threshold.
- FALSE indicates a closed circuit.
- 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
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]] – (273.15 + OffsetConstant)
Refer to the National Institute of Standards and Technology (NIST) Monograph 175 thermocouple reference tables for more information about converting and adjusting thermocouple values.
1 Engineering units are equivalent to the units of the mode input range listed in the NI 9219 hardware documentation on ni.com/manuals.
2 Refer to the NI 9219 hardware documentation on ni.com/manuals 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.
3 The OffsetConstant is the typical temperature gradient between the CJC sensor and the thermocouple cold junction.