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

read any string as an asynchronous operation.

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

Syntax

C#

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

Parameters

indexGroup

Type: System.UInt32
The index group.

indexOffset

Type: System.UInt32
The index offset.

len

Type: System.Int32
The string length to be read.

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 value (Value) and the ErrorCode after execution.

Implements

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

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

Reference

AdsConnection Class

ReadAnyStringAsync Overload

TwinCAT.Ads Namespace