ModbusTCP_ReadMultipleRegisters_AsByteBuffer


Function Code 03. Reads the contents of a contiguous block of holding registers in a remote device

Syntax

C++
Python
 
def ModbusTCP_ReadMultipleRegisters_AsByteBuffer(
	inSocket: int,
	outData: ByteBuffer,
	/,
	*,
	inTimeout: int | None = None,
	inUnitID: int = 1,
	inStartingAddress: int = 0,
	inCount: int = 1
)
-> None

Parameters

Name Type Range Default Description
Input value inSocket int Connected socket ID on port 502.
Input value inTimeout int | None 10 - None Timeout in milliseconds, block if not specified.
Input value inUnitID int 0 - 255 1 Default is 1.
Input value inStartingAddress int 0 - 65535 0 The address of the first holding register.
Input value inCount int 1 - 125 1 Number of registers to read. Each register is 2 Bytes in size.
Output value outData ByteBuffer Received register values.