
10 MODBUS
10.4 Address Mapping
This section describes the address allocation to allow own implementations and extensions of the
PLC function blocks.
Modbus defines four memory areas that can be read and written by different messages. In the address
mapping of the igus robots, the areas are used as follows. In some cases information can be retrieved
both bitwise and as register.
Memory Section
Access
Usage
Coils
1 Bit, read and write
Actions and changeable states
Discrete Inputs
1 Bit, read only
States, information
Holding Registers
16 Bit, read and write
Changeable values and states
Input Registers
16 Bit, read only
Not changeable values, information
Table 21: Use of the Modbus address sections
The following Modbus function codes can be used to read and write the memory areas.
Memory Section
Read
Write
Coils
1
5 (single), 15 (multiple)
Discrete Inputs
2
-
Holding Registers
3
6 (single), 16 (multiple), 22 (masked), 23 (read and write)
Input Registers
4
-
Table 22: Supported Modbus function codes (decimal)
Since Modbus defines only 1-bit and 16-bit access, complex data types and actions are defined here
as follows:
Data Type
Description
boolean
Writing bit "0" or "1" starts the corresponding action or sets the state.
enum
Enumeration. Meaning depends on the register, see section 10.4.5.
Info
Information, not writable
int32 / uint32
Two 16-bit registers, least significant register first.
rising edge
Action is executed when first a 0 and then a 1 is written. Attention: Some coils
return the actual value when reading, not the last written one. In case of double
assignment (e.g. enable/disable motors) the action is chosen depending on the
actual state.
string
character string. Two 8-bit characters per register, least significant byte first.
The string ends with a zero byte or when the maximum number of registers is
reached.
Table 23: Definition of complex data types
©2022 igus® GmbH
53