(Procedure for Finding zero )
( Y-axis )

G10 L80 P5521 Q1
G10 L80 P5525 Q1

(watching for given sensor (P12 - #8) pressed(L1), skip motion when event happens)
M89 L1 P12

(move Y-, stop when the sensor is pressed)
G91 G0 Y -500 F100.
(short pause, program pointer jump here when the sensor is activated)
G04 P0.5 ( pause to apply new settings )

(move out from the sensors)
(N50 G91 G0 Y 10 F100.)

(turn ON back watching for limit sensors)
G10 L80 P5521 Q0
G10 L80 P5525 Q0

(reset Y axis .... and unused ABC axes)
G90 G10 L70 P0 Y0 A0B0C0

M02


