25-4 9492600990
Modbus
®
Communication DECS-150
• Protocol Identifier – Used for intra-system multiplexing. The Modbus protocol is identified by the
value 0.
• Length – A byte count of the following fields, including the Unit Identifier and data fields.
• Unit Identifier – Used for intra-system routing purpose. It is typically used to communicate to a
Modbus or a Modbus serial line slave through a gateway between an Ethernet TCP/IP network
and a Modbus serial line. This field is set by the Modbus Client in the request and must be
returned with the same value in the response by the server.
Note: All Modbus TCP ADU are sent via TCP on registered port 502.
Error Handling and Exception Responses
Any query received that contains a non-existent device address, a framing error, or CRC error is ignored.
No response is transmitted. Queries addressed to the DECS-150 with an unsupported function or illegal
values in the data block result in an error response message with an exception response code. The
exception response codes supported by the DECS-150 are provided in Table 25-2.
Table 25-2. Supported Exception Response Codes
Code Name Description
01 Illegal Function The query Function/Subfunction Code is unsupported;
query read of more than 125 registers; query preset of
more than 100 registers.
02 Illegal Data
Address
A register referenced in the data block does not support
queried read/write; query preset of a subset of a numerical
register group.
03 Illegal Data Value A preset register data block contains an incorrect number
of bytes or one or more data values out of range.
DECS-150 Modbus
®
via Ethernet
Modbus can communicate through Ethernet if the IP address of the DECS-150 is configured as described
in the Communications section of this manual.
Detailed Message Query and Response
A detailed description of DECS-150 supported message queries and responses is provided in the
following paragraphs.
Read Holding Registers
Query
This query message requests a register or block of registers to be read. The data block contains the
starting register address and the quantity of registers to be read. A register address of N will read holding
register N+1. If the query is a broadcast (device address = 0), no response message is returned.
Device Address
Function Code = 03 (hex)
Starting Address Hi
Starting Address Lo
No. of Registers Hi
No. of Registers Lo
CRC Hi error check
CRC Lo error check
The number of registers cannot exceed 125 without causing an error response with the exception code
for an illegal function.