
Programmable Serial-to-Ethernet Device Server
PDS Series User Manual, Version 2.5, Mar. 2019
-
198 -
Function Code:
specifies the message type.
The second byte in the frame structure of the Modbus RTU is the function code. The function code
describes what the slave is required to do. Valid function codes are between 1 and 255. The slave
uses the same function code as the request to answer it. Only when an error occurs in the system
will the highest bit of the function code be set to ‘1’. Hence the master will know whether the
message has been transmitted correctly or not.
Section
Code
Function
Reference
(Address)
01 (0x01)
Read Coils status (Readback DOs)
0xxxx
02 (0x02)
Read Input Status (Read DIs)
1xxxx
05 (0x05)
Force Single Coil (Write DO)
0xxxx
15 (0x0F)
Force Multiple Coils (Write DOs)
0xxxx
Data Field:
is the data block.
Data is transmitted in 8-, 16- and 32-bit format. The data of 16-bit registers is transmitted in high-
byte first (For example: 0x0A0B ==> 0x0A, 0x0B). The data of 32-bit registers is transmitted as two
16-bit registers, and is low-word first. (For example: 0x0A0B0C0D ==> 0x0C, 0x0D, 0x0A, 0x0B.)
The data field of messages sent between a master and a slave contains additional information
about the action to be taken by the master or any information requested by the slave. If the master
does not require this information, the data field can be empty.
Reference
(Address)
Description
0xxxx
Read/Write Discrete Outputs or Coils.
A 0x reference address is used to output device data to a digital output channel.
1xxxx
Read Discrete Inputs.
The ON/OFF status of a 1x reference address is controlled by the corresponding
digital input channel.
For more detail of Address Mapping (Reference number), refer to