AdsClient.ReadAnyAsync.T. Method (UInt32, CancellationToken)

Reads data synchronously from an ADS device.

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 6.0.328+39e3229

Syntax

C#

public Task<ResultValue<T>> ReadAnyAsync<T>(
    uint variableHandle,
    CancellationToken cancel
)

Parameters

variableHandle

Type: System.UInt32
The variable/symbol handle.

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Type Parameters

T

The Type of the value to be read.

Return Value

Type: Task.ResultValue.T..
A task that represents the asynchronous read operation. The ResultAnyValue parameter contains the read value (Value) and the ErrorCode after execution.

Implements

IAdsAnyAccess.ReadAnyAsync.T.(UInt32, CancellationToken)

Remarks

As object types only primitive types are supported.

Reference

AdsClient Class

ReadAnyAsync Overload

TwinCAT.Ads Namespace