AndrewEllis93 / Print-Tuning-Guide

1.94k stars 258 forks source link

EM Calibration with PrusaSlicer #74

Open jleutgeb1 opened 1 year ago

jleutgeb1 commented 1 year ago

In the Extrusion Multiplier Section for PrusaSlicer it is stated that "There is no way to set the EM per object. You will have to print the test objects one at a time."

With the PrusaSlicer Macro Language introduced in 2.6.0-alpha6 there is now a way.

In "Printer Settings">"Custom G-code" one can add the "Start G-code":

{ global flowtestrate = 100; "M221 S" + flowtestrate; }

and under "Between objects G-code (for sequential printing)":

{ flowtestrate = flowtestrate - 2 ; "M221 S" + flowtestrate ; }

This will decrease the flowrate by 2 for each object when "Sequential printing" is enabled under "Print Settings">"Output options". It might also be useful for other calibrations where there is no built-in modifier.

I wanted to share this info if maybe someone else finds it useful. If there is an easier way, please let me know.

myevo8u commented 1 year ago

I also created a post processing script for this yesterday for this as well! https://github.com/myevo8u/Prusa-Slicer-Extrusion-Multiplier-Calibration-Script

dotrey commented 1 year ago

Based on @myevo8u's script (which I couldn't get to run), I used the G-code substitutions in PrusaSlicer 2.6:

This method has the downside(?) that the M221 command is added after every layer change, because the object label is added after every layer change. This is more often than necessary, but as far as I can tell it shouldn't cause issues.

Also, the regex could be improved to only work with valid numbers, as the current one will work with something like em-0.1.2 and add a M221 S0.1.2.

I prefer this way over the Between objects G-code (for sequential printing) of @jleutgeb1 or the version in #75 because I can easily define which object will be printed with a certain extrusion multiplier, and can also vary freely which extrusion multipliers I want to test (e.g. sth like 100%, 99%, 98.7%, 98.235%, 95% all on the same plate).

hiltonjanfield commented 1 year ago

Based on @myevo8u's script (which I couldn't get to run), I used the G-code substitutions in PrusaSlicer 2.6:

This was an interesting solution I hadn't thought of, which I might start using because it isn't tied to printer settings - therefore I can use the same 3mf file for multiple printers without any manual editing. The only thing I don't like about it is that it requires manually renaming all the objects rather than changing a variable or two. One enhancement I might suggest is to allow filenames (and perhaps Ellis renames his labeled objects to compatible filenames, e.g. em-97.5.stl instead of EM_Cube-0.975.stl) so that you can simply drag and drop whichever you want into the slicer, click Arrange, and print. No need to worry about placement or order since they're all labeled.

For the record, I am currently using the following setup, enhanced from @jleutgeb1's original post (which is enhanced over the one I came up with in #75 before seeing this post):

; Add to Start G-Code, adjust values
; Object 1 will print at the flow rate specified; each subsequent object will have the flow rate increased by the specified increment rate. Set increment to a negative value to go from high to low instead.
{
global flowtestrate = 97;
global increment = 0.5;
"M221 S" + flowtestrate;
}

; Add to Between objects G-code
{
flowtestrate = flowtestrate + increment;
"M221 S" + flowtestrate;
}
totalguy commented 12 months ago

Is there a video on how to do this all this text is very overwhelming and i am really confused. I work much better with visuals text is just too much! ive got the usual issue i cant add an instance of filament on Prusa slicer then extrusion multiplier.

is there a simple way to do this workaround? everyones talking about code here and there and i just cant get my head around it. ive prusa slicer 2.6.1 and a prusa style printer AM8MU