AdsConnection.TryRead Method (UInt32, Memory.Byte., Int32.)

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

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

Syntax

C#

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

Parameters

variableHandle

Type: System.UInt32
The variable handle.

readBuffer

Type: System.Memory.Byte.
The read buffer/data

readBytes

Type: System.Int32.
Number of read bytes.

Return Value

Type: AdsErrorCode
The ADS error code.

Implements

IAdsHandle.TryRead(UInt32, Memory.Byte., Int32.)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

Reference

AdsConnection Class

TryRead Overload

TwinCAT.Ads Namespace