13. Appendix F: Modbus Commands
Chapter 6.11 Adding and Setting Up a Modbus Command, page 68, also shows a few examples of correspondences between the elements displayed in AbcConf and the corresponding Modbus frame fields.
See also: Chapter 6.11.2 With a Generic Modbus Slave, page 70, and chapter 6.11.3 Adding a Special Modbus Command, page 80, if the implementation of one of these commands would be incompatible with its implementation in the gateway, for example. You then have to create a special Modbus command to compensate for this incompatibility.
N.B. here, the notions of “input” and “output” (and assimilated) are irrelevant, as all Modbus commands have access to all of a Modbus slave’s memory. However, these names are retained in order to comply with the terms used in the standard Modbus documentation.
13.1. “Read Holding Registers” Command (16#03)
Frame | Field | Value or properties | |
Query | Starting Address (MSB) | - Address of the 1st output / internal register | |
Starting Address (LSB) | |||
|
| ||
| Number of points (PF) | - Number of output / internal registers | |
| Number of points (Pf) | ||
|
| ||
Response | Byte count | - Number of data bytes = Number of output / internal registers × 2 | |
| Data (first register / MSB) | - Byte swap = “No swapping” (or “Swap 2 bytes”) | |
| Data (premier registre / Pf) | ||
| - Data length = Value of the “Byte count” field | ||
| ……… | ||
| Data (dernier registre / PF) | - Data location = Address in the gateway’s input memory | |
| Data (dernier registre / Pf) | ||
|
|
13.2. “Preset Single Register” Command (16#06)
Frame | Field | Value or properties |
Query | Register (MSB) | - Address of the output / internal register |
| Register (LSB) | |
|
| |
| Preset data (MSB) | - Byte swap = “No swapping” (or “Swap 2 bytes”) |
|
| - Data length = 16#0002 |
| Preset data (LSB) | |
| - Data location = Address in the gateway’s output memory | |
Response | Register (MSB) | - Byte swap = “No swapping” (or “Swap 2 bytes”) |
|
| - Data length = 16#0002 |
| Register (LSB) | |
| - Data location = Address in the gateway’s input memory | |
| Preset data (MSB) | |
| N.B.: These data are an echo to the query. So in most cases there is no | |
| Preset data (LSB) | |
| need to feed them back to the |
Instead of creating a link between the echo of the response to the “Preset Single Register” Command (16#06) and the memory area dedicated to the
110