IAdsSymbolicAccessReadValue(String, Type) Method

Reads the value of a symbol specified with its instance path and returns the value as object of the specified type.


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

Syntax

C#

Object ReadValue(
    string instancePath,
    Type? type
)

Parameters

instancePath  String

Symbol/Instance Path of the ADS symbol.

type  Type

Managed type (.NET Type) of the ADS symbol value that will be read, or NULL to use automatic marshalling for primitive types.

Return Value

Object
Value of the symbol

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 ReadValue Overload TwinCAT.Ads Namespace ReadValue(String) TryReadValue(String, Type, Object) ReadValueAsync(String, Type, CancellationToken)

Beckhoff Automation GmbH & Co. KG 2001-2026