Writing Back: Touch Off

Write a work offset from a probe result — the pattern behind every probing routine.

Reading machine state is half the job. Some system variables are writable, and that's where macros earn their keep: G31 feeds until the probe trips, latches where it touched into #5063, and your macro shifts the G54 Z origin so the touched face becomes Z0.

Read firstReading & Writing System Variables (Every Control)The cross-control concept: how a part program reads and writes the control's internal data — positions, offsets, tool data, probe results, modal state — in Fanuc, Haas, Mitsubishi, Mazak, Siemens, Heidenhain, and Okuma dialects, with a Rosetta-stone syntax table.

Your turn

The G31 probe move has already run and its trip position is waiting in #5063. Shift the G54 Z origin (#5223) so that the touched face becomes Z0.

The machine gives you

probe trips 2.5 mm below zero:#5223 = -310#5063 = -2.5
probe trips 1 mm high:#5223 = -100#5063 = 1

Your program is run once for each set of conditions. It has to work for all of them.

Loading...

This is a learning simulation — always prove out a program on the actual control before you cut metal.