G32 not working as expected
-
Working on commissioning a Voron Trident which I belt drove the bed instead of leadscrews, but when trying to run a G32 to level the bed things go bad in a hurry. If I use the bed.g that was created with the configurator it attempts to level but errors out. "error: max attempts failed. max deviation 1.184" and stops then moves to the center of the bed and waits. So I took the bed.g from my Voron V2.4 changed it for 3 points and tried it. It makes adjustments but in the wrong directions, high side goes higher and the low sides go lower and it will continue trying to adjust it that way just making it worse. Everything homes as expected. I posted this on the Voron discord got a few ideas, which none work. Here is my config and bed.g main board has firmware 3.4.5 and the 1lc has 3.4.4
; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.16 on Wed May 17 2023 18:25:34 GMT-0400 (Eastern Daylight Time) ;================================== ; General preferences ;================================== M575 P1 S1 B57600 ; enable support for PanelDue G21 ; Work in millimeters G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Trident" ; set printer name M669 K1 ; select CoreXY mode M564 S1 H1 ; Forbid axis movements when not homed G4 S5 ; wait 4s for expansion boards to start ;================================== ; Network ;================================== M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives ;================================== ; ; Drives ; ;================================== ; ; Z axis _____ ; ; |0.1| ; ; _____---_____ ; ; |0.0| |0.2| ; ; --- --- ; M569 P0.0 S1 D2 ; physical drive 0.0 goes forwards using default driver timings in Stealthchop |Z0 M569 P0.1 S0 D2 ; physical drive 0.1 goes forwards using default driver timings in Stealthchop |Z1 M569 P0.2 S0 D2 ; physical drive 0.2 goes forwards using default driver timings in Stealthchop |Z2 ; X/Y & E M569 P0.4 S1 D2 ; physical drive 0.3 goes forwards using default driver timings in Spreadcycle |B(x) M569 P0.3 S1 D2 ; physical drive 0.4 goes forwards using default driver timings in Spreadcycle |A(y) M569 P121.0 S0 ; physical drive 121.0 goes forwards using default driver timings in Spreadcycle on SB2040 tool-board M584 X0.4 Y0.3 Z0.0:0.1:0.2 E121.0 ; set drive mapping M671 X-50.0:150.0:350.0 Y20.0:340.0:20.0 ; Z pivot points are at (-50,20), (150,340) and (350,20) M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400 E420.00 ; set steps per mm ;M17 Z ;================================== ; Speeds ;================================== M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X8000.00 Y8000.00 Z350.00 E2000.00 ; set accelerations (mm/s^2) M906 X1200 Y1200 Z1200 E600 I50 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ;================================== ; Axis Limits ;================================== M208 X0 Y0 Z0 S1 ; set axis minima M208 X300 Y300 Z260 S0 ; set axis maxima ;================================== ; Endstops ;================================== M574 X2 S1 P"121.io2.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop M574 Y2 S1 P"0.io5.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ystop M574 Z0 P"nil" ; no Z endstop ;================================== ; Z-Probe (TAP) ;================================== M558 K0 P8 C"121.io0.in" H2 F300:180 T18000 A3 S0.05 ; Set Z probe type to switch and the dive height + speeds G31 Z-0.7 ; Set Z probe trigger value, offset and trigger height ;================================== M671 X-50:175:350 Y0:382:0 S5 ; define positions of Z leadscrews or bed levelling screws -VORON Trident 300 bed. M557 X15:285 Y15:285 P10 ; define mesh grid ; Heaters ;================================== M308 S0 P"temp0" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin ADC_0 M950 H0 C"out0" T0 ; create bed heater output on bed and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"121.temp0" Y"thermistor" T100000 B4138 A"Hotend" ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"121.out0" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ;================================ ; MCU sensors ;================================ M308 S3 Y"mcu-temp" A"MCU" M308 S4 Y"drivers" A"Drivers" ;================================= ;Temperature sensors ;================================= M308 S5 P"121.TEMP1" Y"thermistor" T100000 B3950 A"Chamber Temp" M308 S6 P"TEMP1" Y"thermistor" T100000 B3950 A"Lower Elec Temp" ;================================== ; ; Fans ; ;================================== ; M950 F0 C"121.out1" Q100 ; create fan 0 on pin 121.out1 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off PART COOLING TOOL 0 M950 F1 C"121.out2" Q100 ; create fan 1 on pin 121.out2 and set its frequency M106 P1 S1.0 H1 T45 ; set fan 1 value. Thermostatic control is turned to hotend 45+ HEATSINK M950 F2 C"out3" Q250 ; create fan 0 on pin out3 and set its frequency M106 P2 H3:4 L0.2 T25:30 C"MCU" ; set fan 0 value. Thermostatic control is turned on M950 F3 C"out4" Q250 ; create fan 1 on pin out4 and set its frequency M106 P3 H3:6 L0.2 T25:30 C"Lower Elec Temp" ; set fan 1 value. Thermostatic control is turned on B2 ;================================== ;Lights ;================================== ;M150 X1 Q3000000 ; set LED type to NeoPixel and set SPI frequency to 3MHz ;M150 R255 U255 B255 P255 ; set first 20 LEDs to red, half brightness, more commands for the strip follow M150 X1 Q3000000 ; set LED type to NeoPixel and set SPI frequency to 3MHz M150 R255 P128 S20 F1 ; set first 20 LEDs to red, half brightness, more commands for the strip follow M150 U255 B255 P255 S20 ; set next 20 LEDs to cyan, full brightness, finished programming strip ;================================== ; ; Tools ; ;================================== ; M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ;================================== ; ; Miscellaneous ; ;================================== M501 ; read config-override.g
The bed.g has 3 different attempts just commented out the ones not used
G1 X125 Y125 F6000 ; move to X/Y center ; --- leveling bed --- while true ; run leveling pass ; --- probe near lead screws - ; --- Z Drive map --- ; _______ ; | 1 | ; | ----- | ; | 0 | 2 | ; ------- ; front G30 P0 X15 Y15 Z-99999 ; probe near front left leadscrew and calibrate all motors G30 P1 X150Y285 Z-99999 ; probe near center rear leadscrew G30 P2 X285 Y15 Z-99999 S0 ; probe near front right leadscrew ; check results - exit loop if results are good if move.calibration.initial.deviation < 0.003 break ; check pass limit - abort if pass limit reached if iterations = 5 abort "Bed Leveling Aborted - Pass Limit Reached" ;M290 R0 S0 ; clear baby stepping ;M561 ; clear any bed transform ;M400 ; flush move queue ;if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; echo "not all axes homed, homing axes first" ; G28 ;G30 P0 X15 Y15 Z-99999 ; probe near a leadscrew ;G30 P1 X150 Y285 Z-99999 ; probe near a leadscrew ;G30 P2 X285 Y15 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors ;echo "Current rough pass deviation: " ^ move.calibration.initial.deviation ;M558 H6 F120 ;while move.calibration.initial.deviation > 0.005 ; if iterations >= 5 ; echo "Error: Max attemps failed. Deviation: " ^ move.calibration.initial.deviation ; break ; echo "Deviation over threshold. Executing pass" , iterations+1, "deviation", move.calibration.initial.deviation ; G30 P0 X15 Y15 Z-99999 ; probe near a leadscrew ; G30 P1 X150 Y285 Z-99999 ; probe near a leadscrew ; G30 P2 X285 Y15 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors ; echo "Current deviation: " ^ move.calibration.initial.deviation ; continue ;echo "Final deviation: " ^ move.calibration.initial.deviation ;G1 X150 Y150 Z10 F18000 ;M558 H5 F600:120 ; Reset probe dive height and speed ;G28 Z ; rehome Z as the absolute height of the z plane may have shifted ; bed.g ; Called to align the gantry to the bed plane via G32 ; Clear any bed transform ;M561 ; Turn off noisy Extruder motor ;M84 E0 ;if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; echo "not all axes homed, homing axes first" ; G28 ; Probe the bed at 3 points, x3 for more precision ;M558 K0 H10 F400 ; increase the depth range, gets the gantry mostly level immediately ;M98 P"/sys/bed_probe_points.g" ;M558 K0 H4 F240 ; reduce depth range, probe slower for better repeatability ;M98 P"/sys/bed_probe_points.g" ; last attempt will be auto-repeated ;M558 K0 H1 F60 ; reduce depth range, probe slower for better repeatability ;while move.calibration.initial.deviation > 0.003 ; if iterations > 3 ; abort "Too many leveling attempts! Canceling print." ; M98 P"/sys/bed_probe_points.g" ; echo "Current deviation: " ^ move.calibration.initial.deviation ^ "mm" ;echo "Leveling complete" ;G1 X175 Y175 Z10 F18000 ;M558 H5 F600:120 ; Reset probe dive height and speed ;G28 Z ; rehome Z as the absolute height of the z plane may have shifted
-
In the config.g file you have two M671. I don't know if that could be a problem.
In the bed.g the indentation under the first while is wrong.
I assume you double checked that the position of the Z steppers matches the configuration?
Frederick
-
@motor5622 M671 has to be in the same order as the motors are mapped in M584