ICP DAS, ZT-2005-C8 User Manual, Version v1.0.1 Page 19
Copyright © 2014 by ICP DAS Co., Ltd. All Rights Reserved.
5.2.1
Checksum
Calculation the Checksum:
Sum the ASCII codes of all the characters contained in the command in addition
to the ‘CR’ terminator. The Checksum is the sum value expressed in
Hexadecimal format.
Example: Command
”
$012(CR)
”
Sum = ‘$’ + ‘0’ + ‘1’ + ‘2’ = 24h + 30h + 31h + 32h = B7h
Checksum = “B7”
DCON Command with Checksum =“$012B7(CR)”
Example: Response
”
!01200600(CR)
”
Sum = ‘!’ + ‘0’ + ‘1’ + ‘2’ + ‘0’ + ‘0’ + ‘6’ + ‘0’ + ‘0’
= 21h+30h+31h+32h+30h+30h+36h+30h+30h
= 1AAh
Checksum = “AA”
DCON Response with Checksum = “!01200600AA(CR)”
※
Note: The Checksum is the sum value expressed in capital letters.