FL20-C Series
97
4.
Error Check
(1)
ASCII mode
Longitudinal Redundancy Check (LRC): It is performed on the ASCII message field contents
excluding the ‘colon’ character that begins the message, and excluding the CRLF pair at the end
of the message.
The LRC is calculated by adding together successive 8–bit bytes of the message, discarding any
carries, and then two’s complementing the result.
(2)
RTU mode
CRC-16 (Cyclical Redundancy Check), please read reference books or ask for the details from
manufactures.
II.
Command Type& Format
1.
Command types of common functional domain parameters as below:
Code
Name
Description
03
Read Holding Registers
Read the binary contents of holding registers in the slave.
(Less than 10 registers once time )
06
Preset Single Register
Preset a value into holding register
16
Preset Multiple Register
Preset values into successive registers (1~120 registers)
Note:
In ASCII mode, register number must be less than 40.
In RTU mode, register number must be less than 100.
2.
Data packet mode:
(1)
ASCII Mode
(2)
RTU Mode
Start
Address
Function
Data
CRC check
End
T1-T2-T3-T4
Servo drive
Address
Function
Code
N data
Low-order
byte of CRC
High-order
byte of CRC
T1-T2-T3-T4
(3)
Protocol Converter
It is easy to turn a RTU command into an ASCII command followed by the lists:
1)
Use the LRC to replace the CRC.
2)
Transform each byte in RTU command into a corresponding two byte ASCII. For
example: transform 0x03 into 0x30, 0x33 (ASCII code for 0 and ASCII code for 3).
3)
Add a ‘colon’ ( : ) character (ASCII 3A hex) at the beginning of the message.
4)
End with a ‘carriage return – line feed’ (CRLF) pair (ASCII 0D and 0A hex).
Start Address Function
Data
LRC check
End
:
(0X3A)
Servo
drive
Address
Function
Code
Data
length
Data
1
…
…
Data
N
High-order
byte of
LRC
Low-order
byte of
LRC
Return
(0X0D)
Line
Feed
(0X0A)