IAdsHandleTryRead Method

Reads the value synchronously data of the symbol, that is represented by the variable handle into the readBuffer.


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

Syntax

C#

AdsErrorCode TryRead(
    uint variableHandle,
    Memory<byte> readBuffer,
    out int readBytes
)

Parameters

variableHandle  UInt32

The variable handle.

readBuffer  MemoryByte

The read buffer/data

readBytes  Int32

Number of read bytes.

Return Value

AdsErrorCode
The ADS error code.

Reference

IAdsHandle Interface TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026