AdsConnectionWriteControlAsync(AdsState, UInt16, ReadOnlyMemoryByte, CancellationToken) Method

Write control as an asynchronous operation.


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

Syntax

C#

public Task<ResultAds> WriteControlAsync(
    AdsState adsState,
    ushort deviceState,
    ReadOnlyMemory<byte> writeBuffer,
    CancellationToken cancel
)

Parameters

adsState  AdsState

State of the ads.

deviceState  UInt16

State of the device.

writeBuffer  ReadOnlyMemoryByte

The write buffer.

cancel  CancellationToken

The cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value

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

Implements

IAdsStateControlWriteControlAsync(AdsState, UInt16, ReadOnlyMemoryByte, CancellationToken)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

Reference

AdsConnection Class WriteControlAsync Overload TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026