NI-9219 Vendor Configuration Extensions
- Updated2024-09-13
- 6 minute(s) read
NI-9219 Vendor Configuration Extensions
The following table lists the vendor configuration extensions for the NI-9219.
Index | Sub | Type | R/W | Description |
---|---|---|---|---|
0x2001 | 0 | ARR:U32 | — | Command List = 33 |
1 | R | Command Count = <1..32>, default = 32 | ||
2..33 | R/W | Configuration Command | ||
0x2002 | 1 | ARR:U32 | R | Error Status |
0x2005 | 0 | U32 | R/W | ADC Format |
0x2100 | 0 | ARR:U32 | Calibration = 168 | |
1 | R | Ch0 60 V Offset | ||
2 | R | Ch0 60 V Gain | ||
3 | R | Ch0 15 V Offset | ||
... | — | — | ||
42 | R | Ch0 Full-Bridge 7.8 mV/V Gain | ||
43 | R | Ch1 60 V Offset | ||
... | — | — | ||
0x2101 | 0 | ARR:U32 | External Calibration = 168 | |
1 | — | R | Ch0 60 V Offset | |
... | ... | ... | ... | ... |
NI-9219 ADC Format
The NI-9219 converts at different rates, and can specify different data formatting styles. This is determined by both the ADC Format field and corresponding fields in the setup commands. The following table describes the ADC Format field.
Bits | Field |
---|---|
31..24 | Reserved |
23..16 | Conversion speed in multiples of 10 mS |
15..8 | Reserved |
7..0 | ADC Data Formatting |
Standard values for ADC Format are:
- 0x0001000F, High Speed
- 0x000B000F, Best 60 Hz rejection
- 0x000D000F, Best 50 Hz rejection
- 0x0032000F, High Resolution
NI-9219 Error Status
When a channel over-current condition occurs on any of the channels of the NI-9219 (such as, configure channels in 4-wire resistance mode and do not connect a resistor to the channel), the firmware sets a bit in the lower nibble indicating the presence of this condition (LSB = ch0).
Errors are internally acknowledged on the cycle after the error is reported.
NI-9219 Calibration Data
The NI-9219 has four channels which each have 21 different operating modes and ranges. Each channel has an associated LSB weight, which is the number of volts per bit, and an offset, which is the number of volts per bit measured when the inputs are grounded.
The following table lists the operating modes and ranges, in the order they are defined in the calibration table for each channel.
Entry Number | Mode | Range |
---|---|---|
1 | Voltage | ±60 V |
2 | ±15 V | |
3 | ±4 V | |
4 | ±1 V | |
5 | ±125 mV | |
6 | Current | ±25 mA |
7 | 4-Wire Resistance | 10 kΩ |
8 | 1 kΩ | |
9 | 2-Wire Resistance | 10 kΩ |
10 | 1 kΩ | |
11 | Thermocouple | — |
12 | 4-Wire RTD | Pt1000 |
13 | Pt100 | |
14 | 3-Wire RTD | Pt1000 |
15 | Pt100 | |
16 | Quarter-Bridge | 350 Ω |
17 | 120 Ω | |
18 | Half-Bridge | ±500 mV/V |
19 | Reserved | — |
20 | Full-Bridge | ±62.5 mV/V |
21 | ±7.8 mV/V |
The calibration data is stored in a U32 array, though each offset field should be interpreted as a signed value.
Coefficient | Representation |
---|---|
LSB Weight | Unsigned |
Offset | Signed |
The NI-9219 returns calibrated 24-bit (padded to 32-bits) AI data for all modes and ranges.
Use the following formula to convert raw data into engineering units.
where b represents offset based on range of the device: such as, -60 for ±60 V voltage measurement range and m represents gain full-range/(224): such as, 120/(224) for ±60 V voltage measurement range.
NI-9219 Configuration Commands
There are eight configuration commands for the NI-9219. Eight configuration commands must be sent for each of the four channels, even if you are only using a subset of the four channels. Each of the eight configuration commands is 1 Byte. Each configuration command is followed by a data Byte, then by a CRC value, which is 1 Byte. Therefore, 3 Bytes × 8 commands × 4 channels = 96 command bytes (held in 32 entries in the object dictionary).
Data in the object dictionary is held in LSB format, so the value 0x12345678 is represented in memory as the series of bytes 0x78, 0x56, 0x34, 0x12. The following table shows the command word format.
Bits | Field |
---|---|
31..24 | Reserved |
23..16 | CRC |
15..8 | Configuration Data |
7..0 | Configuration Command |
U8 crcShiftReg = 0; for ( x = 0 ; x < 8 ; ++x ) { dataBool = ((0x80>>x) & configCommand) != 0; shiftBool = (0x01 & crcShiftReg) != 0; crcShiftReg /= 2; if (dataBool != shiftBool) crcShiftReg ^= 0x8C; } for ( x = 0 ; x < 8 ; ++x ) { dataBool = ((0x80>>x) & configData) != 0; shiftBool = (0x01 & crcShiftReg) != 0; crcShiftReg /= 2; if (dataBool != shiftBool) crcShiftReg ^= 0x8C; } crcShiftReg = crcShiftReg << 1; return crcShiftReg;
You must configure the conversion time, mode, range, and calibration gain/offset values for each channel on the NI-9219, regardless of whether you are using that channel.
Bits | Field | Description | |
---|---|---|---|
7..6 | Channel Number, <0..3> | — | |
5 | 0 | — | |
4..0 | Configuration Type | Configuration Type values: | |
Conversion Time | 0x1F | ||
Mode & Range | 0x01 | ||
Calibration Offset 2 (LSB) | 0x06 | ||
Calibration Offset 1 | 0x05 | ||
Calibration Offset 0 (MSB) | 0x04 | ||
Calibration Gain 2 (LSB) | 0x0A | ||
Calibration Gain 1 | 0x09 | ||
Calibration Gain 0 (MSB) | 0x08 |
NI-9219 Configuration Data
Configuration Value | Maximum Frequency | Conversion Time | Description |
---|---|---|---|
0x01 | 100 Hz/50 Hz (TC) | 10 ms/20 ms (TC) | High Speed |
0x08 | 9.09 Hz/8.33 Hz (TC) | 110 ms/120 ms (TC) | Best 60 Hz Rejection |
0x09 | 7.69 Hz/7.14 Hz (TC) | 130 ms/140 ms (TC) | Best 50 Hz Rejection |
0x0F | 2 Hz/1.96 Hz (TC) | 500 ms/510 ms (TC) | High Resolution |
Configuration Value | Mode | Range |
---|---|---|
0x00 | Voltage | 60 V |
0x01 | 15 V | |
0x02 | 3.75 V | |
0x03 | 1 V | |
0x04 | 125 mV | |
0x05 | Current | 25 mA |
0x06 | Resistance | 10K 4w |
0x07 | 1K 4w | |
0x08 | 10K 2w | |
0x09 | 1K 2w | |
0x0A | TC | TC |
0x0B | RTD | Pt1000 4w |
0x0C | Pt100 4w | |
0x0D | Pt1000 3w | |
0x0E | Pt100 3w | |
0x0F | Quarter-Bridge | 350 Ω |
0x10 | 120 Ω | |
0x11 | Half-Bridge | 1 V/V |
0x13 | Full-Bridge CJC | 62.5 mV/V |
0x14 | 7.8 mV/V | |
0x17 | CJC range |
Configuration 1: All Channels <ai0..ai3> for Voltage AI, ±15 V Range, High-Speed Mode (100 Hz Maximum Sample Rate).
Command Byte Value | Description |
---|---|
0x01 | Mode and Range Configuration Byte - Channel 0 |
0x01 | Data Byte |
0x46 | CRC value |
0x1F | Conversion Time - Channel 0 |
0x01 | Data Byte |
0xC6 | CRC value |
0x04 | Calibration Offset MSB - Channel 0 |
0x7F | Data Byte |
0x54 | CRC value |
0x05 | Calibration Offset Byte 2 - Channel 0 |
0xFF | Data Byte |
0xB6 | CRC value |
0x06 | Calibration Offset LSB - Channel 0 |
0x85 | Data Byte |
0x56 | CRC value |
0x08 | Calibration Gain MSB - Channel 0 |
0x6C | Data Byte |
0x1E | CRC value |
0x09 | Calibration Gain Byte 2 - Channel 0 |
0xAA | Data Byte |
0x4E | CRC value |
0x0A | Calibration Gain LSB - Channel 0 |
0xC1 | Data Byte |
0x32 | CRC value |
0x41 | Mode and Range Configuration Byte - Channel 1 |
0x01 | Data Byte |
0x64 | CRC value |
0x5F | Conversion Time - Channel 1 |
0x01 | Data Byte |
0xE4 | CRC value |
0x44 | Calibration Offset MSB - Channel 1 |
0x7F | Data Byte |
0x76 | CRC value |
0x45 | Calibration Offset Byte 2 - Channel 1 |
0xFF | Data Byte |
0x94 | CRC value |
0x46 | Calibration Offset LSB - Channel 1 |
0x86 | Data Byte |
0xE0 | CRC value |
0x48 | Calibration Gain MSB - Channel 1 |
0x6C | Data Byte |
0x3C | CRC value |
0x49 | Calibration Gain Byte 2 - Channel 1 |
0x76 | Data Byte |
0x50 | CRC value |
0x4A | Calibration Gain LSB - Channel 1 |
0x3C | Data Byte |
0xF6 | CRC value |
0x81 | Mode and Range Configuration Byte - Channel 2 |
0x01 | Data Byte |
0xCE | CRC value |
0x9F | Conversion Time - Channel 2 |
0x01 | Data Byte |
0x4E | CRC value |
0x84 | Calibration Offset MSB - Channel 2 |
0x7F | Data Byte |
0xDC | CRC value |
0x85 | Calibration Offset Byte 2 - Channel 2 |
0xFF | Data Byte |
0x3E | CRC value |
0x86 | Calibration Offset LSB - Channel 2 |
0xC8 | Data Byte |
0xC2 | CRC value |
0x88 | Calibration Gain MSB - Channel 2 |
0x6C | Data Byte |
0x96 | CRC value |
0x89 | Calibration Gain Byte 2 - Channel 2 |
0xB0 | Data Byte |
0xF4 | CRC value |
0x8A | Calibration Gain LSB - Channel 2 |
0x90 | Data Byte |
0x5E | CRC value |
0xC1 | Mode and Range Configuration Byte - Channel 3 |
0x01 | Data Byte |
0xEC | CRC value |
0xDF | Conversion Time - Channel 3 |
0x01 | Data Byte |
0x6C | CRC value |
0xC4 | Calibration Offset MSB - Channel 3 |
0x7F | Data Byte |
0xFE | CRC value |
0xC5 | Calibration Offset Byte 2 - Channel 3 |
0xFF | Data Byte |
0x1C | CRC value |
0xC6 | Calibration Offset LSB - Channel 3 |
0xD3 | Data Byte |
0xCA | CRC value |
0xC8 | Calibration Gain MSB - Channel 3 |
0x6C | Data Byte |
0xB4 | CRC value |
0xC9 | Calibration Gain Byte 2 - Channel 3 |
0xD8 | Data Byte |
0x56 | CRC value |
0xCA | Calibration Gain LSB - Channel 3 |
0x65 | Data Byte |
0xA0 | CRC value |