IAdsAnyAccess.ReadAny Method (Int32, Type, .Int32.)

Reads data synchronously from an ADS device and writes it to an object.

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 4.3.0.0

Syntax

C#

Object ReadAny(
    int variableHandle,
    Type type,
    int[] args
)

VB

Function ReadAny ( 
    variableHandle As Integer,
    type As Type,
    args As Integer()
) As Object

Parameters

variableHandle

Type: System.Int32
Handle of the ADS variable.

type

Type: System.Type
Type of the object to be read.

args

Type: .System.Int32.
Additional arguments.

Return Value

Type: Object
The object the read data is written to.

Remarks

If the Type of the object to be read is a string type, the first element of the parameter args specifies the number of characters of the string. If the Type of the object to be read is an array type, the number of elements for each dimension has to be specified in the parameter args. At the moment only 1 dimensional Arrays are supported.

Reference

IAdsAnyAccess Interface

ReadAny Overload

TwinCAT.Ads Namespace