AdsClient.DeleteVariableHandleAsync Method

Releases the specified symbol/variable handle asynchronously.


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

Syntax

C#

public Task<ResultAds> DeleteVariableHandleAsync(
uint variableHandle,
CancellationToken cancel
)

Parameters

variableHandle  UInt32

Handle of the ADS variable

cancel  CancellationToken

The cancellation token.

Return Value

Task<ResultAds>
A task that represents the asynchronous 'DeleteVariableHandle' operation. The ResultAds parameter contains the ErrorCode after execution.

Implements

IAdsHandle.DeleteVariableHandleAsync(UInt32, CancellationToken)
ITcAdsRaw.DeleteVariableHandleAsync(UInt32, CancellationToken)

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 DeleteVariableHandleAsync(UInt32, CancellationToken) is the CreateVariableHandleAsync(String, CancellationToken)

See Also

Reference

AdsClient Class TwinCAT.Ads Namespace CreateVariableHandleAsync(String, CancellationToken) TryDeleteVariableHandle(UInt32) DeleteVariableHandle(UInt32)

Beckhoff Automation GmbH & Co. KG 2001-2026