Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

TaskHnd

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the task handle of a specific task. You can then use the task handle with other task functions to control the task. If you do not specify a thread name, it will default to that of the current task.

Syntax

TaskHnd( [sName] )

sName:

The thread name of the task. The thread name is the name of the function that was passed to the TaskNew() function. For example, if. . .

TaskNew("MyTask","",0);

then:

hTask=TaskHnd("MyTask");

will return the handle of this task.

If you do not specify a thread name, it will default to that of the current task.

Return Value

The task handle, identifying the table where all data on the task is stored.

TaskKill, TaskNew, TaskResume, TaskSuspend

Example

! Get the task handle of the current task and then kill it.

hTask=TaskHnd();

TaskKill(hTask);

! Get the task handle of MyTask and then kill it.

hTask=TaskHnd("MyTask");

TaskKill(hTask);

See Also

Task Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in