Rockwell-automation 57C620 AutoMax Programming Executive Version 3.8 Uživatelský manuál Strana 239

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 298
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 238
CĆ3AutoMax Task Execution
The
Control Block task starts, and finishes executing 2 ticks later
. At
this point, the
BASIC task is eligible to run (its time 0). When it finishes, the time elapsed from
the point of view of the Control Block task is 5 ticks and the higher priority task
can then execute again. At 10 ticks, however, both the Control Block and the
BASIC task are scheduled to run. Because the Control Block task has a higher
priority, it will execute first. The BASIC task will execute immediately afterwards.
Note that although the BASIC task was prevented from executing at the originally
scheduled 10 ticks, it is still scheduled to run again at the next 8Ćtick interval, i.e.,
at 18 ticks. Two ticks into this scan, however, it will be suspended by the Control
Block task which is scheduled to run at 20 ticks. After the Control Block task
completes its scan, the BASIC task will continue the remainder of its scan.
Priority 4 task
Priority 7 task
Time
0 2 5 7 10 12 15 17 18 20 22 23

In applications that
require multiple interdependent tasks, the programmer needs
to ensure that the structure of the individual tasks takes into account the
possible
timing lag between execution of different types of tasks. The first scan of the task
is used to execute only the initialization code for the following types of tasks: all
BASIC tasks with a START EVERY statement, all PC/Ladder Logic tasks, and all
Control Block tasks.
Control
Block
initialization code consists of all statements before the SCAN_L
OOP
statement. BASIC task initialization code consists of all statements before the
START EVERY statement. PC/ladder Logic task initialization code is constructed
by the Executive software.
BASIC tasks without a START EVERY statement do not have initialization code
and are always executed in total (if they are not suspended by a higher priority
task which is scheduled to run) during their first scan. Execution of BASIC tasks
without a START EVERY statement is based only on their priority or their links to
other tasks because there is no method of establishing scan time without a
START
EVERY statement. Note that this type of BASIC task is executed only once
unless it includes a GOTO statement that results in a loop.
Zobrazit stránku 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 297 298

Komentáře k této Příručce

Žádné komentáře