Adding a +Z offset at a specific layer ?

My coding skills are ZERO. I can navigate the duet g-code just about, but only through stubbornness do I get stuff to eventually work.

Im wondering if it is possible for a Duet to add a positive Z offset to be implemented at a specific layer in the g-code, I currently do this manually by editing my slicer g-code in notepad++

The Background of this is that I mainly print with PETG and after reels and reels of printing with the stuff I have found that around layer 5 I like to lift the nozzle by 0.2mm as this stops the dreaded PETG "boogers" from forming.

Another option for preventing boogers is that I have just bought half a dozen of these new Nozzle "X"'s from E3D, we will see how they perform.

But it would be really nice to not have to edit my slicer g-code every print.

@CaLviNx Sorry I can't help - I'd guess some sort of conditional gcode/macro would do the job but I'll let someone more knowledgeable that I answer that. But your technique of lifting the nozzle slightly fascinates me and I must give it a try. I guess you have no problem with layer adhesion otherwise you wouldn't do it. Is it something that you do only once on layer 5 or do your repeat it every "n" layers?

I only have it lift once as I kind of "squish" (as much as you can with PETG anyway) for the the first 5 layers then lift the nozzle, and its only 0.2mm, been doing it for years I thought everyone overcome the PETG boogers this way.

Only other thing I spent lots of time on was the getting my ooze control settings in S3D (extra restart & coast distance) to my liking as before I optimised them I was sometimes getting small blobs at the start and end of direction changes.

I should add that I know you can add an extra process in S3D and have a global offset at a certain layer/height, but having more than one printer has led to me inadvertently deleting the additional process when i go to slice something else in an other material and getting puzzled/grumpy at my print stopping at layer 5......

@CaLviNx Ah OK. I don't have a need for the initial "squish" with my setup so may not see any benefit from that Z lift. TBH I hadn't come across that technique before (but I lead a sheltered life and maybe need to get out more).

I don't really get the "boogers" but I've never been able to completely eliminate stringing with PET-G - almost eliminated with tuning firmware retraction, pressure advance, fast travel speeds etc, but not completely eliminated. Might try the odd 0.1mm Z lift here and there to see if it helps....

My coding skills are ZERO. I can navigate the duet g-code just about, but only through stubbornness do I get stuff to eventually work.

Im wondering if it is possible for a Duet to add a positive Z offset to be implemented at a specific layer in the g-code, I currently do this manually by editing my slicer g-code in notepad++

The Background of this is that I mainly print with PETG and after reels and reels of printing with the stuff I have found that around layer 5 I like to lift the nozzle by 0.2mm as this stops the dreaded PETG "boogers" from forming.

Another option for preventing boogers is that I have just bought half a dozen of these new Nozzle "X"'s from E3D, we will see how they perform.

But it would be really nice to not have to edit my slicer g-code every print.

There are "divisions of responsibility" between firmware and slicers, and doing a specific thing at a layer is very clearly the slicer.

Just saw in your reply it is S3D. Let me take a look for a super-easy way to automate this.

I do understand why you don't want to use multiple processes in S3D; it requires you to specify them every time, and therefore it is easy to miss.

What I'm going to suggest in the first screenshot below becomes a permanent part of an S3D profile, and therefore can't be forgotten or missed. G10 L20 P0 offsets the "current" coordinate system. Z0.2 is your desired offset. You MAY need Z-0.2, you'll have to try it and decide.

Note: It is important to REMOVE this offset before the NEXT print job. See the second screenshot for how to automate this, assuming the current job ends. If something goes wrong, reset the printer before the next print job.

I do nothing fancy, through trial and error I worked out I could successfully inject M290 S0.2 at the start of layer 6 of the generated g-code file, it effectively tells the duet to "baby-step" up by 0.2mm automatically, from layer 6 on.!