e
Electro Industries/Gauge Tech
Doc # E134-7-15 V1.01
3-2
3.3: Function Codes
3.3: Function Codes
A packet’s Function Code tells the addressed Slave what action to perform. The I/O modules support the
following Modbus Function Codes:
3.3.1: Function Code 03
3.3.1: Function Code 03—
—Read Holding Registers
Read Holding Registers
n
This function allows a Master station to read one or more parameter values (data registers) from a
Slave. The data registers are 16-bit (two byte) values transmitted in “Big Endian” format:
high-ordered byte first, low-ordered byte second.
n
The Master device sends a packet defining a start register for the Slave and the number of registers
to read. The Slave responds with a packet containing the requested parameter values within the range
specified in the request.
n
In the following example, a Master device requests a Slave at address 01H to transmit two values
beginning at Register 00001. The Slave replies with values 3031H and 3037H from Registers 00001
and 00002.
Hex
Dec
03H
3
06H
6
16
10H
Read Holding Registers
Preset Single Register
Preset Multiple Registers
Function Code
Description
Table 3.1: Function Codes
Slave Address
Function Code
Data Starting Address-Hi
Data Starting Address-Lo
Number of Registers-Hi
Number of Registers-Lo
CRC-Lo
CRC-Hi
01H
Slave Address
01H
03H
Function Code
03H
00H
00H
00H
02H
C4H
0BH
Byte Count
04H
30H
31H
30H
37H
F1H
2AH
CRC-Hi
CRC-Lo
Data 2-Lo
Data 2-Hi
Data 1-Lo
Data 1-Hi
Slave Packet
Master Packet
Table 3.2: Function Code 03 Example
1
Dec
Hex
1
Dec
Hex
3
4
48
49
48
55
241
42
3
0
0
0
2
4
11
Содержание I/O Module
Страница 2: ......
Страница 6: ...e Electro Industries Gauge Tech Doc E134 7 15 V1 01 iv ...
Страница 10: ...e Electro Industries Gauge Tech Doc E134 7 15 V1 01 viii ...
Страница 30: ...e Electro Industries GaugeTech Doc E134 7 15 V1 01 2 16 ...
Страница 44: ...e Electro Industries GaugeTech Doc E134 7 15 V1 01 4 8 ...
Страница 50: ...e Electro Industries GaugeTech Doc E134 7 15 V1 01 6 4 ...
Страница 52: ...e Electro Industries Gauge Tech Doc E 134 7 15 V1 01 7 2 ...
Страница 63: ...e Electro Industries GaugeTech Doc E134 7 15 V1 01 8 4 ...
Страница 65: ...e Electro Industries Gauge Tech Doc E 134 7 15 V1 01 9 2 ...
Страница 72: ...e Electro Industries GaugeTech Doc E134 7 15 V1 01 10 4 ...
Страница 74: ...e Electro Industries Gauge Tech Doc E 134 7 15 V1 01 11 2 ...
Страница 81: ...e Electro Industries Gauge Tech Doc E 134 7 15 V1 01 13 2 ...
Страница 87: ...e Electro Industries GaugeTech Doc E134 7 15 V1 01 14 4 ...
Страница 89: ...e Electro Industries Gauge Tech Doc E 134 7 15 V1 01 15 2 ...