; homeall.g ; called to home all axes via G28 M400 ; make sure everything has stopped before we make changes M913 X40 Y40 ; drop motor currents to 40% M915 Y X S3 R0 F0 ; set sensitivity to 3, do nothing when stall, unfiltered G91 ; use relative positioning G1 Z5 F500 S2 ; lower bed for clearance ; Y AXIS G1 S1 Y-345 F2600 ; move 345mm, stopping at the endstop G4 P125 ; wait 130msec G1 Y10 F1000 ; move away from home 10mm G4 P125 ; wait 130msec G1 S1 Y-345 F2600 ; move towards axis minimum again stopping at the endstop G4 P125 ; wait 130msec ; X AXIS G1 S1 X-690 F2600 ; move 690mm, stopping at the endstop G4 P125 ; wait 130msec G1 X10 F1000 ; move away from home 10mm G4 P125 ; wait 130msec G1 S1 X-690 F2600 ; move towards axis minimum again stopping at the endstop G4 P125 ; wait 130msec M400 ; make sure everything has stopped before we reset the motor currents M913 X100 Y100 ; motor currents back to 100% G90 ; back to absolute positioning ; Z AXIS M561 ; Cancel any bed-plane fitting as the result of probing (or anything else) and returns the ; machine to moving in the user's coordinate system. G1 X345 Y172.5 F5000 ; go to center of bed for measurement G30 ; Probe the bed at the current XY position. When the probe is triggered, set the Z ; coordinate to the probe trigger height ;G29 S1 ; load heightmap and activate mesh compenstaion