AdsConnection.Write Method (UInt32, ReadOnlyMemory.Byte.)

Writes data synchronously to an ADS device.

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

Syntax

C#

public void Write(
    uint variableHandle,
    ReadOnlyMemory<byte> writeBuffer
)

Parameters

variableHandle

Type: System.UInt32
Handle of the ADS variable

writeBuffer

Type: System.ReadOnlyMemory.Byte.
The write buffer / value to be written

Implements

IAdsHandle.Write(UInt32, ReadOnlyMemory.Byte.)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

Reference

AdsConnection Class

Write Overload

TwinCAT.Ads Namespace

IAdsHandle.TryWrite(UInt32, ReadOnlyMemory.Byte.)

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