Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
348
 
Synchronizing Turbo PMAC to External Events
 
Constraints on Selection of RTIF 
If Turbo PMAC had infinite resolution and infinite dynamic range in its time base calculations, the choice 
of real-time input frequency would be entirely arbitrary –any frequency can be selected as the RTIF, and 
the motion program can be written for that RTIF.  However, Turbo PMAC does its time-base calculations 
in integer arithmetic, which limits the resolution, and in 24-bit registers, which limits the dynamic range. 
These limitations lead to three restraints on the selection of the RTIF: 
1.  The time base scale factor (TBSF) derived from the RTIF must be an integer.  The value that Turbo 
PMAC needs for its calculations is not the frequency in cts/msec, but the inverse of the frequency in 
msec/ct.  In order for this number to be in the range of integer values, the rule is to multiply the 
frequency inverse by 2
17
 (131,072).   
If a value of 100 cts/msec were chosen for RTIF, then the TBSF would be 131,072/100 = 131.072, 
which is not an integer.  Turbo PMAC could accept only the integer part of 131, and drift would 
occur. 
A choice of real-time input frequency that is a power of 2 in cts/msec (e.g. 32, 64, 128) will always 
produce an integer TBSF.  Also, RTIF values that are equal to a power of 2 divided by an integer will 
typically work.  For example, 204.8 cts/msec (=2048/10, = 2
11
/10) will yield a TBSF of 2
17
/2
11
*10 = 
640. 
2.  The time base calculations will saturate at an input frequency (IF) where IF/RTIF equals the servo 
update frequency in kHz.  At the default servo update frequency of 2.25 kHz and an RTIF of 32 
cts/msec, the maximum input frequency that can be accepted without saturation is 32*2.25 = 72 
cts/msec.  If the system could operate to 100 cts/msec, the choice of RTIF=32 cts/msec would not be 
acceptable, but a choice of RTIF=64 cts/msec would be acceptable (100/64=1.5625<2.25). 
A choice of RTIF greater than the maximum input frequency is always acceptable. 
How Time-Base Control Works 
Time-base control works by “lying” to the commanded position update equations that occur every servo 
cycle about the amount of elapsed time since the last servo cycle.  (Variable I10 contains the actual 
amount of time.)  The actual time between servo cycles does not change nor do the dynamics of the servo 
loops.  It is only the rate of the commanded trajectories that change with the external frequency, and since 
all of the trajectories in the coordinate system change together, the path through space does not. 
Instructions for Using an External Time-Base Signal 
Using an external time-base signal requires several steps to set up.  However, once the setup is complete, 
the time-base control is transparent to the user and the program – it is automatic.  The steps in the typical 
set-up are detailed below. 
Step 1: Signal Decoding 
The signal is input to the Turbo PMAC at one of the incremental encoder inputs (Channels A and B).  The 
signal must be either a quadrature signal (as out of an encoder) or a pulse and direction signal (pulse into 
A, direction into B).  For the Encoder inputs used, variable I7mn0 controls the decoding method, and 
defines what a “count” is.  For instance, with a quadrature signal, I7mn0 = 3 or 7 defines 4 counts per 
encoder cycle, whereas I7mn0 = 2 or 6 defines only 2 counts per encoder cycle.  The difference between 
3 and 7, or 2 and 6 is for which sense of the signal does the decoder count up.   
Note: 
Make sure that it is counting up in the direction that master signal is going – 
counting down would imply a negative time-base, which Turbo PMAC cannot 
handle.