8-9
Chapter 8. Modbus Communication Function
8 - 3 Description of Commands
Read command (03H)
z
Instruction message
This is a command—in one message—to read data from consecutive word
addresses starting from the specified address. The following is a sample “read”
instruction message.
Modbus/ASCII
3AH 30H 41H 30H 33H 30H 33H 45H 39H 30H 30H 30H 32H 30H 35H 0DH 0AH
: 0 A 0 3 0 3 E 9 0 0 0 2 0 5 CR LF
(1) (2) (3) (4) (5) (6) (7)
(1) Start of the message
(2) Station address
(3) Read command (03H)
(4) Starting word address
(5) Read data count
(6) Checksum (LRC)
(7) Delimiter
Modbus/RTU
0AH 03H 03H E9H 00H02 h 14H C0H
(1) (2) (3) (4) (5)
(1) Station address
(2) Read command (03H)
(3) Starting word address
(4) Read data count
(5) Checksum (CRC)
z
Response message
If an instruction message is received successfully, a response message appropriate
for the command is returned.
The following is a sample response message for a read command.
Modbus/ASCII
• Normal termination
3AH 30H 41H 30H 33H 30H 34H 30H 33H 30H 31H 30H 30H 30H 33H 45H 38H 0DH 0AH
: 0 A 0 3 0 4 0 3 0 1 0 0 0 3 E 8 CR LF
(1) (2) (3) (4) (5) (6) (7) (8)
(1) Start of the message
(2) Station address
(3) Read command (03H)
(4) Read data count × 2
(5) Read data 1
(6) Read data 2
(7) Checksum (LRC)
(8) Delimiter