IDEC FC6A-C16K1CE Communications Manual page 96

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

Advertisement

5: U
C
SER
OMMUNICATION
Conversion Type
The BCC calculation result can be converted or not according to the assigned conversion type as described below:
Example: BCC calculation result is 0041h.
(1) Binary to ASCII conversion
0041h
D0010:
(2) No conversion
D0010:
0041h
BCC Digits (Bytes)
The quantity of digits (bytes) of the BCC code can be selected from 1 or 2.
Example:
(1) BCC digits = 2
(2) BCC digits = 1
Comparing BCC Codes
The FC6A Series MicroSmart compares the BCC calculation result with the BCC code in the received incoming data to check for any error in the
incoming communication due to external noises or other causes. If a disparity is found in the comparison, an error code is stored in the data register
designated as receive status in the RXD instruction. For user communication error code, see "User Communication Error" on page 5-43.
Example 1: BCC is calculated for the first byte through the sixth byte using the XOR format, converted in binary to ASCII, and
compared with the BCC code appended to the seventh and eighth bytes of the incoming data.
Incoming Data
"1"
"2"
(31h)
(32h)
BCC calculation range
BCC Calculation Result
31h ⊕ 32h ⊕ 33h ⊕ 34h ⊕ 35h ⊕ 36h = 07h
Example 2: BCC is calculated for the first byte through the sixth byte using the ADD format, converted in binary to ASCII, and
compared with the BCC code appended to the seventh and eighth bytes of the incoming data.
Incoming Data
"1"
"2"
(31h)
(32h)
BCC calculation range
BCC Calculation Result
31h + 32h + 33h + 34h + 35h + 36h = 135h
5-20
I
NSTRUCTIONS
Binary to ASCII conversion
No conversion
"4"
"1"
(34h)
(31h)
"4"
"1"
(34h)
(31h)
"3"
"4"
"5"
"6"
(33h)
(34h)
(35h)
(36h)
Binary to ASCII Conversion
"3"
"4"
"5"
"6"
(33h)
(34h)
(35h)
(36h)
Binary to ASCII Conversion
FC6A S
M
S
A
ERIES
ICRO
MART
"4"
"1"
(34h)
(31h)
2 digits
NUL
"A"
(00h)
(41h)
2 digits
"4"
"1"
(34h)
(31h)
"1"
Lower digit
(31h)
"0"
"7"
(30h)
(37h)
BCC
"0"
"7"
(30h)
(37h)
"0"
"7"
(30h)
(37h)
BCC
"3"
"5"
(33h)
(35h)
-
-O
T
C
LL
IN
NE
YPE
OMMUNICATION
Note: On WindLDR, Modbus ASCII defaults to binary
to ASCII conversion.
Note: On WindLDR, Modbus RTU defaults to no
conversion.
Note: On WindLDR, Modbus ASCII and Modbus RTU
default is set to 2 digits.
Comparison result is true to indicate that data
is received correctly.
Comparison result is false.
Error code 9 is stored in the receive status data
register.
M
FC9Y-B1730
ANUAL

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents