AdamTCP_Function02


Function code 02. Reads discrete input's ON/OFF status.

Syntax

C++
Python
 
def AdamTCP_Function02(
	state: AdamTCP_State,
	/,
	*,
	inDeviceIP: str | None = None,
	inStationAddress: int = 1,
	inStartAddress: int = 0,
	inNumberOfCoils: int = 1
)
-> (
	outValues: list[int],
	outStatuses: list[bool]
)

Parameters

Name Type Range Default Description
Input will be modified ioState AdamTCP_State
Input value inDeviceIP str | None None The Advantech Adam device IP address.
Input value inStationAddress int 0 - 1
Input value inStartAddress int 0 The address of the first input.
Input value inNumberOfCoils int 1 - 1 Requested number of bits.
Output value outValues list[int] Received values as integers.
Output value outStatuses list[bool] Received statuses as bits.

Multithreaded environment

This function is not guaranteed to be thread-safe. When used in multithreaded environment, it has to be manually synchronized.