M400 ; make sure everything has stopped before we make changes M913 X40 Y40 ; XY motors to 65% current M915 H400 X Y S2 R0 F0 ; set X and Y to sensitivity 3, do nothing when stall, unfiltered M574 X1 Y1 S3 ; set endstops to use motor stall G91 ; use relative positioning G1 S2 Z10 F1200 ; lift Z G1 S1 X-300 F3000 ; move right/back 325mm, stopping at the endstop G4 P500 ; wait 500msec G1 X5 ; move away from home G4 P500 ; wait 500msec ;koniec X M913 X40 Y40 ; XY motors to 65% current M915 H400 X Y S2 R0 F0 ; set X and Y to sensitivity 3, do nothing when stall, unfiltered M574 X1 Y1 S3 ; set endstops to use motor stall G91 ; use relative positioning ;G1 S2 Z10 F1200 ; lift Z ; make sure everything has stopped before we make changes ; X is homed at this point, now home the other axis G1 S1 Y-300 F3000 ; move beyond axis minimum G4 P500 ; wait 500msec G1 Y5 ; move away from home ;koniec Y ;G1 Z5 F6000 S2 ; lift Z relative to current position G1 S1 Z-255 F1800 ; move Z down until the endstop is triggered G92 Z0 ; set Z position to axis minimum (you may want to adjust this) G1 Z-10 F1200 ; lower Z M400 ; make sure everything has stopped M913 X100 Y100 ; XY motors to 100% current G90 ; back to absolute positioning M574 X1 Y1 S1 ; define active low microswitches