NEC RS-232C user manual Delimiter, Header, Message, Check code

Models: RS-232C

1 50
Download 50 pages 13.24 Kb
Page 6
Image 6
4.6 Delimiter

Following is an example of a Check code (BCC) calculation.

 

 

 

Header

 

 

 

 

 

 

 

 

Message

 

 

 

 

Check

Delimiter

SOH

Reserved

Destination

Source

Message

Message length

 

STX

OP code

OP code

 

Set Value

 

ETX

code

 

 

 

(BCC)

 

Address

Address

type

 

page

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

01

30

41

30

45

30

 

41

02

30

30

31

30

30

30

36

34

03

77

0D

D0

D1

D2

D3

D4

D5

 

D6

D7

D8

D9

D10

D11

D12

D13

D14

D15

D16

D17

D18

Check code (BCC) D17 = D1 xor D2 xor D3 xor … xor D14 xor D15 xor D16

=30h xor 41h xor 30h xor 45h xor 30h xor 41h xor 02h xor 30h xor 30h xor 31h xor 30h xor 30h xor 30h xor 36h xor 34h xor 03h

=77h

4.6 Delimiter

Header

Message

Check code

Delimiter

Packet delimiter code; ASCII CR(0Dh).

(6/50)

Page 6
Image 6
NEC RS-232C user manual Delimiter, Header, Message, Check code