
CNC Machining, G codes, G1, Linear Interpolation.
12/09/2009This code is used for linear interpolation. Linear moves can be made by one, or any combination of, all the active axes.
Linear Interpolation is used to generate motion along a line, at a specified feed rate. The linear mode is established by the G1 code.
Some controllers can move up to 5 axes simultaneously, completing the movement at a point determined by the X, Y, Z, A, and B words.
EXAMPLE:
N1 O1
N2 M6 T1
N3 G0 G90 S2000 M3 E1 X0 Y0 A0 B0
N4 H1 Z.1 M8
N5 G1 Z-.25 F5.
N6 G1 G91 X1. F10.
N7 X1. Y1.
N8 X1. Y1. Z1. A360. B90.
According to the sample program above:
Block N6 moves the X axis linearly (G1 mode) 1.0 inch at a feed rate of 10 IPM. Block N7 moves the X and Y axes together forming an angular cut. Block N8 moves all possible axes together.
The G1 code will use the last feed rate established in the program with the F# word. The F# word is modal and is only canceled by another F# word. The F# will remain in effect throughout the program until another F# word is used. The F# word can appear on any line with other codes as long as the other codes have no restrictions. G1 is modal and is only canceled by a G0 code.
The G1 must be used again after using a G0 code in the program. A G2/G3 code will not cancel a G1 code.
This means that if a G2 or G3 is used it is not necessary to re-state the G1 on the following line. Also, if the arc center is not described, then a straight line will be generated.