Notifications
Clear all

Different Filament starting Z heights gcode  

  RSS
devilhunter
(@devilhunter)
Reputable Member
Different Filament starting Z heights gcode

Anybody know of a good way to set specific starting z heights per printer starting gcode and filament gcode?

Lets say i have a general Z offset of -0.800, for PLA
PETG likes to be printed +0.150 higher, or else it will fuse with the bed.
Black ABS likes to printed at -0.850, and my white ABS at -0.950 (almost into the bed)

I cannot watch the live Z height all the time, and when switching from white ABS to PETG and forgetting to set the z height, a catastrophe will happen.

If i set a +absolute +0.150 in the PETG filament gcode section, the starting gcode of the printer will print it's intro line at -0.800 regardless, then the filament gcode takes over and the normal print will be +0.150 higher.

Low starting intro line still damages the bed though.

Posted : 07/06/2018 1:07 pm
stahlfabrik
(@stahlfabrik)
Honorable Member
Re: Different Filament starting Z heights gcode

I also wonder for a long time if there is a gcode to set the live adjust Z value. Are you aware of any? Or is that your question, too - just in other words?:-)

Best regards!

Posted : 07/06/2018 1:30 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Different Filament starting Z heights gcode

Well, you can always try KISSlicer which allows you to have filament-specific user-defined G-code which can be inserted into the printer G-code sections.

I think that you would need to set the initial absolute Z height, then reset the Z value (G92).

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Posted : 07/06/2018 2:10 pm
Dibujor
(@dibujor)
Eminent Member
Re: Different Filament starting Z heights gcode

I'm surely saying something stupid here because of lack of knowledge but, can't you use the z-offset in the printer settings for that? Although the description says it applies that offset to all the z coordinates in the g-code you you would still have the problem with the purge line I guess

Posted : 07/06/2018 4:36 pm
Tiago
(@tiago)
Reputable Member
Re: Different Filament starting Z heights gcode


Well, you can always try KISSlicer which allows you to have filament-specific user-defined G-code which can be inserted into the printer G-code sections.

I think that you would need to set the initial absolute Z height, then reset the Z value (G92).

Peter

Slic3r have it too, under "filament -> Custom G-Code"
Also you can do general IF under printer gcode. eg: M221 S{if layer_height<0.075}100{else}95{endif} Thats for flow, but will work with filament_type too, still use filament gcode would be better to avoid if mess
Not possible right now without hack the gcode via manual or octoprint plugin but prusa could implement a g-code for set live z, that would be cool and easy

Posted : 07/06/2018 4:42 pm
Martin Wolfe
(@martin-wolfe)
Reputable Member
Re: Different Filament starting Z heights gcode

I just create a new printer settings entry in Slic3r. On the "General" section in "Sizes and coordinates" there is an entry for Z offset. As the PETG I use prints slower than the default given setting I just switch "Print Settings", "Filament Settings" and "Printer Settings" over to the PETG entries I created.

No need to mess around with G-Code that way.

Regards,
Martin

Martin Wolfe

Posted : 08/06/2018 5:39 am
mdpauley
(@mdpauley)
Member
Re: Different Filament starting Z heights gcode

Wouldn't M851 help? http://marlinfw.org/docs/gcode/M851.html

Posted : 30/10/2018 8:12 pm
The Plastic Shed
(@the-plastic-shed)
Estimable Member
Re: Different Filament starting Z heights gcode

Why bother ?

If you set up a printer profile in Slic3r PE you can play with the Z offset in there, have a profile for each material with the Z offset plus or minus whatever and nothing special is needed in the gcode.

It's as easy to edit the z offset on the printer tab as it is to mess about adding / removing lines of gcode so I'm with Martin.w15 on this one.

Posted : 30/10/2018 9:52 pm
rodrigo.a2
(@rodrigo-a2)
New Member
Re: Different Filament starting Z heights gcode

Adding a custom z-offset in the "Filament Settings/Custom G-Code/Start G-code" field will set Different Filament starting Z heights for you, depending on your filament profile.

There is a description of how to do it at https://3dprinting.stackexchange.com/questions/5931/adding-extra-z-offset-to-bed-for-petg-in-slic3r/5932 , which says to move the desired offset in the z-axis and then reset the z value to zero, but that didn't work for me because the Marlin firmware (empirically observed, not confirmed in code) did not let me set z lower that 0 mm. Instead, this is what is working for me :

; Custom z-offset for PLA to improve bed adherence
G92 Z0.1 ; Redefine the zero Z level at the oppostite of the target offset
G1 Z0 F500 ; Go to the new z=0 level of the printer.

I had to implement this feature because switching between PETG and PLA resulted in very different bed adhesion. PLA prints would lift if I used the z-offset for PETG, so I had to lower it by about 0.1 mm. On one occasion I forgot to raise z-adjustment back and the PETG stuck to my PEI bedplate so strongly that I ended up ruining the bedplate when removing the piece's support.

Posted : 07/03/2019 8:21 pm
--
 --
(@)
Illustrious Member
Re: Different Filament starting Z heights gcode

You could change the print settings and save a print profile for each type of filament.

Set layer one to a different height for each?

Posted : 07/03/2019 8:46 pm
Robin
(@robin-4)
Estimable Member
Re: Different Filament starting Z heights gcode

Just set up a printer profile in printer settings. Alter the Z offset:. Any values entered here are either added or subtracted from the live Z height that was done. So if you want the nozzle closer to the bed then insert a negative value i.e. -0.1mm will take the nozzle 0.1mm closer to the bed.

I have one set for +1.35mm so i can print on to a textured HIPS sheet surface on top of the print plate.

Posted : 08/03/2019 1:31 am
Pedja
(@pedja)
Trusted Member
RE: Different Filament starting Z heights gcode
Posted by: @devilhunter

Anybody know of a good way to set specific starting z heights per printer starting gcode and filament gcode?

I cannot watch the live Z height all the time, and when switching from white ABS to PETG and forgetting to set the z height, a catastrophe will happen.

This is how it works for me: I set First layer Z height for PLA, and then create printer profile for PETG where I set Z-offset to raise Z a bit. Effect seems to be the same as I changed First layer Z height.

Posted : 08/08/2020 6:54 pm
Share: