Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC On-line Command Specification 308
the second {constant} is a positive integer representing the number of synchronous M-variable
assignments that can be stored in the buffer
This command establishes a lookahead buffer for the addressed coordinate system. It reserves memory to
buffer both motion equations and synchronous M-variable output commands for the lookahead function.
Segment Buffer Size: The first constant value in the command determines the number of motion
segments that can be stored in the lookahead buffer. Each motion segment takes Isx13 milliseconds at the
motion program speeds and acceleration times (the velocity and acceleration limits may extend these
times). However, it is variable Isx20 for the coordinate system that determines how many motion
segments the coordinate system will actually look ahead in operation.
The lookahead buffer should be sized large enough to store all of the lookahead segments calculated,
which means that this constant value must be greater than or equal to Isx20. If backup capability is
desired, the buffer must be sized to be large enough to contain the desired lookahead distance plus the
desired backup distance.
The method for calculating the number of segments that must be stored ahead is explained in the Isx20
specification and in the Turbo PMAC User manual section on Lookahead. The fundamental equation is:
13Isx*2
1
*
xx
17Ixx
16Ixx
max*
3
4
20Isx
If backup capability is desired, the buffer must be able to store an additional number of segments for the
entire distance to be covered in reversal. This number of segments can be calculated as:
)segsec/m(SegTime*sec/units
max
V
sec)sec/m(1000*unitsBackupDist
tsBackSegmen
The total number of segments to reserve for the buffer is simply the sum of the forward and back
segments wishing to be able to hold:
tsBackSegmen20IsxntsTotalSegme
Memory Requirements: For each segment Turbo PMAC is told to reserve space for in the lookahead
buffer, Turbo PMAC will reserve (2x+4) 48-bit words of memory from the main buffer memory space,
where x is the number of motors in the coordinate system at the time that the buffer is defined. For
example, if there are 5 motors in the coordinate system, a command to reserve space for 50 segments will
reserve 50*(2*5 + 4) = 700 words of memory. If a motor is added to the coordinate system, or removed
from it, after the lookahead buffer has been defined, the lookahead buffer should be re-defined.
Output Buffer Size: The second constant value in the command determines the number of synchronous
M-variable assignments that can be stored in the lookahead buffer. Because these are evaluated at
lookahead time, but not actually implemented until move execution time, they must be buffered. This
section of the buffer must be large enough to store all of the assignments that could be made in the
lookahead distance. Synchronous M-variable assignments are not made during backup, so there is no
need to reserve memory to store assignments for the backup distance as well as the lookahead distance.
Memory Requirements: For each synchronous M-variable assignment Turbo PMAC is told to reserve
space for in the lookahead buffer, Turbo PMAC will reserve two 48-bit words of memory.
There are no performance penalties for making the lookahead buffer larger than required, but this does
limit the amount of Turbo PMAC memory free for other features.
A lookahead buffer is never retained through a power-down or board reset, so this command must be
issued after every power-up/reset if the lookahead function is to be used.