Probe result to offset write

Turn a measured value and nominal into the offset write line: #5221-style variable assignment or G10 L2, L20, L10 to L13 block for work offsets, G54.1 P offsets and tool length or radius wear on Fanuc, Haas and Mazak.

Probe result to offset write

You have a measured value and a nominal. This gives you the exact line to write the correction into a work offset or a tool offset, as a #variable assignment and as a G10 block.

Deviation0.0032
Applied correction0.0032
Variable#5221
New offset value-12.4968
#variable write#5221 = #5221 + 0.0032
G10 lineG10 G91 L2 P1 X0.0032

Fanuc: tool offset addresses depend on offset memory type and count. Pick the memory layout that matches your control.

Write offsets from a program only inside a macro you have single-blocked once. A wrong sign on a work offset write is a crash on the next rapid. Set the decimal places to match the control's input units.