Back to FabImage Library website
You are here: Start » Function Reference » Hardware Support » Advantech » AdamTCP_Function04
Header: | ThirdPartySdk.h |
---|---|
Namespace: | fil |
Module: | ThirdParty |
Function code 04. Reads the binary contents of input registers.
Syntax
void fil::AdamTCP_Function04 ( AdamTCP_State& ioState, const ftl::Optional<ftl::String>& inDeviceIP, int inStationAddress, int inStartAddress, int inNumberOfRegister, ftl::Array<int>& outValues )
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 input register. | ||
![]() |
inNumberOfRegister | int | 1 - ![]() |
Number of registers to read. | |
![]() |
outValues | Array<int>& | Received values as integers. |
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 FabImage, 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.
See Also
- AdamTCP_Function01 – Function code 01. Reads discrete output's ON/OFF status.
- AdamTCP_Function02 – Function code 02. Reads discrete input's ON/OFF status.
- AdamTCP_Function03 – Function code 03. Reads the binary contents of input registers.
- AdamTCP_Function05 – Function code 05. Forces a single coil to either ON or OFF.