clear the incomplete information, and mistake that the last byte is the address field part of the new frame.
START
: (0x3A)
Likewise, if the interval between t he start of a new frame and the previous frame is less than 3.5 bytes,
5/14/2018
the receiving device will regard it as the subs equent part of the previous frame. Due to frame disorder,
the final CRC value is incorrect, which will l ead to communication failure.
Standard Structure of RTU Frame:
Address Hi
Fuling Inve r te r Use r Ma nua l - slide pdf.c om
Address Lo
Function Hi
Function Lo
Communication address:
2 ASCII combine 8-bit address
F2 uAnScCtiIoInccoomdbei:ne 8-bit address
Frame header (START)
Slave address field (ADDR)
Function field
(CMD)
Data field
DATA( N-1 )
DATA( 0)
T1-T2-T3-T4 (transmission time of 3.5 bytes)
Communication address:
0~247 (decimal) ("0" stands for the broadcast address)
03H: Read slave parameters;
06H: Write slave parameters
Data of 2*N bytes: this part is the main con tent of
communications, and is also the data exchange core in
communications.
DATA( 0)
DATA( N-1 )
LRC CHK Hi
LRC CHK Lo
END Hi
END Lo
Data content:
nx8-bit 2n ASCII combine data content
n<=16,maximum 32 ASCII
LRC check:
2 ASCII combine 8-bit check code
End:
END Hi=CR(0x0D),END Lo=LF(0x0A)
CRC CHK lower bit
CRC CHK higher bit
Frame tail END
Detection value: CRC value (16BIT).
T1-T2-T3-T4 (transmission time of 3.5 bytes)
6. Command Codes and Communication Data
6.1 Command Code: 03H (0000 0011), read N words (can ready a maximum of consecutive five words)
For example: for an inverter with the sla ve address of 01H, the start address of memory is 0004, ready
In ASCII mode, frame header is ":" ("0x3A"),frame tail is "CRLF"("0x0D""0x0A"). Except frame
header and frame tail, all other bytes are transmitted by ASCII coding system. It will transmit high 4 bits
first, then transmit low 4 bits . The data length is 8 bit. Capital ASCII is used to demonstrate 'A'~'F' and use
consecutive two words, the structu re of the frame is as follows:
RTU mode:
RTU Command Message of the Master
LRC check, cover the information from slave address to data.
ASCII mode Data Frame
START
"0x3A"
slave
address
operation
command
code
data
CRC
check
word
END
"0x0D""0x0A"
START
ADDR
CM D
Higher bits of start address
Lower bits of start address
Higher bits of data number
Lower bits of data number
CRC CHK lower bit
CRC CHK higher bit
END
T1-T2-T3-T4 (transmission time of 3.5 bytes)
01H
03H
00H
04H
00H
02H
85H
CAH
T1-T2-T3-T4 (transmission time of 3.5 bytes)
-87-
DZB Series
http://slidReTpUdfR.ceospmo/nreseadMeers/fsuaglle/fouflitnhge-Sinlavveer ter-user-manual
Appendix B Serial Communications
-88-
DZB Series
ASCII Response Message of the Slave
Appendix B Serial Communications
47/54