AdsClient.ReadStateAsync Method

Reads the ADS status and the device status from an ADS server.


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

Syntax

C#

public Task<ResultReadDeviceState> ReadStateAsync(
CancellationToken cancel
)

Parameters

cancel  CancellationToken

The cancellation token

Return Value

Task<ResultReadDeviceState>
A task that represents the asynchronous 'ReadState' operation. The ResultReadDeviceState parameter contains the state (State) as long as the ErrorCode of the ADS communication after execution.

Implements

IAdsStateProvider.ReadStateAsync(CancellationToken)
ITcAdsRaw.ReadStateAsync(CancellationToken)

Exceptions

Exception

Condition

ObjectDisposedException

Remarks

Not all ADS Servers support the State ADS Request

See Also

Reference

AdsClient Class TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026