Introduction
1-6
PC3000 Real Time Operating
The function blocks within the User Program are assigned to be under the control of
a designated task. By default, the PC3000 Programming Station arranges function
blocks to be in either a 10ms or 100ms task. Function blocks dealing with purely
digital parameters such as digital I/O function blocks, are nominally run in the 10ms
task, while function blocks associated with analogue I/O or floating point
computation and the Sequential Function Chart (SFC) are run in the 100ms task.
However, these are only default task assignments. It is possible to assign function
blocks to other tasks or to create more tasks, if there are special timing or
performance requirements. Additional tasks can be specified by creating Task
function blocks when the User Program is being developed on the PC3000
Programming Station. Refer to Chapter 7 Real Time Task Scheduler for further
details.
Figure 1-3 shows an example User Program consisting of three tasks. Each task is
associated with a number of I/O input and output values defined by the I/O
parameters accessed by the function blocks assigned to the task.
Each task has an interval, defined by the corresponding task function block’s
Interval parameter which defines how often the task should be executed. The
Scheduler is designed to re-run each task at the required interval so that User
Program execution is deterministic. For example, the period between sampling an
analogue input and updating an associated output for a PID loop is always the same.
However, note that the actual task interval may be affected by the loading on the
system and the execution time and priority of other tasks. If a task is not executed
within the required deadline, the task function block will report a task overrun; this is
regarded as an overload condition.
Inter-task parameter transfer
ST wiring can be used to transfer parameters between function blocks assigned to
different tasks. ST statements in Step bodies and in Transitions can be used to read
and write parameters from function blocks in different tasks.
Because there is no inter-task buffering of parameters the following principles should
be considered when transferring parameters between function blocks in different
tasks.
1. The value of input parameters of function blocks in a lower priority task may
change while the task is executing, if the parameter values come from function
blocks within higher priority tasks
2. The value of input parameters of function blocks in a higher priority task cannot
be changed by function blocks in a lower priority task while the higher priority
task is executing.
Further principles and restrictions regarding the interaction of tasks and parameter
passing are described in detail in Chapter 7, Real Time Task Scheduler.