Read holding registers, Return query data – Basler Electric DGC-2020 User Manual
Page 435
9400200990 Rev X
DGC-2020 Modbus
™ Communication
B-3
•
Function 03 - Read Holding Registers
•
Function 6 - Preset Single Register, Non-Broadcast & Broadcast
•
Function 08, Subfunction 00 - Diagnostics: Return Query Data
•
Function 16 - Preset Multiple Registers, Non-Broadcast & Broadcast
The only Broadcast query supported by the DGC-2020 is the Preset Multiple Registers query.
Read Holding Registers
Read Holding Registers - General
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.
Device Address
Function Code 03 (hex)
Starting Address Hi
Starting Address Lo
No. of Registers Hi
No. of Registers Lo
CRC Error Check
The number of registers cannot exceed 125 without causing an error response with Exception Code
"Illegal Function".
Queries to read Write Only or unsupported registers result in an error response with Exception Code of
“Illegal Data Address”.
RESPONSE:
The response message contains the data queried, respectively. The data block contains the block length
in bytes followed by the data for each requested register. Attempting to read an unused register or a
register which does not support read results in an error response with Exception Code of "Illegal Data
Address".
Device Address
Function Code
03 (hex)
Byte Count
Data Hi
Data Lo
.
.
.
Data Hi
Data Lo
CRC 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.
Device Address
Function Code
08 (hex)
Subfunction Hi
00 (hex)
Subfunction Lo
00 (hex)
Data Hi
Data Lo
CRC Error Check