15.07.2013 Views

Automatic control function programming manual ladder language

Automatic control function programming manual ladder language

Automatic control function programming manual ladder language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Operation of the Background Tasks<br />

NOT READY —> READY<br />

Structure of an Application<br />

When the system is reset, tasks %TF are in NOT READY state. The call to <strong>function</strong> tfstart(n) causes %TFn to go into<br />

READY state.<br />

WAITING or READY or RUNNING —> NOT READY<br />

The call to <strong>function</strong> tfstop(n) causes task %TFn to go into NOT READY state.<br />

READY —> RUNNING<br />

In READY state, a task %TF is executed as soon as no task is RUNNING and no %TF task with higher priority is in<br />

READY state.<br />

The hierarchy of tasks %TF is determined by their number:<br />

RUNNING —> SUSPENDED<br />

%TF0 priority > %TF1 priority > ... > %TF15 priority<br />

Task %TF is suspended to allow execution of a task %TS or %TH. Tasks %TF are not mutually preemptible.<br />

SUSPENDED —> RUNNING<br />

When no %TS or %TH task is running, the suspended %TF task is resumed.<br />

RUNNING —> WAITING<br />

Task %TF calls <strong>function</strong> whtr() or ends (end of task reached).<br />

REMARK Function whtr(..) programmed in a background task interrupts the task during<br />

execution to allow the execution of other %TF tasks in READY state.<br />

WAITING —> READY<br />

The task was placed on wait by <strong>function</strong> whtr(..) for a given number of RTC cycles which have now elapsed.<br />

The task is completed, and the occurrence of the RTC returns it to READY state.<br />

en-938846/3 2 - 7<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!