Symbol.ReadValueAsync Method

Reads the Value of the IValueSymbol asynchronously.

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

Syntax

C#

public Task<ResultReadValueAccess> ReadValueAsync(
    CancellationToken cancel
)

Parameters

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultReadValueAccess.
A tasks that represents the asynchronous 'ReadValue' operation. The read result is stored in the ResultReadValueAccess return value and contains the Value and the ErrorCode.

Implements

IValueSymbol.ReadValueAsync(CancellationToken)

Remarks

Calling on primitive types, a call of this method will return the primitive value. On complex types (structures and arrays) it depends on the ISymbolLoader settings what will happen. In non dynamic modes: the raw byte Array will be returned, in dynamic mode: A Value will be created on the fly.

Reference

Symbol Class

TwinCAT.Ads.TypeSystem Namespace