AdsClient.ReadWrite(UInt32, Memory<Byte>, ReadOnlyMemory<Byte>) Method

Writes data synchronously to an ADS device and then Reads data from that target.


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

Syntax

C#

public int ReadWrite(
uint variableHandle,
Memory<byte> readBuffer,
ReadOnlyMemory<byte> writeBuffer
)

Parameters

variableHandle  UInt32

Variable handle.

readBuffer  Memory<Byte>

The read buffer.

writeBuffer  ReadOnlyMemory<Byte>

The write buffer.

Return Value

Int32
Number of successfully returned data bytes.

Implements

IAdsHandle.ReadWrite(UInt32, Memory<Byte>, ReadOnlyMemory<Byte>)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

See Also

Reference

AdsClient Class ReadWrite Overload TwinCAT.Ads Namespace TryReadWrite(UInt32, Memory<Byte>, ReadOnlyMemory<Byte>, Int32) ReadWriteAsync(UInt32, Memory<Byte>, ReadOnlyMemory<Byte>, CancellationToken)

Beckhoff Automation GmbH & Co. KG 2001-2026