Page 1 of 1

How to stop a task

Posted: Sun Dec 05, 2010 8:11 pm
by sergifern
Hi!
I have a problem to stop a task. When I have a task on (with SetRelAlarm), I would like to stop and then Set on again but with a different period. I have found TerminateTask() function, but the compiler says that the function is not declared. I should add some other library? There is another function to do what I want?

Thanks,
Sergi

Re: How to stop a task

Posted: Mon Dec 06, 2010 9:10 am
by paolo.gai
If you specified the period using SetRelAlarm, and you want to change period, you should first cancel the alarm using CancelAlarm, and then set again a new period using SetRelAlarm.

If you want to kill the running task, you can use TerminateTask. (but note that TerminateTask is NOT available under FP, EDF, FRSK kernels!).

Ciao,

PJ