AdsConnection.ReadStateAsync Method

Read the ADS State asynchronously

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

Syntax

C#

public Task<ResultReadDeviceState> ReadStateAsync(
    CancellationToken cancel
)

Parameters

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultReadDeviceState.
A task that represents the asynchronous 'ReadState' operation. The ResultReadDeviceState parameter contains the value State and the ErrorCode of the ADS communication after execution.

Implements

IAdsStateProvider.ReadStateAsync(CancellationToken)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

Remarks

Not all ADS Servers support the State ADS Request

Reference

AdsConnection Class

TwinCAT.Ads Namespace