Important Note
Be careful not to allow a user sub-routine to be started by
two different real-time tasks (a situation termed
re-entry).
For example, a sub-routine is able to be started by a
BACKGROUND
task starts the sub-routine, and the
the
BACKGROUND
executed, the values of the variable being processed could
become altered. This can occur because the
also run the sub-routine, but will apply its own values.
CLOCK task
The
CLOCK
commands to the Drive (eg. controlled acceleration or deceleration ramp).
The task has the second lowest priority. Only the
way to the
The task is executed on a constant timebase; the actual timebase used
depends on the value of the set-up parameter on the Drive (see also UD70
set-up parameters in Chapter 10 Parameters), which can range from 5ms to
200ms.
Example This example produces a sine-wave.
CLOCK{
#1.21 = SIN (rad)*1000
rad =rad+0.01
IF rad > 6.283185 THEN ; 6.283185 = 2 * pi
rad = 0
ENDIF
}
UD70
Issue code: 70nu2
task as well as a
task while the sub-routine is being
task is used for time-related monitoring of the Drive, and
task.
CLOCK
DPL programming
task. If the
CLOCK
BACKGROUND
task interrupts
CLOCK
CLOCK
task gives
BACKGROUND
task will
4-11
Need help?
Do you have a question about the UD70 and is the answer not in the manual?