Automatically Programmed Tools Outline – APT (I) • • • • • APT is a high-level NC language designed for machining processes. APT Programming History of APT Structure of APT program Defining geometric entities – – – – – Based on English words, – Standardized and portable. • In APT programming, one needs to Point Definitions Line Definitions Circle Definitions Plane Definitions – Define the geometry of the part first, – Describe the tool path using the geometric entities as reference. • APT requires a processor & a post-processor. • Mathematical Calculations Chapter 8a ME 440 – Post-processor generates the appropriate NC program for a particular CNC machine tool. 2 History of APT ME 440 ME 440 3 Structure of APT Program • First prototype of the APT (I) system was developed in 1956 by MIT. • The program was further developed by the cooperative efforts of 21 industrial companies with the assistance of MIT. Consequently, a more effective system called APT II emerged by 1958. • An advanced version (APT III) was distributed in 1961. • The Illinois Institute of Technology Research Institute was selected to direct the future expansion of the program. • The present APT language constitutes a vocabullary of approximately 300 words. Chapter 8a Chapter 8a • Initial statements • Definition of geometric entities – Part surfaces • Definition of machining conditions – Cutter specifications, tolerance – Spindle speed, coolant, etc. • Motion statements • Termination. 4 Chapter 8a ME 440 5 Geometric Expressions Geometric Expressions (Cont’d) • A geometric expression defines a geometric shape or form. • For each geometric form, there are 1 to 14 different methods of definition. • APT contains 16 geometric elements. The most common ones are – 1-D: Point – 2-D: Line, Circle, Ellipse, Hyperbola – 3-D: Plane, Cylinder, Cone, Sphere. Chapter 8a ME 440 • In APT language, a geometric entity is mostly defined by a reserved word defining the entity (object) type, followed by various modifiers and data associated with that entity. • An entity is assigned to a symbol for easy reference. Symbol = Entity / Descriptive Data 6 Chapter 8a Defining a POINT – Define a point by its coordinates, – Define a point with respect to an entity, – Define a point as the intersection of two (or more) entities. • Definition of a point by its Cartesian coordinates: – POINT/x,y,z – POINT/x,y • As an example, – P1 = POINT/1.0,2.0,-5.0 – P1 = POINT/1.0,2.0 • Only seven of these formats will be covered here. ME 440 7 Definition #1 for Point • In APT, there are 26 different formats to define a point in space. All of these can be classified into three categories: Chapter 8a ME 440 • Note that when z coordinate is omitted, z = 0. 8 Chapter 8a ME 440 9 Definition #2 for Point • Definition of a point by its polar coordinates in various planes: • Definition of a point by its polar coordinates with respect to a given point: Y – POINT/RTHETA,{plane},r,θ – POINT/THETAR,{plane},θ,r • Here, θ is in degrees. • For {plane} modifier, choose – XYPLAN → XY plane – YZPLAN → YZ plane – ZXPLAN → ZX plane. Chapter 8a Definition #3 for Point r=1 – POINT/x,y,RADIUS,r,θ – POINT/P1,RADIUS,r,θ P1 45o X P1=POINT/RTHETA,XYPLAN,1.0,45 or P1=POINT/THETAR,XYPLAN,45,1.0 ME 440 Definition of a point on or relative to a geometric entity: 10 • Again, θ in degrees. P1 • P1 is a point entity. • This definition is only valid 1 in XY plane. P1=POINT/1.0,1.0 Chapter 8a • • ME 440 11 Definition of a point on a geometric entity: • 45o POINT/{directional modifier},ON,<line entity>, DELTA,d,<point entity> {directional modifier} is used to select a point by their coordinates: – – – – P1 P2 X P2=POINT/P1,RADIUS,2.0,30 or P2=POINT/1.0,1.0,RADIUS,2.0,30 – C1 30o Definition #5 for Point Y 1. POINT/<entity>,ATANGL,α 2. POINT/CENTER,C1 • ATANGL is a vocabulary word meaning “at an angle of.” • Here, α is in degrees. • C1 is a circle entity defined earlier. • First definition is only valid in XY plane. P2 r=2 1 Definition #4 for Point • Y XLARGE picks the entity with larger x coordinate. XSMALL picks the entity with smaller x coordinate. YLARGE picks the entity with larger y coordinate. YSMALL picks the entity with smaller y coordinate. This definition is only valid in XY plane. Y P1 X P3 P2=POINT/XLARGE,ON,L1,DELTA,3,P1 P3=POINT/XSMALL,ON,L1,DELTA,3,P1 or alternatively, P2=POINT/YSMALL,ON,L1,DELTA,3,P1 P3=POINT/YLARGE,ON,L1,DELTA,3,P1 d d=3 P1=POINT/C1,ATANGL,45 P2=POINT/CENTER,C1 P2 L1 X Chapter 8a ME 440 12 Chapter 8a ME 440 13 Definition #6 for Point • Definition of a point in the intersection of two given lines: Definition #7a for Point Y • Y L2 – POINT / INTOF, <line entity 1>, <line entity 2> P1 • L1 X • P1=POINT/INTOF,L1,L2 ME 440 Definition of a point in the intersection of two given circle entities: Y • • C2 C1 Chapter 8a ME 440 ME 440 15 • In APT, there are 27 different formats to define a line. All of these can be classified into three categories: P2 X P1=POINT/XSMALL,INTOF,C1,C2 P2=POINT/XLARGE,INTOF,C1,C2 or alternatively, P1=POINT/YLARGE,INTOF,C1,C2 P2=POINT/YSMALL,INTOF,C1,C2 Chapter 8a P1 Defining a LINE P1 {directional modifier} is as defined in Slide 13. This definition is only valid in XY plane. P2 P1=POINT/YSMALL,INTOF,L1,C1 P2=POINT/YLARGE,INTOF,L1,C1 14 – POINT / {directional modifier} INTOF, <circle entity 1>, <circle entity 2> L1 X {directional modifier} is as defined in Slide 13. P1=POINT/XSMALL,INTOF,L1,C1 P2=POINT/XLARGE,INTOF,L1,C1 This definition is only or alternatively, valid in XY plane. Definition #7b for Point • C1 – POINT / {directional modifier} INTOF, <line entity>, <circle entity> • INTOF is a vocabulary word meaning “the intersection of.” Chapter 8a Definition of a point in the intersection of a given line entity and a given circle entity: 16 – Define a line by two given points or by its relationship with a given point or a given line or both, – Define a line using a circle or circles as the references, – Define a line by a point on it and its relationship with a given geometric entity. • Only seven of these formats will be covered here. Chapter 8a ME 440 17 Definition #1 for Line Definition #2 for Line • Definition of a line passing through two given points: • – LINE/x1,y1,z1,x2,y2,z2 – LINE/x1,y1,x2,y2 – LINE/<point entity 1>,<point entity 2> Y Definition of a line passing through two given points in polar coordinates: P1 P2 – LINE/RTHETA,r1,θ1,r2,θ2 – LINE/THETAR,θ1,r1,θ2,r2 150o • As examples, Chapter 8a ME 440 18 Chapter 8a – LINE/XAXIS,d – LINE/YAXIS,d Y L1 L2 3 L3 3 L1=LINE/YAXIS,3.0 L2=LINE/YAXIS,-3.0 L3=LINE/XAXIS,3.0 ME 440 ME 440 19 Definition of a line which is parallel to and at a distance, d, from a given line: Y – LINE/PARLEL,<line entity>,{directional modifier},d 3 X Chapter 8a X Definition #4 for Line • Definition of a line which is parallel to and at a distance, d, from the X or Y axis: 30o L1=LINE/RHETA,2.0,30,1.0,150 Definition #3 for Line • r=2 r=1 – L1=LINE/1.0,1.0,2.0,2.0 – L1=LINE/P1,P2 L1 • PARLEL is a vocabulary word meaning “parallel to.” • {directional modifier} is as defined in Slide 13 3 2 L2 L1 L3 X L2=LINE/PARLEL,L1,XSMALL,2.0 L3=LINE/PARLEL,L1,YLARGE,3.0 20 Chapter 8a ME 440 21 Definition #5 for Line • Definition #6 for Line Definition of a line which has a slope, s , with respect to +X axis and an intercept value, d, on the X or Y axis: • Definition of a line which passes through a given point P(x,y) and is at an angle, α, with the +X or +Y axis: – LINE/SLOPE,s,INTERC,{XAXIS or YAXIS},d – LINE/x,y,ATANGL,α,{XAXIS or YAXIS} – LINE/<point entity>,ATANGL,α,{XAXIS or YAXIS} • INTERC is a vocabulary word meaning “intercept.” Y Y L1=LINE/SLOPE,-1,INTERC,XAXIS,2.0 or alternatively, L1=LINE/ATANGL,-45,INTERC,XAXIS,2.0 L1 2 P1(2,1) Slope = -1 (tan -45o = -1) L1=LINE/2.0,1.0,ATANGL,-60,YAXIS X X 2 Chapter 8a ME 440 22 Chapter 8a ME 440 Definition #7 for Line • L1 -60o 23 Definition #8 for Line Definition of a line which passes through a given point P(x,y) and is at an angle, α, with a given line: • Definition of a line which is perpendicular to a given line and at a distance, d, from a given point: – LINE/{directional modifier},PERPTO,<line entity>,DELTA,d,<point entity> – LINE/x,y,ATANGL,α,<line entity> – LINE/<point entity>,ATANGL,α,<line entity> • PERPTO is a vocabulary word meaning “perpendicular to.” Y Y 3 L1 P1(3,1) L3 L2=LINE/XSMALL,PERPTO,L1,DELTA,3.0,P1 L3=LINE/XLARGE,PERPTO,L1,DELTA,5.0,P1 or alternatively, L2=LINE/YLARGE,PERPTO,L1,DELTA,3.0,P1 L3=LINE/YSMALL,PERPTO,L1,DELTA,5.0,P1 L1 L2 X X Chapter 8a P1 5 L2=LINE/P1,ATANGL,-30,L1 or L2=LINE/3.0,1.0,ATANGL,-30,L1 -30o L2 ME 440 24 Chapter 8a ME 440 25 Definition #9 for Line • Defining a CIRCLE Definition of a line which passes through a given point P(x,y) and is tangent to a given circle: – – • • LINE/x,y,{RIGHT or LEFT},TANTO,<circle entity> LINE/<point entity>,{RIGHT or LEFT},TANTO,<circle entity> • In APT, there are 27 different formats to define a circle. All of these can be classified into four categories: TANTO is a vocabulary word meaning “tangent to.” Modifier LEFT or RIGHT indicates the line is on the left or right side of the circle as one looks from the given point P. – – – – Y L1 L1=LINE/P1,LEFT,TANTO,C1 L2=LINE/P1,RIGHT,TANTO,C1 P1(x,y) C1 Define a circle by a point or points as the reference(s) Define a circle by points and lines as references Define a circle by lines as references Define a circle by a circle or circles as the reference(s) • Only four of these formats will be covered here. L2 X Chapter 8a ME 440 26 Chapter 8a Definition #1a for CIRCLE • 27 Definition #1b for CIRCLE Definition of a circle which has a center at P1(x,y,z) with a given radius, r: – CIRCLE/CENTER,x,y,z,RADIUS,r – CIRCLE/CENTER,x,y,RADIUS,r – CIRCLE/CENTER,<point entity>,RADIUS,r • Definition of a circle which has a center at P1 and passes through a given point P2: – CIRCLE/CENTER,<point entity 1>,<point entity 2> Y Y C1 C1 r=2 r=2 C1=CIRCLE/CENTER,3.0,4.0,RADIUS,2.0 C1=CIRCLE/CENTER,P1,RADIUS,2.0 P1(3,4) C1=CIRCLE/CENTER,P1,P2 P1(3,4) P2 P2 X X Chapter 8a ME 440 ME 440 28 Chapter 8a ME 440 29 Definition #2 for CIRCLE • Definition #3 for CIRCLE Definition of a circle which passes through two given points with a given radius, r: – CIRCLE/{directional modifier},<point entity 1>, <point entity 2>,RADIUS,r. • Directional modifier is selected by comparing the coordinates of the centers for the two possible solutions. • Definition of a circle which passes through three given points: Y – CIRCLE/<point entity 1>, <point entity 2>, <point entity 3> C1 Y P1 5 5 P2 C2 C1 P1 P2 C1=CIRCLE/XLARGE,P1,P2,RADIUS,5.0 C2=CIRCLE/XSMALL,P1,P2,RADIUS,5.0 or alternatively, C1=CIRCLE/YLARGE,P1,P2,RADIUS,5.0 C2=CIRCLE/YSMALL,P1,P2,RADIUS,5.0 P3 X C1=CIRCLE/P1,P2,P3 X Chapter 8a ME 440 30 Chapter 8a Definition #4 for CIRCLE • • – CIRCLE/CENTER,x,y,TANTO,<line entity> – CIRCLE/CENTER,<point entity>,TANTO,<line entity> Y L1 P1(4,4) C1=CIRCLE/CENTER,P1,TANTO,L1 or C1=CIRCLE/CENTER,4.0,4.0,TANTO,L1 Definition of a circle which Y passes through two given points and is tangent to a given line: – CIRCLE/{directional modifier},TANTO, <line entity 1>, THRU,<point entity 1>,<point entity 2> ME 440 C1 P2 P1 L1 C2 X C1=CIRCLE/YLARGE,TANTO,L1,THRU,P1,P2 C2=CIRCLE/YSMALL,TANTO,L1,THRU,P1,P2 or alternatively, C1=CIRCLE/XSMALL,TANTO,L1,THRU,P1,P2 C2=CIRCLE/XLARGE,TANTO,L1,THRU,P1,P2 X Chapter 8a 31 Definition #5 for CIRCLE Definition of a circle which is tangent to a given line, with its center at a given point: C1 ME 440 32 Chapter 8a ME 440 33 Defining a PLANE Some Plane Definitions • Planes are among the most frequently used geometric entities for defining cutter path. • There are 13 different formats to define a plane on the basis of various gives conditions • Only three of these formats will be covered here. • A plane passing through 3 given points: Chapter 8a Chapter 8a ME 440 34 – PLANE/P1,P2,P3 • A plane defined by ax + by + cz = d: – PLANE/a,b,c,d • A plane which is parallel to and at a distance, d, from coordinate plane XY, YZ, or ZX: – PLANE/{XYPLAN,YZPLAN,or ZXPLAN},d Example – Defining Entities 90 Y C1 90 L5 100 L3 40 P0 70 L4 120 40 40 35 Defining Geometric Entities • Consider the part shown on the left. • Define the relevant geometric entities. Y ME 440 L1 40 X Z X -20 L2 70 X 100 P0 = POINT/0.0,0.0 L1 = LINE/YAXIS,40.0 L2 = LINE/YAXIS,100.0 L3 = LINE/XAXIS,40.0 L4 = LINE/XAXIS,120.0 L5 = LINE/70.0,120.0,ATANGL,45,YAXIS L5 = LINE/70.0,120.0,ATANGL,-45,XAXIS C1 = CIRCLE/CENTER,70.0,90.0,RADIUS,30.0 C1 = CIRCLE/CENTER,70.0,90.0,TANTO,L1 PL1 = PLANE/XYPLAN,-20.0 Z X PL1 -20 Chapter 8a ME 440 36 Chapter 8a ME 440 37 Mathematical Functions in APT • In many cases, one or more geometric parameters associated with various geometric entities must be calculated. • APT language incorporates a wide variety of mathematical functions: – Trig. / inverse trig. – Logarithmic – Absolute value, square root, int, etc. Chapter 8a ME 440 38 Mathematical Functions (Cont’d) Statement SINF(A) COSF(A) TANF(A) ASINF(A) ACOSF(A) ATANF(A) EXPF(A) LOGF(A) Expression sin A cos A tan A sin-1 A cos-1 A tan-1 A eA ln A Chapter 8a Remark A is in degrees -90o≤ sin-1 A ≤ 90o 0o≤ cos-1 A ≤ 180o -90o≤ tan-1 A ≤ 90o Exponential Natural logarithm ME 440 39 Arithmetic Operations Mathematical Functions (Cont’d) • APT Language enables all arithmetic operations (+, -, *, /, **). Here are some examples: Statement ABSF(A) SQRTF(A) INTF(A) LOG10F Chapter 8a Expression |A| A1/2 [A] log A ME 440 Remark Absolute value of A Square root of A Truncate to an integer Logarithm (base 10) A = B + C – M/N → A = B +C − A = B / C + D*F**G → A= M N B + D⋅FG C • One can calculate the parameters of geometric entities in a program: ... X = 60*COSF(10) + 10*SINF(30) Y = 60*SINF(10) + 10*COSF(30) ... P = POINT/X,Y 40 Chapter 8a ME 440 41 Math. Operations on Entities • APT Language includes a number of functions that operate on geometric entities: Function Remark ANGLF(C1,P1) The angle between the X+ axis and the line segment connecting P1 to the center of C1. ANGLF(L1,L2) The absolute value of the smaller included angle between two defined lines L1 and L2. DISTF(L1,L2) The absolute value of the distance between two defined parallel lines L1 and L2. Chapter 8a ME 440 42
© Copyright 2024 Paperzz