AdsConnection.ReadAny Method (UInt32, UInt32, Type, .Int32.)

Reads data synchronously from an ADS device and writes it to an object. 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.

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

Syntax

C#

public Object ReadAny(
    uint indexGroup,
    uint indexOffset,
    Type type,
    int[] args
)

VB

Public Function ReadAny ( 
    indexGroup As UInteger,
    indexOffset As UInteger,
    type As Type,
    args As Integer()
) As Object

Parameters

indexGroup

Type: System.UInt32
Index group of the ADS variable.

indexOffset

Type: System.UInt32
Index offset 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.

Implements

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

Reference

AdsConnection Class

ReadAny Overload

TwinCAT.Ads Namespace