AdsConnectionCreateVariableHandleAsync Method
Determines the Symbol handle by its instance path asynchronously.
Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll)
Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470
Syntax
C#
public Task<ResultHandle> CreateVariableHandleAsync(
string variableName,
CancellationToken cancel
)Parameters
|
variableName String |
Name of the variable. |
|
cancel CancellationToken |
The cancellation token. |
Return Value
Task
ResultHandle
A task that represents the asynchronous
'CreateVariableHandle' operation. The ResultHandle
parameter contains the variable handle (Handle) and the
ErrorCode
after execution.
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 CreateVariableHandleAsync(String, CancellationToken) is the DeleteVariableHandleAsync(UInt32, CancellationToken)
Reference
AdsConnection Class TwinCAT.Ads Namespace DeleteVariableHandleAsync(UInt32, CancellationToken) TryCreateVariableHandle(String, UInt32) CreateVariableHandle(String)
Beckhoff Automation GmbH & Co. KG 2001-2026