Mesh Compensation not moving Z axis Motors
-
@fcwilt I used G29 and that creates the bed mesh, I can see the mesh height map in the GUI, but when I try and use it the Z-axis motors do nothing to compensate. That is the issue I am having.
-
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
@fcwilt I used G29 and that creates the bed mesh, I can see the mesh height map in the GUI, but when I try and use it the Z-axis motors do nothing to compensate. That is the issue I am having.
If your height map is fairly flat the motion of the Z steppers can be hard to see.
Did you set the Z=0 Datum with a single G30 to a fixed XY position (like the center of the bed) before creating the height map?
How are you trying to use it?
Do you have code that executes at the start of a print that:
- sets the Z=0 Datum
- does a G29 S1 that loads the existing height map
Or are you doing it some other way?
Frederick
-
-
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
@fcwilt I apologize, I am not sure what the Z=0 Datum is exactly. Also are you saying to put in my start gcode "G29 S0"? Wouldn't that just probe the bed right before the print starts?
Sorry that was a typo - it should have been G29 S1 - my bad.
Setting the Z=0 Datum is using the Z probe to adjust the logical Z position (what the firmware "thinks" the Z position is) so that position Z=0 would have the nozzle just touching the bed.
This is done with a single G30 after moving the probe to a fixed XY location. Some folks use the first probe point of the G29 grid. I use the center of the bed.
Setting the Z=0 Datum must be done when creating a new height map or loading an existing height map.
Whatever XY position was used when setting the Z=0 Datum before creating the height map, that same XY position must be used when loading that height map.
Frederick
-
Can you post your config.g, homeall.g, homez.g, and bed.g if it exists?
Can you post a sliced gcode file or at least the first 50 or so lines of it?
Can you send M122 and M98 P"config.g" in the Gcode console in DWC and post the results?That should give us a much better idea of what is happening in your setup.
-
@phaedrux config.g homeall.g bed.g
M122
=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 (2021-06-15 21:44:54) running on Duet WiFi 1.02 or later
Board ID: 08DGM-917DA-G4MS8-6JTD2-3SJ6T-T9VB8
Used output buffers: 3 of 24 (23 max)
=== RTOS ===
Static ram: 23876
Dynamic ram: 75240 of which 12 recycled
Never used RAM 15288, free system stack 184 words
Tasks: NETWORK(ready,14.4%,229) HEAT(delaying,0.0%,314) Move(notifyWait,0.1%,364) MAIN(running,85.5%,442) IDLE(ready,0.0%,29), total 100.0%
Owned mutexes:
=== Platform ===
Last reset 00:04:45 ago, cause: power up
Last software reset at 2021-08-03 17:57, reason: User, GCodes spinning, available RAM 15080, 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
Step timer max interval 0
MCU temperature: min 17.7, current 18.3, max 18.5
Supply voltage: min 24.1, current 24.2, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Driver 0: position 0, standstill, SG min/max not available
Driver 1: position 0, standstill, SG min/max not available
Driver 2: position 0, standstill, SG min/max not available
Driver 3: position 0, standstill, SG min/max not available
Driver 4: position 0, standstill, SG min/max not available
Driver 5: position 0
Driver 6: position 0
Driver 7: position 0
Driver 8: position 0
Driver 9: position 0
Driver 10: position 0
Driver 11: position 0
Date/time: 2021-08-04 08:18:32
Cache data hit count 4294967295
Slowest loop: 5.22ms; 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 0.9ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 83, maxWait 0ms, bed compensation in use: mesh, comp offset 0.000
=== MainDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock 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
Code queue is empty.
=== Network ===
Slowest loop: 199.90ms; fastest: 0.09ms
Responder states: HTTP(2) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
HTTP sessions: 1 of 8- WiFi -
Network state is active
WiFi module is connected to access point
Failed messages: pending 0, notready 0, noresp 1
WiFi firmware version 1.22
WiFi MAC address bc:dd:c2:89:9f:4c
WiFi Vcc 3.37, reset reason Turned on by main processor
WiFi flash size 4194304, free heap 26176
WiFi IP address 192.168.1.25
WiFi signal strength -54dBm, mode none, reconnections 0, sleep mode modem
Clock register ffffffff
Socket states: 0 0 0 0 0 0 0 0
M98 P"config.g"
HTTP is enabled on port 80
FTP is enabled on port 21
TELNET is enabled on port 23 - WiFi -
-
I re-posted your files using the </> tag - using the tag means no downloading is required to view the files.
The homeall.g file didn't seem quite right - it had two sections for homing XY that were much the same but no code to home Z.
I don't see the code where you create the height map.
The config file says you are using a BLTouch but you have commands M401/M402 which you usually don't need with a BLTouch.
Frederick
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.0 on Tue Aug 03 2021 11:42:17 GMT-0500 (Central Daylight Time) ; General preferences M575 P1 S1 B57600 ; enable support for PanelDue G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"HyperCube" ; set printer name M669 K1 ; select CoreXY mode ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet ; Drives M569 P0 S0 ; physical drive 0 goes forwards M569 P1 S0 ; physical drive 1 goes forwards M569 P2 S0 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M584 X0 Y1 Z2 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E409.00 ; set steps per mm M566 X900.00 Y900.00 Z99.60 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X12000.00 Y12000.00 Z7200.00 E3000.00 ; set maximum speeds (mm/min) M201 X1000.00 Y1000.00 Z200.00 E10000.00 ; set accelerations (mm/s^2) M906 X950 Y950 Z950 E950 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z-0.3 S1 ; set axis minima M208 X271 Y290 Z280 S0 ; set axis maxima ; Endstops M574 X1 S3 F0 R0 ; Set active High endstops (S1=SENSORED) (X-MIN(1)) (S3=SENSORLESS) M574 Y0 S3 F0 R0 ; Set active High endstops (S1=SENSORED) (Y-MIN(1)) (S3=SENSORLESS) M574 X1 Y1 S3 ; Set endstops controlled by motor load detection M574 Z1 S2 ; configure sensorless endstop for low end on Y and X M915 X Y S7 R0 F0 ; Z-Probe M950 S0 C"exp.heater7" ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" H3 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X0 Y0 Z0.95 ; set Z probe trigger value, offset and trigger height M557 X15:250 Y15:250 S20 ; define mesh grid ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat 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"e0temp" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 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 and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"fan0" Q500 ; 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"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T45 ; 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 ; Custom settings are not defined M671 X50:250:250:50 Y250:250:50:50 P0.5 ; point1 (50,250), point2 (250,250), point3 (250,50), point4 (50,50) ; Miscellaneous M501 ; load saved parameters from non-volatile memory M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.3.0 on Tue Aug 03 2021 11:42:18 GMT-0500 (Central Daylight Time) M400 M913 X70 Y70 ; drop motor current to 70% M400 G91; relative positioning G1 H2 Z10 F12000 ; lift Z relative to current position G1 H1 X-320.5 F10000 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X5 F12000 ; go back a few mm G1 H1 X-320.5 F7000 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-10 F6000 ; lower Z again G90 ; absolute positioning M400 M913 X100 Y100 ; return current to 100% M400 M400 M913 X70 Y70 ; drop motor current to 70% M400 G91; relative positioning G1 H2 Z10 F12000 ; lift Z relative to current position G1 H1 Y-320.5 F10000 ; move quickly to X axis endstop and stop there (first pass) G1 H2 Y5 F12000 ; go back a few mm G1 H1 Y-320.5 F7000 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-10 F6000 ; lower Z again G90 ; absolute positioning M400 M913 X100 Y100 ; return current to 100% M400
; homez.g ; called to home the Z axis ; ; BLTouch prep so we don't catch the probe pin on the edge of the bed ; M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed M402 ; Retract probe just in case it's down ; Drop the bed for travel ; G91 ; Relative positioning G1 Z5 F200 H2 ; Lower bed 5mm to ensure it is below the trigger height ; Move probe into position ; G90 ; absolute positioning G1 X160 Y160 F4000 ; Move x and Y axis over to bed center so probe is on top of bed ; Set lower speeds for homing ; M566 Z5 ; Set maximum instantaneous speed changes (mm/min) (Jerk) M203 Z400 ; Set maximum speeds (mm/min) M201 Z100 ; Set maximum accelerations (mm/s^2) ; Probe the bed ; M558 A1 F350 ; Set single probing at faster feed rate G30 ; Do a single probe to home our Z axis M558 A10 F100 ; Set tripple probing at slower feed rate G30 ; Probe again to get a more accurate position ; Set normal speeds again ; M566 Z60 ; Set maximum instantaneous speed changes (mm/min) (Jerk) M203 Z600 ; Set maximum speeds (mm/min) M201 Z600 ; Set maximum accelerations (mm/s^2) ;Load Mesh Bed Compensation ; G29 S1 ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z3 F100 ; lift Z relative to current position ;G90 ; absolute positioning
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v3.3.0 on Tue Aug 03 2021 11:42:17 GMT-0500 (Central Daylight Time) ;M561 ; clear any bed transform ;G29 ; probe the bed and enable compensation G28 ; home M401 ; deploy Z probe G30 P0 X50 Y250 Z-99999 ; probe near an adjusting screw G30 P1 X250 Y250 Z-99999 ; probe near an adjusting screw G30 P2 X250 Y50 Z-99999 ; probe near an adjusting screw G30 P3 X50 Y50 Z-99999 S4; probe near an adjusting screw and report adjustments needed M402 ; retract probe
-
; homez.g ; called to home the Z axis ; ; BLTouch prep so we don't catch the probe pin on the edge of the bed ; M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed M402 ; Retract probe just in case it's down ; Drop the bed for travel ; G91 ; Relative positioning G1 Z5 F200 H2 ; Lower bed 5mm to ensure it is below the trigger height ; Move probe into position ; G90 ; absolute positioning G1 X160 Y160 F4000 ; Move x and Y axis over to bed center so probe is on top of bed ; Set lower speeds for homing ; M566 Z5 ; Set maximum instantaneous speed changes (mm/min) (Jerk) M203 Z400 ; Set maximum speeds (mm/min) M201 Z100 ; Set maximum accelerations (mm/s^2) ; Probe the bed ; M558 A1 F350 ; Set single probing at faster feed rate G30 ; Do a single probe to home our Z axis M558 A10 F100 ; Set tripple probing at slower feed rate G30 ; Probe again to get a more accurate position ; Set normal speeds again ; M566 Z60 ; Set maximum instantaneous speed changes (mm/min) (Jerk) M203 Z600 ; Set maximum speeds (mm/min) M201 Z600 ; Set maximum accelerations (mm/s^2) ;Load Mesh Bed Compensation ; G29 S1 ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z3 F100 ; lift Z relative to current position ;G90 ; absolute positioning
This is the rest of what is in homeall.g not sure why it didn't show up for you.
-
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
bed compensation in use: mesh
That indicates that mesh compensation is active.
Can you post an image of your heightmap being displayed in DWC so that we can see what it's looking like?
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
WiFi firmware version 1.22
Your wifi firmware is quite out of date for firmware 3.3. I suggest you do a full update just to make sure everything is actually updated. The easy way to do this is to upload the complete zip file for the release to the system tab in DWC.
https://github.com/Duet3D/RepRapFirmware/releases/download/3.3/Duet2and3Firmware-3.3.zip
Upload it as is, don't extract it first. That should update everything. You can check if the wifi server was successfully updated by sending M122 again and looking for the wifi firmware version near the end of the report. It should be 1.26.
M203 Z7200.00
Is that actually a viable max speed for your z axis?
The rest of your files look ok, but you didn't share a sliced gcode file, so we can't see what's happening at the start of a print. We need to know the order of operations. When is it getting homed with G28, when is G32 being called for leveling, when is G29 S1 getting called (other than at the end of your homez)?
-
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
; homez.g ; called to home the Z axis ; ; BLTouch prep so we don't catch the probe pin on the edge of the bed ; M280 P7 S160 I1 ; Alarm Release and Push-Pin UP just in case it's in alarm and deployed M402 ; Retract probe just in case it's down ; Drop the bed for travel ; G91 ; Relative positioning G1 Z5 F200 H2 ; Lower bed 5mm to ensure it is below the trigger height ; Move probe into position ; G90 ; absolute positioning G1 X160 Y160 F4000 ; Move x and Y axis over to bed center so probe is on top of bed ; Set lower speeds for homing ; M566 Z5 ; Set maximum instantaneous speed changes (mm/min) (Jerk) M203 Z400 ; Set maximum speeds (mm/min) M201 Z100 ; Set maximum accelerations (mm/s^2) ; Probe the bed ; M558 A1 F350 ; Set single probing at faster feed rate G30 ; Do a single probe to home our Z axis M558 A10 F100 ; Set tripple probing at slower feed rate G30 ; Probe again to get a more accurate position ; Set normal speeds again ; M566 Z60 ; Set maximum instantaneous speed changes (mm/min) (Jerk) M203 Z600 ; Set maximum speeds (mm/min) M201 Z600 ; Set maximum accelerations (mm/s^2) ;Load Mesh Bed Compensation ; G29 S1 ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z3 F100 ; lift Z relative to current position ;G90 ; absolute positioning
This is the rest of what is in homeall.g not sure why it didn't show up for you.
Well the comment at the top of the file says it is "homez.g" - thus my confusion.
Frederick
-
@fcwilt Yeah I need to do some more tidying up. I just copied and pasted the code from the homez.g into the homeall.g at the end. Lol. A little sloppy for sure. Sorry for the confusion.
-
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
@fcwilt Yeah I need to do some more tidying up. I just copied and pasted the code from the homez.g into the homeall.g at the end. Lol. A little sloppy for sure. Sorry for the confusion.
Understood.
You have a number of things in the code that are not really needed - even though they don't hurt anything.
Frederick
-
@phaedrux I thought I did use that file to update the Duet. I will have to check it again.
In regards to the M203 Z7200, that is probably not viable, but idk if it will have a negative effect on it, wouldn't it just do the max speed possible if it is too high?
I can post some Gcode of a sliced gcode file and height map.
-
That height map suggests you didn't set the Z=0 Datum using a single G30 at the first grid point or the center of the bed before creating the height map.
Frederick
-
@fcwilt Alright, I will try and do that and report back with my result. Thanks for all your help.
-
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
but idk if it will have a negative effect on it, wouldn't it just do the max speed possible if it is too high?
It will use the max speed unless told to use a slower feed rate. If that max speed is beyond what the axis is capable of it may skip steps. For a heavy lead screw axis like a print bed moving in Z 600mm/min is a good place to start. Fast enough to make movement not annoying, but not too fast to case issues. You are setting a slower Z speed in your homing files, so it's not likely to be an issue, but to be on the safe side you should set the speed limit correctly in config.g regardless.
Your sliced gcode files shows that it only does G28 homing at the start of the print. And you have G29 S1 in your homeall, so it's loading the saved heightmap after it's homed. This is ok, but it still doesn't tell us when you do the tilt correct with G32 or whether that was done before you created the saved heightmap in the first place.
One issue I do see in your bed.g is that you have the M561 commented out to clear any compensation in effect. Then you home all, which has the heightmap loaded, and then you do the tilt correction. So in effect, you're doing tilt correct with the heightmap already in effect.
I would suggest that you move the G29 S1 from the end of homeall to your slicer start gcode after the g28 to keep them separate. Then make sure you are using M561 at the start of your homeall.g and bed.g to ensure you're not layering compensations on top of each other.
Also make sure you do a G30 at bed center before and after the tilt correction. Make sure the point used for that G30 is the same as used in your homeall.g
Also make sure your G31 probe XYZ offsets are correct. Otherwise everything will be off.
https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe
-
@phaedrux So I did the Probe calibration, but for some reason it is starting too high when I start the print now. Any idea why that would be? I followed the guide multiple times and am still have issues with it being to far from the bed for some reason.
-
What was the G31 Z before and what is it now?
Where on the bed are you measuring?
Did you also correct the other things mentioned? -
@phaedrux Yeah I went through an corrected everything you told me to. I had it at Z0.95 and now I have it at Z0.825, but for some reason it is starting way too high now. Very confusing. I just put it to what the G30 S-1 showed after checking it multiple times that way. Measuring right in the middle of the bed.
-
@thepfeiffenator said in Mesh Compensation not moving Z axis Motors:
@phaedrux Yeah I went through an corrected everything you told me to. I had it at Z0.95 and now I have it at Z0.825, but for some reason it is starting way too high now. Very confusing. I just put it to what the G30 S-1 showed after checking it multiple times that way.
Does your home Z routine include setting the Z=0 Datum using a single G30?
After you've done the setting of the Z=0 Datum does a command like G90 G1 Z0 result in the nozzle just touching the bed?
Are you trying to print with mesh compensation enabled?
Frederick