Introduction, General overview, Intended use of the communications protocol – Winco DGC-2020 User Manual

Page 159: Detailed description of dgc-2020 modbus protocol, Modbus protocol overview, Device address field, Function code field, Appendix b • modbus ™ communication

Advertising
background image

9400200990 Rev B

DGC-2020 Modbus

Communication

B-1

APPENDIX B

MODBUS COMMUNICATION

INTRODUCTION

General Overview

An optional feature of the DGC-2020 performs Modbus communications by emulating a subset of the
Modicon 984 Programmable Controller. This document describes the Modbus communications protocol
employed by the DGC-2020 and how to exchange information with the DGC-2020 over a Modbus
network.

The DGC-2020 maps all parameters into the Modicon 984 Holding Register address space (4XXXX).
Refer to MAPPING - DGC 2020 Parameters into MODICON ADDRESS SPACE in this section. The
40XXX registers are identical to the data that was present in the DGC-500 and DGC-1000 products. This
allows the DGC-2020 to work seamlessly in Modbus applications where it is replacing a DGC-500 or
DGC-1000. The 42XXX registers contain all information included in the DGC-2020 and should be used
for any new Modbus applications.

Intended Use of the Communications Protocol

This document provides the necessary information for 3rd party OEMs to develop in-house software to
communicate with the DGC-2020 via Modbus protocol. This will allow the exchange of setup information
and measured data between a Modbus Master Station and the DGC-2020.

The DGC-2020 data supported for remote access is listed in MAPPING - DGC 2020 Parameters into
MODICON ADDRESS SPACE
in this section.

DETAILED DESCRIPTION OF DGC-2020 MODBUS PROTOCOL

Modbus Protocol Overview

Modbus communications use a master-slave technique in which only the master can initiate a transaction,
called a query. The slave addressed by the query will respond by either supplying the requested data to
the master or by 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
DGC-2020 is designed to communicate on the Modbus only as a slave device.

A master can query slaves individually or query all slaves collectively by initiating a broadcast message. A
slave does not send a response message to a broadcast query.

If a query requests actions unable to be performed by the slave, the slave response message will contain
an Exception Response Code defining the error detected.

Query and response messages share the same message structure. Each message is comprised of four
message fields: the Device Address, the Function Code, the Data Block, and the Error Check field.
Subsequent sections in this document detail each message field and the corresponding functionality
supported by the DGC-2020.

Query / Response Message Structure:

• Device

Address

• Function

Code

• Eight-Bit Data Bytes

• Error

Check

Device Address Field

The Device Address field contains the unique Modbus address of the slave being queried. The addressed
slave will repeat its address in the Device Address field of the response message. This field is 1 byte.

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 will be altered by setting the MSB of the field to "1" if
the response is an error response. This field is 1 byte.

Advertising