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: i18n/en/docusaurus-plugin-content-docs/current/reference/modbus.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ For this purpose, in addition to the general 'modbus' settings (see above), a `r
192
192
The definition of a register requires the following parameters:
193
193
194
194
- `address`: the register address
195
-
- `type`: The register type, allowed are `coil`, `input`, `holding`
195
+
- `type`: The register type, allowed read types are `coil`, `input`, `holding`, write types are `writeholding`, `writeholdings`, `writecoil`
196
196
- `decode`: The type of encoding of the data. Allowed are: `int16|32|64, uint16|32|64, float32|64 and u|int32s + float32s`. For type `coil` the encoding is ignored, but must still be specified. For type `writecoil`, `bool8` must be specified.
197
197
- `bitmask`: An optional specification. The specified value is ANDed with the read value to extract individual bits.
198
198
@@ -219,7 +219,8 @@ For the `int32s/uint32s` decodings, the byte order is swapped, which is useful f
219
219
220
220
### Writing Registers
221
221
222
-
Both holding registers and coils can be written. For this, either `type: writeholding` for holding registers or `type: writecoil` for coils must be specified.
222
+
Both holding registers and coils can be written. For this, either `type: writeholding` for holding registers or `type: writecoil` for coils must be specified. For writing multiple registers (function code 16) the type `writeholdings` is available.
223
+
223
224
`type: writeholding` always writes a 16-bit register (int or bool16). Therefore, for `decode`, `uint16` must always be specified.
224
225
`type: writecoil` writes a coil. For `decode`, `bool8` must be specified.
225
226
@@ -230,7 +231,7 @@ source: modbus
230
231
---
231
232
register:
232
233
address: 40070
233
-
type: writeholding # writeholding or writecoil
234
+
type: writeholding # writeholding, writeholdings or writecoil
0 commit comments