AdsClient.TryCreateVariableHandle Method

Determines the Symbol handle by its instance path synchronously.

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

Syntax

C#

public AdsErrorCode TryCreateVariableHandle(
    string symbolPath,
    out uint variableHandle
)

Parameters

symbolPath

Type: System.String
SymbolName / InstancePath.

variableHandle

Type: System.UInt32.
The symbols handle.

Return Value

Type: AdsErrorCode
The ADS error code.

Implements

IAdsHandle.TryCreateVariableHandle(String, UInt32.)

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

AdsClient Class

TwinCAT.Ads Namespace

AdsClient.TryDeleteVariableHandle(UInt32)

AdsClient.CreateVariableHandleAsync(String, CancellationToken)

AdsClient.CreateVariableHandle(String)