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.

2.1.2.4 Real-Time Tasks<br />

Structure of an Application<br />

Tasks %TH0 to %TH15 allow processing of high priority events that cannot wait for the end of the RTC cycle.<br />

Tasks %TH therefore have higher priority than tasks %TS and %TF.<br />

An activated %TH task cannot interrupt a running %TH task.<br />

The hierarchy of %TH task priorities is determined by their number:<br />

Operation of Tasks %TH<br />

%TH0 priority > %TH1 priority > ... > %TH15 priority.<br />

The programmer associates a task %TH with a hardware interrupt by the following <strong>function</strong>s:<br />

thiti() probe interrupt.<br />

thtimer() timer interrupt.<br />

When the interrupt occurs, the system starts execution of the associated task %TH.<br />

If several %TH tasks are activated during the same RTC cycle, the total time required for processing each interrupt<br />

routine must not exceed 4 ms. If it does, the machine processor goes into the «computation time overrun» error.<br />

MONITOR %TSn (user programme) %THn<br />

1 RTC cycle (20 ms)<br />

Activation<br />

%THn %THn–1<br />

t > 4ms<br />

%THn–1 %TFn<br />

Computation time overrun<br />

machine processor error<br />

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

2

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

Saved successfully!

Ooh no, something went wrong!