beautypg.com

6 calculating checksums, Calculating checksums – KEYENCE N-410 User Manual

Page 150

background image

A-14

A

p

p

endi
ces

6

Calculating Checksums

A checksum can be appended to read data as it is being transmitted (The checksum will not be
appended to commands or replies).
The checksum allows you to check if RS-232C communications have become corrupted. By
using the PASS/RTRY or ACK/NAK protocols, an automatic RTRY or

can be sent if the

checksum does not match. Settings should be handled through "Protocol settings" on the setting
software (This cannot be done when using a PLC link).

Checksum calculation range and location
The checksum is calculated using all characters that are not a part of the header or the delimiter
and is then appended immediately after the delimiter.

CC= checksum (2 ASCII characters)

• When an ID number is appended

• When an ID number is not appended

NAK

P mm -

Header

Read data

%

Delimiter

cc

P

01

-

Header

ERROR

%

Delimiter

cc

nnnn

0009

Header

Read data

Delimiter

cc

nnnn

Header

AB12

Delimiter

cc

0004

Header

AB12

Delimiter

cc

0004