Home › G-codes › Mach3 Mach4 › G0
G0 Rapid move
Mach3 Mach4 G-code · Mill
Moves the named axes at rapid rate to the end point in a coordinated straight line. Use it only for moves in air.
Format
G0 [X] [Y] [Z] [A] [B] [C]
Addresses
| Address | What it does |
|---|---|
X Y Z | End point of the move |
A B C | Optional rotary axes |
How it works
Modal, motion group. Stays on until G1, G2, G3 or a canned cycle.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
G43 H1 Z1.0 (LENGTH OFFSET, Z TO CLEARANCE)
S12000 M3 (SPINDLE ON)
…
T1 M6 (TOOL CHANGE)
G43 H1 Z1.0 (LENGTH OFFSET, Z TO CLEARANCE)
S12000 M3 (SPINDLE ON)
…
The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Rapid speed comes from the velocity in Motor Tuning. Set it too high on a stepper router and the motors lose steps without any alarm.
- G0 stays active. The next block with only axis words is also a rapid.
- Lift Z first. Mach does not check for clamps or the part.
Related codes
G0 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Rapid positioning |
| Haas NGC | Rapid motion positioning |
| Mazak (EIA) | Rapid positioning |
| Okuma OSP | Rapid positioning |
| Mitsubishi M70 M80 | Rapid positioning |
| Brother Speedio | Rapid positioning |
| Siemens 840D 828D | Rapid traverse positioning |
| Heidenhain TNC (ISO) | Rapid straight line, Cartesian |
| Fagor 8055 8065 | Rapid traverse |
| LinuxCNC Tormach | Rapid move |
| Centroid CNC12 Acorn | Rapid positioning |
| Hurco WinMax (NC) | Rapid positioning |
| Fadal | Rapid travel |
| Swiss (Citizen Star) | Rapid positioning |
Every G-code for Mach3 Mach4 in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G0 in the app All Mach3 Mach4 G-codes