Kills a task. The Cicode task will be stopped and will not run again.
The task handle, returned from the TaskNew() or TaskHnd() function. The task handle identifies the table where all data on the associated task is stored.
0 (zero) if successful, otherwise an error is returned.
Note: TaskKill is an abrupt way to stop a Cicode task. It can cause system errors and may have unintended consequences. Whenever possible, use TaskGetSignal and TaskSetSignal to stop Cicode tasks. Use TaskKill as a last resort and after observing the following:
UNINTENDED EQUIPMENT OPERATION
Failure to follow these instructions can result in death, serious injury, or equipment damage.
TaskGetSignal, TaskSetSignal, TaskHnd, TaskNew, TaskResume, TaskSuspend
! Create a task, run it for 10 seconds and then kill it.
WHILE 1 DO