AdsClient.WriteAsync Method (UInt32, ReadOnlyMemory.Byte., CancellationToken)

Writes the value data asynchronously that is represented by the writeBuffer to the symbol specified by the variableHandle.

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

Syntax

C#

public Task<ResultWrite> WriteAsync(
    uint variableHandle,
    ReadOnlyMemory<byte> writeBuffer,
    CancellationToken cancel
)

Parameters

variableHandle

Type: System.UInt32
The variable handle.

writeBuffer

Type: System.ReadOnlyMemory.Byte.
The write buffer/value.

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultWrite.
A task that represents the asynchronous write operation. The ResultWrite parameter contains the ErrorCode after execution.

Implements

IAdsHandle.WriteAsync(UInt32, ReadOnlyMemory.Byte., CancellationToken)

Reference

AdsClient Class

WriteAsync Overload

TwinCAT.Ads Namespace