NI 9144 User Guide and Specifications
|
© National Instruments
|
57
NI 9219 CRC Calculation
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;
NI 9219 Configuration Command
Whether you are using the channel or not, you must configure the Conversion Time, Mode,
Range, and Calibration Gain/Offset values for each channel on the NI 9219.
Note
You must first send calibration gain and offset values in MSB format. The
Conversion Time value must be the same across all channels.