IAccessorRawValue.WriteArrayElementRawAsync Method

Writes an array element value from raw memory asynchronously to the ADS Device.

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

Syntax

C#

Task<ResultWriteAccess> WriteArrayElementRawAsync(
    IArrayInstance arrayInstance,
    int[] indices,
    ReadOnlyMemory<byte> writeBuffer,
    CancellationToken cancel
)

Parameters

arrayInstance

Type: TwinCAT.TypeSystem.IArrayInstance
The array instance.

indices

Type: .System.Int32.
The indices of the array element.

writeBuffer

Type: System.ReadOnlyMemory.Byte.
The write buffer containing the data to write (element value).

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultWriteAccess.
A task that represents the asynchronous 'WriteRaw' operation. The ResultWriteAccess result contains the the ErrorCode after execution.

Reference

IAccessorRawValue Interface

TwinCAT.ValueAccess Namespace