AdsConnectionReadAnyStringAsync(String, Int32, Encoding, CancellationToken) Method

Read any string as an asynchronous operation.


Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public Task<ResultAnyValue> ReadAnyStringAsync(
    string instancePath,
    int len,
    Encoding? encoding,
    CancellationToken cancel
)

Parameters

instancePath  String

The instance path.

len  Int32

The length.

encoding  Encoding

The string value encoding (IAdsConnection.DefaultValueEncoding if null)

cancel  CancellationToken

The cancellation token.

Return Value

Task ResultAnyValue
A Task<ResultAnyValue> representing the asynchronous operation.

Implements

IAdsAnyAccessReadAnyStringAsync(String, Int32, Encoding, CancellationToken)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

Reference

AdsConnection Class ReadAnyStringAsync Overload TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026