© 2018 NFR Partners Inc. Portland Maine USA
EditNC by NFR Partners Inc
APT Architecture
The designers of APT had several major problems to overcome, and their solutions have proven to be far sighted and, in some cases, brilliant.
Here, we will try to highlight some of the problems they faced and how they addressed them.
Note: APT is often called a compiler or an assembler. Technically, it doesn't fit either definition - it's really a very complex translator. The term
processor is often used to refer to the APT translator. APT program refers to a CNC program written in the APT language.
Problem: Slow computers with limited memory.
Solution: Break tasks into 4 sections.
Section 1 (Translation Section) reads the users APT program and builds tables containing the part geometry information. It verifies
syntax and lists the program and geometry information if requested. In some APT processors it stores this information on disk. The
part geometry is now in canonical form.
Section 2 (Calculation Section) takes the section 1 output and computes the tool path geometry. Tool offsets can be applied here. A
preliminary CL file is created here.
Section 3 (Edit Section) modifies and expands on section 2 data if necessary. The final CL file is created here. A CL listing is printed if
requested.
Section 4 (Postprocessor Section) controls postprocessing.
For complex programs, these sections took hours to process and could be run as separate steps. Some of the newer APT processors
pass data between sections directly rather than through temporary disk files but the section identities remain.
Problem: Countless machine tools as targets
Solution: Create a machine tool independent, generic NC program called a Cutter Location, or CL file. (Some older folks call it a Center Line file.) The CL
file is then read and processed by a postprocessor supplied by someone with a good knowledge of the specific machine tool and its requirements and
limitations - originally this was often the tool manufacturer.
Problem: Postprocessors need to understand different CL file formats
Solution: The basic APT processor is public domain code and the language rigidly defined by an ANSI standard. Most APT processors were written in
Fortran and were reasonably computer and operating system independent. The biggest issue, however, was postprocessors. The APT designers did not
want to have to support every machine tool available, yet they couldn't expect the tool companies and others to supply postprocessors that supported
every variety of APT CL file. Although the CL file format was similar from APT vendor to vendor, they were tailored to individual computer system
characteristics. Therefore, they created an API (they didn't call it that) that would insulate the postprocessor from the actual CL file format. (An API, or
Application Programming Interface, is basically a defined way for programs to interact). APT postprocessors traditionally do not read the CL file directly, but
use (APT) vendor supplied routines to access the CL data. This method lets a single postprocessor function with multiple APT systems, operating systems,
and computers and has allowed many postprocessors written for mainframes run on PC's with only minor changes.
Problem: Complex cutter shapes acting on complex geometry
Solution: APT allows use of up to 10 parameters to define a cutter. Positioning a complex cutter shape along surfaces, potentially very complex
themselves, requires some nearly impossible calculations if done using traditional methods. APT uses several methods, depending on the problem to be
solved. Simple analytical approaches are used for 2D problems with sophisticated iterative methods used for 3D calculations. For this reason, the user
specified required tolerances can have a big impact on the resulting program - APT is often asking itself "Am I close enough yet?". Use of iterative methods
is one reason why APT was not used directly in more modern CAD/CAM systems (where response time is a major concern) than it has been. Not everyone
agreed on how to perform many of these processes and some companies had special geometry requirements and several major Section 2 "engines" or
ARELEM's were developed. (ARELEM = Arithmetic Element).
Note: This material may be more interesting than you expect