What is G1?
G1 moves the machine in a straight line at the programmed feed rate F. It is the primary cutting command in CNC machining and the primary extrusion command in 3D printing. All axes move simultaneously at a synchronized rate.
Syntax
G1 [X] [Y] [Z] [E] [F]
Parameters
| Parameter | Description |
|---|---|
| X | Target X-axis coordinate |
| Y | Target Y-axis coordinate |
| Z | Target Z-axis coordinate |
| E | Extruder position โ used in 3D printing to control filament extrusion |
| F | Feed rate in mm/min (or in/min in G20 mode). Persists until changed. |
Examples
G1 X50 Y30 F1500โ Move to X=50, Y=30 at 1500 mm/min (no Z change)
G1 Z-3 F200โ Plunge Z to -3mm at slow feed rate of 200 mm/min
G1 X100 Y50 Z-5 F800โ 3-axis simultaneous cut โ all axes arrive together
G1 X70 E5.23 F2000โ 3D printer: move to X=70 while extruding to E=5.23mm
Important Notes
- G1 is modal โ once set, all subsequent X/Y/Z coordinates use G1 until overridden.
- The F (feed rate) word is also modal โ the last F value stays active for subsequent moves.
- In 3D printing, E is the extruder position. It must match the calculated extrusion volume for the move length.
- For CNC, feed rate is typically 50โ3000 mm/min depending on material and tool. For 3D printing, 1000โ6000 mm/min.
- G1 guarantees a straight-line path โ all axes are interpolated to arrive simultaneously.
Common Mistakes
- โ Forgetting the F word on the first G1 โ causes 'feed rate not set' errors or dangerously slow moves.
- โ Using G1 for long travel moves (slow, wastes cycle time) โ use G0 instead for non-cutting travel.
- โ Wrong E values in 3D printing โ causes over or under extrusion, visible in walls and infill.
Frequently Asked Questions
Q: What does F mean in G1?
F is the feed rate โ the speed at which the machine moves during the G1 command, in mm/min (or in/min in G20 inch mode). For example, G1 X50 F1200 moves to X=50 at 1200 mm/min = 20 mm/sec. The F value is modal and persists until changed.
Q: What is E in G1 for 3D printing?
E is the extruder axis position in mm. As the printhead moves from current position to the target X/Y coordinate, E increases by the calculated amount of filament needed to fill that line at the target line width and layer height. Slicers calculate this automatically.
Q: Can G1 move multiple axes at once?
Yes โ G1 X50 Y30 Z-5 F800 moves all three axes simultaneously, with each axis velocity scaled so they all arrive at the target at the same time. This is called linear interpolation and produces a perfectly straight 3D line.
GCodex