IAdsHandleRead Method

Reads data synchronously from an ADS device and writes to the specified readBuffer.


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

Syntax

C#

int Read(
    uint variableHandle,
    Memory<byte> readBuffer
)

Parameters

variableHandle  UInt32

Handle of the ADS variable

readBuffer  MemoryByte

The read buffer / data

Return Value

Int32
Number of successfully returned data bytes.

Reference

IAdsHandle Interface TwinCAT.Ads Namespace TryRead(UInt32, MemoryByte, Int32)ReadAsync(UInt32, MemoryByte, CancellationToken)

Beckhoff Automation GmbH & Co. KG 2001-2026