UD70
Issue code: 70nu2
Reference 7-1
7 Reference
7.1 Tasks
Refer also to Tasks and real-time programming in Chapter 4
DPL Programming.
INITIAL task
The INITIAL task is used typically to initialize program variables and Drive
parameters.
The
INITIAL task boots-up the DPL program and runs only when the UD70 is
reset or at the moment AC power is applied to the Drive.
The
INITIAL task is special in that all other tasks are guaranteed not to be
running when it is being run. This is significant when other real-time Tasks
are to manipulate data which have initial values.
BACKGROUND task
The BACKGROUND task is used for functions and commands that do not
require time-related or encoder-related monitoring. It would be used for
the following:
• Data logging
• Checking digital inputs
• Setting output status
The
BACKGROUND task runs after the INITIAL task is completed. It is
recommended that the majority of the program is run in the BACKGROUND
Task.
Note
The BACKGROUND task does not automatically loop.
Example
BACKGROUND{
RAMP:
#1.21 = 0
DO WHILE #1.21 < 1000
#1.21 = #1.21+1
LOOP
GOTO RAMP:
}