Adding a +Z offset at a specific layer ?
-
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.
Those two lines should make it "automagic".
-
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.!
-
You could put that M290 in where I was showing the G10.
-
Thanks, I will test and report.
I already have M290 R0 S0
To clear any baby stepping in my start & end scripts.I was thinking about the layer change tab but needed to work out what the actual code for that should be, as i didnt know it was possible to define a layer with the M290 command
-
WAIT!!
I just realized my solution has a huge hole in it (one of your comments triggered the thought).
The way I suggested, the commands in that box would get applied at EVERY layer. That won't work.
Let me check for an easy way to do them once, at a few mm / layers up.
-
This is what you want. In the box circled in the diagram below, place:
{REPLACE "; layer 6" "M290 S0.2\n; layer 6"}
-
Just tested that, and it worked perfectly. These lines are about 1300 down into the G-Code file:
G1 X81.267 Y106.723 E1.9034 G92 E0.0000 G1 E-1.0000 F1800 M290 S0.2 ; layer 6, Z = 1.200 ; feature inner perimeter G1 Z1.200 F1000 G1 X79.550 Y104.482 F4800
-
@Danal, Very elegant.
Will the +0.2 offset accumulate over successive prints?
-
@zapta said in Adding a +Z offset at a specific layer ?:
@Danal, Very elegant.
Will the +0.2 offset accumulate over successive prints?
It would, but he already has the code in his end G-code to reset it.
And... if the job does not run to completion, a full printer reset is always a good idea. Who knows what all was set in a given job?
-
Thanks for the update.
Time for me to go and try to learn about conditional g-code it would appear...
-
@CaLviNx said in Adding a +Z offset at a specific layer ?:
Thanks for the update.
Time for me to go and try to learn about conditional g-code it would appear...
The conditional here is in the slicer, not the gcode.
-
REPLACE is a Simplify3D command, first string is what to look for, second is the replacement.
-
The { } cause Simp to regard the whole thing as a script,
-
The box it is in causes it to run when all the Gcode is done, but before the file is saved.
-
-
I managed to get time to test that small script you wrote, it works perfect.
Thanks for the assistance.