56 CCR TM8100/TM8200 Computer-Controlled Data Interface (CCDI) Protocol Manual© Tait Electronics Limited April 2007Where:General characteristics of the message format worth noting are as follows:■ All characters in a message are printable ASCII■ Where numeric values are represented in ASCII-hex notation (twocharacters per byte), digits A...F are upper case■ The minimum length of a command packet is 5 characters; i.e. when[SIZE] = 00. For example, c003D is the CANCEL command which is5 characters.■ The maximum length of the [PARAMETERS] field is 32 characters, sothat the maximum length of the command packet is therefore37 ([SIZE]=“20”) characters2.4.2 Calculating [CHECKSUM][CHECKSUM] is calculated by applying the following algorithm:5. Take the modulo-2 sum of all message bytes preceding[CHECKSUM].6. Retain bits 0...7, discarding any higher order bits resulting from thesummation.7. Form the two's complement of the remainder.8. Convert the binary number into two ASCII-hex digits, MSD first.Checksum Example s0D050800TESTHi!DA9. Take the modulo-2 sum of all message bytes preceding[CHECKSUM].■ s = 73h, 0 = 30h, D = 44h etc. therefore the modulo-2 sum is:73 + 30 + 44 + 30 + 35 + 30 + 38 + 30 + 30 + 54 + 45 + 53 + 54+ 48 + 69 + 21 = 426hParameter Value[IDENT] is the message identifier. Identifiers are single ASCII characterswhich categorise the message type[SIZE] is the number of characters which make up the [PARAMETERS]field. [SIZE] is an 8-bit number expressed in ASCII-hex notation(two characters)[PARAMETERS] is an optional field, depending upon the command. Parametervalues are generally character strings unless explicitly statedotherwise. Parameter type is dependent upon the command -there is no explicit type definition.[CHECKSUM] s an 8-bit checksum of the [IDENT], [SIZE] and [PARAMETERS]fields. It is expressed in ASCII-hex notation (two characters) is the packet terminator. It is the ASCII “carriage return”character (0Dh).