154
SV200 DC Hardware Manual
920-0126A
4/14/2017
9.3.8 Function Code
Applied Motion Products’ drives currently support the following Modbus function codes:
1) 0x03: Read holding registers
2) 0x04: Read input registers
3) 0x06: Write single registers
4) 0x10: Write multiple registers
9.3.8.1 Function Code 0X03, Reading Multiple Holding Registers
To read the encoder’s actual position command to drive Node ID 1, the data address for the encoder’s actual position is register 40005.
If the register value is in decimal numbers it will be 2,500,000, and the transfer method is P-75 (PR) = 5, for big-endian transfer.
Communication details are as follows:
Command Message (Master)
Response Message (slave)
Function
Data
Number Of Bytes
Function
Data
Number Of Bytes
Slave Address
01H
1
Slave Address
01H
1
Function Code
03H
1
Function Code
03H
1
Starting Data Address
00H (High)
04H (Low)
2
Number of Data
(In Byte)
04
1
Number of Data
(In word)
00 (High)
02 (Low)
2
Content of Starting Data
Address 40005
00H (High)
26H (Low)
2
CRC Check Low
85
1
Content of second Data
Address 40006
25H (High)
A0 (Low)
2
CRC Check High
CA
1
CRC Check Low
01H
1
CRC Check High
10H
1
Host Sending: 01 03 00 04 00 02 85 CA
Drive Reply: 01 03 04 00 26 25 A0 01 10
If an error occurs, drive reply format will be: 01 83 XX CRC_L CRC_H
When XX = 01 Function code 03 unsupported
XX = 02 Incorrect reading of drive’s address or numbers
XX = 03 Reading register address out of range
XX = 04 Reading failure