G38.x: Probing

Last modified by writer on 2023/02/09 18:48

G38.x axes - probing

G38.2 – perform probing towards the workpiece, stop when touched, error message on failure.
G38.3 – perform probing towards the workpiece, stop when touched.
G38.4 – perform probing in the direction from the workpiece, stop when contact is lost, error message on failure.
G38.5 – perform probing in the direction from the workpiece, stop when contact is lost.

In order to use probing, you must configure the input for probing in the parameters of the input signals.

Issue the G38.x axes command to perform probing. The axis parameters are optional, but at least one of them must be specified. All of the indicated axes define a point towards which movement is made during probing. If probing did not work before reaching the endpoint, commands G38.2 and G38.4 signal an error.

The movement to the endpoint during probing is carried out with the current feed rate and stops (subject to acceleration restrictions) when the endpoint is reached or when the probing input signal is expected to change, whichever occurs earlier.

The probing command example:
G38.2 Z-100 F500
It is an error if:
  • the end point is the same as the current position;
  • no axis is specified;
  • feed rate is zero;
  • the probe signal is already in the expected state.

Extended G38.x command syntax to use multiple probing inputs

G38.x Pn axes

  • n - an integer denoting the set of Probing inputs to be used when executing this command.
Example:
G38.2 P6 X200

It means that when executing the probing command, the Probing2 and Probing3 inputs will be polled.

Correspondence between P parameter values ​​and probing inputs.

PProbing inputs
ProbingProbing2Probing3
1  
2  
3 
4  
5 
6 
7

If the P parameter is not specified, probing ends when any of the Probing, Probing2, Probing3 inputs fires.

Example of a probing macro for use with a sensor ZATS-01-NC. In this case, the sensor that works first (petals) is assigned to the Probing input, the second one (microswitch) is assigned to Probing2.

Download M115 macro