Preset single register – Basler Electric DGC-2020HD Modbus Protocol User Manual
Page 13
![background image](https://www.manualsdir.com/files/773959/content/doc013.png)
9469300991 Rev A
7
DGC-2020HD Modbus
™ Protocol
General Information
•
An incorrect Byte Count will result in an error response with Exception Code of “Illegal Data
Value”.
•
There are several instances of registers that are grouped together to collectively represent a
single numerical DGC-2020HD data value (i.e. - floating point data, 32-bit integer data, and
strings). A query to write a subset of such a register group will result in an error response with
Exception Code “Illegal Data Address”.
•
A query to write a not allowed value (out of range) to a register results in an error response with
Exception Code of “Illegal Data Value”.
Device Address
Function Code =
10 (hex)
Starting Address Hi
Starting Address Lo
No. of Registers Hi
No. of Registers Lo
Byte Count
Data Hi
Data Lo
.
.
Data Hi
Data Lo
CRC Hi error check
CRC Lo error check
Response
The response message echoes the starting address and the number of registers. There is no response
message when the query is a broadcast (device address = 0).
Device Address
Function Code =
10 (hex)
Starting Address Hi
Starting Address Lo
No. of Registers Hi
No. of Registers Lo
CRC Hi Error Check
CRC Lo Error Check
Preset Single Register
A Preset Single Register query message requests a single register to be written. If the query is a
broadcast (device address = 0), no response message is returned.
Note: Only data types INT16, INT8, UINT16, UINT8, and String (not longer than 2 bytes), can be preset
by this function.
Query
Data will cease to be written if any of the following exceptions occur.
•
Queries to write to Read Only registers result in an error response with Exception Code of “Illegal
Data Address”.
•
A query to write an unallowed value (out of range) to a register results in an error response with
Exception Code of “Illegal Data Value”.
Device Address
Function Code =
06 (hex)
Address Hi
Address Lo
Data Hi
Data Lo