AdsClient.ReadAnyStringAsync Method (UInt32, Int32, Encoding, CancellationToken)

Reads a string asynchronously from the specified symbol/variable

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

Syntax

C#

public Task<ResultAnyValue> ReadAnyStringAsync(
    uint variableHandle,
    int len,
    Encoding encoding,
    CancellationToken cancel
)

Parameters

variableHandle

Type: System.UInt32
The variable handle.

len

Type: System.Int32
The length.

encoding

Type: System.Text.Encoding
The encoding.

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

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

Implements

IAdsAnyAccess.ReadAnyStringAsync(UInt32, Int32, Encoding, CancellationToken)

Reference

AdsClient Class

ReadAnyStringAsync Overload

TwinCAT.Ads Namespace