#Before layer change - pressure advanced

1 messages · Page 1 of 1 (latest)

spring wigeon
#

I'm trying to figure out my pressure advance a little different for a project i'm running. I would really like to do it like I did my fan test. Does anyone know what I would need to do something like this but for pressure advanced?... I would really like it to change every layer instead of every 10 if possible. I searched and couldn't find anything. Thanks for any help, Cody

;BEFORE_LAYER_CHANGE - fan
G92 E0.0
;[layer_z]
{if layer_z>=1.05} M104 S220 M109 S220 {endif}
{if layer_z>=11.05} M104 S225 M109 S225 {endif}
{if layer_z>=21.05} M104 S230 M109 S230 {endif}
{if layer_z>=31.05} M104 S235 M109 S235 {endif}
{if layer_z>=41.05} M104 S240 M109 S240 {endif}
{if layer_z>=51.05} M104 S245 M109 S245 {endif}
{if layer_z>=61.05} M104 S250 M109 S250 {endif}
{if layer_z>=71.05} M104 S255 M109 S255 {endif}
{if layer_z>=81.05} M104 S260 M109 S260 {endif}

dark trail
#

What firmware are you using

spring wigeon
#

Whatever you call bambu x1c firmware.

#

I've got this, but haven't tried it yet. I found it in an old post. I don't know if it will work or not. I do see m900 is used in orca tower tests. changes every 10 layers for 300 layer test.

#

;BEFORE_LAYER_CHANGE 300 layer test
;[layer_z]
{if layer_z <= 1}
M900 K0.02
{elsif layer_z <= 51}
M900 K0.03
{elsif layer_z <= 101}
M900 K0.04
{elsif layer_z <= 151}
M900 K0.05
{elsif layer_z <= 201}
M900 K0.06
{elsif layer_z <= 251}
M900 K0.07
{endif}

#

I would really like finer detailed changes per layer, but...

spring wigeon
#

I guess once it close i can change the number to .xxx

mint rose
#
{elsif layer_z == 2}M900 K0.01
{endif}```
spring wigeon
spring wigeon
mint rose
#

It will change before each layer, you just have to follow the same scheme for as the amount of layers as there will be or you want to

mint rose
spring wigeon
#

Ok, so for a 60mm test piece that would have 300 layers at .2 layer height, I would have to copy, paste, and edit this number 300 times?

mint rose
#

yes, no other choice because Orca doesn't support custom vars

#

that said, 300 layers seems a bit exaggerated for testing PA, if that's the goal

spring wigeon
#

I thought there would be a way to 1. Read K valve 2. add .001 to k valve at next layer

mint rose
#

this would have been possible with something like this M900 {pressure_advance[0] + 0.05} but pressure_advance is not updated at each layer, it's the global setting defined in the filament preset (read only value)

spring wigeon
#

I basicly want to run the PA Tower code on my own Test STL. I want to put the seams and corners the way I want to test them.

mint rose
#

your bambu machine runs a variant of klipper (probably) so I think it would be possible to tell Orca to call a macro, instead of making an if statement 300 times

#

basically something like [get current PA, add a value, set new PA]

mint rose
#

is your OS Windows?

spring wigeon
mint rose
#

I was just thinking about writing a little CMD script that would make avoiding the annoying copy/paste task

#

but this would make more sense to do it in a sheet so every one could benefit

mint rose
#

no, it's a hassle in cmd format since defining floating values to vars is not supported