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

Reads data asynchronously from an ADS device.

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

Syntax

C#

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.

Remarks

As object types only primitive types are supported.

Reference

IAdsAnyAccess Interface

ReadAnyAsync Overload

TwinCAT.Ads Namespace