Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
322
 
Writing and Executing Motion Programs 
Note: 
When using axis matrix transformation for scaling, do not use the R radius 
specification for circular interpolation because the radius will not scale with the 
axes.  Use the IJK center vector specification instead. 
Calculation Implications 
Program move calculations involving the X, Y, and Z-axes take a small but possibly significant additional 
amount of computational time (about ¼-millisecond for an 80 MHz CPU) if the matrix transformation 
calculations have been activated with the TSELECTn command.  This can decrease the maximum move-
block execution rate for the motion program slightly.  To disable the matrix transformation calculations, 
use TSELECT0, which deselects all matrices, and stops the matrix calculation overhead. 
Examples 
These concepts are probably best illustrated with some simple examples.  In actual use, much more 
sophisticated things may be done with the matrices, especially with the inclusion of math and logic. 
Scaling Example 
If axis definition statements scaled your axes in units of millimeters, but the program should at least 
temporarily, scale in inches, set up the matrix as follows: 
TSEL 1     ; 
Select 
Matrix 
Q11=25.4 Q12=0 
 
Q13=0   
; Variables for first row 
Q14=0  
Q15=25.4 
Q16=0   
; Variables for second row 
Q17=0  
Q18=0  
Q19=25.4 
; Variables for third row 
AROT 11 
    ; 
Use 
Q11-Q19 
for 
matrix 
Note that pure scaling uses only the primary diagonal of the matrix.  The scaling is done with respect to 
the origin of the coordinate system.  Of course, the Q-variable values do not need to be assigned as three 
per command line, but this can be nice for program readability. 
Rotation Example 
To rotate the coordinate system 15 degrees about the origin in the XY plane.  Set up the matrix as follows 
TSEL 2 
 
 
 
; Select Matrix 2 
Q40=COS(15) Q41=SIN(15) 
Q42=0 
; Variables for first row 
Q43=-SIN(15) Q44=COS(15) 
Q45=0 
; Variables for second row 
Q46=0 Q47=0 
Q48=1 
; Variables for third row 
AROT 40 
 
 
 
; Assign these values to the rotation portion 
This transformation rotates the points 15 degrees counterclockwise in the XY plane relative to fixed XY 
axes when viewed from the +Z axis in a right-handed coordinate system (i x j = k).  Alternately stated, it 
rotates the XY axes 15 degrees clockwise in the XY plane relative to fixed points when viewed from the 
+Z axis in a right-handed coordinate system. 
Displacement Example 
To offset the Y and Z-axes by 5 units and 2.5 units, respectively, leaving the X axis unchanged.  Set up 
the matrix as follows: 
TSEL 3 
 
; Select Matrix 3 
Q191=0  ; 
First 
variable 
Q192=5  ; 
Second 
variable 
Q193=2.5  
Third 
variable 
ADIS 191 
 
; Assign these values to the displacement portion