M ESSAG E FORM AT
—
8. Function Codes
The MOBDUS protocol implemented in Digital Gateway is using the MODBUS standard func-
tion codes (FC). Those are applicable for Modbus RTU as well as for Modbus TCP communica-
tion. The standard function codes supported are as follows:
Function Code
FC02
FC03
FC04
FC06
FC08
FC16
Table 15 Function Codes
The Digital Gateway is a 'standard MODBUS slave device. The PLC or PCS master initiates the
communication by sending the 'Query Messages' and the Digital Gateway replies the re-
quested information in 'Response Messages'.
8.1. Message Format
Query Messages
The MODBUS query messages have the standard query structure as below.
• The slave address
• Function code for Read or Write operation
• Start address of the desired information
• Register length or data code to be read
• CRC-Error checking field
Response Messages
The MODBUS query messages have the standard query structure as below.
• The slave address
• Applied function code
• Length of response (byte)
• Requested information/Action performed
• CRC-Error checking field
4 4
Function
Read Input Status
Read Holding Registers
Read Input Registers
Preset Single Register
Diagnostics
Pre-set multiple Registers
F U NCT IO N CO DES
Description
Bit-orientated reading from regis-
ter file
Word-orientated reading from reg-
ister file
Word-orientated reading from reg-
ister file
Writing of a word into register file
Check communication between
master and slave, (loop back)
Write of several successive words
into register file
1 TG C90 80 04