ModbusTCP_WriteMultipleRegisters_AsByteBuffer
Function Code 16. Writes a block of contiguous registers (1 to 123 registers) in a remote device
Syntax
C++
Python
def ModbusTCP_WriteMultipleRegisters_AsByteBuffer( inSocket: int, inBuffer: ByteBuffer, /, *, inTimeout: int | None = None, inUnitID: int = 1, inStartingAddress: int = 0 ) -> None
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inSocket | int | Connected socket ID on port 502. | ||
![]() |
inTimeout | int | None | 10 - ![]() |
None | Timeout in milliseconds, block if not specified. |
![]() |
inUnitID | int | 0 - 255 | 1 | Default is 1. |
![]() |
inStartingAddress | int | 0 - 65535 | 0 | The address of the first register. |
![]() |
inBuffer | ByteBuffer | Buffer with values to set. |


