Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
186
 
Setting Up the Servo Loop 
Table Range 
The compensation is defined directly for a range of source motor positions starting at zero counts (the 
most recent home or power- up/reset position) and going in the positive direction.  The size of this range 
is declared as the last argument of the DEFINE COMP command.  This argument has units of counts of 
the source motor.  The spacing between entries is the total range divided by the number of entries (which 
is the first argument of the DEFINE COMP command).  The first entry in the table defines the correction 
at one spacing from the zero position of the source motor, the second entry at two spacings, and so on. 
Rollover 
Outside of this range, the uncorrected position is rolled over to within this range – essentially a modulo 
(remainder) operation – before the compensation is done.  For 2D tables, this rollover occurs in both 
dimensions.  The rollover permits compensation of rotary axes over several revolutions, and simple 
compensation for encoder eccentricity.  Of course, if the table is made big enough to cover the entire 
source motor travel, the rollover feature will never be used. 
If the motor has a travel range to the negative side of zero, and compensation is desired here, these entries 
should be made as if they were past the positive end of the motor range.  For instance, if the motor travel 
were +/- 50,000 counts and a table entry was to be made every 500 counts (so 200 entries total), the table 
would be set up with a DEFINE COMP 200,100000 command.  The first 100 entries would cover the 
500 to +50,000 count range, and the last 100 entries would cover the -50,000 to 0 count range.  (Usually 
the table is referenced so there is a zero correction at the source motor zero position, so the last entry in 
the table should be 0.)  Essentially, the -50,000 to 0 range would be mapped into the +50,000 to +100,000 
range. 
If global variable I30 (new in V1.939 firmware) is set to the default value of 0 when the table is 
downloaded to Turbo PMAC, the correction value at 0 counts of the source motor is always 0.  In this 
case, the last entry of the table must be set to 0, or there will be a discontinuity in the correction (and 
therefore a position jump) as the source motor passes either end of the table, rolling over the correction.  
Most often, the correction is defined to be 0 at the zero position of the motor. 
If I30 is set to 1 when the table is downloaded to Turbo PMAC, the correction value at 0 counts of the 
source motor is set equal to the last entry of the table, guaranteeing smooth rollover of the table.  If the 
last entry for the table is 0, the result will be the same regardless of the setting of I30. 
Determining Compensation Values 
The values that will be entered into the compensation table are determined by comparing the raw 
measurements of the sensor that will be used in the application against a reference sensor that is installed 
only for the calibration process.  Move the axis (or the axes) to the raw position at which you want to 
make an entry.  Read the reference sensor at this position.  The entry in the table will be the raw position 
minus the reference position, with both values scaled to 1/16 of a Turbo PMAC software count, both 
measured from the motor home (zero) position. 
For standard leadscrew compensation tables (1D tables with the same motor as both source and target), 
Delta Tau provides a PC software package called Flycal that can perform these measurements on the fly 
and automatically generate these tables quickly. 
Entering Tables 
Position compensation tables are entered into the Turbo PMAC with on-line commands.  First there is the 
DEFINE COMP command, which defines the size and span of the table, and which motors it uses as its 
source and target motors.  Following this is a series of numerical constants, separated by spaces and/or 
carriage-return characters, which are entered sequentially into the table.  (If there is no table to be filled, a 
numerical constant sent to PMAC is assigned to variable P0.) 
Position compensation tables must be defined in order from those assigned to higher-numbered motors to 
those assigned to lower-numbered motors.