nka
Posts: 7
Joined: Wed Aug 05, 2015 8:11 am

Layer Change Script for Raft

Hello,

I'm currently adding this before my layer 7 (layer 6 is the last layer of my Raft).

Code: Select all

; nka adding
G1 E-5.0000 F1800
G1 Z10 F1800
M109 S110 T0
M109 S210 T0
; copy last line above
G1 E-2.0000 F1800
G1 Z2.997 F7200
I'm wondering if there's any way to do it directly with the "layer change script" ?

The goal of that, is to raise the nozzle, retract a lot and make the printer "wait" a little (using the trick of cooling and heating the nozzle) to let the raft cooling so the print don't stick too much on it.
JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: Layer Change Script for Raft

Just add the following command into your post processing commands section (on the Scripts tab)

{REPLACE "; layer 7\n" "; layer 7\nCommand 1\nCommand 2\nCommand 3\n"}

Where command 1, command 2, and command 3 are just whatever commands you want to insert. So it may look like:

{REPLACE "; layer 7\n" "; layer 7\nG1 E-5.0000 F1800\nG1 Z10 F1800\nM109 S110 T0\n"}

And so on
nka
Posts: 7
Joined: Wed Aug 05, 2015 8:11 am

Re: Layer Change Script for Raft

Oh, so I must use post processing... thanks!
Nightram
Posts: 17
Joined: Tue Oct 20, 2015 5:43 am

Re: Layer Change Script for Raft

can this be used to change the speed of a certain layer?
nka
Posts: 7
Joined: Wed Aug 05, 2015 8:11 am

Re: Layer Change Script for Raft

I guess you could, but it will be a lot of job, as you will have to modify EACH commands under the layer you wish... better go edit the .gcode directly, changing the Fxxx for that layer.
nka
Posts: 7
Joined: Wed Aug 05, 2015 8:11 am

Re: Layer Change Script for Raft

So, I finally did it... working, but with some bugs.

This is the line I need to add.

Code: Select all

{REPLACE "; layer 7, Z = 2.4973" "\n; nka adding\nG1 E-5.0000 F1800\nG1 Z10 F1800\nM109 S110 T0\nM109 S210 T0\nG1 E-2.0000 F1800\nG1 Z2.997 F9000\n\n; layer 7, Z = 2.4973"}
But there's two problems.

1) Simplify3D add a "post-processing" line in the header (sumarry setting), that contain those line return. There for, they are considered as commands.

2) When reloading Simply3D, he's getting ride of the ',' in the line, so it's not matching anymore.

:(
Tesse
Posts: 8
Joined: Mon Dec 07, 2015 3:33 pm

Re: Layer Change Script for Raft

Hi,

I got the same problem. See viewtopic.php?f=8&t=1959&p=17737#p17737


Tesse
CompoundCarl
Posts: 2005
Joined: Wed Aug 05, 2015 7:23 am

Re: Layer Change Script for Raft

nka wrote:But there's two problems.

1) Simplify3D add a "post-processing" line in the header (sumarry setting), that contain those line return. There for, they are considered as commands.

2) When reloading Simply3D, he's getting ride of the ',' in the line, so it's not matching anymore.
If you want to get rid of that one line in the header, just put the following at the beginning of your post-processing commands (before the replacement commands)
{STRIP "; postProcessing"}

Then to fix your replacement stuff, try the line below. It works fine for me!
{REPLACE "Z = 2.4973\n" "Z = 2.4973\n; nka adding\nG1 E-5.0000 F1800\nG1 Z10 F1800\nM109 S110 T0\nM109 S210 T0\nG1 E-2.0000 F1800\nG1 Z2.997 F9000\n"}
nka
Posts: 7
Joined: Wed Aug 05, 2015 8:11 am

Re: Layer Change Script for Raft

Oh good idea, thanks!

Return to “General Discussion and Tips”