Note:
The only exceptions are the poll message from the terminal controller, all ACK and NAK responses, and the DC1 response from the terminal when a file download is required.The 7526 DCT calculates the checksum and transmits two checksum characters (CS1, CS2). The terminal controller program may choose to strip off and ignore the checksum characters, however, it is recommended that the checksum be calculated, compared to the received checksum, and an ACK or data returned to the DCT (or a NAK if the comparison fails).
When transmitting to the terminal, the terminal controller program may replace the calculated checksum characters with two ASCII space characters, causing the DCT to bypass the checksum calculation.
Checksum characters are calculated as follows:
- From terminal controller.
Starting with the first character following the second address character (addr), each byte up to the checksum is added (dropping the carry). The resulting value is converted to two ASCII characters (0-F) and transmitted immediately prior to the ETX character.For example, the terminal controller requests the DCTs status:
=> STX, a, a, 1, 3, 1, ETXFrom terminal.
Starting with the first character following the STX character and ending before CS1, each byte up to the checksum is added (dropping the carry). The resulting value is converted to two ASCII characters (0-F) and transmitted immediately prior to the ETX character.For example, the DCT responds to the terminal controller's status request:
<= STX, 10000A 00B90, 5, D, ETXThe terminal responds with a NAK if the checksum it calculates does not match the checksum received from the terminal controller.