User manual
PMAC User Manual 
Synchronizing PMAC to External Events  223 
Step 3: Time Base Calculation 
A separate entry in the encoder conversion table takes the interpolated position information from the 
above step, subtracts out the interpolated position information from the previous servo cycle, and 
multiplies this difference by a scale factor to produce the time base value for the servo cycle. (This time 
base value is then a multiplying factor in the position update calculations, so the amount of update is 
proportional to the number of counts received from the time base signal in the last servo cycle.) 
The two set-up items in this step are the source of information (the interpolated "position" register) and 
the scale factor. Both of these are entries in the encoder conversion table. See the description of the table 
for more details on how to enter these. The equation for the time base conversion is: 
17
2
)FREQ_INPUTFACTOR_SCALE0.100(
value %
⋅⋅
=
where the value (also known as feedrate override value) is what controls the rate of position update when 
it equals 100.0, programs and moves operate in real time (i.e., at the times and speeds specified in the 
program). SCALE_FACTOR is the integer value that must be determined to set up time base following 
properly. INPUT_FREQ is the count rate (as determined by the signal and Encoder I-variable 0) in 
counts/millisecond 2
17
 is 131, 072. 
To set the scale factor, decide on a real-timeinput count frequency which is the rate of input counts at 
which the program and moves should execute at the specified rate. Since this is the rate at which the % 
value will be 100.0, solve it simply for the scale factor: 
)FREQ_INPUT_TIME_REAL(
072,131
FACTOR_SCALE =
Since the scale factor must be an integer, and 131,072 is a power of two, make the real time input 
frequency a power of two in units of counts/msec. For instance, if using a system where the typical full-
speed input count frequency is 60,000 counts/second, define the real-time input frequency to be 64 
counts/msec. This would then make the scale factor 131,072 / 64 = 2,048. 
So far, all there is only a value in a register proportional to the master frequency. Now make use of this 
value to control the motion program. 
Step 4: Using the Time-Base Calculation 
Time base values work on a coordinate system. Each coordinate system has an I-variable that tells it 
where to look for its time base information. This variable is Ix93 for Coordinate System x. The default 
values for Ix93 are the addresses of registers that are under software control, not the control of an external 
frequency. For a coordinate system to be under external time-base control, put the address of the scaled 
time-base value determined above. For instance, in the default conversion table, this value is at address 
$729 (1833 decimal), so if Coordinate System 1 were to be controlled by this frequency, I193 would be 
set to 1833 (this is always an X-memory word, so X does not need to be specified). 
Once this I-variable has been set up, all motors assigned to this coordinate system will be under the 
control of the external frequency, in programmed and non-programmed moves. 
I-variable Ix94 controls the maximum rate of change of the time-base value for Coordinate System x. 
When commanding the time-base value from the host (with a %n command), this value should be set 
fairly low to produce a nice slewing to the new commanded value. However, to keep synchronized to an 
external signal as time-base source, this value should be set as high as possible (maximum value is 
8,388,607) so the time base can always slew as fast as the signal. Setting the value low can improve 
following smoothness at the cost of some slip in the following. If the Ix94 limit is ever used in external 
time base, position synchronization to the master is lost. 










