Basic Operation
2-6
Data Representation on Modbus RTU
General
The Input- and Output Data areas are mapped to Modbus registers 0... 1279 and Coils 0... 20479.
Supported Function Codes
The following function codes are supported:
Coil & Register Map
The Input & Output Data areas are mapped to coils and registers as follows:
Note:
Coils are mapped MSB first, i.e. coil 0 corresponds to bit 15 of register 0.
Supported Exception Codes
Function Code
Modbus Function
Associated with Area(s)
1
Read Coil
Input- and Output Data Area (0x000... 0x3FF)
2
Read Input Discretes
3
Read Holding Registers
4
Read Input Registers
5
Write Coil
Output Data Area (0x200... 0x3FF)
6
Write Single Register
15
Force Multiple Coils
16
Force Multiple Registers
22
Mask Write Register
23
Read/Write Registers
Input- and Output Data Area (0x000... 0x3FF)
Register #
Coil #
Memory Location
Area
Comments
1
1... 16
0x000... 0x001
Input Data area
-
2
17... 32
0x002... 0x003
...
...
...
255
4065... 4080
0x1FC... 0x1FD
256
4081... 4096
0x1FE... 0x1FF
257... 1024
4097... 16384
-
-
(reserved)
1025
16385... 16400 0x200... 0x201
Output Data area
-
1026
16401... 16416 0x202... 0x203
...
...
...
1279
20449... 20464 0x3FC... 0x3FD
1280
20465... 20480 0x3FE... 0x3FF
Exception Code
Name
Description
0x01
Illegal function
Function code not supported
0x02
Illegal data address
Invalid address in query
0x03
Illegal data value
Illegal data in request