Khaos
Posts: 4
Joined: Mon Feb 07, 2022 7:45 am

Post processing variables

Hi,

i tryed to find a list of all the variables available in the post-processing scripts. Sadly I wasn't successfull in my search.

Can you please point me in the right direction?
S3D-Jason
Posts: 1402
Joined: Sun May 31, 2015 6:01 am

Re: Post processing variables

We are actively working on more documentation for these variables.

Are there any variables you need to know right now that I can help with?
blj1884
Posts: 45
Joined: Mon Jan 30, 2017 8:34 am

Re: Post processing variables

Yes, I would like to know if there is an,

if layer = 1 then "gcode to run"

I want to adjust flow for first layer, then change it back after.

OR, have a first layer setting for flow? I know, first layer width, but that doesn't give "me" control on flow directly so I can have a "tune"-able machine setting. Does that make since?

Thank you
S3D-Jason
Posts: 1402
Joined: Sun May 31, 2015 6:01 am

Re: Post processing variables

blj1884 wrote: Mon Jan 02, 2023 4:37 am Yes, I would like to know if there is an,

if layer = 1 then "gcode to run"

I want to adjust flow for first layer, then change it back after.

Sure - you could try placing this in the Pre Layer Change script:

{IF "[current_layer_number] == 1"}M221 S120 ; increase flow rate by 20% for layer 1
{IF "[current_layer_number] == 2"}M221 S100 ; reset flow rate to 100% for layer 2 and beyond
Smoky312
Posts: 5
Joined: Wed Jan 04, 2023 2:00 pm

Re: Post processing variables

I'm looking for a post processing variable for the prime pillar. I'm using a prime pillar infill percentage of 10% which is now selectable but is for the whole pillar. With a tool change I want the pillar infill switching to 100% for that layer to completely wash my single extruder.
blj1884
Posts: 45
Joined: Mon Jan 30, 2017 8:34 am

Re: Post processing variables

Thank you! :)
S3D-Jason
Posts: 1402
Joined: Sun May 31, 2015 6:01 am

Re: Post processing variables

Smoky312 wrote: Wed Jan 04, 2023 5:24 pm I'm looking for a post processing variable for the prime pillar. I'm using a prime pillar infill percentage of 10% which is now selectable but is for the whole pillar. With a tool change I want the pillar infill switching to 100% for that layer to completely wash my single extruder.
I don't think you can change the infill percentage through the gcode scripts. However, you could probably use Tools > Variable Settings Wizard to accomplish the same thing. Just create a new zone where you want to use the higher prime pillar infill percentage.
Smoky312
Posts: 5
Joined: Wed Jan 04, 2023 2:00 pm

Re: Post processing variables

Making a new process for every tool change is too much work for some models.


But would it be possible to implement this feature into the application: Every tool change, set prime pillar infill to 100% and when tool change complete, back to preset infill percentage(like 5 or 10%)?
That would safe a lot of time and filament.
S3D-Jason
Posts: 1402
Joined: Sun May 31, 2015 6:01 am

Re: Post processing variables

Smoky312 wrote: Wed Jan 11, 2023 3:03 pm But would it be possible to implement this feature into the application: Every tool change, set prime pillar infill to 100% and when tool change complete, back to preset infill percentage(like 5 or 10%)?
That would safe a lot of time and filament.
That would be a great idea to add to the Feature Request subforum! That way we can see how many other users are interested in it.
S.Oesterle
Posts: 1
Joined: Thu Jan 26, 2023 10:47 am

Re: Post processing variables

Hello,

I'm searching for a way of changing the G-Code conditionally with post-processing.
S3D-Jason wrote: Tue Jan 03, 2023 10:31 am Sure - you could try placing this in the Pre Layer Change script:

{IF "[current_layer_number] == 1"}M221 S120 ; increase flow rate by 20% for layer 1
{IF "[current_layer_number] == 2"}M221 S100 ; reset flow rate to 100% for layer 2 and beyond
This looks very interesting!


The firmware I'm using differentiates between travel movement and action movement by use of G0 and G1 respectively. The G0 and G1 commands are handled differently within the firmware in terms of velocity, acceleration and the transition from one to the other.

That's why I would want to change G1 to G0 for every line that is not using the E-dimension.

So

Code: Select all

G1 X123.235 Y112.592 E639.7060
G1 X126.912 Y157.073 F6000
G1 X130.566 Y175.831
would become

Code: Select all

G1 X123.235 Y112.592 E639.7060
G0 X126.912 Y157.073 F6000
G0 X130.566 Y175.831

Is that possible with use of {IF ...} and {REPLACE ..} or are there any other commands that I could use?

Return to “General Discussion and Tips”