User's Manual

PMAC User Manual
214 Writing Programs for PMAC
Starting Calculations
Upon the command to start the program, PMAC will calculate program statements down to and including
the first or second move statement, depending on the mode of the move and the setting of I13. This can
include multiple modal statements, calculation statements, and logical control statements.
Actually the programmed moves will not start executing until I11 milliseconds have passed, even if the
calculations were finished earlier. This permits proper synchronization between cards, so one will not
start before the other. If I11 is set to zero, the first move will start as soon as the calculations have
finished.
Statements down to and including the next move statement, putting the data thus computed into a queue
for the trajectory generator. Program calculation is then held up until the trajectory generator starts the
next move, and PMAC performs other tasks (PLC programs, communications, etc.).
Calculation of Subsequent Moves
As soon as the actual execution of a move by the trajectory generating routines starts, a flag is set for
PMAC to calculate the entire succeeding program insufficient calculation time.
If PMAC ever cannot finish calculating the trajectory for a move by the time execution of that move is
supposed to begin, PMAC will abort the program, showing a run-time error in its status word. Usually
this happens when move times are made short (a few milliseconds) and/or there is a large amount of
calculation in between move commands. The limit on this move block calculation rate is application-
dependent, but generally is several hundred blocks per second.
If concerned about this move calculation limit, during development make the move times continually
shorter until PMAC fails. Then for the final application make sure that the minimum move time is kept
greater than this, usually with a safety margin of at least 25%.
I11
1
2 3
4 5 6
1
2
3 4
time
"R"
Execute
Calculate
A. Two moves ahead
LINEAR with I13=0
SPLINE1
B. One move ahead
LINEAR with I13>0
CIRCLE, PVT
I11
1
2
3
4 5
1
2
3
4
time
"R"
Execute
Calculate
C. No moves ahead
Ix92=1, RAPID,
HOME, DWELL,"S"
I11
1
2 3
1
2
3
time
"S"
"R"
Execute
Calculate
I11
DWELL
time
I11
2a
2a
Figure 50 PMAC Motion Program Recalculation