Hidden CNC Probe & Measurement Codes: Real G/M Functions for Automated Setup & In-Process Inspection
CNC probing is one of the biggest time-savers in modern machining. Instead of manually setting work offsets or checking dimensions, probing cycles can automatically measure, adjust, and even stop production if a part is out of tolerance.
Many of these probing functions use hidden G/M codes or special macro calls that most shops never use to their full potential.
This guide reveals real probing codes for Fanuc, Haas, Siemens, Heidenhain, and Mazak with working examples.
📌 1. Why Probing Codes Matter
- Automate work offset setup (no edge finder required).
- Measure tool length and diameter automatically.
- Perform in-process inspection to catch scrap early.
- Enable closed-loop machining — CNC adjusts offsets based on measurement.
📌 2. Fanuc Probe & Measurement Codes (Renishaw Macros)
Fanuc machines use macro calls for probing, typically via G65 calls.
| Code | Function | Notes |
|---|---|---|
| G65 P9810 | Single surface probe | Sets Z offset |
| G65 P9811 | Bore / boss probing | Finds center of hole |
| G65 P9812 | Web probing | Finds center between two surfaces |
| G65 P9814 | Internal corner probing | X/Y corner detection |
| G65 P9818 | Tool breakage detection | Stops if tool broken |
Example – Fanuc Z Surface Probe
G65 P9810 Z-20. F100. (Probe down to find workpiece top)
Example – Fanuc Bore Probe
G65 P9811 X50. Y50. Q25. (Probe bore at 50,50 with diameter 25)
📌 3. Haas VPS Probing (NGC)
Haas machines have VPS (Visual Programming System) for probing, but under the hood it uses macro calls.
| Code | Function | Notes |
|---|---|---|
| G65 P9832 | Bore probing macro | Finds bore center |
| G65 P9833 | Boss probing macro | Finds boss center |
| G65 P9810 | Surface probe | Sets work offset |
| M59/M69 | Trigger macros through I/O | For custom automation |
Example – Haas Automatic Z Offset
G65 P9810 Z-20. F100. (Touch off workpiece)
G54 (Offset is now automatically set)
📌 4. Siemens SINUMERIK Probe Cycles
| Cycle | Function | Notes |
|---|---|---|
| CYCLE977 | Measure workpiece | Auto update work offset |
| CYCLE978 | Automatic work offset setup | Multi-axis capable |
| CYCLE979 | Tool measurement | Tool length and radius |
Example – Siemens Workpiece Probing
CYCLE977("MEASUREMENT", 1, 50.0)
📌 5. Heidenhain Probe Cycles
Heidenhain integrates probing via cycle definitions.
| Cycle | Function |
|---|---|
| CYCL DEF 400 | Workpiece datum probing |
| CYCL DEF 401 | Bore/boss probing |
| CYCL DEF 402 | Slot probing |
| CYCL DEF 403 | Internal corner probing |
Example – Heidenhain Datum Probing
CYCL DEF 400 DATUM
Q200=+2 (Safe height)
Q201=+20 (Measuring depth)
Q206=+100 (Feedrate)
📌 6. Mazak Smooth Control Probing
Mazak SmoothX/SmoothAi include integrated Renishaw probing cycles.
- G65 P98xx macros (in EIA mode)
- Mazatrol Probing – conversational cycles for setup and inspection
- Custom M-codes to call probe routines automatically after pallet change
Example – Mazak Automatic Probing
G65 P9814 X0 Y0 (Corner find macro)
📌 7. Real-World Applications
- Fanuc G65 P9811 – Bore centering on aerospace parts for precision dowel holes.
- Haas VPS – Automatic offset setup before every cycle to compensate thermal drift.
- Siemens CYCLE979 – Tool measurement after roughing to detect breakage.
- Heidenhain CYCL DEF 400 – Datum probing on every pallet to guarantee repeatability.
- Mazak Auto Probe – Integrated with robot to run 24/7 without operator.
📌 8. Future of CNC Probing
- AI-driven measurement analysis – CNC auto-compensates for tool wear and thermal expansion.
- Inline SPC (Statistical Process Control) – real-time quality control data sent to MES/ERP.
- Automatic re-machining – part re-cut triggered when out-of-tolerance detected.
- Universal probing macros – one syntax across all brands.
✅ Conclusion
Hidden probing codes like Fanuc G65 P981x macros, Haas VPS cycles, Siemens CYCLE977, Heidenhain CYCL DEF 400, and Mazak Smooth probing cycles unlock fully automated setup and in-process inspection.
By 2030, CNC probing will evolve into self-correcting machining systems — measuring, compensating, and re-cutting automatically to guarantee zero-defect manufacturing.
Leave a comment