Process data objects (PDO)
As with CANopen, a process image can be configured for input and output values with Modbus. This image only contains the data values of one or more objects without additional information, such as length, index or subindex. A single message can thereby be used to read or write multiple objects at the same time.
- 3502h for the Modbus Rx (master → slave) PDO mapping
- 3602h for Modbus Tx (slave → master) PDO mapping
Objects 3502h and 3602h can be written with messages with Modbus function code 2Bh.
The data are written sequentially in the message without gaps and alignment.
If alignment is required (e.g., 16-bit alignment), additional "dummy objects" can be incorporated in the message. Dummy objects are only ever transferred with the data value "0". These objects are listed in the following table.
|0002h||Signed integer (8 bit)|
|0003h||Signed integer (16 bit)|
|0004h||Signed integer (32 bit)|
|0005h||Unsigned integer (8 bit)|
|0006h||Unsigned integer (16 bit)|
|0007h||Unsigned integer (32 bit)|
Mapping is as follows:
- The PDO RX image begins at Modbus register address 6000d (1770h).
- The PDO TX image begins at Modbus register address 5000d (1388h).
To be able to change the mapping, you must first deactivate it by setting the corresponding subindex 0h to "0".
After writing the objects to the respective subindices, enter the number of mapped objects in subindex 0h.
- 3602h:00h = "6h" (6 values are mapped)
- 3602h:01h = "60410010h" (object 6041h:00h, length 16 bits is mapped)
- 3602h:02h = "00050008h" (dummy object 0005h:00h, length 8 bits is mapped)
- 3602h:03h = "60610008h" (object 6061h:00h, length 8 bits is mapped)
- 3602h:04h = "60640020h" (object 6064h:00h, length 32 bits is mapped)
- 3602h:05h = "60440010h" (object 6044h:00h, length 16 bits is mapped)
- 3602h:06h = "60FD0020h" (object 60FDh:00h, length 32 bits is mapped)
Rx message: The master sends the slave the following message:
Tx message: The slave sends following response to the master: