IDEC FC4A-C10R2 User Manual page 300

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

17: U
C
SER
OMMUNICATION
Conversion Type
The BCC calculation result can be converted or not according to the designated conversion type as described below:
Example: BCC calculation result is 0041h.
(1) Binary to ASCII conversion
0041h
(2) No conversion
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
(34h)
(2) BCC digits = 1
(34h)
Comparing BCC Codes
The
compares the BCC calculation result with the BCC code in the received incoming data to check for any
MicroSmart
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 page 17-27.
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
17-22
I
NSTRUCTIONS
Binary to ASCII conversion
No conversion
"4"
"1"
(31h)
"4"
"1"
(31h)
"3"
"4"
"5"
"6"
(33h)
(34h)
(35h)
(36h)
(30h)
Binary to ASCII Conversion
(30h)
« FC4A M
"4"
"1"
(34h)
(31h)
2 digits
NUL
"A"
(00h)
(41h)
2 digits
"4"
"1"
(34h)
(31h)
"1"
Lower digit
(31h)
"0"
"7"
(37h)
BCC
"0"
"7"
(37h)
S
U
'
M
ICRO
MART
SER
S
ANUAL
Note: On WindLDR, Modbus ASCII is
defaulted to binary to ASCII conversion.
Note: On WindLDR, Modbus RTU is
defaulted to no conversion.
Note: On WindLDR, Modbus ASCII and
Modbus RTU are defaulted to 2 digits.
Comparison result is true to indicate
that data is received correctly.
»

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents