Gantry leveling
-
I have 2 z motors and I'm strying to auto level my gantry but am having some issues. I have my bed.g as
while true G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis G30 P1 X180 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors if abs(move.calibration.initial.deviation) < 0.01 || iterations > 3 break
when I first tried this the other day it worked perfectly but now when I run G32 my machine crashes into the bed of my cnc without even moving to the x,y corrdinates.
I can't figure out why it woked Saturday but not today. There were not any other changes made to my config.g or anywhere else.
; General G90 ; absolute coordinates M83 ; relative extruder moves M550 P"Duet3CNC" ; set hostname M453 ; select CNC mode ; Accessories M575 P1 S0 B57600 ; configure PanelDue support ; Smart Drivers M569 P0.0 S1 D3 ; driver 0.0 goes backwards (X axis) M569 P0.1 S0 D3 ; driver 0.1 goes backwards (Y axis) M569 P0.2 S1 D3 ; driver 0.2 goes forwards (Z axis) M569 P0.3 S1 D3 ; driver 0.3 goes forwards (U or Y2 axis) M569 P0.4 S1 D3 ; driver 0.4 goes forwards (V or Z2 axis) ; Motor Idle Current Reduction M906 I30 ; set motor current idle factor M84 S1000 ; set motor current idle timeout ; Axis M669 K0 ; set Cartesian kinematics M584 X0.0 Y0.1:0.3 Z0.2:0.4 U0.3 V0.4 P5 ; U=Y2 V=Z2 set axis mapping ;M584 X0.0 Y0.1:0.3 Z0.2:0.4 P3 ; Leadscrew locations for automatic Z squaring M671 X58:1183 Y80:80 S5 ; leadscrew positions for Z0 (left), Z1 (right) M350 X16 Y16 Z16 U16 V16 I1 ; configure microstepping with interpolation M906 X1200 Y1100 Z1100 U1100 V1100 ; set axis driver currents M92 X100.067 Y100.067 Z400 U100.067 V100.067 ; configure steps per mm M566 X300 Y300 Z60 U300 V60 ; set maximum instantaneous speed changes (mm/min) M203 X12000 Y9000 Z3000 U9000 V3000 ; set maximum speeds (mm/min) M201 X300 Y300 Z60 U300 V60 ; set accelerations (mm/s^2) ; Axis Limits M208 X0 Y0 Z-150 U0 V-150 S1 ; Z min is -150 (full depth) M208 X1252 Y2467.8 Z150 U2467.8 V150 S0 ; set axis maximum ; Endstops M574 X1 S1 P"io1.in" ; configure active-high endstop for low end on X via pin io2.in M574 Y1 S1 P"io2.in+io3.in" ; Y endstops on io2.in (Y) and io3.in (U) M574 Z2 S1 P"io4.in+io5.in" ; Z homes to the **max** end (top) ; Z Probe Configuration M558 P5 C"!io6.in" H5 F120 T6000 ; Digital probe using io6.in, active-low G31 P850 X-10 Y-10 Z5.89 ; set Z probe trigger value, offset and trigger height
I am using a 3 way touchplate and the bit to probe. Everything works as expected when I run my probe z macro to find the surface of the work peice.
please let me know if you have any insights. -
@Alijambo73 said in Gantry leveling:
when I run G32 my machine crashes into the bed
Are you starting from a homed state?
-
@Phaedrux yes
-
@Alijambo73 it seems it had something to do with the z offset getting saved in config-override.g. this seems to be working well```
code_textG28 G1 X58 Y100 F3000 ; === Run Z probing macro === G91 ; relative M291 P"Connect probe and jog tip over Z touchplate. Press OK to continue." R"Z Probe" S3 G38.2 Z-100 F75 G1 Z2 F300 G38.2 Z-100 F45 G4 P0.1 G92 Z5.89 G1 Z5 F300 G90 ; absolute ; === Proceed with squaring === M558 P5 C"!io6.in" H5 F120 T6000 M584 Z0.2:0.4 P3 M671 X58:1183 Y100:100 S15 G10 L2 P1 Z0 var iterations = 0 while true G1 X58 Y100 F3000 G30 P0 Z-99999 G1 X1183 Y100 F3000 G30 P1 Z-99999 S2 set var.iterations = var.iterations + 1 if abs(move.calibration.initial.deviation) < 0.01 || var.iterations >= 2 break M584 X0.0 Y0.1:0.3 Z0.2:0.4 U0.3 V0.4 P3 M671 X58:1183 Y100:100 S5 M118 P0 S"Z gantry squaring complete."