Skip to content

Commit c5a9faa

Browse files
committed
feat(modbus_controller): Add courtesy response configuration for Modbus server
1 parent 8f9b0ef commit c5a9faa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/modbus_controller.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,18 @@ Configuration variables:
7373

7474
- **max_cmd_retries** (*Optional*, integer): How many times a command will be retried if no response is received. It doesn't include the initial transmition. Defaults to 4.
7575

76+
- **server_courtesy_response** (*Optional*): A configuration block used to enable a courtesy response when acting as a Modbus server.
77+
If present in the configuration, the courtesy response feature is enabled.
78+
79+
- **register_count** (*Optional*, integer): The highest Modbus register address (inclusive) up to which undefined registers are allowed to be read and will be padded with a default value.
80+
Any read request that includes undefined registers within this range will return the value specified by ``register_value`` instead of triggering an exception.
81+
Defaults to ``65535``.
82+
83+
- **register_value** (*Optional*, integer): The 16-bit value (range: 0–65535) to return for undefined registers within the address range defined by ``register_count``.
84+
Defaults to ``0``.
85+
7686
- **server_registers** (*Optional*): A list of registers that are responded to when acting as a server.
87+
7788
- **address** (**Required**, integer): start address of the first register in a range
7889
- **value_type** (*Optional*): datatype of the mod_bus register data. The default data type for ModBUS is a 16 bit integer in **big endian** format (network byte order, MSB first)
7990

0 commit comments

Comments
 (0)