G31 offset not obeyed/saved?
-
I have a CoreXY printer with a precision piezo attached.
After following the instructions for the Precision Piezo and how to set the G31 Z offset correctly I came up with the folowing in my config.g:
G31 X0 Y0 Z-1.32 P600
.. this was after having to babystep up by 1.1mm.
Even after setting the G31 like this, I still have to babystep up by 1.1mm at the start of every print, so it seems to like the Zoffset is getting cleared somehow, otherwise everything works ok..
What could be causing this?My bed.g looks like this:
; bed.g
; called to perform automatic bed compensation via G32
;
; generated by RepRapFirmware Configuration Tool on Sun Oct 14 2018 22:54:34 GMT+0800 (Australian Western Standard Time)
;M561 ; clear any bed transform
;G1 X150 Y150 F9000
;G30;M561 ; clear any bed transform
G29 S0 ; probe the bed and enable compensation
;G1 X150 Y150 F9000
;G30; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v2 on Wed Mar 06 2019 15:24:15 GMT+0800 (Australian Western Standard Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 Y-305 F3500 ; move quickly to X or Y endstop and stop there (first pass)
G1 S1 X-305 F3500 ; move quickly to X or Y endstop and stop there (first pass)
G1 S1 X-305 ; home X axis
G1 S1 Y-305 ; home Y axis
G1 X5 Y5 F6000 ; go back a few mm
G1 S1 X-305 F360 ; move slowly to X axis endstop once more (second pass)
G1 S1 Y-305 ; then move slowly to Y axis endstop
G90
G1 X150 Y150 F6000
G30 -
Check whether you have another G31 command in config-override.g that is overriding that one.
A G31 Z offset of -1.32mm sounds wrong to me, it means that the nozzle had to push the bed down by 1.32mm before it triggers. That sounds excessive, and explains why you had to babystep up 1.1mm. So try using (-1.32+1.1) = -0.21mm in your G31 command instead.
-
@snupple said in G31 offset not obeyed/saved?:
; bed.g
; called to perform automatic bed compensation via G32
;
; generated by RepRapFirmware Configuration Tool on Sun Oct 14 2018 22:54:34 GMT+0800 (Australian Western Standard Time)
;M561 ; clear any bed transform
;G1 X150 Y150 F9000
;G30
;M561 ; clear any bed transform
G29 S0 ; probe the bed and enable compensation
;G1 X150 Y150 F9000
;G30You have everything but G29 commented out. You should uncomment the G30 and the M561 at least.
What firmware version are you running?
How exactly are you determining your trigger height? -
@phaedrux said in G31 offset not obeyed/saved?:
@snupple said in G31 offset not obeyed/saved?:
; bed.g
; called to perform automatic bed compensation via G32
;
; generated by RepRapFirmware Configuration Tool on Sun Oct 14 2018 22:54:34 GMT+0800 (Australian Western Standard Time)
;M561 ; clear any bed transform
;G1 X150 Y150 F9000
;G30
;M561 ; clear any bed transform
G29 S0 ; probe the bed and enable compensation
;G1 X150 Y150 F9000
;G30You have everything but G29 commented out. You should uncomment the G30 and the M561 at least.
What firmware version are you running?
How exactly are you determining your trigger height?I followed the instructions here https://duet3d.dozuki.com/Wiki/Using_mesh_bed_compensation#Section_Checking_the_trigger_height
Should the G30 be done before the G29 only?
-
@snupple The G30 is to locate Z0. So it can happen when you home the printer, or you can use another method to locate Z0 as long as it's accurate before you run G29 so that the heightmap has a correct reference for where 0 is. You can do another G30 after if you like.
-
ok, so I uncommented G30 so it does that before the G29, and changed the G31 offset to Z -22, however I still have to babystep up by 1mm ?
-
Do you have a config-override.g file in /sys, and if so, does it have a G31 command in it? That would override the one you have in config.g (assuming you have a M501 command in config.g).
-
@dc42 No I dont
-
Problem Solved - I noticed that when looking at the "Machine Properties/Z Probe" section that the Trigger Height was on 0.7mm even my G31 was set to Z-0.2.
I removed the G31 fron the config.g and manually typed it back in and it all works now!