IDEC FC6A-C16K1CE Communications Manual page 95

Fc6a series microsmart all-in-one type
Hide thumbs Also See for FC6A-C16K1CE:
Table of Contents

Advertisement

BCC (Block Check Character)
The FC6A Series MicroSmart has an automatic BCC calculation function to detect a communication error in incoming data. If a BCC
code is designated in the receive format of a RXD instruction, the FC6A Series MicroSmart calculates a BCC value for a specified
starting position through the position immediately preceding the BBC. It then compares the calculation result with the BCC code in
the received incoming data. The start position for the BCC calculation can be specified from the first byte through the 15th byte.
The BCC can be 1 or 2 digits.
When an end delimiter is not used in the RXD instruction, the BCC code must be positioned at the end of the receive format
designated in Source 1 device. When an end delimiter is used, the BCC code must be immediately before or after the end delimiter.
The FC6A Series MicroSmart reads a specified number of BCC digits in the incoming data according to the receive format to
calculate and compare the received BCC code with the BCC calculation results.
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 receive data.
Example: Received data consists of 17 bytes plus 2 BCC digits.
(1) Calculation start position = 1
1st
2nd
3rd
STX
"A"
"B"
(2) Calculation start position = 2
1st
2nd
3rd
STX
"A"
"B"
BCC Calculation Formula
BCC calculation formula can be selected from XOR (exclusive OR), ADD (addition), ADD-2comp, Modbus ASCII, or Modbus RTU.
Example: Incoming data consists of 41h, 42h, 43h, and 44h.
(1) BCC calculation formula = XOR
Calculation result = 41h ⊕ 42h ⊕ 43h ⊕ 44h = 04h
(2) BCC calculation formula = ADD
Calculation result = 41h + 42h + 43h + 44h = 10Ah → 0Ah (Only the last 1 or 2 digits are used as BCC.)
(3) BCC calculation formula = ADD-2comp
Calculation result = FEh, F6h (2 digits without conversion)
(4) BCC calculation formula = Modbus ASCII
Calculation result = 88 (ASCII)
(5) BCC calculation formula = Modbus RTU
Calculation result = 85h 0Fh (binary)
4th
5th
6th
"C"
"D"
"E"
BCC calculation range
4th
5th
6th
"C"
"D"
"E"
BCC calculation range
FC6A S
M
S
A
ERIES
ICRO
MART
LL
5: U
15th
16th
17th
18th
"0"
CR
LF
BCC
(2 digits)
15th
16th
17th
18th
"0"
CR
LF
BCC
(2 digits)
-
-O
T
C
IN
NE
YPE
OMMUNICATION
C
SER
OMMUNICATION
19th
BCC
BCC
19th
BCC
BCC
M
FC9Y-B1730
ANUAL
I
NSTRUCTIONS
5-19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents