beautypg.com

Decs-250n modbus™ via ethernet, Read holding registers, Query – Basler Electric DECS-250N User Manual

Page 219: Response, Return query data

background image

9440500990 Rev D

203

DECS-250N

Modbus™ Communication

DECS-250N Modbus

™ via Ethernet

Modbus can communicate through Ethernet if the IP address of the DECS-250N is configured as
described in the Communications chapter of this manual.

Detailed Message Query and Response for RTU Transmission Mode

A detailed description of DECS-250N 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)

CRC Hi error check

This manual is related to the following products: