← All guides
CNC probing and tool setting guide - CNC touch probe measuring workpiece on machine table - CNC Dance guide

CNC Probing and Tool Setting Guide: Touch Probe Workflow Setup

Guides

Probing is one of the most useful upgrades you can make to your CNC machine as covered in our CNC Shop Starter Kit guide. A touch probe automates finding part zero, measuring tool lengths, and inspecting features. Instead of jogging the machine manually with an edge finder and paper you press a button and the machine does the work. Probing reduces setup time, improves accuracy, and eliminates the human error from manual measurement.

This guide covers probe types, how they work, how to set them up, and how to use them in your workflow. Whether you have a hobby machine with GRBL or a production VMC with a spindle probe the principles are the same.

How Touch Probes Work

Probe Signal and Accuracy

A touch probe is an electrical switch that detects contact between the probe and a conductive surface. When the probe touches the workpiece it completes an electrical circuit and sends a signal to the controller. The controller records the position at the moment of contact.

The probe signal is processed by the controller in one of two ways. On hobby controllers like GRBL the probe input is connected to a dedicated pin on the control board. When the pin detects a voltage change the controller latches the current axis position and stops motion. On industrial controls the probe signal is processed through the probe interface which filters noise and sends a clean signal to the control.

Signal Processing

The probe signal is processed by the controller in one of two ways. On hobby controllers like GRBL, the probe input is connected to a dedicated pin. When the pin detects a voltage change, the controller latches the position and stops motion. On industrial controls, the probe signal is processed through a probe interface which filters noise and sends a clean signal.

Accuracy depends on probe repeatability and machine resolution. A typical hobby probe has repeatability of 0.001 to 0.002 inches. An industrial probe has repeatability of 0.0001 to 0.0005 inches. An industrial spindle probe has a repeatability of 0.0001 to 0.0005 inches. The machine positioning accuracy must be better than the probe repeatability for the probing to be effective.

Probe Types

Hobby Probes

Simple block probes are the most affordable option for hobby machines. A block probe is a rectangular piece of conductive material with a wire connected to it. Cost: $10 to $20. The block is placed on the workpiece surface and the tool or a separate probe is used to touch it. Block probes cost $10 to $20 and can be made from scrap material in minutes.

Corner and Combination Probes

Three-axis corner probes combine X, Y, and Z probing in one device. Cost: $40 to $80. Accurate enough for most hobby work. The probe has three conductive faces that detect contact in each axis. Corner probes cost $40 to $80 and are more convenient than using separate blocks for each axis. They are accurate enough for most hobby work and eliminate the need for multiple probing tools.

Industrial Probes

Industrial spindle probes mount in the spindle like a tool holder. They have a spring-loaded stylus that triggers when contacting the workpiece. Cost: $1,000 to $5,000. Standard equipment on production VMCs. Fixed tool length setters mount on the table with a plunger that triggers on tool contact. Cost: $60 to $150. They have a plunger that moves when the tool touches it. The plunger movement triggers a switch that signals contact. Tool length setters cost $60 to $150 and provide consistent Z reference for every tool. They are essential for machines with automatic tool changers.

Industrial spindle probes are precision devices that mount in the spindle like a tool holder. They have a spring-loaded stylus that deflects when it contacts the workpiece. The deflection triggers a sensor that sends a signal to the control. Spindle probes cost $1,000 to $5,000 and provide the highest accuracy and repeatability. They are standard equipment on production VMCs and HMCs.

G-Code Probing Commands

G31 and G38.2

The G-code command for probing is G31. G31 moves the probe in a straight line at a specified feed rate until the probe touches a surface. G38.2 is similar but generates an alarm if the probe does not make contact within the specified distance.

Probing Format and Variables

The basic probing format is G31 X Y Z F where X Y Z is the target position and F is the feed rate. After a successful probe move, the contact position is stored in system variables that the program uses to calculate work offsets and tool lengths. The probe moves toward the target at the specified feed rate. If the probe touches a surface before reaching the target the motion stops and the position is recorded. If the probe reaches the target without touching a surface the motion stops at the target without recording a contact.

After a successful probe move the contact position is stored in system variables. On GRBL the probe position is reported in the probe status message. On industrial controls the position is stored in macro variables that can be accessed by the program. The program uses these variables to calculate work offsets and tool lengths.

Z Probing Workflow

Finding Z Zero

Z probing is the most common probing operation. It finds the top surface of the workpiece and sets Z zero. The workflow is the same regardless of the probe type.

First mount the probe in the spindle or attach it to the collet nut. Jog the probe to a position above the workpiece surface over a safe area where it will contact solid material.

Run the probing command G31 Z target F feed rate. The probe moves down until it touches the surface. The control records the Z position at contact. The difference between the contact position and the target surface position is calculated.

Calculating True Surface Position

For a block probe, subtract the probe thickness from the contact position. If the block is 0.5 inches thick and the probe contacts at Z-0.5, the surface is at Z zero. Use G92 Z0 to set current position as Z zero or G10 L2 P1 Z to set the work offset.

Tool Length Probing

Automated Tool Measurement

Tool length probing automates measuring each tool and storing it in the tool offset table. This is essential for machines with automatic tool changers where multiple tools are used in the same program.

The tool length probe is typically a fixed device mounted on the machine table at a known height. The tool moves to a position above the probe and feeds down until it touches the probe surface. The control records the Z position and calculates the tool length offset based on the probe height.

G-Code for Tool Probing

The G-code for tool length probing: the tool moves to the probe position and runs G31 Z target F feed. The contact position minus the probe height equals the tool length. Store using G10 L1 P tool number R tool length. Perform for every tool before starting a program. Some controls support automatic tool length probing that measures each tool as it is loaded into the spindle. This eliminates the need for a separate probing cycle at the start of the program.

X and Y Probing

Edge Finding with Probe

X and Y probing finds the edges of the workpiece and sets X and Y work offsets. This replaces the manual edge finder process with an automated cycle.

For X probing the probe approaches the workpiece from the left side. The probe moves in the negative X direction at a slow feed rate until it contacts the edge. The control records the X position at contact. The probe then retracts and approaches from the right side to find the opposite edge. The center between the two edges is calculated.

For single-edge probing the probe approaches from one side only and the edge position is calculated from the contact position and the probe diameter or stylus offset. Single-edge probing is faster but less accurate than double-edge probing.

Single vs Double Edge Probing

Double-edge probing approaches from both sides and calculates the center. Single-edge probing approaches from one side — faster but less accurate. Y probing works the same way as X.

Calibration

Z and XY Calibration

Probe calibration is essential for accurate results. The probe must be calibrated against a known reference to correct for probe tip diameter, stylus length, and electrical contact offset.

To calibrate a Z probe measure a known thickness with the probe and compare the reading to the actual thickness. If the probe reads 0.498 inches on a 0.500 inch gage block the calibration offset is 0.002 inches. Apply this offset in the probing macro or controller settings.

To calibrate an X Y probe measure a known length in each axis. For example probe both sides of a 2.000 inch gage block. If the measured length is 2.002 inches the calibration offset is minus 0.001 inches per side.

Calibration Frequency

Calibrate the probe at least monthly and after any mechanical change to the probe or spindle. Temperature changes affect probe accuracy — allow the machine and probe to reach thermal equilibrium before calibrating. Temperature changes affect probe accuracy. Allow the machine and probe to reach thermal equilibrium before calibration.

Common Probing Mistakes

Feed Rate and Position

Using the wrong feed rate is the most common mistake. Too high causes overshoot and inaccurate readings. Too low wastes time. Recommended: 5 to 20 IPM depending on probe type.

Probing into a pocket or hole gives a false reading. Always probe over solid material where the probe will contact a known surface. Verify the probe position before starting the probing cycle.

Forgetting to compensate for probe thickness or diameter is a common error. The probe measurement includes the probe geometry. Subtract the probe thickness from Z measurements and half the probe diameter from X and Y measurements.

Geometry Compensation and Testing

Forgetting probe compensation is a common error — subtract probe thickness from Z measurements and half the probe diameter from X/Y. Always test the probe before running automated cycles — manually trigger it and verify the control detects the signal.

Probe Wiring and Configuration

Electrical Interface

Connecting a touch probe to your CNC controller requires understanding the electrical interface. Most probes are normally open or normally closed switches. GRBL controllers typically need a normally open probe connected between the probe pin and ground. Most probes are normally open or normally closed switches. A normally open probe circuit is open when the probe is not touching anything and closed when contact is made. A normally closed probe circuit is the opposite. GRBL controllers typically require a normally open probe connected between the probe pin and ground.

The probe input on most hobby controllers is pulled high to 5 volts through a resistor. When the probe touches a conductive surface connected to ground the input voltage drops to zero and the controller detects the contact. The probe wire connects to the probe pin on the controller. The workpiece or machine frame connects to ground. When the probe touches the workpiece the circuit is completed.

Wiring Best Practices

Use shielded cable to prevent electrical interference. Connect shield to ground at one end only to prevent ground loops. Keep probe wires separate from power and motor cables. On industrial machines, the probe interface filters noise and may provide power through the same cable. The filtered signal is sent to the PLC or CNC control which processes it and stops axis motion. Industrial probe interfaces also provide power to the probe through the same cable that carries the signal.

Probe wiring should use shielded cable to prevent electrical interference from the spindle motor and drives. The shield should be connected to ground at one end only to prevent ground loops. Keep probe wires separate from power cables and motor cables to minimize noise pickup.

Automated Probing Cycles

Single Program Automation

Automated probing cycles combine multiple probe moves into a single program that runs without operator intervention. A typical cycle might probe the Z surface for tool length, probe X and Y edges for work offset, and probe a known feature to verify correct loading.

The automated probing program uses the G31 command to make each probe move. After each move the program reads the contact position from the system variables and calculates the offset. The offset is written to the work offset register using G10 L2 P1 X contact position. This process is repeated for each axis.

Calibration Automation

For probe calibration, the automated cycle uses known reference surfaces. The probe touches a reference surface multiple times and the program calculates the average contact position to determine calibration offset. The difference between the average and the known reference position is the calibration offset. This offset is stored and applied to all subsequent probe measurements.

Probing for Inspection

In-Process and Post-Process

In addition to setup, probing can be used for in-process inspection. After machining a feature, the probe measures it and compares to the programmed dimension. The control can adjust the tool offset for the next part to compensate for tool wear or thermal expansion.

In-process probing reduces scrap by catching out-of-tolerance conditions early. If a feature measures outside the tolerance band the control can halt production and alert the operator. This prevents a batch of bad parts from being produced.

Reducing Scrap

In-process probing reduces scrap by catching out-of-tolerance conditions early. If a feature measures outside the tolerance band, the control can halt production and alert the operator. Post-process probing measures the finished part while still in the vise — if within tolerance, it continues; if not, the operator adjusts before the next part.

Probing on Different Controllers

GRBL, Mach4, and Industrial

The probing implementation varies. GRBL supports G31 with a probe input pin but no built-in probing cycles. Mach4 and UCCNC have built-in probing wizards that automate common tasks. Industrial controls (Haas, Fanuc, Siemens) have comprehensive probing cycles built into the control software. The probe position is reported in the probe status message after each probe move. GRBL does not have built-in probing cycles but the G-code program can implement custom probing logic using G31 and system variables.

Mach4 and UCCNC controllers have built-in probing wizards that automate common probing tasks. These wizards guide the operator through the probing process and automatically set work offsets and tool lengths. The wizards reduce programming time and ensure consistent probing results.

Cycle Types

Industrial cycles include single-edge probing, double-edge probing, bore probing, boss probing, and web probing. The operator selects the cycle type and enters parameters through the control interface.

DIY Probe Construction

Block Probe and Tool Setter

Building your own touch probe is straightforward for a hobby machinist. A simple block probe is a piece of aluminum or brass (1“ square, 0.5“ thick) with a wire connected to the probe input. The block must be conductive and electrically isolated from the machine frame.

Accuracy Expectations

For a tool length setter, use a metal plate mounted on an insulating base connected to the probe input. DIY probes are not as accurate as commercial ones but sufficient for most hobby work — expect 0.001 to 0.003 inch repeatability from a well-constructed DIY probe. The plate must be flat and mounted at a known height. Use a surface gauge to measure the plate height accurately.

DIY probes are not as accurate as commercial probes but they are sufficient for most hobby work. The repeatability of a DIY probe depends on the construction quality and the cleanliness of the contact surfaces. Expect 0.001 to 0.003 inch repeatability from a well-constructed DIY probe.

Safety Considerations

Crash Prevention

Probing moves the tool toward the workpiece until contact. If the probe signal fails, the machine continues until the target — crashing the probe. Always test the probe signal before running automated cycles.

Safe Feed Rates

Set the probing feed rate low enough that a crash will not damage the probe. 5 to 10 IPM is safe for most hobby probes. Industrial probes can run faster. Ensure the workpiece is clean and dry before probing — chips, coolant, and debris cause false readings.

Ensure the workpiece is clean and dry before probing. Chips, coolant, and debris on the surface cause false readings. Clean the probe contact surface with a clean cloth before each use. For accurate probing the probe and workpiece must be at the same temperature.

Probe Comparison Table

Probe Type Cost Repeatability Best For
Block probe $10-20 0.002“ Simple Z probing
Corner probe $40-80 0.001“ XYZ probing, hobby
Tool setter $60-150 0.0005“ Tool length, ATC
Spindle probe $1,000-5,000 0.0002“ Production work

Here is a sample probing cycle:

; Z probe cycle — find top of workpiece
G90 G94 G17 G54
G21
G31 Z-1 F10       ; Probe down at 10 IPM
; Probe contact at Z = measured value
G92 Z0            ; Set current Z as zero
G00 Z5            ; Retract
M30

For more setup guides see our CNC Workholding 101 guide and our CNC Machine Setup guide.

Tags:#setup#programming#beginner#mill#reference