C.TY TNHH TỰ ĐỘNG HÓA VIỆT TRUNG 02413.281.181-0989.984.666
Website:www.viet-trung.com.vn Đ/c:194-Nguyễn Trãi-Võ Cường-TP.Bắc Ninh
129
Serial Communications User Manual
C. Function code
This product support Function code 03H and 06H in MODBUS protocol.
(1) Function 03H
:
Read holding register
Read the binary contents of holding registers (4 x references) in the slave.
Broadcast is not supported. The maximum parameters supported by various
controller models are listed on page.
Ex: Read data from 3 continuous addresses in register. The beginning address is
0080H, the data frame are listed as follow.
Query
Field Name
Example (hex)
ASCII code
RTU 8-Bit Field
Header
‘ : ’ (colon)
None
Slave Address
F0
F 0
1111 0110
Function
03
0 3
0000 0011
Start Address Hi
00
0 0
0000 0000
Start Address Lo
80
8 0
1000 0000
No. of Register Hi
00
0 0
0000 0000
No. of Register Lo
03
0 3
0000 0011
Error Check
LRC (2 chars)
CRC (16 bits)
Trailer
CR LF
None
Total Bytes
17
8
Response
Field Name
Example (hex)
ASCII code
RTU 8-Bit Field
Header
‘ : ’ (colon)
None
Slave Address
F0
F 0
1111 0000
Function
03
0 3
0000 0011
Byte Count
06
0 6
0000 0110
1
st
Data Hi
03
0 3
0000 0011
1
st
Data Lo
E8
E 8
1110 1000
2
nd
Data Hi
00
0 0
0000 0000
2
nd
Data Lo
07
0 7
0000 0111
3
rd
Data Hi
00
0 0
0000 0000
3
rd
Data Lo
00
0 0
0000 0000
Error Check
LRC (2 chars)
CRC (16 bits)
Trailer
CR LF
None
Total Bytes
23
11