Specifications

8.2
HIGH PRIORITY CRITICAL TASKS (fOREGROUND)
The
high priority time critical tasks consist of
the
following:
a.
Generate
the
spindle
motor
waveform
and
measure
the
revolution time.
b.
Deted
and
accumulate
the
step pulses from
the
Interface.
c.
Generate
the
stepping waveforms applied to
the
stepper
motor,
and perform
the
actuator velocity
ramping (up
and
down) including pulse width modulation.
d.
Time out
the
actuator
damping
interval.
These
tasks are
updated
once
each
90
lisec
by
using the mlcroprocessor'slntemal timer
to
generate
an
interrupt for
each update.
These
tasks cannot be Interrupted
by
another task while
they
are
being
executed.
The set
of
program routines associated with these
task.
II
collectively
caned
the
IIforeground."
Foreground routines are
arranged
so
that they
will
sequlntlally,.xlcute'one after
the
other,
with
each
routine per-
forming any necessary
action,
then
handing control to
th.
next routine.
The
last
routine turns processing over to
other tasks
until
the next timer interrupt
anives,
at which
the
foreground
process
starts
over.
See
figure 8-2.
The folloWing
subparagraphs
detail the actual foreground routines.
8.2.1 Foreground Loop
Control
This is the entry point for the
90
lisec Interrupt requelt which
II
set
up
at
the
beginning of
the
"background"
routines. Refer
to
paragraph
8.3.
This routine saves
the
accumulator, clears
the
timer interrupt flag,
and
updates
the
background
gate counter. Con-
trol then passes
to
the
Spindle Motor Foreground.
8.2.2
Spindle Motor Foreground
This
measures
the
revolution period in lnaements of foreground time by being triggered
by
INDEX.
It
then
generates a Pulse Width Modulated (PWM) waveform to control spindle
motor
power.
Control now passes to
Motor
Fault
Foreground.
,8.2.3 Motor Fault Foreground
This routine determines
if
the spindle,
motor
speed
is
correC1.
If
It
is not, controlls
passed
to
the
Foreground End
and
Interrupt Return routine
and
all
seek
fundions
are
skipped
..
If
speed is correct, control
passes
to
the
Step
Input
Buffering Fundion. .
8.2.4
Step
Input Buffering
Function
If
Step
Input
is
not
enabled,
this
means
that actuator seek.
are
stilltn process,
In
which
case
this routine exits im-
mediately to
the
Stepper
Damping
Time
Out
routine.
If
Slip
Input
is
enabled,
this
routine
adds
any additional steps
to the total
step
count;
the
directioJ:\ls saved:
the
Step Input flag
'I
disabled: and
the
Ramp
Calculate flag
is
set true.
Control
will
then
pass
to
the
Stepper
Damping Time
Out
Routtne.
8.2.5
Stepper
Damping Time
Out
Routine
Damping
can
be
enabled
through
the
Seek
Function
Foreground
or
Actuator
Lubricant
Unstick
Routine
(Background).
If
it
is not
enabled,
the
routine exits to
the
Seek
Function
Foreground.
U
it
is
enabled,
the
actuator
is
decelerated
somewhat
with
a track arrival delay. This
is
followed by
an
additional settling delay which also allows
checking for
any
additional
step
pulses.
If
any
more
step pulses
are
received,
the
routine exits early without Setting
Seek Complete true. Exit
is
made
to
Seek
Fundion
Foreground.
!
8ยท2
)