Error responses, Calculating checksums – Hypertherm HPR800XD Auto Gas Rev.2 User Manual
Page 354

Appendix B – CnC interfACe protoCol
b-20
HPR800XD Auto Gas –
806500
Error responses
If there is a problem with the serial command, the module will return an error.
bad checksum
Return ID: 500
Description: The serial command received does not have the correct checksum.
Sample: >00091< – checksum should be 90, not 91
>50095< – bad checksum
bad command
Return ID: 501
Description: If the module does not recognize the command ID, it will return ID 501.
Sample >999AB< – unknown ID
>50196< – bad command
calculating checksums
Checksum is calculated on the command ID and command data only.
HELLO Command: >00090<
0 = 0x30 (ASCII value for number 0)
0 = 0x30
0 = 0x30
—————
Checksum = 0x30 + 0x30 + 0x30 = 90
READ INPUTS power supply response: >107000058<
1 = 0x31
0 = 0x30
7 = 0x37
0 = 0x30
0 = 0x30
0 = 0x30
0 = 0x30
—————
Checksum = 0x31 + 0x30 + 0x37 + 0x30 + 0x30 + 0x30 + 0x30 = 0x158
We only use the 2 least significant digits so the checksum = 58