A CNC Program is a series of G and M codes that tell the machine how to move the tool relative to the work piece.
a) Absolute (G90) vs. Incremental (G91) Modes
In absolute mode, (G90) all coordinates are referenced from the origin of the work coordinate system.
In incremental mode, (G91) all coordinates are referenced from the current tool position.
Absolute coordinates of point 1 are (20,10)
Absolute coordinates of point 2 are (10,20)
What are the coordinates of point 2 relative to point 1?
What are the coordinates of point 1 relative to point 2?
This code causes the tool to move to the given coordinates as fast as possible and in a straight line. This code is used to position the tool and not to cut material!!
From Figure 3 above, to move from point 1 to point 2:
(Absolute Coordinates) G00 X___ Y___ Z___
This code causes the tool to move to the given coordinates at the given feed rate. Feed rate is given in inches per minute. This command is used for cutting!!!!!
From our example, to move from point 1 to point 2:
(Absolute Coordinates) G01 X___ Y___ Z___ F___
(Incremental Coordinates) G01 X___ Y___ Z___ F___
X,Y are the coordinates of the end point of the arc. I and J are the incremental coordinate of the center of the arc relative to the starting point of the arc.
N10 G03 X0 Y1.0 I-1.0 J0.0 F250
How would you specify the arc shown below if you were working in incremental coordinates?, in absolute coordinates?
X, Y are the end points of the arc.
How would you specify the arc shown below if your were working in incremental coordinates?, in absolute coordinates?
e) General Preparatory Codes - Codes called to prepare the machine for operation.