Page 1 of 1
Lower Bed After Print Using Variable?
Posted: Wed Jan 18, 2023 9:17 am
by wirlybird
I'd like to add a variable to the end script that is used in another slicer to lower the bed after a print.
This is the statement in the other slicer - the section in BOLD is the variable that moves the bed lower.
The specific variable is "max_layer_z" I haven't been able to find a corresponding one for S3D.
M17 Z0.4 ; lower z motor current to reduce impact if there is something in the bottom
{if (max_layer_z + 100.0) < 250}
G1 Z{max_layer_z + 100.0} F600
G1 Z{max_layer_z +98.0}
{else}
G1 Z250 F600
G1 Z248
{endif}
M400 P100
M17 R ; restore z current
Re: Lower Bed After Print Using Variable?
Posted: Thu Jan 19, 2023 2:13 pm
by S3D-Jason
Is max_layer_z supposed to be the highest Z-position of the print? If so, you could use the [build_max_z] variable in S3D.
Re: Lower Bed After Print Using Variable?
Posted: Thu Jan 19, 2023 2:16 pm
by wirlybird
I think so but let me check on this.
UPDATE:
Ok, here is what I found on a Prusa site. I think this may apply since Bambu Studio is somewhat based on Prusa slicer.
max_layer_z: The maximum height of your sliced print. Note that this is only evaluated a SLICE time, not at PRINT time. This is a value in the slicer that is set to the maximum height of your print in mm.
P.S. First test prints using S3D on the Bambu X1 Carbon did well.
There are a few things in the slicer settings that need to be adjusted. Acceleration and jerk are one. It seems S3D is using the "MAX" values set in Bambu Studio and not the actual values used for slicing.
Also, first layer height and width are a little excessive. Caused some pretty good over extrusion on the first layer!
Re: Lower Bed After Print Using Variable?
Posted: Thu Jan 19, 2023 3:31 pm
by wirlybird
S3D-Jason wrote: ↑Thu Jan 19, 2023 2:13 pm
Is max_layer_z supposed to be the highest Z-position of the print? If so, you could use the [build_max_z] variable in S3D.
Ok, I gave this a try and it did not work. May be how the "IF" statement is constructed.
Here is what I currently have.
{if ([build_max_z] + 100.0) < 250}
G1 Z{[build_max_z] + 100.0} F600
G1 Z{[build_max_z] +98.0}
{else}
G1 Z250 F600
G1 Z248
{endif}
Re: Lower Bed After Print Using Variable?
Posted: Mon Jan 23, 2023 5:41 pm
by S3D-Jason
I believe the V5 syntax is this:
{IF "[build_max_z] > 250"}G1 Z10
You have to put the conditional in double quotes.
Re: Lower Bed After Print Using Variable?
Posted: Thu Jan 26, 2023 11:23 am
by wirlybird
S3D-Jason wrote: ↑Mon Jan 23, 2023 5:41 pm
I believe the V5 syntax is this:
{IF "[build_max_z] > 250"}G1 Z10
You have to put the conditional in double quotes.
Didn't work.