KEYENCE N-400 User Manual

Page 144

Advertising
background image

Appendices

136

Appendices

Convert the calculated hexadecimal number into an ASCII code in two digits. The
result obtained is the checksum.
Therefore, the checksum for the above example is “cc = 59 (35h 39h).

Example:

Exclusive OR calculation formula
Calculate the numbers of each bit, referring to the following formula:

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0

*

+ : Operator of Exclusive OR

Conversion from hexadecimal number into binary number
To convert ASCII codes into binary numbers, refer to the following table.

Tips

Hexadecimal number

0

1

2

3

4

5

6

7

Binary number

0000 0001

0010 0011 0100

0101 0110

0111

Hexadecimal number

8

9

A

B

C

D

E

F

Binary number

1000 1001

1010 1011 1100

1101 1110

1111

Header % P 15

CC

Delimiter

ERROR

Header

CC Delimiter

1234

Result:
CC=04

CC=04

Advertising