User`s manual

1.0 - Introduction to PMAC
Page - 9
1.6.5 - Real-Time Interrupt Tasks
The real-time interrupt (RTI) tasks are the fifth highest
priority on PMAC. They occur immediate after the servo
update tasks at a rate controlled by parameter I8 (every I8+1
servo update cycles). There are two significant tasks
occurring at this priority level: PLC 0 / PLCC0 and motion
program move planning.
PMAC will scan the lines of each program running in the
different coordinate systems and will calculate the necessary
number of move commands.
The number of move commands of precalculation could be
either zero, one or two and it depends on the type of motion
commands and the mode in which the program is being
executed.
Non-move commands are executed immediately as they are
found. The scan of any given motion program will stop as
the necessary number of moves is calculated. It resumes
when previous move commands are completed and more
move-planning calculations are required.
In the execution of a motion program, if PMAC finds two
jumps backward (toward the top) in the program while
looking for the next move command, PMAC will pause
execution of the program and not try to blend the moves
together. It will go on to other tasks and resume execution
of the motion program on a later scan. Two statements can
cause such a jump back: ENDWHILE and GOTO
(RETURN does not count).
1.6.6 - Background Tasks
In the time not taken by any of the higher-priority tasks, PMAC will be
executing background tasks. There are three basic background tasks:
command processing, PLC programs 1-31, and housekeeping. The
frequency of these background tasks is controlled by the computational
load on PMAC: the more high-priority tasks are executed, the slower
the background tasks will cycle through; and the more background
tasks there are the slower they will cycle through.
Each PLC program executes one scan (to the end or to an
ENDWHILE statement) uninterrupted by any other background task
(although it can be interrupted by higher priority tasks). In between
each PLC program, PMAC will do its general housekeeping, and
respond to a host command, if any.
All enabled PLCC programs execute one scan (to the end or to an ENDWHILE statement) starting from lowest numbered
to highest uninterrupted by any other background task (although it can be interrupted by higher priority tasks). At power-
on\reset PLCC programs run after the first PLC program runs.
The receipt of a control character from any port is a signal to PMAC that it must respond to a command. The most common
control character is the carriage return (<CR>), which tells PMAC to treat all the preceding alphanumeric characters as a
command line. Other control characters have their own meanings, independent of any alphanumeric characters received.
Here PMAC will take the appropriate action to the command, or if it is an illegal command, it will report an error to the
host.
Between each scan through each background PLC program, PMAC performs its housekeeping duties to keep itself properly
updated. The most important of these are the safety limit checks (following error, overtravel limit, fault, watchdog, etc.)
Although this happens at a low priority, a minimum frequency is ensured because the watchdog timer will trip, shutting
down the card, if this frequency gets too low.
Enabled
PLC0
Enabled
PLCC0
move
calculations
needed?
Read next line of
the motion program
line
contains move
commands?
calculate move execute line
end of program?
C.S.
program
running?
Next coordinate
system
Yes No
Yes
No
Yes
No
Yes No
All
C.S.
programs
checked?
No
Yes
End of Interrupt
I5=1 or I5=3?
Yes
decrement the
watchdog register
by 8
No
Execute next
enabled PLC
Execute first
enabled PLCC
All PLCCs
checked?
Execute next
enabled PLCC
perform safety checks:
end of travel limits
amplifier faults
following error
sets watchdog register
to 4095
command response
(communications)
I5=2 or I5=3?
Yes
No
NoYes