Version 1.0, August 31, 2001, Copyright, Hugh Jack 1993-2001

44.2 APT

 

· This language allows tools to be programmed using geometrical shapes. This puts less burden on the programmer to do calculations in their heads.

 

· APT programs must be converted into low level programs, such as G-codes.

 

· An example of an APT program is given below.

 

 

· Some samples of the geometrical and motion commands follow. These are not complete, but are a reasonable subset.

 

· GEOMETRY: The simplest geometrical construction in APT is a point

  1. p=POINT/x,y,z - a cartesian point
  2. p=POINT/l1,l2 - intersection of two lines
  3. p=POINT/c - the center of a circle
  4. p=POINT/YLARGE,INTOF,l,c - the largest y intersection of a line and a circle
  5. *Note: we can use YSMALL,XLARGE,XSMALL in place of YLARGE

 

· GEOMETRY: Lines are one of the next simplest definitions,

  1. l=LINE/x1,y1,z1,x2,y2,z2 - endpoint cartesian components
  2. l=LINE/p1,p2 - endpoints
  3. l=LINE/p,PARLEL,l - a line through a point and parallel to another line
  4. l=LINE/p,PERPTO,l - a line through a point and perpendicular to a line
  5. l=LINE/p,LEFT,TANTO,c - a line from a point, to a left tangency point on a circle
  6. l=LINE/p,RIGHT,TANTO,c - a line from a point, to a right tangency point on a circle
  7. l=LINE/LEFT,TANTO,c1,LEFT,TANTO,c2 - defined by tangents to two circles
  8. l=LINE/LEFT,TANTO,c1,RIGHT,TANTO,c2 - defined by tangents to two circles
  9. l=LINE/RIGHT,TANTO,c1,LEFT,TANTO,c2 - defined by tangents to two circles
  10. l=LINE/RIGHT,TANTO,c1,RIGHT,TANTO,c2 - defined by tangents to two circles

 

· GEOMETRY: Circles are very useful for constructing geometries

  1. c=CIRCLE/x,y,z,r - a center and radius
  2. c=CIRCLE/CENTER,p,RADIUS,r - a center point and a radius
  3. c=CIRCLE/CENTER,p,TANTO,l - a center and a tangency to an outside line
  4. c=CIRCLE/p1,p2,p3 - defined by three points on the circumference
  5. c=CIRCLE/YLARGE,l1,YLARGE,l2,RADIUS,r - tangency to two lines and radius
  6. *Note: we can use YSMALL,XLARGE,XSMALL in place of YLARGE

 

· GEOMETRY: More complex geometric constructions are possible

  1. PLANE/ - defines a plane
  2. QUADRIC/a,b,c,d,e,f,g,h,i,j - define a polynomial using values
  3. GCONIC/a,b,c,d,e,f - define a conic by equation coefficients
  4. LCONIC/p1,p2,... - defines a conic by lofting (splining) points
  5. RLDSRF/ - a ruled surface made of two splines
  6. POLCON/ - define a surface using cross sections
  7. PATERN/ - will repeat a motion in a linear or circular array

 

· Once we have constructed points, lines and circles we can then proceed to direct the tool to follow the path.

 

· MOTION: We can use the basic commands to follow the specified geometry

  1. FROM/p - specify a start point
  2. FROM/x,y,z - specify a start point
  3. GOTO/p - move to a final point
  4. GOTO/x,y,z - move to a final point
  5. GOTO/TO,p - move until the tool touches a point
  6. GOTO/TO,l - move until the tool touches a line
  7. GOTO/TO,c - move until the tool touches a circle
  8. GOLFT/l1,TO,l2 - go on the left of l1 until the tool touches l2
  9. GORGT/l1,TO,l2 - go on the right of l1 until the tool touches l2
  10. GOBACK/l1,TO,l2 - reverses direction along l1 to l2
  11. GOBACK/l1,TO,c1 - reverses direction along l1 to c1
  12. GOUP/l1,TO,l2 - goes up along l1 to l2
  13. GODOWN/1l,TO,l2 - goes down along l1 to l2
  14. GODLTA/x,y,z - does a relative move
  15. Note: TO can be replaced with PAST, ON to change whether the tool goes past the structure, or the center stops on the structure.

 

· MOTION: The following commands will create complex motion of the tool

  1. POCKET/ - will cut a pocket
  2. PSIS/ - will call for the part surface

 

· As would be expected, we need to be able to issue commands to control the machine.

 

· CONTROL: The following instructions will control the machine outside the expected cutting tool motion.

  1. CUTTER/n1,n2 - defines diameter n1 and radius n2 of cutter
  2. MACHIN/n,m - uses a post processor for machine `n', and version `m'
  3. COOL/ANT/n - either MIST, FLOOD or OFF
  4. TURRET/n - sets tool turret to new position
  5. TOLER/n - sets a tolerance band for cutting
  6. FEDRAT/n - sets a feedrate n
  7. SPINDL/n,CW - specifies n rpm and direction of spindle

 

· We can also include some program elements that are only used for programming

 

· PROGRAM: The following statements are programming support instructions

  1. REMARK - starts a comment line that is not interpreted
  2. $$ - also allows comments, but after other statements
  3. NOPOST - turns off the post processor that would generate cutter paths
  4. CLPRNT - prints a sequential history of the cutter center location
  5. SQRTF(n) - calculates the floating point square root
  6. FINI - stop program
  7. PARTNO/n - allows the user to specify the part name
  8. LOOPST and LOOPND - loop instructions
  9. RESERV/n,m - defines an array of size `n' by `m'
  10. JUMPTO/n - jump to line number

 

· Note: variables can also be defined and basic mathematical operations can be performed.

 

· Note: macro functions are also available.