Beginner issue: storing Z-offset
-
Greetings!
Having a couple set-up problems, I hope someone can help me with.
1) I have different beds, a mirror, magnetic and standard PEI bed. So different heights.
I can't seem to set the Z offset. I home all. Then Move to the middle of the bed and lower the Z slowly using a sheet of paper. I'm at Z1.40 with the mirror.
I used G92 Z0, and do see that the console shows me I'm at Z0 now (not +1.40) Great. I tried M500, but nothing is saved in Config or config-overide?So, I start a print and it does a Home All, which I read overrides the G92. So how can I save my new Z Offset?
Do I need to do something with M208? Can I manually enter the Z offset in Config or Config-override?
2) I use Cura, And for some weird reason at the end of the print the filament retracted a good 6-7". It's not in my Cura G-code because I print the same thing on another printer running Marlin. Any Thoughts.
Thanks!
Max
-
You likely need to use G92 in your homeall.g and homez.g so when you home Z either way Z=0 ends up being the position where the nozzle just touches the printing surface.
You need to post your config.g, homeall.g and homez.g files - one file per </> tag.
Then I can likely tell you what is wrong.
Frederick
-
Hi!
I've never touched Homeall or Homez just Config. Let me know what I can change to set my Z offset +1.40.
Thanks
Just in case
This is my Cura START GCODE. In case it is conflicting.
; Ender 3 Custom Start G-code
G92 E0 ; Reset Extruder
G28 ; Home all axes
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish -
; Configuration file for Fly-E3 (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.1-LPC+17 on Wed Jul 21 2021 14:43:22 GMT-0700 (Pacific Daylight Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"EnderFly" ; 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 S0 ; physical drive 0 goes backwards using default driver timings M569 P1 S0 ; physical drive 1 goes backwards using default driver timings M569 P2 S1 ; physical drive 2 goes forwards using default driver timings M569 P3 S0 ; physical drive 3 goes forwards using default driver timings 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 E93.00 ; set steps per mm M566 X1200.00 Y1200.00 Z60.00 E360.00 ; set maximum instantaneous speed changes (mm/min) M203 X9000.00 Y9000.00 Z1800.00 E6000.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z100.00 E5000.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; 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 X235 Y235 Z260 S0 ; set axis maxima ; Endstops M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop M574 Z1 S1 P"zstop" ; configure active-high endstop for low end on Z via pin zstop ; Z-Probe M950 S0 C"servo0" ; create servo pin 0 for BLTouch M558 P9 C"^probe" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X-40 Y-12 Z2.08 ; set Z probe trigger value, offset and trigger height M557 X15:215 Y15:195 S20 ; define mesh grid ; 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 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S100 ; set temperature limit for heater 0 to 120C M308 S1 P"e0temp" Y"thermistor" T100000 B4092 ; 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 S245 ; set temperature limit for heater 1 to 245C ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 C"Part Cooling Fan" S0 H-1 ; set fan 0 name and value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 C"Hotend Fan" S0.01 H1 T45 ; set fan 1 name and 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 ; Miscellaneous M501 ; load saved parameters from non-volatile memory
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.1-LPC+17 on Wed Jul 21 2021 14:43:23 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-240 Y-240 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X5 Y5 F6000 ; go back a few mm G1 H1 X-240 Y-240 F360 ; move slowly to X and Y axis endstops once more (second pass) G1 H1 Z-265 F360 ; move Z down stopping at the endstop G90 ; absolute positioning G92 Z0 ; set Z position to axis minimum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.1-LPC+17 on Wed Jul 21 2021 14:43:23 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Z-265 F1800 ; move Z down until the endstop is triggered G92 Z0 ; set Z position to axis minimum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
-
G1 H1 Z-265 F360 ; move Z down stopping at the endstop G90 ; absolute positioning G92 Z0 ; set Z position to axis minimum (you may want to adjust this)
The G1 H1 command is going to set the Z position to 0 since that is the Zmin value from your M208 command in your config.g file.
However if your Z endstop is triggered when the Z position is NOT 0 then your homed Z position is going to be off.
The G92 Z0 command can be edited to correct for this.
Example: Let us say your Z endstop triggers at Z=2. So changing G92 Z0 to G92 Z2 will sync the actual Z position with homed Z position.
You also have to make the same correction to your homez.g file.
Frederick
-
@fcwilt Thanks Frederick for your prompt advice.
In my Cura start GCODE it has:
G28 ; Home all axes
Does that execute the homeAll.g? Just trying to figure out what supersedes the other commands.
HomingAll overrides the G92 Z0 I set in the console.
Now your example:
I need my Z0 to be 1.40mm higher to compensate for the mirror height.
So I edit homeAll.g and homeZ.g to:
G92 Z1.40 or do I do Z-1.40 (technically my Z endstop triggers -1.40mm below my bed level)
My mechanical Z endstop is actually lower than the bed due to the extra Mirror height.
Thanks again.
PS: I'm a newbee to RRF but have plenty of Marlin experience with baby stepping and dialing in my z height.:-)
-
@westech said in Beginner issue: storing Z-offset:
My mechanical Z endstop is actually lower than the bed due to the extra Mirror height.
That's bad because the nozzle can destroy the mirror. You should always home above the bed, so you have to raise the endstop somehow.
-
@westech said in Beginner issue: storing Z-offset:
@fcwilt Thanks Frederick for your prompt advice.
In my Cura start GCODE it has:
G28 ; Home all axes
Does that execute the homeAll.g? Just trying to figure out what supersedes the other commands.
Yes. G28 by itself executes homeall.g. G28 X executes homex.g. G28 Y executes homey.g. G28 Z executes homez.g.
My mechanical Z endstop is actually lower than the bed due to the extra Mirror height.
How is that possible? Why doesn't the nozzle crash into the mirror when homing?
Frederick
-
@westech I had a similar issue running different beds, Mirror and PEI.
I had 2 different length pins for initial homing of Z, one for Mirror and one for PEI on Spring.
Got fed up with changing or forgot and used a BLTouch in the end, saved a lot of hassle and head crashes! -
@fcwilt said in Beginner issue: storing Z-offset:
How is that possible? Why doesn't the nozzle crash into the mirror when homing?
This will only be possible when the nozzle is outside of the bed (or additional mirror) when homing...
-
@cosmowave said in Beginner issue: storing Z-offset:
@fcwilt said in Beginner issue: storing Z-offset:
How is that possible? Why doesn't the nozzle crash into the mirror when homing?
This will only be possible when the nozzle is outside of the bed (or additional mirror) when homing...
OK, that's fair enough for homing, but not for bed levelling or mesh levelling. (that's why fcwilt and me were confused)
-
Please understand, I have 3 bed surface options. The Mirror prints AMAZING. Perfectly flat, but it is thicker than the regular "buildtech" surface by 1.4mm. Likewize I bought a Energetic Flex plate which I believe is even thicker than the mirror. So, I will be switching between them. (The flex plate has a very textured surface).
The mechanical endstop I don't want to move. If I moved it up, then physically I could never reach the bed (besides the Z min trigger)
This is actually very simple to set in Marlin with baby stepping and M500.
I'm perplexed that G92 isn't saved using M500 in RRF?
-
@westech I'm sure there are various ways of achieving this, but in my case where I have different z offsets per print surface I use the Z offset feature in my slicer profile.
I choose the thickest surface option to be the default (eg 0 z offset in the slicer) slicer profile and set printer firmware defaults (homing heights, offsets etc) for that print surface; then create different printer profiles for each additional print surface, and adjust the slicer z offset for each as required.
I just have to remember to choose the correct printer profile for the appropriate print surface before slicing.
(I am using a BL Touch so I do not have to worry about crashing the HE into the bed if the surface is not detectable with a inductive probe though.)
Hope this helps.
-
@westech said in Beginner issue: storing Z-offset:
The mechanical endstop I don't want to move. If I moved it up, then physically I could never reach the bed (besides the Z min trigger)
Well it doesn't have to be that way.
The purpose of any endstop is to allow the firmware to establish that an axis is in a known position.
That position can be anywhere along the axis as long as the firmware can use the endstop to accurately and unequivocally determine that position.
Of course the endstop sensor has to be mounted in such a way as to allow this.
I use IR beam break sensors which allow me to place the endstop near one end of the axis without preventing movement to the end of the axis.
For example on a recent printer I built the Z endstop sensor triggers at Z=20mm and remains triggered from 20mm to 0mm.
So the homing code looks something like this:
G91 G1 H1 Z-299 F3000 G1 Z25 G1 H1 Z-30 F300 G92 Z20 ; since the endstop sensor triggers at 20mm this is where the actual Z position is set
If I had to cope with different bed thicknesses I would set such an endstop sensor to trigger above the thickest bed and rely on the Z probe to establish the actual Z=0 datum for the current bed.
In your case you could use a global variable to hold the Z offset from the endstop sensor position for each bed type. A macro could set the Z offset for the current bed type. The homing code would use the value in the global variable with G92 to set the Z position so that Z=0 was at the surface of the current bed type.
Frederick
-
@westech said in Beginner issue: storing Z-offset:
I'm perplexed that G92 isn't saved using M500 in RRF?
G92 only sets the current position on an axis. It is not a constant value and thus cannot be saved in a meaningful way.
Frederick
-
@mintytrebor Thank you! I just checked Cura and Prusa Slicer and this is an excellent solution for me, unless I forget to switch the profiles.
Again, the enstop I have is a mechanical switch. It is physically impossible for the printer to go beyond the switch.
-
@westech said in Beginner issue: storing Z-offset:
Again, the enstop I have is a mechanical switch. It is physically impossible for the printer to go beyond the switch.
I understand that it is mounted in such a way on your printer that it is impossible to move beyond it.
But that is not an inherent characteristic of a mechanical switch.
I have micro-switches (the kind with a lever) that are mounted on the Z axis in such a way that they are triggered over a range and do not block movement.
Once the bed support bracket reaches the point where it triggers the switch the lever of the switch can just slide along the side.
Frederick
-
x; Z-Probe
M950 S0 C"servo0" ; create servo pin 0 for BLTouch
M558 P9 C"^probe" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds
G31 P500 X-40 Y-12 Z2.08 ; set Z probe trigger value, offset and trigger height
M557 X15:215 Y15:195 S20 ; define mesh grIt looks like you have a BLTouch configured, but you're not using it in your homing files to actually probe and set the Z0 position. Doing this would solve all your problems and you don't have to worry about setting a Z offset or saving an offset, etc. You just measure the offset between the nozzle and probe trigger point once, save it, and you're good to go regardless of the bed surface because the probe checks the surface each time before the print when you home.
Do you not actually have a probe?
https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe
-
@westech said in Beginner issue: storing Z-offset:
This is actually very simple to set in Marlin with baby stepping and M500.
I'm perplexed that G92 isn't saved using M500 in RRF?That's a very marlin way of thinking.
You can use M500 P31 to save a trigger height for your probe (G31 Z) after it's been measured, but you can't save G92. That doesn't really make any sense. You don't need to save it because your homeall.g dictates what happens when you want to set the Z position. So just have G92 Z in there if you want to force a current position as Z#
-
@westech said in Beginner issue: storing Z-offset:
2) I use Cura, And for some weird reason at the end of the print the filament retracted a good 6-7". It's not in my Cura G-code because I print the same thing on another printer running Marlin. Any Thoughts.
You need to change Cura to use relative extrusion in the settings. It's likely set to absolute extrusion right now, and your end gcode probably has it do a small retraction, but since it's in absolute mode, it's not retracting a 2mm, it's going to the 2mm position which was way at the beginning of the print.