ModbusTCP_ReadInputIntegerRegisters
Function Code 04. Reads contiguous input registers in a remote device
Syntax
C++
Python
def ModbusTCP_ReadInputIntegerRegisters( inSocket: int, /, *, inTimeout: int | None = None, inUnitID: int = 1, inStartingAddress: int = 0, inCount: int = 1, inInputDataFormat: ModbusDataFormat = ModbusDataFormat.UnsignedInteger ) -> outIntegerValues: list[int]
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 input register. |
![]() |
inCount | int | 1 - 125 | 1 | |
![]() |
inInputDataFormat | ModbusDataFormat | ModbusDataFormat.UnsignedInteger | ||
![]() |
outIntegerValues | list[int] | Received integer values |



