Bed leveling vs height map
-
This looks suspicious, line 17 of your bed.g
M558 F200 A5 S-1
S is tolerance allowed between multiple probes in mm, -1 is most likely not the right value.
-
@oliof
Thanks a lot for the fast reply.
I have changed the S-Value to 0.03I will see how the next prints are running.
Thanks a lot,
Regards Tobias -
Dammit, happened again.
Printer has done the bed leveling, tells me the gantry deviation that has been reached,
right after this message the Z-Axis moves again off. You can see it by eye and you can hear it.
Then height map is again off by approx. 1mm when completed.Which offset value is taken into affect here?
Or has it something to do with the startcode in my slicer?
G28 W ; home all without mesh bed level G90 ; use absolute coordinates M83 ; extruder relative mode G0 X60 Y-3 Z80 ; move extruder above bed, keep extruder in front for cleaning and checking M104 S160 T0; pre-heat extruder to 160C M140 S[first_layer_bed_temperature] ; set bed temp M190 S[first_layer_bed_temperature] ; wait for bed temp G29 ; mesh bed leveling using defined mesh grid G0 X0 Y-3 Z0.6 ; go outside print area M104 S[first_layer_temperature] ; set extruder temp M109 S[first_layer_temperature] ; wait for extruder temp M98 P"0:/sys/primeLine.g"; execute primeline macro G92 E0.0M572 D0 S0.07 ; set pressure advance
I only do wonder about the "W" behind the G28, as I do not have a W-Axis in my setup
Or should I use G29 S1 in the slicers Startcode? -
Can you post your full config.g and your homing files as well please?
Also please include the results of sending M98 P"config.g" and M122 in the gcode console. -
@Kubunter I always rehome Z after running or loading a bed mesh. I find this gives consistent results. You can have a file called 'mesh.g' to control the commands called when G29 is sent. Mine is:
; mesh.g ; called to perform bed mesh compensation via G29 ; M561 ; clear any bed transform G28 Z ; home Z G29 S0 ; probe the bed and enable compensation G28 Z ; home Z
Yes, it looks like
G28 W
is a mistake, probably should beG28 Z
.Regarding your bed mesh, it looks like your bed.g isn't really working, because your X axis is not square, or bed isn't square with the Z rods. Bed.g is called by G32, so first manually square the bed to the Z axis rods (if possible, assuming your bed is manually adjustable) then use G32 to level the X axis to the bed. Subsequent bed meshes should be flat across the Y axis.
... or at least would be, except it looks like you have a Y tramming problem, ie your Y rods are not level. That's why there's what looks like a twist across the bed.
Ian
-
@Phaedrux
Here is my config.g; ========================================================================================================= ; ; Configuration file for Duet2-WiFi/Ethernet (firmware version 3.4 and higher) ; ; for 0.9° motors on xy, and 0.9° or 1.8° (only LGXM) motor e ; ; for Caribou320 Duet2 WiFi/Ethernet LGX Copperhead - E3d or SE Thermistor - PINDA2 ; ; CariboDuetConfiguration Release : "2.2.0" ; Build : 587 ; ; Copyright Caribou Research & Development 2023. Licensed under GPL3. No commercial use. ; Source code and release notes are available on github: https://github.com/Caribou3d/CaribouDuet2-ConfigurationMacros ; ; ========================================================================================================= ; ; general settings ; M111 S0 ; debugging off G21 ; work in millimetres ; ; global variables ; M98 P"0:/settings/Set-Global-Variables.g" ; set global variables ; ; ========================================================================================================= ; network settings ; ========================================================================================================= ; M550 P"Caribou320-LGXC-NP" ; set printer name ; ;if {network.interfaces[0].type = "ethernet"} ; echo >"0:/sys/runonce.g" "M98 P""0:/settings/Set-Ethernet-Mode.g""" ;else ; M98 P"0:/settings/Set-WiFi-mode.g" ; M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S0 ; disable Telnet M575 P1 S1 B57600 ; enable support for PanelDue ; ; ========================================================================================================= ; drives ; ========================================================================================================= ; M569 P0 S1 F11 ; physical drive 0 goes forwards - x-axis M569 P1 S0 F8 Y3:2 ; physical drive 1 goes backwards - y-axis ; M569 P2 S1 F10 ; physical drive 2 goes forwards - z - left M569 P3 S1 F14 ; physical drive 3 goes forwards - Extruder M569 P4 S1 F10 ; physical drive 4 goes forwards - z right ; ; motor configuration ; M584 X0 Y1 Z2:4 E3 ; set drive mapping M671 X-36.5:293.5 Y0:0 S2.00 ; leadscrews at left (connected to Z/drive 2) and right (connected to E1/drive 4) of x axis ; ; set microsteps and steps / mm ; ========================================================================================================= ; M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X200.00 Y100.00 Z400.00 ; set steps per mm M98 P"0:/settings/Set-E-Steps.g" ; set esteps ; ; set motor currents ; ========================================================================================================= ; M906 X1250 Y1250 Z650 E650 I40 ; set motor currents (mA) and motor idle factor in percent ; M84 S60 ; set idle timeout ; ; set speeds ; ========================================================================================================= ; M201 X3000.00 Y3000.00 Z100.00 E500.00 ; set accelerations (mm/s^2) M203 X18000.00 Y18000.00 Z1000.00 E3600.00 ; set maximum speeds (mm/min) M204 P500.0 T500.0 ; set print and travel accelerations (mm/s^2) M566 X480.00 Y480.00 Z48.00 E300.00 ; set maximum instantaneous speed changes (mm/min) ; set global.x_accel = move.axes[0].acceleration ; save accelerations (mm/s^2) set global.x_jerk = move.axes[0].jerk ; save maximum instantaneous speed changes (mm/min) ; set global.y_accel = move.axes[1].acceleration ; save accelerations (mm/s^2) set global.y_jerk = move.axes[1].jerk ; save maximum instantaneous speed changes (mm/min) ; M564 H0 ; allow unhomed movement ; ; ========================================================================================================= ; axes limits ; ========================================================================================================= ; M208 X-2 Y-7.5 Z0 S1 ; set axes minimum M208 X253.5 Y214 Z325.50 S0 ; set axes maximum ; ; ========================================================================================================= ; endstops ; ========================================================================================================= ; M574 X1 S3 ; configure sensorless endstop for low end on x M574 Y1 S3 ; configure sensorless endstop for low end on y M574 Z1 S2 ; configure z-probe endstop for low end on z M574 Z2 S3 ; configure sensorless endstop for high end on z ; ; ========================================================================================================= ; ; PINDA2 ; M558 P5 C"^zprobe.in" H1.5 F600 T8000 A3 S0.03 ; set z probe to PINDA2 M308 S2 P"e1temp" A"Pinda V2" Y"thermistor" T100000 B3950 ; temperature of PINDA2 M557 X23:235 Y5:186 S30.25:30 ; define mesh grid ; ; ========================================================================================================= ; M574 Z1 S2 ; set endstops controlled by probe ; ; stallguard sensitivy ; M915 X S2 F0 H400 R0 ; set x axis sensitivity M915 Y S1 F0 H200 R0 ; set y axis sensitivity M915 Z S0 F0 H200 R0 ; set z axis sensitivity ; ; ========================================================================================================= ; heaters, fans, thermistors ; ========================================================================================================= ; ; heated bed ; ========================================================================================================= ; M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 R4700 A"Bed" ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" Q50 T0 ; create bed heater output on bedheat and map it to sensor 0 M143 H0 S110 ; set temperature limit for heater 0 to 110°C 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 ; ; extruder ; ========================================================================================================= ; ; hotend (Mosquito or Mosquito Magnum with E3d Thermistor) ; M308 S1 P"e0temp" Y"thermistor" T100000 B4658 C6.533898e-8 A"Nozzle E1"; E3d configure sensor 0 as thermistor on pin e0temp ; M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater 1 and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280°C ; ; display MCU and drivers temperature ; ========================================================================================================= ; M308 S4 P"mcu-temp" Y"mcu-temp" A"MCU" ; set virtual heater for MCU M308 S5 P"drivers" Y"drivers" A"Driver" ; set virtual heater for stepper drivers ; ; fans ; ========================================================================================================= ; ; radial fan ; M950 F0 C"fan1" Q160 ; create fan 0 on pin fan1 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off ; ; extruder fan (temperature controlled) ; M950 F1 C"fan0" Q500 ; create fan 1 on pin fan0 and set its frequency M106 P1 H1 T45 ; fan turns on at 45°C ; ; ======================================================================================================== ; tools ; ========================================================================================================= ; M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets M568 P0 S0 R0 A0 ; turn off extruder M302 S180 R180 ; allow extrusion starting from 180°C and retractions already from 180°C ; ; ========================================================================================================= ; other settings ; ========================================================================================================= ; M98 P"0:/settings/Set-PID-Bed.g" ; set PID values for the heated bed M98 P"0:/settings/Set-PID-Nozzle.g" ; set PID values for the nozzle ; ; ========================================================================================================= ; filament handling ; ========================================================================================================= ; ; execute macros that determine the status of the filament sensor ; M98 P"0:/settings/Set-FilamentSensorStatus.g" ; load filament sensor settings M98 P"0:/settings/Set-AutoLoadStatus.g" ; load autoload settings M98 P"0:/sys/00-Functions/FilamentsensorStatus" ; update sensor status ; ; ========================================================================================================= ; offsets - place off-sets for x and y here. z-offsets are handled in the print sheet macros ; ========================================================================================================= ; M98 P"0:/settings/Set-Probe-XY-Offsets.g" ; set probe xy-offset M98 P"0:/settings/Set-Probe-Z-Offset.g" ; set probe z-offset M18 XY ; release / unlock x, y G90 ; send absolute coordinates... M83 ; ... but relative extruder moves ; ; ========================================================================================================= ; check connectivity ; ========================================================================================================= ; if {network.interfaces[0].type = "wifi"} echo >"0:/sys/runonce.g" "M98 P""0:/sys/test-WiFi.g""" ; ; ========================================================================================================= ;
Thanks a lot.
-
@Phaedrux
This is m122M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.2 (2024-06-11 17:13:43) running on Duet WiFi 1.02 or later Board ID: 0JD0M-9P6M2-NW4SS-6J9FD-3SD6L-KUZZL Used output buffers: 8 of 26 (19 max) === RTOS === Static ram: 23384 Dynamic ram: 75216 of which 56 recycled Never used RAM 11512, free system stack 150 words Tasks: NETWORK(2,nWait 6,17.8%,222) HEAT(3,nWait 5,0.1%,328) Move(4,nWait 5,0.0%,302) MAIN(1,running,82.0%,746) IDLE(0,ready,0.2%,29), total 100.0% Owned mutexes: === Platform === Last reset 00:09:04 ago, cause: power up Last software reset at 2024-07-14 13:44, reason: User, Gcodes spinning, available RAM 11936, slot 1 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 MCU temperature: min 33.3, current 35.5, max 36.7 Supply voltage: min 24.0, current 24.3, max 24.6, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/17, heap memory allocated/used/recyclable 2048/1276/936, gc cycles 5 Events: 0 queued, 0 completed Driver 0: standstill, SG min 171 Driver 1: standstill, SG min 0 Driver 2: standstill, SG min n/a Driver 3: standstill, SG min 0 Driver 4: standstill, SG min n/a Driver 5: Driver 6: Driver 7: Driver 8: Driver 9: Driver 10: Driver 11: Date/time: 2024-07-15 19:03:06 Cache data hit count 4294967295 Slowest loop: 23.36ms; fastest: 0.17ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 12.2ms, write time 1.4ms, max retries 0 === Move === DMs created 83, segments created 5, maxWait 80627ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 18, completed 18, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 8], CDDA state -1 === Heat === Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 === GCodes === Movement locks held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Q0 segments left 0 Code queue 0 is empty === Network === Slowest loop: 39.49ms; fastest: 0.01ms Responder states: HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) HTTP sessions: 1 of 8 === WiFi === Interface state: active Module is connected to access point Failed messages: pending 0, notrdy 0, noresp 0 Firmware version 2.1.0d MAC address 8c:ce:4e:d5:b0:06 Module reset reason: Turned on by main processor, Vcc 3.35, flash size 4194304, free heap 40012 WiFi IP address 10.80.83.243 Signal strength -69dBm, channel 10, mode 802.11n, reconnections 0 Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
-
M98 P"config.g"
M98 P"config.g" Error: in file macro line 5 column 21: meta command: variable 'IdleCounter' already exists
Homeall
; ========================================================================================================= ; ; home xyz axes ; ; ========================================================================================================= ; M98 P"homez.g" ; homeall is the same as homez ; ; ========================================================================================================= ;
Homez
; ========================================================================================================= ; ; home xyz axes ; ; for Caribou320 Duet2 WiFi/Ethernet LGX Copperhead - E3d or SE Thermistor - PINDA2 ; ; ========================================================================================================= ; G91 ; relative positioning M98 P"0:/sys/00-Functions/CurrentSenseHoming" ; ensure the current and sensitivity is set for homing routines. ; set global.zLiftDistance = 5 ; set distance to lift M98 P"0:/sys/00-Functions/zLift" ; call macro to lift z ; ; ========================================================================================================= ; home x Axis ; ========================================================================================================= ; M17 X ; energise motors to ensure they are not stalled G4 P100 ; wait 100ms ; if !move.axes[0].homed G1 H1 X5 F1000 ; move slowly away G1 H1 X-260 F2000 ; move quickly to x axis endstop and stop there (first pass) G1 H2 X5 F1000 ; go back a few mm G1 H1 X-10 F2000 ; move slowly to x axis endstop once more (second pass) M400 ; wait for current moves to finish ; ; ========================================================================================================= ; home y Axis ; ========================================================================================================= ; M17 Y ; energise motors to ensure they are not stalled G4 P100 ; wait 100ms ; if !move.axes[1].homed G1 H1 Y5 F1000 ; move slowly away G1 H1 Y-260 F2000 ; move quickly to x axis endstop and stop there (first pass) G1 H2 Y5 F1000 ; go back a few mm G1 H1 Y-10 F2000 ; move slowly to x axis endstop once more (second pass) M400 ; wait for current moves to finish ; ; ========================================================================================================= ; M913 X100 Y100 ; return x & y motor G4 P200 ; wait 200ms ; G90 ; absolute positioning ; ; ========================================================================================================= ; home z axis ; ========================================================================================================= ; G90 ; absolute positioning ; G1 X11.5 Y-3 F6000 ; go to first probe point G30 ; home z by probing the bed G1 Z1.15 F100 ; move z to origin and 1.15mm above bed G90 ; absolute positioning M400 ; wait for current moves to finish ; ; ========================================================================================================= ; G90 ; absolute positioning ; M98 P"0:/sys/00-Functions/CurrentSenseNormal" ; ensure the current and sensitivity is set for normal routines. ; ; ========================================================================================================= ;
Homey
; ========================================================================================================= ; ; home y Axis ; ; ========================================================================================================= ; G91 ; relative positioning M98 P"0:/sys/00-Functions/CurrentSenseHoming" ; ensure the current and sensitivity is set for homing routines. ; M17 Y ; energise motor to ensure it's not stalled G4 P100 ; wait 100ms ; set global.zLiftDistance = 5 ; set distance to lift M98 P"0:/sys/00-Functions/zLift" ; call macro to lift z ; G1 H1 Y5 F1000 ; move slowly away G1 H1 Y-225 F2000 ; move quickly to y axis endstop and stop there (first pass) G1 H2 Y5 F1000 ; go back a few mm G1 H1 Y-10 F2000 ; move slowly to y axis endstop once more (second pass) G1 H2 Z-5 F4000 ; lower z again ; M400 ; wait for current moves to finish G4 P200 ; wait 200ms ; G90 ; absolute positioning ; M98 P"0:/sys/00-Functions/CurrentSenseNormal" ; ensure the current and sensitivity is set for normal routines. ; ; ========================================================================================================= ;
Homex
; ========================================================================================================= ; ; home x Axis ; ; ========================================================================================================= ; G91 ; relative positioning M98 P"0:/sys/00-Functions/CurrentSenseHoming" ; ensure the current and sensitivity is set for homing routines. ; M17 X ; energise motor to ensure it's not stalled G4 P100 ; wait 100ms ; set global.zLiftDistance = 5 ; set distance to lift M98 P"0:/sys/00-Functions/zLift" ; call macro to lift z ; G1 H1 X5 F1000 ; move slowly away G1 H1 X-260 F2000 ; move quickly to x axis endstop and stop there (first pass) G1 H2 X5 F1000 ; go back a few mm G1 H1 X-10 F2000 ; move slowly to x axis endstop once more (second pass) G1 H2 Z-5 F6000 ; lower z again ; M400 ; wait for current moves to finish G4 P200 ; wait 200ms ; G90 ; absolute positioning ; M98 P"0:/sys/00-Functions/CurrentSenseNormal" ; ensure the current and sensitivity is set for normal routines. ; ; ========================================================================================================= ;
-
@droftarts
I will check mechanical assembly when I'm at home and Give the mesh.g a try. Sounds also good. -
Hello,
I was able to dig a little bit deeper.
Mechanically the printer is within tolerances.
Espacially the 90 degree angle between bed and Z-Rods is looking good.My problem arises when the zLift.g macro is carried out when homing.
I have commented out M98 to call the zLift macro.
Then the X-Axis stays completely leveled.What might be the problem in zLift?
Here is the code:
; ========================================================================================================= ; ; lifts the z axis in a more controlled way. If homed and possible, the z axis is lifted ; by zLiftDistance mm. Otherwise z ist liftes and current is reduced to avoid issues at ; the high end. ; ; ========================================================================================================= ; G91 ; relative positioning ; if move.axes[2].homed if {move.axes[2].machinePosition < (move.axes[2].max -20)} ; if the z position is below 20mm below max z G1 Z{global.zLiftDistance} ; lift z axis by 15mm else M913 Z40 ; reduce z motor current to 30% of set current G1 Z{global.zLiftDistance} F300 ; move z axis 15mm up slowly leveling the X gantry M913 Z100 ; return z motor current to 100% of set current ; M400 ; wait for moves to finish ; G90 ; absolute positioning ; ; ========================================================================================================= ;
Thanks a lot
-
@Kubunter said in Bed leveling vs height map:
M913 Z40
perhaps you're reducing the motor current too much and it's skipping steps.
-
@Phaedrux Thanks a lot, that has done the trick.
Changed value to 80%, now there is no error anymore when zLift is carried out.Please mark topic as solved!
Regards Kubunter
-
-