(This G-code is optional and requires a probe)
This G-code is used to record a probed location to a macro variable.
This G-code moves the programmed axes while looking for a signal from the probe (skip signal). The specified move is started and continues until the position is reached or the probe receives a skip signal. If the probe receives a skip signal during the G31 move, the control will beep and the skip signal position will be recorded to macro variables. The program will then execute the next line of code. If the probe does not receive a skip signal during the G31 move, the control will not beep and the skip signal position will be recorded at the end of the programmed move. The program will continue.
Macro variables #5061 through #5066 are designated to store skip signal positions for each axis. For more information about these skip signal variables see the macro section of this manual.
This code is non-modal and only applies to the block of code in which G31 is specified.
Do not use Cutter Compensation (G41, G42) with a G31.
The G31 line must have a Feed command. To avoid damaging the probe, use a feed rate below F100. (inch) or F2500. (metric).
Turn on the probe before using G31.
If your mill has the standard Renishaw probing system, use the following commands to turn on the probe.
Use the following code to turn on the spindle probe.
Use the following code to turn on the tool-setting probe.
Use the following code to turn off either probe.
Also see M75, M78 and M79 ;
This sample program measures the top surface of a part with the spindle probe traveling in the Z negative direction. To use this program, the G54 part location must be set at, or close to the surface to be measured.