![IDEC OpenNet series Скачать руководство пользователя страница 235](http://html.mh-extra.com/html/idec/opennet-series/opennet-series_user-manual_617384235.webp)
17: U
SER
C
OMMUNICATION
I
NSTRUCTIONS
17-8
O
PEN
N
ET
C
ONTROLLER
U
SER
’
S
M
ANUAL
BCC (Block Check Character)
Block check characters can be appended to the transmit data. The start position for the BCC calculation can be selected
from the first byte through the 15th byte. The BCC, calculated in either XOR or ADD, can be 1 or 2 digits.
BCC Calculation Start Position
The start position for the BCC calculation can be specified from the first byte through the 15th byte. The BCC is calculated
for the range starting at the designated position up to the byte immediately before the BCC of the transmit data.
Example: Transmit data consists of 17 bytes plus 2 BCC digits.
(1) Calculation start position = 1
(2) Calculation start position = 2
BCC Calculation Formula
BCC calculation formula can be selected from XOR (exclusive OR) or ADD (addition) operation.
Example: Conversion results of transmit data consist of 41h, 42h, 43h, 44h, and 45h.
(1) BCC calculation formula = XOR
41h
⊕
42h
⊕
43h
⊕
44h
⊕
45h = 41h
(2) BCC calculation formula = ADD
41h
+
42h
+
43h
+
44h
+
45h = 14Fh
→
4Fh (Only the last 1 or 2 digits are used as BCC.)
STX
BCC calculation star t position can be selected from this range.
1st
“A”
2nd
“B”
3rd
“C”
4th
“D”
5th
“E”
6th
“0”
15th
CR
16th
LF
17th
BCC
18th
BCC
19th
BCC calculation range when star ting with the 1st byte of the data.
BCC
(2 digits)
STX
BCC calculation range
1st
“A”
2nd
“B”
3rd
“C”
4th
“D”
5th
“E”
6th
“0”
15th
CR
16th
LF
17th
BCC
18th
BCC
19th
BCC
(2 digits)
STX
BCC calculation range
1st
“A”
2nd
“B”
3rd
“C”
4th
“D”
5th
“E”
6th
“0”
15th
CR
16th
LF
17th
BCC
18th
BCC
19th
BCC
(2 digits)
“A”
(41h)
“B”
(42h)
“C”
(43h)
“D”
(44h)
“E”
(45h)
ASCII data
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]