Adding a +Z offset at a specific layer ?
-
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.