AdsConnection.WriteControlAsync Method (AdsState, UInt16, CancellationToken)

Changes the ADS status and device status of the ADS server asynchronously.

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

Syntax

C#

public Task<ResultAds> WriteControlAsync(
    AdsState state,
    ushort deviceState,
    CancellationToken cancel
)

Parameters

state

Type: TwinCAT.Ads.AdsState
The ADS state.

deviceState

Type: System.UInt16
The device state.

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultAds.
A task that represents the asynchronous 'WriteControl' operation. The ResultAds parameter contains the state the ErrorCode of the ADS communication after execution.

Implements

IAdsStateControl.WriteControlAsync(AdsState, UInt16, CancellationToken)

Reference

AdsConnection Class

WriteControlAsync Overload

TwinCAT.Ads Namespace