hello again, i don't know, maybe you need G22 for both x&z because you use a master tool ?
so far i never used master tools, but only heared a bit about them ... so i am not sure if i can help you
however, let's begin with auto Z
try this code and see what happens
it should work if your controler suports G22 and those system variables
M19 and M18 are not really required, but i like to have the chuck locked while this "senseless gauging" technique occurs; keeping the chuck steady should minimize marks that remain from the contact
if all is ok, we move to X YZABCDJLJFDLGD / kindly
Code:G00 safe position T ( consider touching with a od tool shank, a rod, toolholder, etc ) M19 G00 X50 Z10 G29 PZ=25 G22 PZ=22 Z-10 F+100*5 G94 D+10*2 G28 G00 Z+2.5 M18 G91 G90 ( NOEX ) VSZOZ = VSZOZ + VSIOZ - 2.5 G00 safe position