beautypg.com

Dgc-2020hd modbus via ethernet, Read holding registers, Return query data – Basler Electric DGC-2020HD Modbus Protocol User Manual

Page 11: Dgc-2020hd modbus, Via ethernet

background image

9469300991 Rev A

5

DGC-2020HD Modbus

™ Protocol

General Information

DGC-2020HD Modbus

via Ethernet

Modbus

can communicate through Ethernet if the IP address of the DGC-2020HD is configured as

described in the Instruction Manual for Digital Genset Controller DGC-2020HD (Basler Publication
9469300990).

Detailed Message Query and Response for RTU Transmission Mode

A detailed description of DGC-2020HD supported message queries and responses is provided in the
following paragraphs.

Read Holding Registers
Query

This query message requests a register or block of registers to be read. The data block contains the starting
register address and the quantity of registers to be read. A register address of N will read holding register
N+1. If the query is a broadcast (device address = 0), no response message is returned.

Device Address
Function Code =

03 (hex)

Starting Address Hi
Starting Address Lo
No. of Registers Hi
No. of Registers Lo
CRC Hi error check
CRC Lo error check

The number of registers cannot exceed 125 without causing an error response with the exception code
for an illegal function.

Response

The response message contains the data queried. The data block contains the block length in bytes
followed by the data (one Data Hi byte and one Data Lo byte) for each requested register.

Reading an unassigned holding register returns a value of zero.

Device Address
Function Code =

03 (hex)

Byte Count
Data Hi (For each requested register, there is one Data Hi and one Data Lo.)
Data Lo
.
.
Data Hi
Data Lo
CRC Hi error check
CRC Lo error check

Return Query Data

This query contains data to be returned (looped back) in the response. The response and query
messages should be identical. If the query is a broadcast (device address = 0), no response message is
returned.
Device Address
Function Code =

08 (hex)

Subfunction Hi =

00 (hex)

Subfunction Lo =

00 (hex)

Data Hi =

xx (don't care)

Data Lo =

xx (don't care)