Home › G-codes › Haas NGC › G31
G31 Skip function, probe move / Feed until skip
Haas NGC G-code · Mill, Lathe
On mills: Skip function, probe move
Feeds toward a point until the skip signal from a probe trips, then stops. The trip position is stored in macro variables. Used for custom probing.
Format
Addresses
| Address | What it does |
|---|---|
X Y Z A B | Target end point if the probe does not trip |
F | Feed rate |
How it works
Non-modal, group 00.
Example program
G01 Z-.25 F30. (DOWN BESIDE THE PART)
G31 X0. F10. (FEED TOWARD THE PART UNTIL THE PROBE TRIPS)
M79 (ALARM IF THE PROBE DID NOT TRIP)
…
The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Use M78 or M79 after G31 to alarm when the probe did or did not trip as expected.
- Do not use cutter comp during G31.
- Feed slowly so the probe stylus is not damaged.
On lathes: Feed until skip
Feeds the axes toward a target while watching for a probe signal. When the probe trips, the position is saved to macro variables 5061 to 5066 and the program goes on.
Format
Addresses
| Address | What it does |
|---|---|
X Z Y C | Absolute target of the probing move |
U W V | Incremental target of the probing move |
F | Feed rate per minute |
How it works
Non-modal, group 00.
Example program
G98 (FEED PER MINUTE)
G31 Z-1. F10. (FEED UNTIL PROBE TRIPS)
M79 (ALARM IF NO SIGNAL)
…
The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Turn the probe on before G31.
- Do not use G41 or G42 with G31.
- Use M78 or M79 after G31 to alarm on an unexpected or missing signal.
Related codes
G31 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Skip function |
| Okuma OSP | Skip function |
| Mitsubishi M70 M80 | Skip function |
| Brother Speedio | Skip function |
| Heidenhain TNC (ISO) | Blank form max point |
| Mach3 Mach4 | Probe move |
| Hurco WinMax (NC) | Skip, probing move |
| Fadal | Probe touch function |
Every G-code for Haas NGC 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 G31 in the app All Haas NGC G-codes