You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/components/modbus_controller.md
+52-41Lines changed: 52 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,18 @@ On the bus side, you need 120 Ohm termination resistors at the ends of the bus c
68
68
69
69
- **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.
70
70
71
+
- **server_courtesy_response** (*Optional*): Configuration block to enable the courtesy response feature when the device is acting as a Modbus server.
72
+
73
+
- **enabled** (*Optional*, boolean): Whether to enable the courtesy response feature.
74
+
Defaults to `false`.
75
+
- **register_last_address** (*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.
76
+
Any read request that includes undefined registers within this range will return the value specified by `register_value` instead of triggering an exception.
77
+
Defaults to `65535`
78
+
- **register_value** (*Optional*, integer): The 16-bit value (range: 0–65535) to return for undefined registers within the address range defined by `register_last_address`.
79
+
Defaults to `0`.
80
+
71
81
- **server_registers** (*Optional*): A list of registers that are responded to when acting as a server.
82
+
72
83
- **address** (**Required**, integer): start address of the first register in a range
73
84
- **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)
74
85
@@ -215,20 +226,20 @@ Some devices use decimal values in read registers to show multiple binary states
In the example below, register `15`, holds several binary values. It stores the decimal value `12288`, which is the sum of `4096` + `8192`, meaning the corresponding bits `12` and `13` are `1`, the other bits are `0`.
234
245
@@ -492,40 +503,40 @@ The response is mapped to the sensor based on `register_count` and offset in byt
0 commit comments