IValueSymbol.TryReadValue Method

Reads the Value of the IValueSymbol

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

Syntax

C#

int TryReadValue(
    int timeout,
    out Object?? value
)

Parameters

timeout

Type: System.Int32
The timeout in ms.

value

Type: System.Object.
The symbol value.

Return Value

Type: Int32
The error code.

Remarks

Calling on primitive types, a call of this method will return the primitive value. On complex types (structures and arrays) it depends on the ISymbolLoader settings what will happen. In non dynamic modes: the raw byte Array will be returned, in dynamic mode: A Value will be created on the fly. A negative timeout indicates that the Default Timeout for the communication will be used. 0 means timeout is switched off.

Reference

IValueSymbol Interface

TwinCAT.TypeSystem Namespace