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

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

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

Syntax

C#

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

Parameters

name

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.

Implements

IAdsSymbolicAccess.TryReadValue(String, Type, Object.)

Remarks

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

Reference

AdsClient Class

TryReadValue Overload

TwinCAT.Ads Namespace