0
0
CNC Programmingscripting~10 mins

In-process measurement in CNC Programming - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - In-process measurement
Start CNC Program
Machine moves to measurement position
Activate probe sensor
Probe touches workpiece
Measure dimension
Store measurement data
Compare measurement to tolerance
Within
Tolerance
Continue machining
End or loop
The CNC program moves the probe to measure the workpiece during machining, stores the measurement, checks if it is within tolerance, and decides to continue or adjust.
Execution Sample
CNC Programming
G00 X50 Y50 Z10 ; Move to measurement point
M85 ; Activate probe
G38.2 Z-5 F100 ; Probe down to workpiece
G10 L2 P1 Z0 ; Set measured position
M86 ; Deactivate probe
; Compare measurement and continue
This CNC code moves the probe to a point, activates it, probes down to the workpiece, records the measurement, then deactivates the probe.
Execution Table
StepActionCommandMeasurement ValueTolerance CheckNext Action
1Move to measurement pointG00 X50 Y50 Z10N/AN/AProceed to probe activation
2Activate probeM85N/AN/AReady to probe
3Probe down to workpieceG38.2 Z-5 F100Z = -3.2 mmN/ARecord measurement
4Set measured positionG10 L2 P1 Z0Z = -3.2 mmN/ADeactivate probe
5Deactivate probeM86N/AN/ACompare measurement
6Compare measurementCustom logic-3.2 mmWithin ±0.05 mmContinue machining
7Continue machiningNext machining commandsN/AN/AEnd or loop
💡 Measurement within tolerance ±0.05 mm, machining continues
Variable Tracker
VariableStartAfter Step 3After Step 4After Step 6Final
Probe Position ZN/A-3.2 mm-3.2 mm-3.2 mm-3.2 mm
Measurement StoredNoNoYesYesYes
Tolerance CheckN/AN/AN/AWithin ±0.05 mmWithin ±0.05 mm
Machining StatusIdleProbingProbingCheckingContinue
Key Moments - 3 Insights
Why does the probe move down with G38.2 command instead of a normal move?
The G38.2 command is a probing move that stops automatically when the probe touches the workpiece, capturing the exact measurement (see execution_table step 3).
What happens if the measurement is out of tolerance?
If out of tolerance, the program would trigger an alarm or adjust machining parameters instead of continuing (not shown in this trace but implied after step 6).
Why do we store the measurement with G10 L2 P1 Z0?
This command sets the measured position as a reference offset for future machining, ensuring accuracy (execution_table step 4).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the probe position Z after step 3?
A-3.2 mm
B-5.0 mm
C0 mm
DNot measured yet
💡 Hint
Check the 'Measurement Value' column at step 3 in the execution_table.
At which step does the program store the measured position?
AStep 2
BStep 4
CStep 5
DStep 6
💡 Hint
Look for the command G10 L2 P1 Z0 in the execution_table.
If the measurement was out of tolerance, what would likely change in the execution table?
ANext Action would be 'Continue machining'
BMeasurement Value would be 'N/A'
CNext Action would be 'Adjust or alarm'
DProbe would deactivate earlier
💡 Hint
Refer to the 'Next Action' column in the last rows of the execution_table.
Concept Snapshot
In-process measurement in CNC:
- Move probe to position (G00)
- Activate probe (M85)
- Probe down to workpiece (G38.2)
- Store measurement (G10 L2 P1)
- Deactivate probe (M86)
- Compare measurement to tolerance
- Continue or adjust machining accordingly
Full Transcript
In-process measurement in CNC programming involves moving the probe to a specific point, activating it, probing down until it touches the workpiece, recording the measurement, and then checking if the measurement is within tolerance. The program uses commands like G00 to move, M85 to activate the probe, G38.2 to probe down, G10 L2 P1 to store the measurement, and M86 to deactivate the probe. After measuring, the program compares the value to the allowed tolerance and decides whether to continue machining or make adjustments. This process ensures precision during machining.