Tasks And Real-Time Programming - Control Techniques UD70 User Manual

Large option module and software
Hide thumbs Also See for UD70:
Table of Contents

Advertisement

4.6

Tasks and real-time programming

Real-time programming runs with reference to a clock to enable the user to
specify the actual times instructions are executed, not just the order in
which they are executed. When real-time programming, a task Structure
(or philosophy) has to be maintained.
programs contain sections called tasks, where a task enables a priority
UD70
to be given to a sub-routine. Seven levels of priority are defined by these
tasks in the following order:
INITIAL
BACKGROUND
CLOCK
ENCODER
SPEED
EVENT
ERROR
Each task is specified by its name in the program. The contents of each task
must be placed in braces { } { }.
Example
CLOCK{
instructions
}
INITIAL task
The
INITIAL
parameters in the DPL program. The task runs only when the
or at the moment
The
INITIAL
other tasks are prevented from running. This is significant when the
or
EVENT
ENCODER
Example
INITIAL{
// This is the only place to reliably initialize 'timer'
timer% = 0
}
CLOCK{
//This task is set at 5ms
//The value of timer must be initialized before CLOCK is run
timer% = timer% + 1
IF timer% > 200 THEN
//200, 5ms intervals = 1 second
PRINT "1 Second expired"
timer% = 0
ENDIF
}
UD70
Issue code: 70nu2
task
task
task
task
task
task
task
task is used typically to initialize program variables and Drive
power is applied.
AC
task has total priority over all other tasks when running; the
tasks are to manipulate data which have initial values.
DPL programming
is reset
UD70
CLOCK,
4-7

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the UD70 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF