code "g31z-1" While IsMoving() ' this makes it wait till all movement of the probing is done... wend if ( IsFirst() ) then adder = GetUserDRO(1000) ' adder will be the DRO reading only on the first m3 in the file... lossz = GetUserDRO(1002) ' lossz will be the DRO reading loss motion in the floating head... else adder = 0 lossz = 0 end if code "G92Z0" code "G1Z" & lossz + adder While IsMoving() ' this makes it wait for the above to complete... wend DoSpinCW() code "G4 P" & (getUserDRO (1001))