IAdsSymbolicAccess.TryReadValue Method (String, Type, Object.)

Reads the value of a symbol and returns the value as object.

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

Syntax

C#

AdsErrorCode TryReadValue(
    string symbolPath,
    Type type,
    out Object?? value
)

Parameters

symbolPath

Type: System.String
Name of the ADS symbol.

type

Type: System.Type
Managed type of the ADS symbol.

value

Type: System.Object.
The read value of the Symbol.

Return Value

Type: AdsErrorCode
The AdsErrorCode.

Remarks

The parameter type must have the same binary layout as the ADS symbol.

Reference

IAdsSymbolicAccess Interface

TryReadValue Overload

TwinCAT.Ads Namespace

IAdsSymbolicAccess.ReadValue(String, Type)

IAdsSymbolicAccess.ReadValueAsync.T.(String, CancellationToken)

IAdsSymbolicAccess.ReadValueAsync(String, Type, CancellationToken)