beautypg.com

Checksum calculation – Kistler-Morse KM STXPlus User Manual

Page 23

background image

APPENDIX B: KISTLER-MORSE

®

PROTOCOL SERIAL COMMANDS

Table B-2. Definitions of Characters in Command Strings.

CHECKSUM CALCULATION

The 1-byte checksum is calculated by adding the hex values of all ASCII characters between the
start of message character ‘>’ or acknowledge character ‘A’ and the checksum character ’ss.’
Overflows from the addition are ignored.

Request

To request gross engineering units (such as weight) from an STXplus, the command is:
>aaWssr

If the STXplus’s address is ‘3’, the command is:
>03Wssr

Calculating the checksum ‘ss’ as the sum of the Hex values of all characters between ‘>’ and’ss’:
03W ASCII = 30 Hex + 33 Hex + 57 hex = BA Hex
‘0’ ‘3’ ‘W’

Therefore, the ASCII string transmitted to the STXplus is:
> 0 3 W B A CR
3E 30 33 57 42 41 0D Hex

B-4