Modbus Protocol; Function Code; Error Response - ICP DAS USA ALM-Horn Series User Manual

Table of Contents

Advertisement

4. Modbus Protocol

4.1.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/RTU feature of ALM-Horn-WF/-MRTU supports 5 function
codes, which allows the reading and writing of data contents of registers.
Function Code
01 (0x01)
02 (0x02)
03 (0x03)
05 (0x05)
06 (0x06)
Table 5-2: Supports Function Codes of ALM-Horn-WF/-MRTU
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.

4.1.3 Error Response

Byte Index
00
01
02
If a CRC mismatch occurs, the module will not respond.
ALM-Horn Series
ALM-Horn Series User's Manual
Field Name
Address
Function code
Exception code
Table 4-2: Error response of Modbus Protocol
User's Manual (Rev1.0, NOV/2020) ------------- 21
Descriptions
Read Coil Status
Read Input Status
Read multiple Analog Output registers
Force Single Coil
Write single Analog Output registers register
Byte count
1 Byte
1 Byte
1 Byte
Description
1 to 247
Function code + 0x80
01

Advertisement

Table of Contents
loading

Table of Contents