Infosys在阅读器中打开 / AI 翻译

ADS · 0 次阅读

AdsClient.RegisterAdsStateChangedAsync Method

Registers for AdsStateChanged events as an asynchronous operation.


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

Syntax

C#

public Task<ResultAds> RegisterAdsStateChangedAsync(
EventHandler<AdsStateChangedEventArgs> handler,
CancellationToken cancel
)

Parameters

handler  EventHandler<AdsStateChangedEventArgs>

The handler function to be registered for AdsStateChanged calls.

cancel  CancellationToken

The cancellation token.

Return Value

Task<ResultAds>
A task that represents the asynchronous 'RegisterAdsStateChanged' operation. The ResultAds parameter contains the state the ErrorCode of the ADS communication after execution.

Exceptions

Exception

Condition

ObjectDisposedException

See Also

Reference

AdsClient Class TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026