0
0
CNC Programmingscripting~5 mins

In-process measurement in CNC Programming

Choose your learning style9 modes available
Introduction

In-process measurement helps check parts while they are being made. It stops mistakes early and saves time.

When you want to check the size of a part during machining to avoid errors.
When you need to adjust the tool automatically based on measurements.
When making many parts and want to keep them all accurate.
When the part shape is complex and needs frequent checking.
When you want to reduce waste by catching problems early.
Syntax
CNC Programming
G65 P9810 Q1 R0.5 ; Call probe macro to measure diameter
G65 P9810 Q2 R0.1 ; Call probe macro to measure length

G65 calls a macro program for measurement.

P is the macro program number, Q selects the measurement type, and R sets the probe offset.

Examples
This measures the diameter of a hole using the probe with 0.5 mm offset.
CNC Programming
G65 P9810 Q1 R0.5
This measures the length of a part with a 0.1 mm probe offset.
CNC Programming
G65 P9810 Q2 R0.1
This measures the depth of a pocket using the probe offset by 0.2 mm.
CNC Programming
G65 P9810 Q3 R0.2
Sample Program

This program moves the tool, measures a hole diameter, then adjusts the tool offset to correct size.

CNC Programming
O1000 (In-process measurement example)
G21 (Set units to mm)
G90 (Absolute positioning)
G54 (Work coordinate system)

; Move to start position
G0 X50 Y50 Z10

; Measure diameter
G65 P9810 Q1 R0.5

; Use measurement result to adjust tool offset
#100 = #5060 (Measured diameter)
#101 = 10.0 (Target diameter)
#102 = #101 - #100
G10 L10 P1 R[#102] (Adjust tool offset)

M30 (End program)
OutputSuccess
Important Notes

Probe macros vary by machine; check your CNC manual for exact codes.

Always set correct probe offsets to avoid crashes.

Use measurement results to automate corrections and improve quality.

Summary

In-process measurement checks parts during machining.

It uses probe macros like G65 with parameters to measure size.

Results help adjust tools and keep parts accurate.