Home

   
 
"

Return

 


  APT is a geometry-oriented  procedural programming language, rigorously defined by an ANSI standard. Many vendors have offered APT processors over the years - most adhere to the standard but also provide proprietary extensions.

The APT language consists of statements that define geometry, from simple points, lines, and circles to conics and complex surfaces. It also includes statements that generate tool motion either directly or based on previously defined geometry.

Here is an example of a simple APT program. This is a program that creates a simple tool path with three clockwise arcs and one counterclockwise arc - it's used for basic postprocessor testing - with the geometry definition in the yellow area and motion in the grey. Comments ($$) describe the function of most statements.

 

PARTNO ABIRD

CLPRNT                    $$ Create a CL file listing

INTOL/ 0                   $$ Set tolerances

OUTTOL/ .001

$$ GEOMETRY DEFINITIONS

SETPT = POINT/0,0,5            $$ Create a point named 'SETPT' at  X  and  Y = 0  and  Z = 5

ZSURF/ -.2                              $$ Set a Z value of  -0.2  for following geometry

P1 = POINT/ -1.5, 1.25            $$ Create a point named 'P1' at X = -1.5, Y = 1.25, and  Z = -0.2

C1 = CIRCLE/ -0.75, 1.25, 0.5009            $$ Create a circle 'C1' centered at X = -0.75, Y = 1.25, radius of 0.5009

C2 = CIRCLE/ 0, 0, 0.5                             $$ Create a circle 'C2' at the origin, radius of 0.5

C3 = CIRCLE/ 1.75, 1.25, 0.5

C4 = CIRCLE/ 0, -1.5, 0.5

L1 = LINE/ LEFT, TANTO, C1, RIGHT, TANTO, C2        $$ Create line 'L1' tangent to two circles

L2 = LINE/ RIGHT, TANTO, C2, LEFT, TANTO, C3        $$ Create remaining lines tangent to circles

L3 = LINE/ LEFT, TANTO, C3, LEFT, TANTO, C4

L4 = LINE/ LEFT, TANTO, C4, LEFT, TANTO, C1

$$ TOOL PATH DEFINITION

CUTTER/0            $$ Cutter diameter of 0 (No tool offset)

LOADTL/1             $$ Postprocessor command to load tool 1

SPINDL/ 2000, CLW        $$ Postprocessor command - spindle on at 2000 rpm clockwise

COOLNT/ ON

FROM/ SETPT                 $$ Start at point 'SETPT', which is 0,0,5

RAPID                               $$ Next move will be a rapid traverse

GOTO/ -1.5, 1.25, 5          $$ Move tool to X = -1.5, Y = 1.25, Z = 5.0 at rapid

FEDRAT/ 15.0                  $$ Set feed rate at 15

GOTO/ P1                         $$ Go to point 'P1' at feed rate

AUTOPS                            $$ Make Z stay at 'P1' depth

GO/ TO, C1                       $$ Move tool to circle 'C1'

GOLFT/ C1, TO, L1           $$ Move around circle 'C1' until line 'L1' is hit, moving to the left from tool perspective

GOFWD/ L1, TO, C2         $$ Move forward along line 'L1' until circle 'C2' is hit

GOFWD/ C2, TO, L2         $$ .... more of the same

GOFWD/ L2, TO, C3

GOFWD/ C3, TO, L3

GOFWD/ L3, TO, C4

GOFWD/ C4, TO, L4

GOFWD/ L4, TO, C1

GOTO/ P1                        $$ Move to point 'P1' again

COOLNT/ OFF

RAPID

GODLTA/0.5                    $$ Move up 0.5 along Z axis at rapid

SPINDL/ OFF

RAPID

GOTO/ SETPT                 $$ Return to point 'SETPT'

END                                  $$ End of this program

FINI                                   $$ End of APT processing

 



APT Birds (Basic circle tests)Changing a few values in the geometry definitions results in a significantly different tool path, shown here. The only changes were to the CIRCLE/ statements. This tool path associativity has been a characteristic of APT since its inception and allows very simple but powerful macros to be written. These are especially useful for repetitive turning, drilling, and point to point operations.

 

 

 

 

 


Copyright © 2009 NFR Partners Inc.  Last change 27 January 2010.