45. CNC PROGRAMMING
We need to be able to direct the position of the cutting tool. As the tool moves we will cut metal (or perform other processes).
Obviously if we plan to indicate positions we will need to coordinate systems.
The coordinates are almost exclusively cartesian and the origin is on the workpiece.
For a lathe, the infeed/radial axis is the x-axis, the carriage/length axis is the z-axis. There is no need for a y-axis because the tool moves in a plane through the rotational center of the work. Coordinates on the work piece shown below are relative to the work.
For a tool with a vertical spindle the x-axis is the cross feed, the y-axis is the in-feed, and the z-axis is parallel to the tool axis (perpendicular to the table). Coordinates on the work piece shown below relative to the work.
For a tool with a horizontal spindle the x-axis is across the table, the y-axis is down, and the z-axis is out. Coordinates on the work piece shown below relative to the work.
Some common programming languages include, (note: standards are indicated with an *)
*APT - (Automatically Programmed Tool) A geometry based language that is compiled into an executable program.
COMPACT/COMPACTII - A higher level language designed for geometrical definitions of parts, but it doesn't require compilation.
These languages have many similarities, but the syntax varies.