IAdsHandleTryCreateVariableHandle Method

Determines the Symbol handle by its instance path synchronously.


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

Syntax

C#

AdsErrorCode TryCreateVariableHandle(
    string symbolPath,
    out uint variableHandle
)

Parameters

symbolPath  String

SymbolName / InstancePath.

variableHandle  UInt32

The symbols handle.

Return Value

AdsErrorCode
The ADS error code.

Remarks

It is a good practice to release all variable handles after use to regain internal resources in the TwinCAT subsystem. The composite method to this TryCreateVariableHandle(String, UInt32) is the TryDeleteVariableHandle(UInt32)

Reference

IAdsHandle Interface TwinCAT.Ads Namespace TryDeleteVariableHandle(UInt32) CreateVariableHandleAsync(String, CancellationToken) CreateVariableHandle(String)

Beckhoff Automation GmbH & Co. KG 2001-2026