Pag. 70 di 152
9 MODBUS Protocol
9.1 Foreword:
The instrument modbus protocol is implemented according to the document “
MODBUS Application
Protocol Specification V1.1
”, available in
www.modbus.org
.
The following “Public functions” are implemented:
(0x01)
Read
Coils
(0x02) Read Discrete Inputs
(0x03) Read Holding Registers
(0x04) Read Input Registers
(0x05) Write Single Coil
(0x06) Write Single Register
(0x07) Read Exception Status
(0x08)
Diagnostics
(0x0F) Write Multiple Coils
(0x10) Write Multiple Registers
(0x11) Report Slave ID
Regarding the “Diagnostics” function, the following “Sub-functions” are implemented:
−
(0x0000) Return Query Data
−
(0x0001) Restart Communications Option
−
(0x0004) Force Listen Only Mode
The only implemented function “User Defined” is marked “Change Slave Address” (function code 0x42).
Through two coils named SWAP BYTES and SWAP WORDS, it is possible to modify the memory area
organization where the modbus registers mapping are. The configuration [SWAP BYTES = FALSE, SWAP
WORDS = FALSE] correspond to a “Big-Endian” type organization (Motorola like): the most significant
data byte whose size is bigger than byte is allocated at the lower address.
The order of the bigger than byte data transmitted on the serial line depend on the memory organization.
In the “Big-Endian” organization type, the most significant byte is the one transmitted first (standard
modbus).
Vice versa, the configuration [SWAP BYTES = TRUE, SWAP WORDS = TRUE] corresponds to an “INTEL
like” memory organization (the most significant byte at the higher address, that is less significant byte
transmitted first on the serial line).
Note: In the released version, not all the listed commands are available, check in the following pages for
availability.
The default configuration is “Big-Endian” (Motorola like) as the modbus standard specify and not “Little-
Endian” as the previous instruments.