User's Manual

PMAC User Manual
Writing Programs for PMAC 215
When No Calculation Ahead
There are several conditions in a motion program that break the blending and stop the calculation ahead.
In these cases, PMAC waits until that operation is finished before it starts calculations on the next move
or two moves. During any of these breaks, PMAC will use the I11 calculation time to delay the start of
the next move.
DWELL Commands
A DWELL command in a motion program breaks the blending of moves, so PMAC will not calculate
through a DWELL. PMAC does not start the calculation of subsequent moves until after the DWELL time
is complete. A DELAY command, by contrast, is really a zero-distance move command of the specified
time; PMAC does calculate through a DELAY.
HOME, RAPID Moves
If a homing search move (HOMEn) or a RAPID mode move is commanded from within a program, it is
not blended with any other move. PMAC does not start the calculation of subsequent moves until after all
motors have completed their commanded moves of these types.
PSET Command
If a PSET command is used within a motion program to redefine axis position(s), PMAC will not blend
the move before the PSET to the move after. It will not start the calculation of the subsequent move until
after the previous commanded move has finished and the PSET command has been executed.
Double-Jump-Back Rule
If in the course of trying to calculate the next move, PMAC detects two backward jumps in the logic of
the program, PMAC will not try to blend the last calculated move to an upcoming move. These backward
jumps can be caused either by ENDWHILE statements or GOTO statements; GOSUB, CALL, and RETURN
jumps do not count here. The intent of this rule is to prevent PMAC from having to abort a program due
to insufficient calculation time if it has to loop multiple time on short moves.
Blending Stopped
PMAC will instead allow the previous move to come to a stop, and will start calculating the program
again at the next real-time interrupt (see I8 description), continuing until it finds the next move statement,
or two more jumps back (in which case the process is repeated). This permits indefinite waiting loops
that will not cause PMAC to abort the motion program because of insufficient calculation time.
Nested Loops
This double jump-back rule can cause programmers to inadvertently stop blending when they are
calculating moves within nested while loops. Consider the following example that attempts to creates
continuously blended sinusoidal motion generated in the inner loop, using the outer loop to index the size
of the sinusoid:
SPLINE1 TA20
P1=0
WHILE P1<10)
P2=0
WHILE (P2<360)
X(P1*SIN(P2))
P2=P2+1
ENDWHILE
P1=P1+1
ENDWHILE