Back to Adaptive Vision Library website
You are here: Start » Function Reference » Advantech » AdamTCP_Function01
AdamTCP_Function01
Function code 01. Read discrete output's ON/OFF status.
Syntax
void avl::AdamTCP_Function01 ( AdamTCP_State& ioState, const atl::Optional<atl::String>& inDeviceIP, int inStationAddress, int inStartAddress, int inNumberOfCoils, atl::Array<int>& outValues, atl::Array<bool>& outStatuses )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
ioState | AdamTCP_State& | Object used to maintain state of the function. | |||
inDeviceIP | const Optional<String>& | NIL | The Advantech Adam device IP address. | ||
inStationAddress | int | 0 - | 1 | ||
inStartAddress | int | The address of the first coil. | |||
inNumberOfCoils | int | 1 - 2000 | Requested number of bits. | ||
outValues | Array<int>& | Received values as integers. | |||
outStatuses | Array<bool>& | Received statuses as bits. |
Remarks
You need to specify the IP address of your Adam device in the inDeviceIP port only in the first filter which is using the device. In the consecutive filters you can leave inDeviceIP set to Auto, these filters will connect to the device with the IP address specified in the first filter.
For a more detailed description of the function from this article and other Adam functions available in Adaptive Vision, please refer to the Advantech documentation for your device.
Multithreaded environment
This function is not guaranteed to be thread-safe. When used in multithreaded environment, it has to be manually synchronized.