115
11. Appendix E: Modbus Commands
11.3. “Preset Multiple Registers” Command (16#10)
Frame Field Value or properties
Query Starting Address (MSB)
Starting Address (LSB) - Address of the 1st output / internal register
Number of Registers (MSB)
Number of Registers (LSB) - Number of output / internal registers
Byte Count - Number of data bytes = number of output / internal registers × 2
Data (first register / MSB)
Data (first register / LSB)
………
Data (last register / MSB)
Data (last register / LSB)
- Byte swap = “Swap 2 bytes” (or “No swapping”)
- Data length = Value of the “Byte count” field
- Data location = Address in the gateway’s output memory
Response Starting Address (MSB)
Starting Address (LSB)
- Address of the 1st output / internal register
Number of Registers (MSB)
Number of Registers (LSB)
- Number of output / internal registers
11.4. Modbus Protocol Exception Responses
When it cannot process a command dictated by a Modbus query, a slave sends an exception response instead
of the normal response to the query.
With standard Modbus commands, the LUFP9 gateway considers that all exception responses
which it receives from Modbus slaves are incorrect responses. As a result, it will carry out the
re-transmissions configured for the queries involved.
If you want the software application for your DeviceNet master to be able to specifically
manage exception responses, you can replace the Modbus command, in AbcConf, with a
personalized command (see chapter 6.11.3.2 Modbus Commands which Can Be Completely
Changed by the User, page 74). This then allows you to feed back the “Slave Address” and
“Function” fields to the DeviceNet master.
The structure of an exception response is independent of the Modbus command associated with the “Function”
field of the query involved. The whole frame of an exception response is shown below :
Slave Address Modbus address (1 to 247; addresses 125, 126 and 127 prohibited): The value of this field
is identical to that of the “Slave Address” field of the query involved.
Function Command code, with exception indicator: The value of this field is set to 16#80 + the value
of the “Function” field of the query involved.
Exception Code Code indicating the nature of the error which has caused the exception response (see table
on next page).
Checksum (Lo)
Checksum (Hi) Error check