Hello,
I want to start and stop the "ProfibusDl" Task at runtime !
Starting the task is not the problem !
How can I stop and delete the Task ?
if (ptRsc->tLoc.hTskDLTask!=NULL)
eRslt=rX_SysDeleteTask(ptRsc->tLoc.hTskDLTask,500);
I stop the taks with the above command. But when I start the task again the Idetify of the Task says RX_KNL_TASK_UNKNOWN
eRslt = TLR_TSK_IDENTIFY("ProfibusDl", ptRsc->tLoc.uTskInst, &ptRsc->tLoc.hTskDLTask, // task handle
&ptRsc->tLoc.uToknDLTask, // task token
&ptRsc->tLoc.uPrioDLTask ))
Can someone help me ?
Br,
Rainer
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
Hi Rainer,
as far as I know, is it not possible to delete a task during the runtime. Of curse it is possible to call the needed rcX function, but the assigned task resources will not be deleted or deallocated.
If you try after a rX_SysDeleteTask to recreate the task you will not be able to create the task again. The task will not be started again.
I figured out that the Hilscher firmwares are using a packet to set back the task and to reinitialize it. They do not delete a task.