beautypg.com

Data block field, Error check field, Modbus modes of operation – Basler Electric DECS-250N User Manual

Page 216: Modbus™ over serial line, Message structure

background image

200

9440500990 Rev D

Modbus™ Communication

DECS-250N

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-250N 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 166.

Figure 166. 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.

Modbus

™ Over Serial Line

Message Structure

Master initiated queries and DECS-250N responses share the same message structure. Each message is
comprised of four message fields. They are:

Device Address

(1 byte)

Function Code

(1 byte)

Data Block

(n bytes)

Error Check field

(2 bytes)

Each 8-bit byte in a message contains two 4-bit hexadecimal characters. The message is transmitted in a
continuous stream with the LSB of each byte of data transmitted first. Transmission of each 8-bit data
byte occurs with one start bit and either one or two stop bits. Parity checking is performed, when enabled,
and can be either odd or even. The transmission baud rate is user-selectable, and can be set at

PDU

ADU

Function code

Data

Additional address

Error Check

This manual is related to the following products: