;Determine Correct Z Offset M568 P0 S240 ;set active temperatures for tool 240 M140 S60 ;set Bed to 60C M116 S5 ;wait until bed 0 and tool 0 are up to temperature if sensors.probes[0].value[0] == 0 ; if sensor is value other than 1000 do this, 0 = probe attached echo "Probe already attched" if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; Home, but only if homing is needed G28 G1 E-15 ;retract filament so nozzle does not ooze M98 P"bed.g" ;Run QGL G1 X175 Y175 Z100 ;Move to bed center M564 S0 ;allow Z axis to exceed preset limits G1 X175 Y10 Z100 ;move to clean nozzle M291 P"Clean Nozzle Press OK When Ready to Continue" S2 ;Continue when Nozzle is Clean if sensors.probes[0].value[0] == 0 ; if sensor is value other than 1000 do this, 0 = probe attached echo "Probe already attched G1 X175 Y175 Z10 ;move to bed center to continue M291 P"Use to pieces of paper and jog the nozzle down to the right tension on the bed" R"Press Ok when Done?" S3 X1, Y1, Z1 ;instruct user to manualy move nozzle to bed G92 Z0 ;Sets current location as Z0 Position G1 Z10 M98 P"Z Offset Calibration Finish.g" ;Call Macro to finish job