G32 causes printhead to go beyond limits
-
I am trying to get G32 working for my printer in order to compensate for what i suspect is a slightly twisted x axis (my bed meshes always come at an angle despite manual leveling). I followed the instructions from https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_auto_levelling . However, upon sending G32, the printhead probes at about 50mm near the first leadscrew, and then it crashes into the axis limit trying to reach the second leadscrew.
Here are the config and bed files:
; Configuration file for BTT SKR 3 EZ (firmware version 3) ; executed by the firmware on start-up ; General preferences G4 S2 ; wait 2 seconds M669 K1 ; select CoreXY mode G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"My Printer" ; set printer name ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP ;M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 D2 ; physical drive 0 goes forwards using default driver timings M569 P1 S1 D2 ; physical drive 1 goes forwards using default driver timings M569 P2 S0 D2 ; physical drive 2 goes forwards using default driver timings M569 P3 S0 D2 ; physical drive 3 goes forwards using default driver timings M569 P124.0 S1 ; physical drive 124.4 goes forwards using default driver timings M584 X0 Y1 Z2:3 E124.0 ; set drive mapping M350 E256 I0 ; configure microstepping with interpolation M350 X16 Y16 Z32 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z800.00 E6501 ; set steps per mm M566 X900.00 Y900.00 Z200.00 E1200.00 ; set maximum instantaneous speed changes (mm/min) M203 X30000.00 Y30000.00 Z1000.00 E3000.00 ; set maximum speeds (mm/min) M201 X15000.00 Y15000.00 Z500.00 E5000.00 ; set accelerations (mm/s^2) M906 X1000 Y1000 Z800 E800 I5 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ;M556 S1 X-0.0036843 ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X265 Y280 Z290 S0 ; set axis maxima ; Endstops M574 X2 S1 P"e0stop" ; configure switch-type (e.g. microswitch) endstop for high end on X via pin xstop M574 Y2 S1 P"e1stop" ; configure switch-type (e.g. microswitch) endstop for high end on Y via pin ystop M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"124.io0.out" ; create servo pin 0 for BLTouch M558 P9 H5 F250:60 T8000 C"124.io0.in" ; set Z probe type to bltouch and the dive height + speeds G31 P500 X-22.345 Y-6.941 Z0.689 ; set Z probe trigger value, offset and trigger height M557 X15:215 Y15:215 S50 ; define mesh grid M671 X-22:287 Y163:163 ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4092 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bed" 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 M307 H0 R0.320 K0.414:0.000 D1.01 E1.35 S1.00 B0 V24.6 ; set PID values for heated bed M143 H0 S130 ; set temperature limit for heater 0 to 120C M308 S1 P"124.temp0" Y"thermistor" T100000 B4092 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"124.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 S300 ; set temperature limit for heater 1 to 300C M307 H1 R3.201 K0.662:0.000 D9.07 E1.35 S1.00 B0 V24.0 ; set PID values for heater 1 ; Fans M950 F0 C"124.out2" Q250 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"124.out1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S0 H1 T100 ; set fan 1 value. Thermostatic control is turned on ; 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 T0 ; select first tool ; TFT Screen ;M575 P1 S0 B115200 ; enable support for tft ; Miscellaneous M955 P124.0 I10 M572 D0 S0.035 M912 P0 S-8.9 M593 P"zvdd" F41 ; use ZVDD input shaping to cancel ringing at 41Hz M308 S2 Y"drivers" A"DRIVERS" ; configure sensor 2 as temperature warning and overheat flags on the TMC2660 on Duet M308 S3 Y"mcu-temp" A"MCU" ; configure sensor 3 as on-chip MCU temperature sensor M308 S4 Y"thermistor" P"124.temp1" A"RRF_36" T100000 B4092 ; configure sensor 4 as temperature sensor on RRF36 CAN-FD board M950 F2 C"fan2" Q20000 ; create fan 2 on pin fan2 and set its frequency M106 P2 H2:3 L0.15 X0.65 B0.3 T40 ; set fan 2 value M501
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v3.4.0-LPC-STM32+7 on Sun Aug 20 2023 12:46:47 GMT+0300 (Eastern European Summer Time) M561 ; clear any bed transform G28 ; home while true G30 P0 X0 Y140 Z-99999 ; probe near a leadscrew, half way along Y axis G30 P1 X265 Y140 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors if abs(move.calibration.initial.deviation) < 0.01 || iterations > 3 break
-
@justGuner G32 calls bed.g, which in turn usually runs a number of G30 commands. From https://docs.duet3d.com/en/User_manual/Reference/Gcodes#g30-single-z-probe
Caution: the XY coordinates are permitted to be outside the normal printable bed area! This is intentional, because some printers (e.g. delta printers) benefit from probing areas not used for printing.
It is up to the user to check that the G30 commands are reachable. It looks like the your's trying to probe at the X limit (X265 in the second G30 command in bed.g), but with the probe offset in config.g (
G31 P500 X-22.345 Y-6.941 Z0.689
) it may cause a crash. I suggest changing the X265 to X240.Ian
-
@droftarts I am also trying to probe at the min. edge of the x axis, however the printhead stops about 20-30mm from the edge. Am I supposed to subtract the offset from both probing coordinates?
When I specify x and y, are those the coordinates for the printhead or bltouch? -
@justGuner said in G32 causes printhead to go beyond limits:
@droftarts I am also trying to probe at the min. edge of the x axis, however the printhead stops about 20-30mm from the edge. Am I supposed to subtract the offset from both probing coordinates?
When I specify x and y, are those the coordinates for the printhead or bltouch?When you specify X and Y in G30, the coordinates are of the probe, not the printhead (assuming the printhead is the HRP, ie where XYZ = 0), so it takes the offsets in G31 into account. If you want to probe to the edge of the bed, and the probe is offset from the printhead, the printhead will go off the edge of the bed. Make sure there is clearance to do this.
Your G31 command (
G31 P500 X-22.345 Y-6.941 Z0.689
) implies the probe is to the left and in front of the nozzle. Is that correct? Because it sounds like it's on the right of the nozzle. If not, see https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_testing#measuring-probe-x-y-offsetIan
-
@droftarts Yes, the probe is to the left and in front of the nozzle
-
I have edited the coordinates for probing and now it behaves as it should. However, I keep on getting the following error:
Error: Some computed corrections exceed configured limit of 1.00mm: 2.404 -2.621
Can I increase the configured limit?
edit: nevermind, I figured it out (it's the S parameter in M671). Probing works as it should now.
-
@justGuner said in G32 causes printhead to go beyond limits:
However, I keep on getting the following error:
Error: Some computed corrections exceed configured limit of 1.00mm: 2.404 -2.621
That's coming from your M671 command in config.g, which defines the leadscrew positions:
... M671 X-22:287 Y163:163 ...
See https://docs.duet3d.com/User_manual/Reference/Gcodes#m671-define-positions-of-z-pivot-points-or-bed-levelling-screws
You have omitted the S parameter, so it is defaulting to 1mm. If the levelling is likely to move, it's worth making the first probe have a wider limit eg M671 ... S5, with more probe lift (M558 H parameter).Ian