Page 7 of 8

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Mon Apr 23, 2018 9:40 am
by ILoveBoobies
ShaqFoo wrote: Tue Aug 04, 2015 1:13 am
KeyboardWarrior wrote:
Kyuubi wrote:I want post too the LCD "(current layer) of (layers)" on every layer change, is that possible?
Since there isn't a current layer or # of layers variable, this isn't currently doable. If you're looking to do this for time-measurement reasons, I don't think that # of layers is a great indicator of speed by the way, since some layers will take much longer than others.

For instance, a pyramids base layers will print much slower than the layers towards the tip.
Great post but he never asked about time measurement. The single biggest reason to display the layer height on the LCD screen is in the case of failed print so you know where to resume by LAYER #. Yes, you could do it by z height too, but visually seeing the layer number is easier to remember and find in the gCode file that S3D creates. S3D inserts the layer# and z height in the gcode for every layer printed but it puts inserts them as comments.

After reading the post, I was really intrigued by the terminal post processing window and was able to display both the layer # and the Z height on the LCD screen during the print for every layer printed. See attached pictures.

Place the following code in the post processing window and you will get layer number printed on your LCD screen along with the z height. The replace command simply removes the comment and replaces it with the M117 command. The second line is for formatting only it is not needed but tightens things up.

{REPLACE "; layer" "M117 Layer"}
{REPLACE " Z = " " Z="}
I like this but can't get it to show up on my LCD screen. I'm using Marlin 1.1.0 RC8. Does that have anything to do with it? Thanks in advance!

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Sun Dec 16, 2018 9:58 pm
by gearsawe
Why has all the post processing variables not been place on the main web site yet? because this post does not contain them all.
for example
{EXTENSION "g"}
changes the annoying long "gcode" extension to a short "g".
and wonder how many others where not documented.

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Wed Dec 19, 2018 8:27 am
by viet
gearsawe wrote: Sun Dec 16, 2018 9:58 pm Why has all the post processing variables not been place on the main web site yet? because this post does not contain them all.
for example
{EXTENSION "g"}
changes the annoying long "gcode" extension to a short "g".
and wonder how many others where not documented.
+1

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Thu Feb 28, 2019 12:09 pm
by tana4
How do you use postscript to do this?

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Tue Mar 03, 2020 3:25 pm
by dhopson
I saw [current_Z_position] mentioned in the first post. Is it possible to do something like wiping the nozzle every X layers? In this case its every 50 layers...

on layer change script

Code: Select all

{IF[current_position_z]%50=0} G1 X70 Y240 F3000 ; move to position in dock
{IF[current_position_z]%50=0} G1 X70 Y200 F3000 ; move out of dock
are there numerical operators we can use in these scripts?

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Wed Mar 04, 2020 10:45 am
by bas
Disable "Wait for temperature controller to stabilize before beginning build"

Add these temp settings to the Scripts: Starting Gcode:

Code: Select all

M104 [extruder0_temperature] T0; start extruder temp
M104 [extruder1_temperature] T1; start extruder temp
M140 [bed0_temperature]; start bed temp
M109 [extruder0_temperature] T0; wait for extruder temp
M109 [extruder1_temperature] T1; wait for extruder temp
M190 [bed0_temperature]; wait for bed temp

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Thu Mar 05, 2020 7:02 am
by XoTT@6bI4
dhopson wrote: Tue Mar 03, 2020 3:25 pm on layer change script

Code: Select all

{IF[current_position_z]%50=0} G1 X70 Y240 F3000 ; move to position in dock
{IF[current_position_z]%50=0} G1 X70 Y200 F3000 ; move out of dock
are there numerical operators we can use in these scripts?
Use:

Code: Select all

{IF "[current_position_z]%50==0"} G1 X70 Y240 F3000 ; move to position in dock
It uses javascript . You can use any js operators.

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Thu Mar 05, 2020 2:56 pm
by Beefi
Hi,

I wrote a PostProcessor to add some Features...quality and scripting improvements.
You can youse real If-Else-Decisions with it.

Here you can download it for free (please read the manual first): S3D-PostProcessor

Best regards,
Andi

Change the order Extruders Print

Posted: Mon Apr 06, 2020 8:27 am
by CZF
Hi,
i need some advice on how i can change the order in wich the extruders work in a 2 component print.
Usually they work like this:
T0
T1
Layer Change
T1
T0
...and vice versa.
I, on the other hand, need it to begin printing every layer on the same extruder
T0
T1
Layer Change
T0
T1
Layer Change
...and so on.
Thanks in advance

EDIT: Found a solution:
If you split the print into 2 processes (1 per component) and make the first layer hight a bit bigger by a minimalistic amount on one of them, simplify will print this process as the second one in EVERY LAYER. Alternatively you could adjust the global g-code offset in one of the processes

Re: Tip of the Day 8- Scripts tab, G-Code

Posted: Thu Apr 16, 2020 3:12 pm
by multicopter
hi

does anymone now what is the g-code in the "Tool Change Script" fore following case:

right after toolchange i want that the new toolhead first extrude (right in the parking position, so no move ) 50mm of material, befor he start to print?

the actually Tool Change Script is:

{IF NEWTOOL=0}M106 S255 T0
{IF NEWTOOL=0}M106 S0 T1
{IF NEWTOOL=1}M106 S255 T1
{IF NEWTOOL=1}M106 S0 T0


thanks,

andy