M144 (# Set watching for GANTRY Sensors) G91 G0 X-1000 F500 (# Move toward Gantry Sensors) ( It takes time for the PLC controller to register the information in the ) ( updated register #800,#801,#802 values to myCNC control software ) ( Add 0.5 seconds pause to get all the registers updated ) G4 P0.5 (# Pause) G10 L81 P809 Q800 (Get offset in pulses) G10 L193 P809 Q5531 (Calculate offset in units/mm) G10 L81 P810 Q809 (Copy Offset in units/mm to #810) G10 L190 P810 Q805 (Add tuning offset) M210 P0 (# OFF the second motor, the Only first motor is ON ) G10 L190 P810 Q5021 (# Add current machine position) G28.9 X810 (# Move 1 motor to adjust) M210 P1 (# ON the second motor, both motors are moved together)