Power supply bl-u1 – KEYENCE BL-180 User Manual

Page 100

Advertising
background image

Power Supply BL-U1

94

Examples

To send

cc = 7A

To send

cc = 4B

To send

cc = 7E.

Point

Exclusive OR calculation formula

Calculate each bit using the following formula.

Conversion form hexadecimal number into binary number

Convert ASCII codes into binary numbers referring to the following table.

Example: Data to send is
[STX][008][01][P][cc][ETX]

0

0

8

0

1

P

1.

Convert each data bit to
ASCII code (Hex).

30h

30h

38h

30h

31h

50h

2.

Convert the ASCII code
to 8-bit binary.

0011 0000 0011 0000 0011 1000 0011 0000 0011 0000 0101 0000

3.

Calculate Exclusive OR
of each data bit.

0011 0000
0011 0000
0011 1000
0011 0000
0011 0000
0101 0000 Exclusive OR
0110 1001

4.

Convert the 8-bit binary
to hexadecimal data.

0110 1001

6

9

h

5.

Enter the result as [cc].

[cc] = 69

[STX]

008

01

C

cc

[ETX].

[STX]

013

11

ABC876

cc

[ETX].

[STX]

010

31

LON

cc

[ETX].

Hexadecimal

0

1

2

3

4

5

6

7

Binary

0000

0001

0010

0011

0100

0101

0110

0111

Hexadecimal

8

9

A

B

C

D

E

F

Binary

1000

1001

1010

1011

1100

1101

1110

111

1

0

,

0 =0

0

,

1 =1

1

,

0 =1

1

,

1 =0

,

Exclusive OR operator

Advertising