28-2 9440300990
Modbus
®
Communication DECS-250
Although Modbus protocol limits a device address from 1 - 247. The address is user-selectable at
installation and can be altered during real-time operation.
Function Code Field
The function code field in the query message defines the action to be taken by the addressed slave. This
field is echoed in the response message and is altered by setting the most significant bit (MSB) of the
field to 1 if the response is an error response. This field is 1 byte in length.
The DECS-250 maps all available data into the Modicon 984 holding register address space supports the
following function codes:
• Function 03 (03 hex) - read holding registers
• Function 06 (06 hex) - preset single register
• Function 08 (08 hex), subfunction 00 - diagnostics: return query data
• Function 08 (08 hex), subfunction 01 - diagnostics: restart communications option
• Function 08 (08 hex), subfunction 04 - diagnostics: force listen only mode
• Function 16 (10 hex) - preset multiple registers
Data Block Field
The query data block contains additional information needed by the slave to perform the requested
function. The response data block contains data collected by the slave for the queried function. An error
response will substitute an exception response code for the data block. The length of this field varies with
each query.
Error Check Field
The error check field provides a method for the slave to validate the integrity of the query message
contents and allows the master to confirm the validity of response message contents. This field is 2 bytes.
Modbus Modes of Operation
A standard Modbus network offers the remote terminal unit (RTU) transmission mode and Modbus TCP
mode for communication. DECS-250 systems support the Modbus TCP mode and RS-485 mode at the
same time. To enable editing over Modbus TCP, or RS-485, the unsecured access level for the port must
be configured to the appropriate access level. See the Security chapter of this manual for more
information on security and access levels. These two modes of operation are described below.
A master can query slaves individually or universally. A universal ("broadcast") query, when allowed,
evokes no response from any slave device. If a query to an individual slave device requests actions
unable to be performed by the slave, the slave response message contains an exception response code
defining the error detected. Exception response codes are quite often enhanced by the information found
in the "Error Details" block of holding registers.
The Modbus protocol defines a simple Protocol Data Unit (PDU) independent of the underlying
communication layers. The mapping of the Modbus protocol on specific buses or networks can introduce
some additional fields on the Application Data Unit (ADU). See Figure 28-1.
Figure 28-1. General Modbus Frame
The client that initiates a Modbus transaction builds the Modbus Application Data Unit. The function code
indicates to the server which kind of action to perform.