IAdsSymbolicAccessTryReadValueT(ISymbol, T) Method

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


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

Syntax

C#

AdsErrorCode TryReadValue<T>(
    ISymbol symbol,
    out T? value
)

Parameters

symbol  ISymbol

The symbol that should be read.

value  T

The value.

Type Parameters

T

The value type.

Return Value

AdsErrorCode
The ADS Error Code

Remarks

This method automatically marshals the read values to appropriate .NET objects if possible. The overall behaviour is described here in the interface description.

Reference

IAdsSymbolicAccess Interface TryReadValue Overload TwinCAT.Ads Namespace ReadValueT(ISymbol) ReadValueAsync(ISymbol, CancellationToken)

Beckhoff Automation GmbH & Co. KG 2001-2026