User's Manual

PMAC User Manual
144 Computational Features
Motion Program Move Planning: .Motion program move planning consists of working through the
lines of a motion program until the next move or dwell command is encountered, and computing the
equations of motion for this next part of the move sequence. Every time PMAC starts executing a
new move, it sets an internal flag indicating it is time to plan the next move in the program. This
planning occurs at the next RTI.
VME Mailbox Processing: Reading or writing a block of up to 16 characters through the VME
mailbox registers is the fourth highest priority in PMAC. The rate at which this happens is controlled
by the host. This never takes a significant portion of the PMAC computational power.
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.
PLC Programs 1-31: PLC programs 1-31 are executed in background. 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.
Compiled PLC Programs 1-31: Compiled PLC programs (PLCC programs) 1-31 are executed in
background. 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.
Host Command Response: 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.
General Housekeeping: 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.
Priority Level Optimization: PMAC will usually have enough speed and calculation power to
perform all of the tasks asked of it without having to worry. Some applications will put a large
demand on a certain priority level and to make PMAC run more efficiently some priority level
optimization should be done.
When PMAC begins to run out of time, problems such as sluggish communications, slow PLC/PLCC
scan rates, run-time errors, and even tripping the Watchdog timer can occur. The specific solutions to the
above symptoms are discussed in the sections of this manual dedicated to those subjects. The general
solution to such problems is two-fold. First, high priority jobs could be slowed down or moved to a lower
priority position. Jobs such as the Encoder Conversion Table, PLC/PLCC0, and the Real Time Interrupt
(RTI) should be evaluated. Check to see if everything in these jobs is necessary or if some of it could be
moved to a lower priority or slowed down.
For example: A 5-axis application might not need Encoder Conversion Table entries 6 to 9, PLC0 could
maybe be done as PLCC1, or the RTI could be done every fourth or fifth servo cycle.