ALM-06-WF User’s Manual
ALM-06-WF
User’s Manual (Rev1.0, Feb./2019) ------------- 33
5.2.2
Function Code
The function code field of a Modbus data unit is coded in one byte. Valid codes are
in the range of 1 ... 255 decimal (the range 128 - 255 is reserved and used or exception
responses). When a Modbus request is sent from a Modbus Client to a Server device the
function code field tells the Server what kind of action to perform.
The Modbus/TCP feature of ALM series controller supports 6 function codes,
which allows the reading and writing of data contents of registers.
Function Code
Descriptions
01 (0x01)
Read Coil Status
02 (0x02)
Read Input Status
03 (0x03)
Read multiple Analog Output registers
05 (0x05)
Force Single Coil
06 (0x06)
Write single Analog Output registers register
16 (0x10)
Write multiple Analog Output registers register
Table 5-2: Supports Function Codes of ALM series
Any other function code request will be returned with an error response indicating
the function code is not supported, as well as a request for too much data or data at a
register address that not present.
5.2.3
Data
The data field of Modbus request sent from a client to server devices contains
additional information that the server uses to take the action defined by the function
code. This can include items like discrete and register addresses, the quantity of items
to be handled, and the count of actual data bytes in the field.
The data field may be nonexistent (of zero length) in certain kinds of requests, in
this case the server does not require any additional information. The function code
alone specifies the action.