Modbus™ communication, Introduction, Message structure – Basler Electric DECS-250N User Manual
Page 215: Device address field, Function code field, Modbus ™ communication

9440500990 Rev D
199
DECS-250N
Modbus™ Communication
Modbus
™ Communication
Introduction
This document describes the Modbus
™ communications protocol employed by DECS-250N systems and
how to exchange information with DECS-250N systems over a Modbus network. DECS-250N systems
communicate by emulating a subset of the Modicon 984 Programmable Controller.
Modbus communications use a master-slave technique in which only the master can initiate a transaction.
This transaction is called a query. When appropriate, a slave (DECS-250N) responds to the query. When
a Modbus master communicates with a slave, information is provided or requested by the master.
Information residing in the DECS-250N is grouped categorically as follows:
•
General
•
Binary Points
•
Metering
•
Limiters
•
Setpoints
•
Global Settings
•
Relay Settings
•
Protection Settings
•
Gains
•
Legacy Modbus
All supported data can be read as specified in the Register Table. Abbreviations are used in the Register
Table to indicate the register type. Register types are:
•
Read/Write = RW
•
Read Only = R
When a slave receives a query, the slave responds by either supplying the requested data to the master
or performing the requested action. A slave device never initiates communications on the Modbus and will
always generate a response to the query unless certain error conditions occur. The DECS-250N is
designed to communicate on the Modbus network only as slave devices.
Refer to the Communication chapter for Modbus communication setup and the Terminals and Connectors
chapter for wiring.
Message Structure
Device Address Field
The device address field contains the unique Modbus address of the slave being queried. The addressed
slave repeats the address in the device address field of the response message. This field is 1 byte.
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-250N 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