EasyManua.ls Logo

Motion iWMC Series - MODBUS RTU Communication; Function Code of Modbus

Motion iWMC Series
56 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Moon Control Products Ltd. Tel.: +44 (0)1202 599922 www.mooncontrolproducts.com Page | 34
6.3 MODBUS RTU Communicaon
The iWMC integrated servo wheel supports the MODBUS RTU communicaon protocol, and its internal object is a
disconnuous 16-bit data register (mapped to 4X when read and wrien by the host computer). Modbus RTU protocol
format:
Staon No.
Funcon code
Data
CRC
1 byte
1 byte
N bytes
2 bytes
6.4 Funcon Code of Modbus
Funcon code 0x03: read data registers Request format:
Staon No.
Funcon
code
Modbus address
Read the byte number
CRC
High byte
Low byte
High byte
Low byte
1 byte
03
1byte
1byte
1byte
1byte
2byte
Response format:
Staon No.
Funcon
code
Return data length
Register data
……
CRC
High byte
Low byte
1 byte
03
1 byte
1 byte
1 byte
……
2 bytes
Note
If there is error such as non-exist address, then it will return funcon code 0x81.
Funcon code 0x06: write single data register Request format:
Staon No.
Funcon
code
Modbus address
Wring value
CRC
High byte
Low byte
High byte
Low byte
1 byte
06
1 byte
1 byte
1 byte
1 byte
2 bytes
Response format: If wring successful, then return the same message.
Note
If there is error such as address over range, non-exist address and the address is read only, then
it will return funcon code 0x86.
Funcon code 0x10: Write mulple registers Request format:
Staon
No.
Funcon
code
Modbus
address
Data length (word)
Data
length of
data-in
Low byte of data
High byte of data
CR C
High
byte
Low
byte
High
byte
Low
byte
High
byte
Low
byte
1 byte
10
2 bytes
1 byte
1
byte
1 byte
1
byte
1
byte
1
byte
1
byte
2 bytes

Table of Contents