Search command (M59) when used with Robot Interrupt (M29) will detect part position shift and shift values are written to Register(R1). Original part X,Y,Z values are stored for Interrupt first time. Subsequent points are then shifted using Shift command (M52) as per values obtained from Register
10. MOVE (N)
11 SEA (1,0,R1) FN 59: Search Start
12 MOVE (N+1)
13 RINT (I5, 1, X,Y,Z) – [Values for original part position] FN 29: Robot Interrupt
14 MOVE (N+2)
15 SEA (0, 0, R1) FN 59: Search End
16 SHIFTR (1, 0, R1, 0) FN52: Shift Start
17 MOVE (N+3)
18 SHIFTR (0,0,R1,0) FN52: Shift End