
4.4Modbus/TCP Server Functions
4.4.1Modbus Address Mapping
The Modbus address is defined from 42001 to 49999. In order to exchange the data through Modbus, users need to move the data onto this memory block by setting the memory address in “I/O Address” field manually. The memory address of this memory block is defined from mw3.0 to mw3.15996. The mapping table of I/O Address and Modbus Address is as following table.
I/O Address | Modbus Address |
|
|
%mw3.0 | 42001 |
%mw3.2 | 42002 |
%mw3.4 | 42003 |
... |
|
Since unit of mw3.0 is Byte, users need to map the I/O Address and Modbus Address as following.
For Bool data type:
| I/O Address | Modbus Address | Length |
|
|
|
|
Data 1 | mw3.0.0 | 02001 | 1 Bit |
Data 2 | mw3.0.1 | 02002 | 1 Bit |
Data 3 | mw3.0.2 | 02003 | 1 Bit |
For Byte and Word data type:
| I/O Address | Modbus Address | Length |
|
|
|
|
Data 1 | mw3.0+ mw3.1 | 42001 | 2 Bytes |
Data 2 | mw3.2+mw3.3 | 42002 | 2 Bytes |
Data 3 | mw3.4+mw3.5 | 42003 | 2 Bytes |
For Dword and Real data type:
| I/O Address | Modbus Address | Length |
|
|
|
|
Data 1 | mw3.0+mw3.1+mw3.2+mw3.3 | 42001+42002 | 4 Bytes |
Data 2 | mw3.4+mw3.5+mw3.6+mw3.7 | 42003+42004 | 4 Bytes |
Data 3 | mw3.8+mw3.9+mw3.10+mw3.11 | 42005+42006 | 4 Bytes |
Chapter 4 Modbus Functions
107 |