Data block field, Error check field, Modbus modes of operation – Basler Electric DGC-2020HD Modbus Protocol User Manual

Page 8: Modbus over serial line

Advertising
background image

2

9469300991 Rev A

General Information

DGC-2020HD Modbus

™ Protocol

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. DGC-2020HD 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 Instruction Manual for Digital Genset
Controller DGC-2020HD
(Basler Publication 9469300990) 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 1.

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

Modbus Over Serial Line
Message Structure

Master initiated queries and DGC-2020HD 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,

PDU

ADU

Function code

Data

Additional address

Error Check

Advertising