AdsConnection.TryDeleteVariableHandle Method

Releases the specified symbol/variable handle synchronously.

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

Syntax

C#

public AdsErrorCode TryDeleteVariableHandle(
    uint variableHandle
)

Parameters

variableHandle

Type: System.UInt32
Handle of the ADS variable

Return Value

Type: AdsErrorCode
The ADS error code.

Implements

IAdsHandle.TryDeleteVariableHandle(UInt32)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

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 TryDeleteVariableHandle(UInt32) is the TryCreateVariableHandle(String, UInt32.)

Reference

AdsConnection Class

TwinCAT.Ads Namespace

AdsConnection.TryCreateVariableHandle(String, UInt32.)

AdsConnection.DeleteVariableHandleAsync(UInt32, CancellationToken)

AdsConnection.DeleteVariableHandle(UInt32)