ILoveBoobies
Posts: 1
Joined: Fri Apr 20, 2018 6:50 pm

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

Mon Apr 23, 2018 9:40 am

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!

gearsawe
Posts: 143
Joined: Sun Sep 10, 2017 11:06 pm

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

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.

viet
Posts: 2
Joined: Wed Dec 12, 2018 1:22 am

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

Wed Dec 19, 2018 8:27 am

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

tana4
Posts: 5
Joined: Tue Nov 28, 2017 10:47 am

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

Thu Feb 28, 2019 12:09 pm

How do you use postscript to do this?
Attachments
exx.JPG

dhopson
Posts: 1
Joined: Tue Mar 03, 2020 3:09 pm

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

Tue Mar 03, 2020 3:25 pm

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?

bas
Posts: 2
Joined: Mon Feb 20, 2017 1:23 pm

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

Wed Mar 04, 2020 10:45 am

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

XoTT@6bI4
Posts: 17
Joined: Mon May 27, 2019 4:02 am

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

Thu Mar 05, 2020 7:02 am

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.

Beefi
Posts: 5
Joined: Tue Feb 18, 2020 6:13 pm

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

Thu Mar 05, 2020 2:56 pm

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

Return to “General Discussion and Tips”