Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
332
 
Writing and Executing Motion Programs 
G94 – Inches (Millimeters) per Minute Mode 
This code sets up the program so that F-values (feedrate) are interpreted to mean length units (inches or 
mm) per minute.  In PMAC, F-values are interpreted to mean a speed (length per time) where the length 
units are set by the axis definition statements, and the time units are set by the coordinate system variable 
Isx90.  Since the units of Isx90 are milliseconds, this routine should set Isx90 to 60,000.  Also, because 
usually G94 is used to cancel G95, which interprets F-values as inches (mm) per spindle revolution by 
using the spindle encoder as an external time base source, this routine should return the coordinate system 
to internal time base.  A typical routine would be: 
N94000 I5190=60000 
; Feedrate is per minute 
I5193=$2000 
; Use internal time base 
RETURN 
G95 – Inches (Millimeters) per Revolution Mode 
This code sets up the program so that F-values (feedrate) are interpreted to mean length units (inches or 
mm) per spindle revolution.  In Turbo PMAC, this requires that the time base for the coordinate system 
be controlled by the spindle encoder.  Feedrate is still interpreted as length per time, but with external 
time base, time is interpreted as proportional to input frequency, and hence, spindle revolutions, giving an 
effective length per revolutions feedrate.  
Therefore, the subroutine implementing G95 must cause the program to get its time base from the spindle 
encoder and get the constants of proportionality correct.  (Actually some or all of these constants may be 
set up ahead of time.)  This external time base function is performed through a PMAC software feature 
known as the Encoder Conversion Table, which is documented in detail in the Setting Up the Encoder 
Conversion Table section of this manual.  Instructions for setting up an external time base are given in 
detail in the Synchronizing Turbo PMAC to External Events section of this manual. 
Briefly, a scale factor between time and frequency must be set up in the conversion table that defines a 
real-time input frequency (RTIF).  The motion program then can be written as if it were always getting 
this frequency.  In our case, we will take a real- time spindle speed that is near or greater than our 
maximum.   
For example, we use 6000 rpm (100 rev/sec) as our real-time spindle speed.  In real time, one spindle 
revolution takes 10 msec, so we want the feedrate to be in units of length per (10 msec), which we 
achieve by setting Isx90 (feedrate time units) to 10.  If we have 4096 counts per spindle revolution (after 
decode) our RTIF would be 4096 x 100 = 409,600 cts/sec = 409.6 cts/msec.  The equation for the 
conversion table’s time-base scale factor (TBSF) is: 
TBSF = 131,072 / RTIF (cts/msec) = 131,072 / 409.6 = 320 
This value must come out to an integer for true synchronization without any roundoff errors.  Usually it is 
easy if the spindle encoder has a resolution of a power of 2.  If not, the real-time spindle speed in rps 
should be a power of 2, and Isx90 would not be an integer (which is fine). 
This scale factor would be written to the appropriate register in the conversion table.  In general, this 
would not have to be done every time G95 is executed; rather, it would be part of the system setup. 
The typical subroutine for G95 would consist of setting Isx93 and Isx90 for the coordinate system: 
N95000 I5190=10 
; PMAC F is length/ 10 msec 
I5193=$350A ; 
Time base source is external 
RET