Académique Documents
Professionnel Documents
Culture Documents
instructions for numerically controlled machine tools. Douglas T. Ross is considered by many to be the
father of APT. APT is a language and system that makes numerically controlled manufacturing possible.
This
early language was used widely into the 1970s and is still a standard internationally.
APT is used to program CNC machine tools to create complex parts using a cutting tool moving in space. It
is used to calculate a point-to-point path that a tool must follow to generate a desired form. APT is a CAM
system based on a special-purpose language. It was created and refined during the late 1950s and early
1960s to simplify the task of calculating geometry points that a tool must traverse in space to cut the
increasingly complex parts required in the aerospace industry. It was a direct result of the new CNC
technology becoming available at that time, and the daunting task that a machinist or engineer faced
calculating the movements of the CNC for the complex parts for which it was capable. APT was created
before graphical interfaces were available, and so it relies on text to specify the geometry and toolpaths
needed to machine a part.
APT shares many similarities to computer programming languages like Fortran. A general-purpose
computer
language takes source text and converts the statements to instructions that can operate the internals of a
computer. APT converts source statements into programs for numerically- or computer-controlled machine
tools. Typically, this is a text file that contains CNC-vendor dependent commands to generate tool motions
and machine states. Most commonly, this is some form of G-code.
These statements are typed into an editor and saved as a plain-text ASCII file, which is the input to the APT
processor. Columns 1 through 72, inclusively, contain information pertinent to the part programming text,
while columns 73 to 80 are reserved for sequence and/or identification purposes. Blank columns are ignored
by the processor, so blanks can be used to make the text more readable.
Punctuation
Vocabulary Words
Numbers
Symbols, including Labels
1.1.1. Punctuation
Punctuation for the APT language includes the comma, slash, asterisk, double asterisk, plus, minus, single
dollar, double dollar, equal, period and parentheses [, / * ** + - $ $$ = . ( )]. This punctuation is used to
separate individual words and elements of the source statements used in the APT language and to indicate
arithmetic operations. The APT processor will automatically accept either BCD or EBCDIC characters.
(ASCII for apt360)
1.1.3. Numbers
All numbers used in a part program are treated by the APT processor as floating-point quantities. Integers
are not treated as a separate class of numbers. The number one (1) may be expressed in the following ways:
1
1.
1.0
.01e2
10.0e-1
1000.e-3
.001e+3
+1
+10.e-1
When writing a number in the exponential format (using an e followed by an exponent), a decimal point
must be given in the number preceding the e. If no decimal point appears, the presence of the alpha character
e will cause the number to be interpreted as a variable symbol.
The maximum number of significant digits allowed is 16, with a range of about 10-75 to 1075.
Whenever a number is used as an index of a subscript only, its integral part is used; for example, if I = 2.4,
the index or subscript value of I is 2.
1.1.4. Symbols
A symbol is used to define an entity in a part program statement that is to be referenced in later statements.
For example, the statement
CIRC1 = CIRCLE/ 1, 2, 3, 8
defines a circle whose center is at X = 1, Y = 2 and Z = 3, and whose radius is 8. Later part program
statements can now refer to this circle by referencing the symbol CIRC1.
A symbol is made up of from one to six alphanumeric characters, at least one of which must be a letter.
(Punctuation characters cannot be used in a variable symbol.) A symbol, sometimes noted as "variable
symbol", cannot be the same as a vocabulary word. Further, a symbol must be defined before a reference to
that symbol in another part program statement. Because of the dynamic environment of the APT language,
new vocabulary words are frequently required. The use of at least one numeric character in a symbol is
recommended to protect against subsequent changes.
JOE) I = 1
123) J = 3
41E) K = 1
ID6
Statement Label
Punctuation
Punctuation
Number
CIRC1
Symbol
10
Punctuation
Punctuation
11
Number
Punctuation
Punctuation
Number
Number
13
specifies that the symbol A is to be assigned the value 14 (the result of multiplying 6 times the square root of
4 and adding 2). A computing statement may be made up of some combination of the following:
Scalars
Arithmetic Operators
Arithmetic Expression
Arithmetic Functions
2.1.1. Scalars
Scalars are one-dimensional quantities that can be operated on as is or combined to define a geometric
quantity. Scalars, sometimes noted as "scalar variables", can be multiply-defined, that is, the value of the
scalar can be reassigned by a new computing statement.
Addition
Subtraction
Multiplication
Division
**
Exponentiation
2*A+B
3. * A + B/ (4. * C)
A + B ** 2 + 3 * C
In the APT language, an arithmetic expression may replace a scalar or a subscript. A scalar symbol or a
variable my be assigned a value by an arithmetic expression.
F = 2 * A + B
C = 3 * A + B / (4. * C)
H = 3.14159
Parentheses may be used in arithmetic expressions to indicate the order of the operations. Within
parentheses, or where parentheses are omitted, the order of operations is as follows:
Table 2.2. Operator Precedence
Operator
Precedence
*/
+-
4 (lowest)
Among operations of the same priority, processing is done from left to right.
An arithmetic expression enclosed in parentheses can be substituted for a scalar value (where a scalar value
is appropriate) in and APT statement except RESERV/.
P1 = POINT/ (A + 2. * B), Y, (-3 + E)
However, an arithmetic expression can never appear to the left of an equal sign, except when used to denote
a subscript value.
Legal
Not Legal
A(I + 2) = D * C I + 2 = D * C
D = A(I + K + 1) CALL/ MAC1, B + C = A, D = E / 2, F = G + H
CALL/ MAC2, B = A(I + K * 2)
Function
Example Usage
ABSF(x)
Absolute Value of x
X = ABSF(-22.5)
ATANF(x)
Arctangent of x
X = ATANF(.577350)
EXPF(x)
ex
X = EXPF(2)
SINF(x)
Sine of x
X = SINF(45)
COSF(x)
Cosine of x
X = COSF(45)
Name
Function
Example Usage
DP = DOTF(V1, V2)
LNTHF(svector)
Vector Magnitude
LEN = LNTHF(V)
LOGF(x)
logex
LOG = LOGF(2)
SQRTF(x)
Square Root of x
SQR = SQRTF(4)
NUMF(SPAT)
N = NUMF(PAT1)
DISTF(splane, splane)
or
DISTF(sline, sline)
D = DISTF(L1, L2)
LOG10F(x)
Log10x
LG = LOG10F(2)
TANF(x)
Tangent of x
T = TANF(30.)
ATAN2F(x, y)
Arctangent of x/y
A = ATAN2F(2, .5)
Note
The arguments to SINF, COSF and TANF are in degrees. ANGLF,
ATANF and ATANF2F return degrees.
The output of each of these functions is single-valued; hence, these functions can be used to define an
arithmetic expression.
R = A * SQRTF(C ** 2 + D ** 2) / E
The scalar quantity 2 is stored in the first storage location for A, and the scalar quantity 5 is stored in the
second storage location of A.
indicates that 50 storage locations are to be set aside for the symbol A. The first pair of entries in the
RESERV statement defines the order for subsequent pairs (symbol, range or range, symbol). The array(s)
defined in a RESERV statement may be used to store either scalars or surfaces. Statement ID's and MACRO
names cannot be subscripted. The first usage of a subscripted variable will determine whether surfaces (or
scalars) are to be allowed for that array. For example:
RESERV/ L1, 10, C1, 20, P1, 5, Q, 20
L1(2) = LINE/ 2.0, 1.0, 2.0, 5.0
C1(5) = CIRCLE/ 0, 0, 0, 0
P1(1) = POINT/ 0, 1, 0
Q(1) = 6.0 * 3 ** 2
would allow ten surfaces to be defined using the symbol L1(1)-L1(10), 20 surfaces to be defined using the
symbols C1(1)-C1(20), etc. Finally, 20 scalars could be defined using the symbols Q(1)-Q(20).
The extent of the array must be specified by a scalar number; a variable symbol cannot be used in place of
the required value.
$$ OK
RESERV/ A, 50
$$ Not allowed
B = 50
RESERV/ A, B
The value of the index (subscript) in a later part program statement cannot extend beyond the range assigned
to the symbol by the RESERV statement. The above example indicates that the allowable range for the
subscript is between 1 and 50, inclusive. Thus, the following examples would result in an error condition.
A(0) = 6
A(61) = 3.56
A(-1) = 10
The value of the subscript may be expressed as a number (as shown in the examples), as a symbolic scalar,
or as a computed expression. Although the subscript value may -- as a result, for instance, of having been
computed -- have a fractional part (that is, not be a perfect integer), it is truncated to an integer value when
used for subscripting purposes.
where a, b and c are scalar values expressed in any of the forms available in the APT language. This notation
is equivalent to a list of consecutive individual elements of the subscript array for the symbol NAME,
between subscript value a and subscript value b at interval of c. The value a specifies the lowest subscript of
the implied list, and be the highest value. These are not necessarily the first and last values of the entire
array; they must, of course, be within the range of the array.
the implied list is from a to b if the incremental value c is positive, and from be to a if the increment is
negative. A negative c may be specified by either a negative sign for the increment with the INCR modifier,
or a positive c with the DECR modifier. A negative c with DECR is equivalent to a double negative, the
effect being positive. The incremental modifier and value need not be given; if omitted, a positive increment
of 1 is assumed. When using incremental values other than 1, the final subscript of the implied list will be
the last subscript value that does not exceed the specified limit and need not be the same as the limiting
value. For Example:
A(1, THRU, 8, INCR, 3)
implies the list:
A(1), A(4), A(7)
When the value of the last subscript of the array is desired for b in the inclusive subscript notation, the
modifier ALL may be used, in place of a scalar following THRU, to indicate it. When the inclusive subscript
is to represent a list with the subscript limits of 1 and the highest value of the array, regardless of the
increment value, of direction, the notation "a, THRU, b" in the subscript nest may be replaced by the single
modifier ALL; for example:
A(ALL) or
A(ALL, DECR, 2)
The first element of the examples implies a list of all of the elements of the array A, in the order:
A(1), A(2), A(3), ... A(n)
The second example implies a list of every other element of the array A, starting with the last one, in the
order:
A(n), A(n-2), A(n-4), ...
If the low end of the range is to be 1, the value of a may be omitted. For example:
A(THRU, ALL)
is equivalent to:
A(1, THRU, ALL)
Examples of the use of inclusive subscripts:
L1 = LINE/ A(ALL)
Vocabulary Word
Point
POINT
Line
LINE
Plane
PLANE
Circle
CIRCLE
Cylinder
CYLNDR
Ellipse
ELLIPS
Hyperbola
HYPERB
Cone
CONE
General Conic
GCONIC
Loft Conic
LCONIC
Vector
VECTOR
Matrix
MATRIX
Sphere
SPHERE
Quadric
QADRIC
POLCON
Ruled Surface
RLDSRF
3.1. Format
The general format of a surface definition is:
SNAME = SURFACE TYPE/ method of definition
where SNAME is a symbol, the SURFACE TYPE is one of the vocabulary words defining the surfaces
listed above and the method of definition is as defined in the following sections. A variable symbol may be
redefined, and then only as a surface of the same type, if one of two techniques involving the word CANON
is used.
CANON as a modifier
Any geometric definitions type involving the word CANON will allow the symbol to be redefined
(see Section 3.22).
These statements are provided to set a module condition to allow redefinition of surface variables.
The specification of CANON/ ON will allow subsequent surface variables to be redefined with any
geometric definition. The specification of CANON/ OFF, which is the default mode, will require the
CANON modifier for redefinition.
3.1.1. Modifiers
Some of the methods of definition require a modifier (or selector). This is necessary when there is more than
one solution as represented by the definitions itself. For example:
SPT = POINT/ XSMALL, INTOF, sline, scircle (see Figure 3.1)
would mean "define SPT as the point that has the smallest X coordinate value of the two possibilities when
the line sline is intersected with the circle scircle".
Figure 3.1. Geometry Modifier
When only the X and Y coordinates for a point have been specified in a part program statement, the APT
processor projects the point on the ZSURF plane to calculate the implicit Z value. (if ZSURF is not
specified, the XY plane is assumed.) For example:
ZSURF/ SPLANE
SPOINT = POINT/ X, Y
The Z value is supplied by projecting the point (X, Y) in a direction parallel to the Z axis onto the plane
SPLANE.
PT1
PT2
PT3
PT4
=
=
=
=
POINT/
POINT/
POINT/
POINT/
2, 4, 3
2, 4, 0
-5, -2, 3
-5, -2, 0
PT1
PT2
PT3
PT4
PT5
=
=
=
=
=
POINT/
POINT/
POINT/
POINT/
POINT/
INTOF,
INTOF,
INTOF,
INTOF,
INTOF,
LN1,
LN2,
LN1,
LN2,
LN2,
LN4
LN1
LN3
LN3
LN4
P1
P2
P3
P4
P5
P6
P7
P8
=
=
=
=
=
=
=
=
POINT/
POINT/
POINT/
POINT/
POINT/
POINT/
POINT/
POINT/
YSMALL,
YLARGE,
YSMALL,
YLARGE,
XLARGE,
XSMALL,
XLARGE,
XSMALL,
INTOF,
INTOF,
INTOF,
INTOF,
INTOF,
INTOF,
INTOF,
INTOF,
L1,
L1,
L1,
L1,
L2,
L2,
L2,
L2,
C3
C3
C1
C1
C1
C1
C2
C2
P1
P2
P3
P4
=
=
=
=
POINT/
POINT/
POINT/
POINT/
YLARGE,
YSMALL,
XSMALL,
XLARGE,
INTOF,
INTOF,
INTOF,
INTOF,
C1,
C1,
C3,
C3,
C2
C2
C4
C4
P1
P2
P3
$$
P1
P2
P3
= POINT/
= POINT/
= POINT/
or
= POINT/
= POINT/
= POINT/
Note
The angle is expressed in degrees and decimal fractions of a degree and is measured from the positive X
axis. A positive angle is measured counter clockwise.
Note
The two points must not be coincidental
Figure 3.12. LINE by Two Points
LN1 =
LN2 =
$$ or
PT1 =
PT2 =
PT3 =
PT4 =
LN1 =
LN2 =
Note
The modifiers RIGHT and LEFT are applied looking from the point toward the circle.
Figure 3.13. LINE by Point and Tangent Circle
Note
The modifiers RIGHT and LEFT are applied looking from the first referenced circle toward the second.
Figure 3.14. LINE by Tangent Circles
L1
L2
L3
L4
=
=
=
=
LINE/
LINE/
LINE/
LINE/
3.4.5. Through a Point and Having a Slope with Respect to the X or Y Axis
3.4.7. Through a Point and Having a Slope with Respect to Another Line
SLN = LINE/ spoint, SLOPE, slope, sline
The lines L1 and L3 illustrated in Figure 3.16 could be defined as follows:
LN1 = LINE/ PT2, SLOPE, .26759, L2
LN3 = LINE/ PT3, SLOPE, -1, L1
Note
The modifiers denote the direction in which the line is offset
Figure 3.19. LINE by Distance from Parallel Line
L1
L2
$$
L1
L2
$$
L1
L2
$$
L1
L2
= LINE/
= LINE/
or
= LINE/
= LINE/
or
= LINE/
= LINE/
or
= LINE/
= LINE/
P1 = POINT/ 1, 1, 1
P2 = POINT/ 2, 3, 2
P3 = POINT/ 3, 4, 0
PLN = PLANE/ P1, P2, P3
Note
A line joining the two given points must not be perpendicular to the given plane.
Figure 3.29. PLANE by Two Points, Perpendicular Plane
C1 = CIRCLE/ 4, 3, 2
$$ or
PT1 = POINT/ 4, 3
C1 = CIRCLE/ CENTER, PT1, RADIUS, 2
Note
There are two possibilities. The modifiers LARGE and SMALL indicate the circle is to be chosed with
the largest or smallest (respectively) radius.
C4
$$
C1
C2
C3
C4
= CIRCLE/
or
= CIRCLE/
= CIRCLE/
= CIRCLE/
= CIRCLE/
L2,
L1,
L2,
L2,
XSMALL,
YLARGE,
XLARGE,
XSMALL,
L1,
L2,
L1,
L1,
RADIUS,
RADIUS,
RADIUS,
RADIUS,
.375
.375
.375
.375
C1
C2
$$
C1
C2
= CIRCLE/
= CIRCLE/
or
= CIRCLE/
= CIRCLE/
C1
C2
C3
C4
C5
C6
C7
C8
=
=
=
=
=
=
=
=
CIRCLE/
CIRCLE/
CIRCLE/
CIRCLE/
CIRCLE/
CIRCLE/
CIRCLE/
CIRCLE/
YLARGE,
YLARGE,
YSMALL,
YSMALL,
YLARGE,
YSMALL,
YLARGE,
YSMALL,
LG,
LG,
LG,
LG,
LG,
LG,
LG,
LG,
XSMALL,
XSMALL,
XSMALL,
XSMALL,
XLARGE,
XLARGE,
XLARGE,
XLARGE,
Note
A point on the TABCYL must be included that is nearest the desired tangency point.
Figure 3.39. CIRCLE by Radius, Tangent Line, Tangent TABCLY
C1 = CYLNDR/ 8, 0, 1, 0, 0, 1, 1.0
3.8.1. Center, Semi-Major and Semi-Minor Axes, and the Angle the Major Axis Makes
with the X Axis.
SELP = ELLIPS/ CENTER, spoint, semi-maj, semi-min, angle
Note
The ellipse define will be in the XY plane. A positive angle (in degrees) is measured counter clockwise.
Figure 3.41. ELLIPS Example
A hyperbola is a plane curve that is the locus of a point moving such that the differences of the distances
from that point to two fixed points in the plane are consistant.
3.9.1. Center, Half-Tranverse Axis, Half-Conjugate Axis and the Angle of the Transverse
Axis to the X axis.
SHYP = HYPERB/ CENTER, spoint, half-transverse, half-conjugate, angle
Note
A positive angle (in degrees) is measured counter clockwise.
Figure 3.42. HYPERB Example
3.13.1. X, Y, Z Components
SVCT = VECTOR/ x, y, z
Figure 3.47. VECTOR by X, Y, Z
VEC1 =
VEC2 =
$$ or
VEC1 =
VEC2 =
$$ or
VEC1 =
VEC2 =
VECTOR/ 1, 1, 4
VECTOR/ +2, -6, -1
VECTOR/ 2, 2, -3, 3, 3, 1
VECTOR/ -5, 2, 3, -3, -4, 2
VECTOR/ P1, P2
VECTOR/ P4, P3
Note
The defined vector is from the first point toward the second point. (See Figure 3.47)
The modifiers are used to indicate the direction the vector is to point. (POSX indicates the vector points in
the positive X direction, etc.)
Figure 3.48. VECTOR by Perpendicular Plane
Note
A normalized vector has the same direction as the given vector, with a magnitude equal to one.
Figure 3.51. VECTOR by Normal
The angle is measured from the first axis specified in the modifier; that is, from the X axis in the XYPLAN,
from the Y axis in the YZPLAN, and from the Z axis in the ZXPLAN.
Figure 3.52. VECTOR by Length, Angle
V1
V1
V2
V2
V3
V3
=
=
=
=
=
=
VECTOR/
VECTOR/
VECTOR/
VECTOR/
VECTOR/
VECTOR/
ATANGL,
ATANGL,
ATANGL,
ATANGL,
ATANGL,
ATANGL,
which define three mutually perpendicular planes of the new coordinate system.
Note
angle is in degrees
a. Rotation in the XY plane, where positive rotation is from the X axis to the Y axis (counter
clockwise)
M1 = MATRIX/ XYROT, A
The order of matrix multiplication for most of the combinations above is left to right. For example:
M1 = MATRIX/ MATR, MATT
where MATR is a rotation matrix and MATT is a translation matrix will yield:
M1 = MATR x MATT
There are exceptions to this general rule. The formats given below define the cases in which the order of
matrix multiplication is right to left rather than left to right.
, where:
a41 = b41 = 0
a42 = b42 = 0
a43 = b43 = 0
a44 = b44 = 1
The canonical form generated will be:
Obviously, the order of the matrices given in this format is quite important.
A1 = a1
B1 = a2
C1 = a3
D1 = -(a1d1 + a2d2 + a3d3)
A2 = b1
B2 = b2
C2 = b3
D2 = -(b1d1 + b2d2 + b3d3)
A3 = c1
B3 = c2
C3 = c3
D3 = -(c1d1 + c2d2 + c3d3)
3.14.9. Origin, X Axis Vector and a Vector in the 1st or 2nd Quadrant
SMAT = MATRIX/ spoint, svector1, svector2
Where svector1 represents the new X axis and svector2 is in the first or second quadrant.
The general qadric surface is the locus of points that satisfy the following general equation in the second
degree:
SQAD = QADRIC/ a, b, c, d, e, f, g, h, p, q, r, d
y2 - 2ay + a2 - px + pb = 0
or, collecting terms:
y2 - 2ay - px + (pb + a2 )
The general quadric definition can then be used as follows:
PARB = QADRIC/ 0, 1, 0, 0, 0, 0, -p,$$
(-2 * a), 0, (p * b + a**2)
This provides the facility for specifying any two-dimensional quadratic curve with the QADRIC surface
definition.
The point P1 will be defined with the coordinate values X = 2, Y = 4, Z = 0. At statement labeled A, the
point P1 will be used to define the output point -- by applying the translation matrix MAT1, the output point
will have the coordinate values X = 7, Y = 9, Z = 0; P1 will still be defined as X = 2, Y = 4, Z = 0 in
reference system MAT1. To rephrase, a geometric definition when used in another system will be
dynamically redefined as often as it is used while preserving its static definition in its own system.
Note
When both rotation and translation are specified, the translation is made first, then the rotation.
Note
A symbolic vector (svector) must be specified if, and only if, the XYZ format is used.
The various options available under the formats indicated above (CANON, NOX, NOY, NOZ, RTHETA,
THETAR, XYZ), together with the data representations, are discussed in the following sections.
The data in these formats is given in the XY plane, the generatrix is normal to the XY plane; and coordinate
transformation is limited to the XY plane. NOZ implies X, Y coordinates only are given; RTHETA and
THETAR indicate polar coordinates, where r is the radius (in units) and is the angle in degrees measured
counter clockwise from the positive X axis.
Note
RTHETA means r1, 1, r2, 2, ... rn, n, and THETAR implies 1, r1, 2, ... r2, n, rn.
The following sections discuss the options (PTNORM, PTSLOP, TWOPT, FOURPT, SPLINE) available
under these formats.
Note
The NOZ format is used, although the options also apply to RTHETA and THETAR
3.18.3.1. PTNORM
STAB = TABCYL/ NOZ, PTNORM, [TRAFORM, smatrix,] x1, y1, n1, x2, y2, n2, ... xn, yn, nn
This option is used when the normals (n1, n2, ... nn, where n is specified in degrees measured counter
clockwise from the positive X axis) are to be input for each given point. The interpolation technique defines
a series of curves that go through the given points, matching the specified normals at each point.
3.18.3.2. PTSLOP
STAB = TABCYL/ NOZ, PTSLOP, [TRAFORM, smatrix,] x1, y1, s1, x2, y2, s2, ... xn, yn, sn
This option is used when the slopes (s1, s2, ... sn, where s is specified as y / x) are known at each given
point. The fitting scheme is such that the slopes are matched at each point.
3.18.3.3. TWOPT
This option is used when the slopes or normals are specified only at selected points. The program computes
a slope or normal when not specified; it then processes as in Section 3.18.3.1 or Section 3.18.3.2.
3.18.3.4. FOURPT
STAB = TABCYL/ NOZ, FOURPT, [TRAFORM, smatrix,] x1, y1, x2, y2, ... xn, yn
This option defines a series of curves, each one passing through four successive input points. The resulting
TABCYL does not have a continuous slope.
3.18.3.5. SPLINE
This TABCYL is similar to the TWOPT, PTNORM and PTSLOP types, except that the slopes or normals
are adjusted until the curvature is continuous.
These formats are identical to the NOZ format (Section 3.18.3) except that the data reference plane is
different.
NOX implies the XZ plane and requires that the points be specified in the y, z order (y1, z1, y2, z2, ..., yn,
zn). NOY implies the ZX plane and requires that the points be specified in the z, x order (z1, x1, z2, x2, ...,
zn, xn).
This format requires that the symbolic vector (svector) representing the generatrix be specified. Further, the
processor determines which coordinate plane will control the fitting techniques; therefore, no slopes or
normals can be given.
The options (TWOPT, FOURPT, SPLINE) are as outlined in Section 3.18.3.3 through Section 3.18.3.5,
respectively, with the exception that no slopes are given in the TWOPT method.
JROOTS
Equal to 2 if there are square root terms, 1 otherwise
M1 - M12
Transformation matrix (may be all zeros)
T
Thickness between defined surface and working surface
Cb
Origin of curves, that is, the start of the polyconic
Pb
Full-size length of the valid region of the surface
A0-P1/2
Coefficients of surface control equations, each of the form:
f(d) = A 1/2 d + A0 + A1d + a2d2 + a3d3 + a4d4 + a5d5 + a6d6 + a7d7
Note
The coefficients of the square root terms for all the surface control equations are in the bottom line of
the canonical form. The square root terms may all be zero (JROOTS = 1).
See Figure 3.68 for a graphic representation of a POLCON.
A surface and three points on a plane intersecting the surface (two of the points being end points of the
desired space curve), and a second surface and three points on a plane intersecting the surface (two of the
points being the end points of the second space curve).
Figure 3.69. RLDSRF by Six Points, Two Surfaces
RS1 = RLDSRF/ SURF1, P1A, P1B, P1C, SURF2, P2A, P2B, P2C
Format:
SRLD = RLDSRF/ ssurface, spoint, spoint, spoint, ssurface, spoint, spoint, spoint
With reference to Figure 3.69, the following restrictions apply:
P1A, P1B and P1C cannot be colinear (similarly for P2A, P2B and P2C)
P1A, P1B and P2A, P2B must be the end points of the first and second space curves respectively.
Format:
SRLD = RLDSRF/ ssurface, spoint, spoint, svector, ssurface, spoint, spoint, svector
RS3 = RLDSRF/ SURF1, P1A, P1B, V1, SURF2, P2A, P2B, P2C
$$ or
RS3 = RLDSRF/ SURF1, P1A, P1B, P1C, SURF2, P2A, P2B, V2
Format:
SRLD = RLDSRF/ ssurface, spoint, spoint, svector, ssurface, spoint, spoint, spoint
or
SRLD = RLDSRF/ ssurface, spoint, spoint, spoint, ssurface, spoint, spoint, svector
Format:
In this example, the SP3 is defined by its center and a plane to which it is tangent. However, the center of
the sphere is defined by a nested definition of a point that is the intersection of two lines. Similarly, the plane
is defined by a nested definition as passing through a point and perpendicular to a vector that, in turn, is
defined as a nested definition.
The center of the sphere is defined as a nested point definition and has been assigned the symbol PT2.
can be written:
C1 = CIRCLE/ P1, P2, (1, 4, 8)
The nested definition permits defining a geometric quantity (except a scalar variable) in the APT statements
that refer symbolically to these quantities. All of the geometric types can be nested except TABCYL,
POLCON and RLDSRF. The following examples illustrate some of the applications of nested definitions.
In this example, the SP3 is defined by its center and a plane to which it is tangent. However, the center of
the sphere is defined by a nested definition of a point that is the intersection of two lines. Similarly, the plane
is defined by a nested definition as passing through a point and perpendicular to a vector that, in turn, is
defined as a nested definition.
The center of the sphere is defined as a nested point definition and has been assigned the symbol PT2.
or
(a, b, c)
The POINT/ is not required in this case. For example:
C1 = CIRCLE/ P1, P2, (POINT/ 1, 4, 8)
can be written:
C1 = CIRCLE/ P1, P2, (1, 4, 8)
The amount to be added to each coordinate can be specified by listing the values (dx, dy, dz) or by
referencing the components of a symbolic vector (done by specifying svector). The third option (specifying
a single scalar value) indicates the tool is to be moved by that amount directly along the tool axis. (A
positive value for delta generates a movement similar to "withdrawing" the tool; a negative value defines a
movement comparable to a plunge operation.) The optional feed rate field has the same meaning as
indicated in the FROM statement,
The start point is included in npoints. The distance between the points is equal to the vector magnitude. (See
Figure 4.1)
SPAT = PATERN/ LINEAR, spoint, svector, npoints
4.5.1.3. Start Point, a Vector, and an Incremental Spacing
The start point is not included in npoints. The distance between the points is equal to i. (See Figure 4.1)
SPAT = PATERN/ LINEAR, spoint, svector, INCR, npoints, AT, i
4.5.1.4. Starting Point, a Vector and Successive Increments
Clockwise
Counterclockwise
The angles used in arc PATERN definitions are specified in degrees measured counterclockwise from the
positive X axis.
4.5.2.1. A Circle, Start and End Angles and the Number of Points
Where sa and ea specify the starting and ending angles, respectively. The number of points includes the
starting and ending points in the pattern.
Figure 4.3. ARC PATERN
PAT1 =
$$ or
PAT2 =
$$ or
PAT3 =
$$ or
PAT4 =
Where sa is the starting angle and a1, a2, ... an define the angular displacements between successive points
on the circle in the direction specified by CLW or CCLW. (See Figure 4.3)
4.5.2.3. A Circle, Starting Angle, and Number of Increments at an Angular Spacing
Where sa defines the starting angle, and npoints is the number of points (one less than the resultant total
number of points) to be generated at an angular displacement specified by angle in the direction indicated by
CLW or CCLW. (See Figure 4.3)
PAT10 = PATERN/ RANDOM, PAT1, PT8, PT7, PT6, PT5, PT4, PT3$
PT2, PT1
This modifier allows the specification of certain elements of a pattern to be included in a point-point motion
sequence by specifying RETAIN, N1,.N2,N3, ..., N, where N1, N2, N3, ..., N refer to the output order of the
referenced pattern (affected by CONST or INVERS). For example, GOTO/ PAT1, RETAIN, 4, 6, 7, where
PAT1 is illustrated in Figure 4.7, would cause the cutter to move to points 4, 6, and 7.
The order of operations (OMIT/RETAIN or AVOID) must be specified in the output sequence of the points.
For example, an AVOID is to occur between the fourth and fifth points of a pattern, the seventh point is to
be omitted, and another AVOID is to occur between the tenth and eleventh points. The modifiers may be
stated as follows:
GOTO/ SPAT, AVOID, 3, 4, OMIT, 7, AVOID, 3, 10
It is permissible to overlap a range of operations of one type with a single operation of another type. For
example, if the fourth through the tenth points and the twelfth through the fifteenth points were to be
retained and AVOID was to occur between the thirteenth and fourteenth points, the following statement
would be permissible:
GOTO/ SPAT, AVOID, 2, 13, RETAIN, 4, THRU, $
10, 12, THRU, 15
If an AVOID was to occur between the sixth and seventh points and the eighth and ninth points, however,
the following statement would be used:
GOTO/ SPAT, RETAIN, 4, THRU, 10, AVOID, 2. 5, $
6, 8, RETAIN, 12, THRU, 15
5.1. Introduction
Even a brief description of how the tool motion is controlled depends upon an understanding of several
concepts. The individual notations are discussed in Section 5.1.1 through Section 5.1.3, and there
relationships are discussed in Section 5.1.3.4.
The parameters are as shown in Figure 5.1. The parameters must all be positive and and must be
between 0 and 90 (degrees).
Figure 5.1. CUTTER Parameters
Two alternative forms of the CUTTER statement can be used for simple cutters. These are:
CUTTER/ d
CUTTER/ d, r
The first alternate form defines either a ball or a filleted-end mill; the second specifies a flat-end mill (see
Figure 5.2 for examples). When these forms are used, the following assumptions are made by the APT
processor:
INTOL/ t1
OUTTOL/ t2
TOLER/ t3
INTOL is defined as the amount by which the cutter can violate (gouge) the surface. OUTTOL is the
amount of excess stock that is permissible. Either OUTTOL or INTOL may be zero, but not simultaneously.
If neither is specified, OUTTOL is set to .0005, and INTOL is set to zero, unless TOLER was specified.
Then, OUTTOL is set equal to TOLER and INTOL is set to zero.
The Tolerance commands are modal; that is, they remain in effect for all subsequent motion statements until
another tolerance specification is given. Figure 5.3 depicts various tolerance specifications. Section 5.5
discusses an expanded tolerance statement.
Figure 5.3. CUTTER Tolerance
The part surface (PS) is one of two surfaces with which the cutter is in continual contact (within tolerance)
during a given machining motion. The PS is usually the surface that controls the depth of the cut (see
Figure 5.4).
5.1.3.2. Drive Surface
The drive surface (DS) is the second surface with which the cutter is in continual contact (within tolerance)
during a given machining motion. The DS guides the cutter through space, while a given relationship is
maintained between the cutter and the PS (see Figure 5.4).
5.1.3.3. Check Surface
The check surface (CS) is the limiting surface for a given motion statement. The cutter maintains a specified
relationship with the PS and DS until it reaches a given condition with regard to the check surface. When
this occurs, a new motion statement can be specified (see Figure 5.4).
5.1.3.4. Basic Problem Description
The surfaces to be machined are defined exactly by the processor. However, most N/C machines are capable
of moving only in a straight line. Therefore, a series of straight lines that approximate the desired contour
within tolerance must be generated. Each individual straight-line movement is called an "elementary cut
vector" A string of these movements that complete the motion defined by a given PS, DS and CS
combination is called an "elementary cut sequence"
For example, the cutter is located initially in space with regard to a PS and a DS. A given relationship is
described with regard to the PS. Then, the cutter is guided through space by the DS, maintaining the defined
relationship with the PS until a specific condition is reached with regard to the CS. As many elementary cut
vectors as required will be generated to maintain the specified tolerance.
TLOFPS specifies that the tool end is to be located off the part surface. The too is tangent to the part surface
at some other point, as indicated by the tool configuration and the relationship of the tool to the drive surface
(see Figure 5.6).
Figure 5.6. TLOFPS
TLLFT
TLRGT
TLON
TLNDON
These modifiers are applied with regard to the direction of tool motion; that is, "left" means on the left of the
surface looking in the direction in which the tool is moving. Thus, TLLFT means place the tool tangent to
the surface on the left, and TLRGT means position the tool tangent to the surface on the right (see
Figure 5.7). TLON and TLNDON both specify that the end of the tool is to be on the surface. If no other
specification is given, TLON is assumed (see Figure 5.8).
Figure 5.7. TLLFT, TLRGT
TO
ON
PAST
TANTO
DSTAN
PSTAN
These modifiers apply when viewed from the tool to the check surface. TO indicates the cutter is to be
tangent to the check surface on the near (cutter) side. ON means the final cutter position is to be on the
check surface. PAST specifies the cutter is to be tangent to the check surface on the far (opposite the cutter)
side. If no modifier is given, TO is assumed (see Figure 5.9).
Figure 5.9. Check Surface to Cutter Relationships
The TANTO specification is to be used when the cutter motion is to be terminated at a point where the drive
surface is tangent to the check surface (see Figure 5.10). (The vocabulary word DSTAN may be used in
place of TANTO and the results would be identical.)
Note
The PSTAN specification indicates the cutter motion is to terminate at a point where the part surface is
tangent to the check surface (see Figure 5.11).
Figure 5.11. PSTAN
defined explicitly. This section discusses the startup procedures available to orient the cutter in space
properly.
5.3.1. Initialization
The tool must have a specific coordinate location before a command involving movement of the tool is
given. This is accomplished initially with a FROM command (see Section 4.1); subsequently, the location is
the final position after executing the last programmed movement.
In addition to a coordinate location, a sense of direction must be established. This can be done by one of the
following.
Specifying a point-to-point command (GOTO, GODLTA). The sense of direction is the direction
resulting from moving the tool to the specified location.
Specifying a previous command involving motion with regard to part, drive and check surfaces. The
sense of direction is taken to be the direction of the last cut vector in the cut sequence.
Specifying either an INDIRV/ or an INDIRP/ statement.
5.3.1.1. INDIRV
5.3.1.2. INDIRP
Note
The current tool location and the INDIRP point must not be identical.
Figure 5.13. INDIRP
FROM/ PTB
INDIRP/ PTC
The positional modifiers TO, PAST, and ON (See Figure 5.14) indicate the relationship of the tool with
regard to the following surface in the GO/ statement. As viewed from the current location of the tool, the
final position of the tool for each modifier is:
TO
Tangent to the surface near (cutter) side.
PAST
Tangent to the surface far (opposite cutter) side.
ON
Tool end is on the indicated surface.
FROM/ PTA
GO/ TO, S1
FROM/ PTB
GO/ ON, S2
FROM/ PTC
GO/ PAST, S3
The first surface to the right of the slash is the DS, the second is the PS, and, if given, the third surface is
called the startup check surface (CS). The third surface is used if it is necessary too specify more exactly
where the cutter is to be positioned. The cutter will be required to be positioned with regard to the CS as
well as the DS and PS. When the GO/ statement references only one surface (the DS), the APT processor
will position the cutter with respect to the specified DS and the current PS, if one has been defined. If no PS
has been defined, the XY-Plane is used as a PS to position the cutter properly.
5.3.2.1. One-Surface Startup
The final cutter position will be at the indicated relationship (TO, ON, PAST) with the specified surface.
The direction in which the cutter moves is determined as follows:
The normal movement is such that the final tool position also satisfied a TO condition with regard to
the part surface (if no part surface has been defined, the XY-Plane is assumed). See Figure 5.15 for
examples.
The vocabulary word NOPS used before a one-surface startup causes the processor to ignore the part
surface and move only with regard to the surface designated in the GO/ statement. The final cutter
position is calculated such that the shortest possible movement is made from the current tool position
to the new one (see Figure 5.16 for examples).
FROM/ PTA
PSIS/ S1
GO/ TO, S2
FROM/ PTA
PSIS/ S1
GO/ ON, S2
FROM/ PTA
PSIS/ S1
GO/ PAST, S2
FROM/ PTA
NOPS
GO/ TO, S1
FROM/ PTA
NOPS
GO/ ON, S1
FROM/ PTA
NOPS
GO/ PAST, S1
A problem may arise when the NOPS feature is used. A previously defined part surface, although ignored
when executing the startup, is still in effect for later motion statements. Upon completion of the startup
command, any attempt to move the cutter with a motion instruction results in failure if the cutter is not
within tolerance of the part surface.
Directed One-Surface Startup. Use of an INDIRV or an INDIRP statement with a NOPS command
indicates the cutter is to move exactly in the direction of the vector to the referenced surface without regard
to the ""shortest" or minimum movement (see Figure 5.17 for an example). Caution must be exercised when
using this feature of the processor, since it is easy to specify an impossible condition (see Figure 5.18 for
such a case). If a NOPS is not used, a part surface is in effect, and the INDIRV vector is used as an aid in
determining the general move in the direction of the referenced surfaces.
Figure 5.17. INDIRV or INDIRP with NOPS
FROM/ PTA
INDIRV/ VECA
NOPS
GO/ S1
FROM/ PTA
INDIRV/ V1
NOPS
GO/ C1
The cutter will not necessarily move exactly in the vector direction because of the added restraint of having
to move within tolerance of the referenced surface and the part surface (see Figure 5.19 for an example).
Figure 5.19. Actual INDIRV Move
FROM/ PTA
PSIS/ PS
INDIRV/ V1
GO/S1
The cutter is moved the shortest possible distance to the required relationship with the specified surfaces.
The second surface automatically becomes the part surface for later motion commands.
Examples of the possible combination of cutter positions are given in Figure 5.20.
Figure 5.20. Possible Two-Surface Startup Positions
FROM/ PTA
GO/ TO, S1, TO, S2
FROM/ PTA
GO/ TO, S1, ON, S2
FROM/ PTA
GO/ TO, S1, PAST, S2
FROM/ PTA
GO/ ON, S1, TO, S2
FROM/ PTA
GO/ ON, S1, ON, S2
FROM/ PTA
GO/ ON, S1, PAST, S2
FROM/ PTA
GO/ PAST, S1, TO, S2
FROM/ PTA
GO/ PAST, S1, ON, S2
FROM/ PTA
GO/ PAST, S1, PAST, S2
Use of INDIRV or INDIRP. An INDIRV or INDIRP used before a two-surface startup establishes a
"guiding" direction to be used in locating the proper final position. The tool will not necessarily move in the
referenced direction, since it must satisfy the given surface requirements. This feature permits proper
selection of the desired position from among more than one possibility. Figure 5.21 depicts the situation
where either PTB or PTC could be the result from a straight GO/ CIRC1, CIRC2 command -- the INDIRV is
used to show that PTC is the desired point.)
Figure 5.21. Two-Surface Startup INDIRV
FROM/ PTA
INDIRV/ V1
GO/ CIRC1, CIRC2
The tool is moved to the closest position at which it can satisfy the given relationships. The TANTO
modifier can be used with the third surface only, and indicates that the second and third surfaces are tangent
at the desired tool location. An example of a three-surface startup is shown in Figure 5.22.
Figure 5.22. Three-Surface Startup
Use of INDIRV or INDIRP. INDIRV or INDIRP has the same meaning with a three-surface startup as
with a two-surface startup. It is used only to establish a general looking direction and does not necessarily
define the actual tool movement (see Figure 5.23).
INDIRV/ V3
GO/ TO, SURF1, TO, SURF2, TO, SURF3
The APT processor performs the following operations for the OFFSET/ statement:
1.
2.
3.
4.
5.
The vector defined by the INDIRV/ or INDIRP/ statement is used to intersect the drive surface.
At the point of intersection, the normal to the drive surface is found.
The cutter is moved along the surface normal until it is in valid position (TO, ON, or PAST).
If NOPS was specified, the resultant point from step 3 is the final output point.
When a part surface is in effect, either implicitly or explicitly, the cutter is moved (from the resultant
location of step 3) directly along its axis until the proper position (TO, ON, or PAST) is reached with
respect to the part surface. Only the final point is output for later processing.
FROM/ PTA
INDIRV/ VECA
OFFSET/ TO, SURF1
FROM/ PTA
INDIRV/ V1
OFFSET/ PAST, CYL, TO, PS
where:
TLLFT, TLRGT, TLON, and TLNDON are positional modifiers that describe the relationship between the
tool and the drive surface. When one of these modifiers is used, it remains in effect with later motion
statements until a new modifier is encountered. The meaning of each modifier is given in Section 5.2.2.
TLONPS and TLOFPS are positional modifiers that describe the relationship between the tool and the part
surface. When specified, they remain in effect until a new modifier is found. When neither has been
specified, TLOFPS is assumed (see Section 5.2.1).
GOLFT, GORGT, GOUP, GODOWN, GOFWD and GOBACK are directional modifiers that select the
proper path of travel. These modifiers, one of which must be present on any motion statement, are described
in Section 5.4.2.
SURF1 is the drive surface for this motion command. The concept of a drive surface was explained in
Section 5.1.3.2. TO, ON, PAST, and TANTO define the relationship of the final cutter position with regard
to the surface that follows in the motion statement. If none is used, TO is assumed. These modifiers are as
defined in Section 5.2.3.
SURF2 is the check surface for this motion command. The concept of a check surface was explained in
Section 5.1.3.3.
The reset of the general statement contains information regarding multiple check surfaces. This concept is
introduced in Section 5.4.3.4.
The modifiers GOLFT and GORGT indicate the cutter is to turn left or right, respectively, at the designated
intersection. The meaning of left and right is determined by viewing the cutter path from the current
reference point. Figure 5.27 indicates the implication of left and right in this sense. GORGT would cause the
movement along S1 toward PL2, while GOLFT would cause the cutter to move toward PL1.
Figure 5.27. GOLFT, GORGT Nomenclature
FROM/ PTA
GO/ ON, S1
TLON, GORGT/ S1
$$ or
FROM/ PTA
GO/ ON, S1
TLON, GOLFT/ S1
would result in motion being terminated at PTC, while GORGT in the last statement would yield PTD. The
results are shown in Figure 5.28.
Figure 5.28. GOLFT, GORGT Example
Example 5.1 shows where neither GOLFT nor GORGT could be used. Making the transition between
LINEA and CURVA does not involve either a left or a right turn with regard to the current direction of
travel. However, it does consist of a continuation of the current forward movement of the cutter. Hence,
GOFWD is the proper modifier.
Example 5.1. GOFWD Usage
FROM/ PTA
GO/ ON, LINEA
TLON, GOLFT/ LINEA, TANTO, CURVA
The general concept of the modifiers GOFWD and GOBACK is shown in Figure 5.29. GOFWD would
cause movement along S1 toward PL1; GOBACK would cause the cutter to be directed toward PL2.
Figure 5.29. GOFWD, GOBACK General Concept
FROM/ PTA
GO/ ON, PL5
TLON, GOLFT/ PL5, TANTO, S1
GOFWD/ S1
$$ or
FROM/ PTA
GO/ ON, PL5
TLON, GOLFT/ PL5, TANTO, S1
GOBACK/ S1
In isolated circumstances, neither GORGT, GOLFT nor GOFWD, GOBACK describe the desired motion
adequately. Then, and only then should GOUP or GODOWN be used.
The previous directional modifiers were applied with regard to the current sense of direction of the cutter
motion GOUP and GODOWN, however, are applied with regard to the tool axis. GOUP specifies that the
motion is to be in a direction similar to withdrawing the tool (that is, move up the tool axis). GODOWN
specifies that the motion is to be in a direction similar to plunging the tool (that is, move down the tool axis).
The use of GOUP and GODOWN does not replace the current sense of direction if the movement resulting
from the GOUP or GODOWN is directly along the tool axis. The sense of direction for later motion
commands will be taken as that of the last motion command which did not result in a motion directly along
the tool axis. Figure 5.30 shows the use of GOUP and GODOWN.
Figure 5.30. GOUP, GODOWN Usage
FROM/ P1
GO/ PLB, ON, PL, PLA
TLONPS, GODOWN/ PLB, PLC
GOFWD/ PLC, PLD
Note
When using GOUP and GODOWN, an implicit check surface (see Section 5.4.3.3) is not allowed.
Where the GOUP, GODOWN directional modifier appears must be designated explicitly in the motion
command.
The part surface must be defined before any motion statements. The XY-Plane is used as the part surface if
one has not been defined explicitly. The part surface designation is in effect until a new surface is so
designated. There are three ways to define a part surface explicitly -- with a PSIS statement, with an
AUTOPS statement, or with a two- or three-surface startup/command.
1. PSIS
The format of a PSIS statement is as follows:
PSIS/ SURF1
This statement indicates that SURF1 is the part surface that is to be in effect until a new one is
defined.
2. AUTOPS
The vocabulary word AUTOPS, appearing by itself as a complete APT statement, causes the
processor to define a plane parallel to the XY-Plane at the current Z-height of the tool. This plane
becomes the part surface and is in effect until a new one is defined (see Figure 5.31 for an example).
Figure 5.31. AUTOPS Usage
FROM/ PTA
INDIRV/ VECA
NOPS
GO/ S1
AUTOPS
The drive surface must be defined explicitly in each motion command. It is the first surface specified to the
right of the slash in the motion statement. It cannot be defined implicitly, and is not modal.
5.4.3.3. Check Surface (CS)
Check surfaces can be defined either explicitly or implicitly. If more than one surface is given in a motion
command, the second and later surfaces are defined as check surfaces. If only one surface was specified, the
first surface in the following motion command is used as the check surface for the current movement.
Figure 5.32 shows a desired series of cutter movements, together with two sets of motion commands that
would work properly. In the first set, each motion command has two surfaces associated with it. The second
surface is then the check surface in each instance. However, in the second set, statements labeled C and D
have only one surface specified. Therefore, the first surface in the following statements, D and E,
respectively are used as check surfaces. This results in the same movement as was obtained with the first set
of instructions.
Figure 5.32. Check Surface in Motion Command
A)
B)
C)
D)
E)
FROM/ PTA
GO/ PLANEA, PL3
TLLFT, GOLFT/ PLANEA, TO, CURVEB
GOLFT/ CURVEB, TO, PLANEC
GOLFT/ PLANEC, TO, PLANED
$$ OR
A)
B)
C)
D)
E)
FROM/ PTA
GO/ PLANEA, PL3
TLLFT, GOLFT/ PLANEA
GOLFT/ CURVEB
GOLFT/ PLANEC, TO, PLANED
There are instances when the exact check surface designation is not precisely known. The APT processor
can determine which of several possible check surfaces is encountered first. On the basis of the results, the
processor will transfer to the location in the program defined by the statement identification following the
check surface in the given motion command. For example, if the motion command was GOLFT/ S1, TO, S2,
ID1, ON, S3, ID2, the processor would GO left along the surface S1 until it was "TO" the surface S2 or
"ON" the surface S3, whichever occurred first. If "TO" S2 occurred first, the processor would transfer to the
part program statement with the label "ID1" If, however, "ON" S3 happened first, the transfer would be to
the statement labeled "ID2"
Figure 5.33 and Figure 5.34 show a situation whereby the selection of the proper check surface depends on
the size of the cutter used. In the first instance, a small tool results in PL2 being the first surface reached.
The second case shows that a larger tool would meet PL3 first. (See Section 14.1.7 for further usage.)
Figure 5.33. Check Surface with Small Cutter
In each instance the four parameters indicated to the right of the slash have the following meaning:
tolps
tolerance to the part surface
tolds
tolerance to the drive surface
tolcs
tolerance to the check surface
tolcs1
tolerance to the second check surface (if any)
If fewer than four tolerances are specified, the processor takes the last specified tolerance and applies it to
the remaining fields. For example OUTTOL/ .005 would result in the same tolerance as OUTTOL/ .005,
.005, .005, .005; and INTOL/ .1, .2, .3 would be the same as INTOL/ .1, .2, .3, .3 and so on.
As was the case in the FROM and GOTO statements, a feed rate can be specified in any general motion
command by adding a scalar variable or number to the end of the statement. For example:
TLLFT, GORGT/ S1, TANTO, S2, 10.0
The feed rate for this command will be 10.0 inches/minute, and it will be in effect until another feed rate is
specified.
The APT language provides the part programmer with a means of controlling certain functions at the
machine tool that are auxiliary to the cutter-part relationship. For instance, through proper part program
statements, the feed fate is controlled, the spindle rpm can be selected, the coolant can be turned on and off,
and if the machine is so equipped, the tool can be changed--all automatically.
There are capabilities and restrictions peculiar to almost every machine tool-control system combination in
use today. As a result, not all systems recognize all the postprocessor words available in the APT language.
Further, different postprocessors may interpret the same word in a variety of ways. For these reasons, the
definition of the postprocessor vocabulary words is meaningful only in the environment of a particular
postprocessor. However, certain classifications and rules can be stated concerning the use of such words.
Certain postprocessor words are definitive without additional information. For example, the usual meaning
conveyed by two of these words is as follows:
END
This is the end of a logical section of a part program. Turn off all the auxiliary functions, stop the
reader, and thus, the machine tool.
STOP
Stop the reader and machine tool at this point to permit changing of clamps, inspection of cutter, etc.
DRAWLI
DRESS
END
FACEML
GOCLER
GOHOME
ISTOP
LOCKX
OPSTOP
PENUP
PENDWN
PROBY
PROBX
RAPID
RESET
RETRACT
REWIND
STOP
SWITCH
UNLOKX
UNLOAD
ZERO
The first four modifiers turn the coolant on in a variety of ways; the last modifier specifies that the coolant is
to be turned off.
Four of the postprocessor words with modifiers affect other parts of the processor, in addition to the
postprocessor. They are: MACHIN, INDEX, COPY, and TRACUT. A full discussion of these special words
appears later in the manual.
The APT processor will allow any combination of vocabulary modifier words, floating-point numbers,
arithmetic expressions, and scalar symbols as minor modifiers except where an alphanumeric string of
characters or other restrictions are specified.
The following is a list of postprocessor words that require parameters, together with sample parameters that
are used by many postprocessors.
ASLOPE/ n, ...
CHECK/ x, y, z, AUTO
CLAMP/ n
Note
CORNFD/ n, ...
COUPLE/ n, ...
CYCLE/ n, ...
DELAY/ t
Note
IFRO/ n, ...
INDEX/ i
Note
MAGTAP/ n, ...
MAXVEL/ n, ...
MCHTOL/ e
MCHFIN/ e
MDEND/ n, ...
MDWRIT/ n, ...
MODE/ n, ...
MOVETO/ n, ...
ORIGIN/ x, y, z
OVPLOT/ n
PARTNO Alphanumeric string of characters
Note
PBS/ n, ...
PITCH/ n, ...
PIVOTZ/ z
PLABEL/ n, ...
PLUNGE/ d, f
REWIND/ n, ...
SELCTL/ n, ...
SEQNO/ n
SLOWDN/ n, ...
THREAD/ n, ...
Note
TRANS/ x, y, z
VTLAXS/ n, ...
Note
WCORN/ n, ...
Note
PPRINT
INSERT
PARTNO
FEDRAT/ fb
The desired feed rate is fb, and it should be maintained constant at fb until respecified. This is a
normal feed rate condition.
FEDRAT/ d1, f1
The previously specified basic feed rate is to be used until distance d1 from the check surface, at
which time the feed rate is changed to f1. The basic feed rate is to be restored after the CS is reached.
This is a one-shot override. That is, the feed rate change is to take place only for the next check
surface approach. Thereafter, the processor reverts to whatever mode was previously in effect, either
basic only or modal override.
The following rules apply to the special feed rate option.
Feedrate overrides occur only as check surfaces are approached, that is, as the result of GOLFT/,
GORGT/, GOFWD/, GOBACK/, GOUP/ or GODOWN/ commands. GO/, GOTO/, GODLTA/
,OFFSET, and POCKET/ motions will not be affected by the feed rate overrides.
The distance from the check surface (dm or d1) at which the feed rate change is to occur may in
some cases be greater than the total distance to the check surface for a given cut sequence. (A cut
sequence is defined as the resultant motion from a single GOXXX command.) If this occurs, the
processor will change the feed rate before the entire cut sequence, and the total motion for that
sequence will be at the appropriate fm or f1 value. No diagnostic message is issued.
The basic feed rate fb may be established either with the FEDRAT/ statement or by tagging the
motion commands FROM/, GOT, GODLTA, or GOXXX as described in Section 4.1, Section 4.2,
Section 4.3, and Section 5.7. Any such basic feed rate specification destroys a modal override
condition, and restores a normal condition.
The distance from the check surface at which the feed rate is to be changed must be short enough
that no more than 70 cut vectors (35 if MULTAX is in effect) are required to reach the check surface
after the feed rate change occurs. If this condition is not met, the feed rate change will occur closer to
the check surface than specified. No diagnostic message is given.
The APT vocabulary words discussed in this chapter either have special effect on the APT processor or
require certain precautions to be exercised in their use, or both.
See double dollar and single dollar for more on program commentary.
The OBTAIN statement defines (or assigns a value to) a scalar variable with reference to a particular
geometric type. The general form of the OBTAIN statement is:
OBTAIN, type/ S1, [a], [b], [c], etc.
The foregoing statement defines the scalar variable a, b and c as follows:
a
The value of the first parameter of the canonical form of S1.
b
The value of the second parameter of the canonical form of S1.
c
The value of the third parameter of the canonical form of S1.
The following rules are to be observed when using the OBTAIN statement.
The surface type given must correspond to the surface type S1.
Commas to the right of S1 denote position. Hence, care must be exercised in specifying the number
and positions of the commas.
The variables a, b and c must be scalar variable.
The number of parameters referred to in the OBTAIN statement cannot exceed the total number of
parameters in the canonical form of the referenced surface type (see Chapter 16 for a discussion of the
canonical form for the various APT surfaces).
Example 7.1. OBTAIN Usage
C1 = CIRCLE/ PT1, PT2, PT3
OBTAIN/ CIRCLE/ C1, X, Y, , , , , RAD
The first statement defines C1 as a circle through the three points PT1, PT2 and PT3. The OBTAIN
statement is then used to define the scalar variables X, Y and RAD as follows:
X
The X coordinate for the center of the circle C1
Y
The Y coordinate for the center of the circle C1
RAD
The radius of the circle C1
CLPRNT
Specifies that the entire input to the postprocessor is to be printed. The statement takes precedence
over any of the other CLPRNT forms, if more than one should occur in a given part program.
CLPRNT/ ON
Specifies that printing of the information is to begin at the location in the part program where the
statement occurs.
CLPRNT/ OFF
Indicates that printing of the information is to cease from this point on in the part program.
CLPRNT/ OPTION
The CLPRNT/ OPTION is used in conjunction with the cutter transformation feature (TRACUT) of
the APT processor (see Chapter 13 for a discussion of TRACUT). Normally, the information is
printed out after the transformation has occurred. However, the CLPRINT/ OPTION statement
causes the information to be printed out before transformation. The CLPRNT/ OPTION statement in
every other regard is identical to the CLPRNT/ ON statement; that is, the printing of the information
begins at the spot in the part program where the statement appears.
CLTV
Specifies that the auxiliary arithmetic element is to be used in place of the standard program. This
form of the statement takes precedence over the alternate format.
CLTV/ OPTION
Specifies that the auxiliary arithmetic element is to be used only if difficulty is encountered in the
standard version.
PTONLY/ 1
Causes the omission of the arithmetic element phase of the APT processor; that is, the APT
processor bypasses the arithmetic element phase and goes directly from the compiler phase to the
edit or postprocessor phase of the APT processor. It is assumed that the tool positioning data is
defined enough so that arithmetic calculations are minor and can be handled by the edit or
postprocessor phases.
PTONLY/ 2
Causes the arithmetic element phase of the APT processor to be omitted -- the cutter location data
(CLTAPE) from a previous computer run is available to the APT processor for later phases of the
APT system.
PTONLY/ 3, n
Informs the arithmetic element phase of the APT processor to use a previously calculated cutter
location data set, up to logical record n, as a starting basis for a new cutter location data set. The
remainder of the cutter location data set is to be generated by the arithmetic element as defined in the
part program.
The PTONLY statement should appear on a line by itself or as the last item of another APT statement.
The loop capability of the APT processor permits the definition and use of geometric surfaces and scalar
variables in an iterative manner. In effect, it supplies the branching logic required to support the computing
facilities discussed in Chapter 2. The macro capability permits the definition of a series of statements that
are to be accessed at one or more subsequent locations in the part program. In addition, input parameters to
the macro can be varied each time the macro is accessed.
In this example, 100 horizontal (LH) and vertical (LV) lines are defined one unit apart. The intersection of
these lines (PI) forms a diagonal pattern of points going through the origin. From the example the following
can be noted:
1. The statement setting I=1 is not required Within the bounds of the loop; thus, it is placed ahead of
the LOOPST statement.
2. The conditional IF statement tests the index value, I, against the upper bound (100) for the geometric
quantities as defined in the RESERV statement. If the index, I, is less than the upper bound, I is
increased by one, and flow is returned to the beginning of the loop by the JUMPTO statement. When
the index, I, is equal to or greater than the upper bound, processing branches to the statement labeled
3A.
3. The statement labeled 3A is a LOOPND statement which, in this case, serves to define the end of the
loop as Well as the terminal flow point for the computing. Both the LOOPND and LOOPST
statements can have statement labels and thus can be used as branching markers in a computing loop.
Any APT statement can be used within the limits of a loop, except the following:
Section 1.1.4). The definition of any macro variable appears in the list immediately following the slash in
the MACRO statement. Macro variables and their methods of definition are discussed in Section 8.2.4.
The macro referred to as NAME would be stored as defined at statements 1 through 5. The statement labeled
as ID1 would produce the following result: Where A occurred in the macro, the value 20 Would be inserted;
where B occurred, the vocabulary word FLOOD Would be used; and where C occurred, the value 1 Would
be used. In effect, then, the result- ant statements would be:
FEDRAT/ 20
COOLNT/ FLOOD
GODLTA/ 0, 0, 1
In a similar fashion, the CALL statement labeled ID2 would result in:
FEDRAT/ 50
COOLNT/ MIST
GODLTA/ 0, 0, 1
A Macro variables can be used to represent other unsubscripted APT symbols, vocabulary words (except for
the fixed-field Words and the word CALL), or numbers. They cannot be used to represent statement labels,
subscripted symbols, or arithmetic expressions. A macro variable must satisfy the rules that apply to a
variable symbol (see Section 1.1.4), with the exception that it can appear elsewhere in the same part
program; that is, the same symbolic name can be used as a macro variable in more than one macro in the
same part program; also, the same symbol can be used as a statement label or variable symbol external to
macros that use it as a macro variable. A macro variable cannot be subscripted; to be used within the macro,
each macro variable must be listed to the right of the slash in the MACRO statement.
The maximum number of macro variables for any given macro is 50.
8.2.4.1. Normal Values
A normal value for a macro variable is that value which is assigned to the variable at macro definition time
(as listed to the right of the slash in the MACRO statement). If a normal value is not specified for a macro
variable, a value must be assigned at each CALL statement for the macro in which the variable is used.
Examples of macro variables and normal values appear below:
NAME1 = MACRO/ A, B, C, D
NAME2 = MACRO/ AA=2.3, BB=TLLFT, CC=X
NAME3 = MACRO/ E, F, G=4.5, H
For the macro defined as NAME1, the four macro variables A, B, C, and D do not have a normal value
assigned to them. Hence, a value must be given for each macro variable on the CALL statement that
activates this macro.
The macro defined as NAME2 has normal values assigned to each of the macro variables AA, BB, CC.
These Would be used at execution of the macro if no value was assigned in the CALL statement.
NAMES has a combination of macro variables with and without normal values. Values must be assigned at
the CALL statement for macro variables E, F, and H; if no value was assigned for G, 4.5 Would be used.
8.2.4.2. Assigned Values
A macro variable may be assigned a value at execution time (that is, in the CALL statement) in the same
manner as a normal value was assigned at definition time (on the MACRO statement). The names of the
macro variables in the CALL statement must be the same as those used in the referenced macro; however,
they need not be in the same order. The following example indicates the use of assigned values for macro
variables:
CALL/ MAC2, D=1, E=OFF
The values of 1 and OFF are assigned to the macro variables D and E, respectively, in the execution of the
macro NAME2. In this instance, it makes no difference whether any normal values were assigned for the
macro variables D and E -- the values specified in the CALL statement take precedence. Only the macro
variables for which an assigned value is specified may be referenced in the CALL statement.
The assigned values replace the normal values only for the CALL statement in which they appear; that is,
the normal value is still in effect for future CALL commands.
A macro definition cannot be nested within another macro definition; that is, two statements of the
general form SMAC = MACRO/ list cannot be specified without an intervening TERMAC
statement.
A macro variable must have a value assigned to it either as a normal value from the MACRO
statement or by assigning a specific value in the CALL statement.
The following vocabulary words are not allowed in a macro definition: RESERV, SYN, FINI,
LOOPST, and LOOPND.
A macro definition must occur in the part program before the CALL statement that references it.
Note
LOOPST and LOOPND are not permitted in a macro, since the macro definition mode itself permits all
of the computing and looping logic (for example, IF, JUMPTO, etc.) inherent in the loop definition.
In addition to the above rules, it is not desirable to specify those words within a macro which, by their very
nature, are not repetitive; for example, CLPRNT, NOPOST, etc. The processor will not treat this condition
as an error, but it will result in the needless execution of these statements over and over. Further, since a
macro is handled in much the same manner as a loop, it is also advisable to keep the macro as small as
possible, eliminating statements that could be specified without error outside the bounds of the macro.
N = 1
R1) GOTO/ A(N), D
GODLTA/ 0, 0, -E,
GODLTA/0, 0, E, C
N = N + 1
IF(N - F) R1, R1,
R2) TERMAC
CALL/ NAME, A=PT,
E=.5,
B
R2
B=2, C=5, D=10, $
F=30
In this example assuming PT to be a previously defined array of points, the CALL statement would result in
30 holes being drilled at a depth of .5, with the following feed rates: 10 inches/minute (D) moving between
holes, 2 inches/minute (B) during the plunge movement, and 5 inches/minute (C) during the withdraw
movement. By using another CALL statement and altering the parameters, the pattern can be located
elsewhere and repeated.