EasyManua.ls Logo

Brooks Polycold MaxCool 2500L - Checksum Calculation

Default Icon
250 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Host Commands Polycold Cryochiller
Command Format Installation and Operation Manual
Brooks Automation
7-4
214072 Revision B
Checksum Calculation
Each command must end in a valid checksum. For heavy usage, it s recommended that the checksum
be calculated using a program/script/macro.
The checksum algorithm is defined as follows:
Perform the 8 bit sum of all the ASCII characters sent in the data field (with the most significant bit
cleared to 0, ignore parity). This is performed on the first character following the ‘$’ up to the last
data character before the checksum and Carriage Return (CR)
C Language example for checksum calculation:
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Function: CtiChkSum
// Purpose: Calculate the checksum for a given NULL terminated
// command.
unsigned char CtiChkSum (unsigned char * pCommand)
{
unsigned char checkSum = 0;
unsigned char
= 0;
do
{
checkSum = checkSum + (pCommand[charNum] & 0x7f);
charNum++;
} while ( pCommand[charNum] != 0 );
checkSum = 0x3f & (checkSum ^ (checkSum >> 6) );
checkSum = (0x30 + checkSum) & 0x7f;
return checkSum;
}// End Function CtiChkSum
Decimal Value 15 14 13 1211109876543210
Hex Bit Hex Digit 8 Hex Digit 7 Hex Digit 6 Hex Digit 5
Hex Value 0005
Binary Value 00 00000000000000
Decimal Value 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Table 7-2: Hexadecimal Bit Field Decoding
Hex Bit Hex Digit 4 Hex Digit 3 Hex Digit 2 Hex Digit 1

Table of Contents

Related product manuals