#Alterations to Elli's Pause macro.

151 messages · Page 1 of 1 (latest)

cobalt pond
#
  • Introduction
    *Printer Used: Biqu Hurakan
    Toolhead Used: Biqu H2 V2S Direct Drive 0.4mm HS Nozzle

I am using Elli's Pause/Resume macro's and one thing stood out to me which is quite a pain in the rear end and that is the time it takes resume. https://ellis3dp.com/Print-Tuning-Guide/articles/useful_macros/pause_resume_filament.html.
I am having a little frustration with the resume portion.

The concept works as intended not here to debate that, the pause will pause the printer and park the toolhead front centre of the bed for easy filament changes at a certain z hop height. (I adjusted the height because Z10 is too low for my taste when I may wish to clean the nozzle before resuming. The Resume function is where it grinds my gears, I don't mind that it turns the heaters off for safety (is also a an easy fix to just comment this out)

  • The problem which needs resolution.
    When the printer overshoots it will wait for it to cool down to the very exact digit before it will continue and this is a problem without a nozzle wipe because in the mean time it just oozes like crazy.
    So I would like if possible that this macro uses the same functionality as my start print where it uses the the temprature wait to wait but instantly resume once target has been reached instead of hold for exact target.
    Somewhere in this section lies the what needs adjusting

  • Section of Macro which needs alteration.

[gcode_macro RESUME]
rename_existing: BASE_RESUME
variable_zhop: 0
variable_etemp: 0
gcode:
    # Parameters
    {% set e = params.E|default(2.5)|int %}                                          ; hotend prime amount (in mm)

    {% if printer['pause_resume'].is_paused|int == 1 %}
        SET_FILAMENT_SENSOR SENSOR=SFS ENABLE=1                                      ; enable filament sensor
        #INITIAL_RGB                                                                 ; reset LCD color
        SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout}  ; set timeout back to configured value
        {% if etemp > 0 %}
            M109 S{etemp|int}                                                        ; wait for hotend to heat back up
        {% endif %}
  • Possible Solution?
    Now I am not 💯 sure, but I believe removing the {% if {% endif %} statement and right after SET_IDLE_TIMEOUT TIMEOUT we could use a TEMPERATURE_WAIT SENSOR=extruder to re-heat not hold for target.
    In the pause macro it saves the current temperature under a param called etemp.
    SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target}    ; set hotend temp variable for reference in resume macro
  • **Expected outcome **
    Print Resumes, Hotend re-heats back to stored heating value and immediately resumes regardless if temperature overshoot by a few degrees to reduce time allowed to ooze holding for exact temperature.
glacial juniperBOT
#

Ahoi @cobalt pond!
It looks like you did not provide all the necessary information we need to help you.
Please upload your logfiles and a detailed description of your problem.
For further information see: https://docs.mainsail.xyz/faq/getting-help/discord#provide-information
Note: We only accept .log and .txt files as log files.
This is an automated message

We are glad to help and chat with you on our Community Discord, but if you need help and want the best support possible you should, follow a few simple rules:

cobalt pond
#

No, bad bot, there is no phsyical problem. I am just looking to alter a macro for convenience sake.

grave pawn
#

Still a log would tell us, what you did in your START_PRINT macro....

#

Oh and if you edit your original message more and more, it's hard to keep track on what was already there and what not ^^

#

I read it like 20min ago and then did something else first and now there are quite some new details appearing every few minutes ^^

#

Atm I would think your start macro just uses TEMPERATURE_WAIT as you already suggested as your own solution, that would explain why it's starting without waiting to stabilize

#

Also if it's really bad oozing, you might want to look at increasing the retract. Mine is also oozing a bit, but not that much that it would create any problem

cobalt pond
cobalt pond
cobalt pond
#

I guess at this point I am just making sure I am putting it into the right area of the macro and it indeed will re-call the stored param in the pause macro which stored the jobs heat temp at the time pause was run.

grave pawn
cobalt pond
#

Yeah ok, I wanted to add that OP but I cannot attach anything there now I don't think

grave pawn
#

Your print_start still uses M109 btw, it just preheats bed and nozzle and wait roughly for it

#

So the thing you should adjust, if you really only want a rough temp would be:

[gcode_macro RESUME]
rename_existing: BASE_RESUME
variable_zhop: 0
variable_etemp: 0
gcode:
    # Parameters
    {% set e = params.E|default(2.5)|int %}                                          ; hotend prime amount (in mm)

    {% if printer['pause_resume'].is_paused|int == 1 %}
        SET_FILAMENT_SENSOR SENSOR=SFS ENABLE=1                                      ; enable filament sensor
        #INITIAL_RGB                                                                 ; reset LCD color
        SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout}  ; set timeout back to configured value
        {% if etemp > 0 %}
            M104 S{etemp|int}                                                        ; wait for hotend to heat back up
            TEMPERATURE_WAIT SENSOR=extruder MINIMUM={etemp|int}
        {% endif %}
```This would only wait for the minimum temperature to be there
#

What did you choose to highlight the code like that?

#

I couldn't find anything suitable for gcodes yet

#

It's not that great highlighted but still better than nothing imo

#

The etemp condition should still be used, that it doesn't end up with some weird value

cobalt pond
#

it aint perfect tho

grave pawn
#

Oh, it's highlighting only after sending the message, with gcode...For python and so on it directly shows it

cobalt pond
cobalt pond
grave pawn
#

So M104 just sets the target temperature without waiting. That's why people use it to preheat and then continue with their other stuff

grave pawn
#

But, doesn't matter. Now I know 😄

#

Btw any reason why you preheat the nozzle to 160 and then wait for it to reach that temp in your START_PRINT?

cobalt pond
#

Yeah I had another admin here actually the person who wrote the mainsail.cfg help me with the start print macro so I could stabilize the bed temp and give it a rough extruder pre heat from idle so the bed was not just idle at room temp or fluctuating its not 100% necessary just I always pre-heat to 55c before jumping up too the target so I may as well just let it do that for me and stablize that roughly, along with ignoring that part if the bed is already heating or above 50/80

#

Nozzle I do it just to kick start the heating cycle

#

Since it is done before the bed anyway and that printer does not leak at that temp.

grave pawn
#

Furthermore the whole bed preheating seems pretty weird, as you make it in intervals anbd heating it to predefined values that aren'T your real values that would make more sense for a good mesh

cobalt pond
grave pawn
#

Furthermore heating the bed over 80 will end up never starting the print xD

cobalt pond
#

It ignores that

#

If its at 80 it skips

#

that whole wait

grave pawn
cobalt pond
#

My thread around why I wanted this is in here somwhere

grave pawn
#
{% if printer.heater_bed.temperature > 80.0 %}
    TEMPERATURE_WAIT SENSOR=heater_bed MAXIMUM=65
#

Oh wait MAXIMUM xD

grave pawn
cobalt pond
#

all good

#

I honestly don't remember myself why I insisted it be like that haha

grave pawn
#

But heating to to 55 and then making a mesh, will end up with a bad mesh if you have like 75 degree or similar

cobalt pond
#

I just remember I didn't want it flucutating at room temp for consitency

grave pawn
#

*could end up with a bad mesh

cobalt pond
#

and I usually print at 55c for PLA

#

so I just set it to that for the wait but now that mention it, be better off grabbing the target for the job instead in the wait for bed but if its over 80 just skip the wait and let it hold for target

#

Since I did notice that printing anything but PLA it will climb after the mesh which is something I had to take into account with my Z Offset

cobalt pond
#

then proceed to mesh instead of the fixed 55 or whatever value defined.

grave pawn
#

Wait I might be dumb again, but why exactly are you waiting for a MAXIMUM of 65 if your bed is over 80? A TEMPERATURE_WAIT won't do anything to your temp and will just wait, so if you actually would heat it over that, it would actually never get further. Furthermore your values before it are both lower, so that case should never happen, unless you had it heated up to 90° directly before that and then start that next print directly after it.

grave pawn
#

The bed takes way longer than the nozzle anyway

cobalt pond
#

IIRC it was written if a stall would happen it skips the temprature wait section.

#

So far I have noticed it just waits roughly for 55c with a max of 64 (for overshoot because I sometimes pre heat it myself to 60c manually)

#

Then it contines to mesh and waits for target of job

#

then prints

#

But considering what you said yes it would be less bullshit to just wait for target to begin with and mesh doing the bed pre heat before mesh then heating hotend as usual after all that parking stuff

grave pawn
#

Yes, that's exactly what it should do. But imo a bit weird to have a random 55 in there and after the mesh you get the real temp

cobalt pond
#

Yeah I mean it is a bit strange I have actually had a few months to contemplate that choice lol

#

it runs as intended but you are 100% correct.

#

It does sometimes produce qwirky meshes that result in frick stuffed 1st layer attempts

#

Not for normal material but high temp material yah

#

that temp def results in a layer height shift

#

like 55c to 90c or 110c is enough to throw the mesh way out

#

55 to 60 was what we OG talked about which is not that substantial in terms of thermal expansion,

grave pawn
#

Yes, that 5 degrees shouldn't matter normally, but those high temp stuff can really throw it off, that's why I was wondering about this way of preheating

cobalt pond
#

I would say it more or less creates situations where the Z offset is close to blocking nozzle more than anything

#

when I call for 90 or 110 or 80+ c after it has meshed at 55c then there is and has been potential for partial blocks or straight up being layers too close to print cleanly the 1st few layers.

cobalt pond
#

I see your point and it has been a issue that I have also noticed. Just 90% of my prints are between normal PLA temps.

#

Not something I ran into often.

#

Easier to just correct it now since I am in there again fixing a macro anyway.

#

Initially the point was to just get the bed up too a temp suitable for PLA so it was not trying to mesh while fluctuating at room temperature, however unessecary it may have been , it makes a lot more sense though if we are pre-pre heating to target bed temp before the mesh so the mesh is done at the requested target.

#

I don't exactly remember why I wanted the hotend to pre-heat while meshing that part can probably just go away tbh I don't think I ever made use of that part but I think I had it running simply so I could brush the nozzle quickly, but again this makes less sense since parking is a better time to do that when its getting up to proper temp and I am actually in middle of adding a Silicon nozzle wipe addition and function so this even is rendered pointless.

grave pawn
#

The preheat of the nozzle, at least, starting to preheat before the meshing, can make sense if you don't want to wait "a long time" for the nozzle to completely heat up

#

I'm currently waiting for bed mesh, then home, wait a small soak time, start heating the nozzle and then do my mesh. After the mesh the nozzle should be up to temp and I can purge.

#

Ok, I might should do the nozzle preheat before the soaking. I'm not really sure, where it makes more sense ^^

cobalt pond
#

Yeah that was the gist of why I asked for it lol

#

Just to kick start the final temp later and have it pre-heat to a sensible no ozze temp

#

while it meshes

#

let it soak basically

grave pawn
#

The oozing shouldn't matter if you purge. Unless it's oozing bad enough that it falls onto you bed

cobalt pond
#

Nah the ozze was not a issue on either printer only 1 of them while it was paused

#

liked to ooze.

#

The other printer does not do it at all when paused.

#

So I think you are on the $ with the retraction needs to be more for that other one.

#

The insane amount I noticed is maybe caused more so by fact I am paused at soak temp with PETG loaded

#

so its sitting there just past 245c waiting to come down to 245 lol

#

Which is enough for that particular nozzle to leak pretty bad like it just keeps oozing at that temp

#

I noticed with lower temps around PLA it oozed a little bit enought to slightly upset layer surface finishes but not really anything to worry about for infill stages

#

It does not ooze while parked though which is odd.. quite likely the fact the park actually does soak and retract before the purge.

#

While the Pause routine does not retract at all it seems

cobalt pond
grave pawn
#

I meant the start_print not the pause

cobalt pond
#

yeah that does not leak

#

its only the pause macro that leaks and only on this unique machine

grave pawn
cobalt pond
#

hence I think you are on the $ its not retracting for this machine

#

and it maybe wants some retract in the pause

grave pawn
#

It's inside the _TOOLHEAD_PARK_PAUSE_CANCEL macro

cobalt pond
#

ah yes I will take a look that.

#

and pinch that for the pause macro

#

I fixed the issue in this thread I think tho

#

I added the intended wait as expressed by yourself above earlier I won't worry about mirroring these to my other machines yet I will make some further adjustments to the print start as well as the pause 1st
since I think its best to also have the pre-soak happen at the actual target temp like you said earlier than the 55c

#

However this might be troublesome as I don't quite understand how to correct this lol

#

SInce there is a few clauses in there at this point to wait and not wait

#

I think and correct me if I am mistaken
all of this goes

#

and I change the here in the S55

#

To instead get the jobs target temp

grave pawn
#

You should wait at some point for the bed temp. So either wait for stablizing or at least wait for the target temp as minimum

cobalt pond
#

ok so um

#

I want to put

M140 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # set bed temp
M190 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # wait for bed temp

In

  M117 Stabilizing Idle Bed and Nozzle Temps.
  {% if (printer.heater_bed.target == 0) %}   # skip preheating if bed is on
    {% if printer.heater_bed.temperature > 50.0 %} # heat bed depending on sensor temp
      M140 S55
    {% else %}

remove the M140 S55

#

and delete these

    {% if printer.heater_bed.temperature > 80.0 %}
      TEMPERATURE_WAIT SENSOR=heater_bed MAXIMUM=65
    {% elif printer.heater_bed.temperature < 50.0 %}
      TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=34 MAXIMUM=46

from the %if function

grave pawn
#

Just try it yourself first and send me the whole thing. I will correct the issues I can see then

cobalt pond
#

Ok sorry for the running commentary on what I believe to be what I have to do I will just make the adjustment and send the start macro whole.

#

@grave pawn Is this correct?

[gcode_macro START_PRINT]
description: Start print routine.
gcode:
  M117 Starting Pre-Print Routine.
  M117 Homing Printer...
  G28
  M117 Stabilizing Idle Bed and Nozzle Temps.
  {% if (printer.heater_bed.target == 0) %}   # skip preheating if bed is on
    {% if printer.heater_bed.temperature > 50.0 %} # pre-soak bed up too print job temp
  M140 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # set bed temp
  M190 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # wait for bed temp
    {% endif %}
    M104 S160
    TEMPERATURE_WAIT SENSOR=extruder MINIMUM=159 MAXIMUM=161
    {% endif %}
  {% endif %}
  # M117 Tramming Gantry. ; optional only used for machines with ZTILT and if desired.
  # Z_TILT_ADJUST
  M117 Adaptive Bed Mesh Started.
  BED_MESH_CALIBRATE # KAMP Adaptive Mesh
  Probe_Stow
  SMART_PARK # Park before pre-heating
  M117 Heating Extruder & Bed to Print Temps!
  M140 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # set bed temp
  M104 S{params.EXTRUDER_TEMP|default(printer.extruder.target, true) } # set extruder temp
  M190 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # wait for bed temp
  M109 S{params.EXTRUDER_TEMP|default(printer.extruder.target, true) } # wait for extruder temp
  LINE_PURGE
  SET_FILAMENT_SENSOR SENSOR=SFS ENABLE=1  ; Enable filament sensor
  M117 Printing!
grave pawn
#

You can delete M140 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # set bed temp at the top, as M190 will already do exactly that. At the bottom you can also delete M140 and M190

#

And there is one {% endif %} too much.

cobalt pond
#

@grave pawn Now for the new Pause Macro

[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
    # Parameters
    {% set z = params.Z|default(30)|int %}                                                   ; z hop amount

    {% if printer['pause_resume'].is_paused|int == 0 %}
        SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={z}                              ; set z hop variable for reference in resume macro
        SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target}    ; set hotend temp variable for reference in resume macro

        SET_FILAMENT_SENSOR SENSOR=SFS ENABLE=0                                              ; disable filament sensor
        SAVE_GCODE_STATE NAME=PAUSE                                                          ; save current print position for resume
        BASE_PAUSE                                                                           ; pause print
      {% if printer.extruder.can_extrude|lower == 'true' %}                                  ; check extruder can extrude
        M83                                                                                  ; E relative positioning
        G1 E-{extrude} F2100                                                                 ; preform retract to prevent ooze
        {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
      {% else %}
        {action_respond_info("Extruder not hot enough!")}                                    ; don't extrude and display message if extruder not enough to retract
      {% endif %}
        {% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %}       ; check that zhop doesn't exceed z max
            G91                                                                              ; relative positioning
            G1 Z{z} F2700                                                                    ; raise Z up by z hop amount
        {% else %}
            { action_respond_info("Pause zhop exceeds maximum Z height.") }                  ; if z max is exceeded, show message and set zhop value for resume to 0
            SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0
        {% endif %}
        G90                                                                                  ; absolute positioning
        G1 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} F6000   ; park toolhead at front center
        SAVE_GCODE_STATE NAME=PAUSEPARK                                                      ; save parked position in case toolhead is moved during the pause (otherwise the return zhop can error)
        M104 S0                                                                              ; turn off hotend
        SET_IDLE_TIMEOUT TIMEOUT=43200                                                       ; set timeout to 12 hours
    {% endif %}
#

I have the neccesary changes to the start gcode as you requested.

grave pawn
#

The PAUSE seems fine ig. No expert tbh ^^

#

You need to adjust your RESUME too ofc

#

Btw please don't ping me. I get there if I have time for it

cobalt pond
#

Adjusted Start Macro with corrected comments since we have moved to a pre-soak method.

description: Start print routine.
gcode:
  M117 Starting Pre-Print Routine.
  M117 Homing Printer...
  G28
  M117 Pre-Soak Bed and Nozzle.
 {% if (printer.heater_bed.target == 0) %}   # skip preheating if bed is on
    {% if printer.heater_bed.temperature > 50.0 %} # heat bed depending on sensor temp
  M190 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # wait for bed temp
    {% endif %}
    M104 S160
    TEMPERATURE_WAIT SENSOR=extruder MINIMUM=159 MAXIMUM=161
 {% endif %}
  # M117 Tramming Gantry. ; optional only used for machines with ZTILT, only if desired.
  # Z_TILT_ADJUST
  M117 Adaptive Bed Mesh Started.
  BED_MESH_CALIBRATE # KAMP Adaptive Mesh
  Probe_Stow
  SMART_PARK # Park before pre-heating
  M117 Heating Extruder to final Print Temp!
  M104 S{params.EXTRUDER_TEMP|default(printer.extruder.target, true) } # set extruder temp
  M109 S{params.EXTRUDER_TEMP|default(printer.extruder.target, true) } # wait for extruder temp
  LINE_PURGE
  SET_FILAMENT_SENSOR SENSOR=SFS ENABLE=1  ; Enable filament sensor
  M117 Printing!```
cobalt pond
#

it seems it primes at the start

#

G1 Z{zhop * -1} E{e} F900 ; prime nozzle by E, lower Z back down

grave pawn
#

Oh, I oversaw that ^^

cobalt pond
#

is set at the top with

    {% set e = params.E|default(2.5)|int %}                                          ; hotend prime amount (in mm)```
#

Suppose I better go test a print and see if it all works

#

pre soak the bed did not engage bed heating at all

#

You sure we don't need M140 at the top

grave pawn
#

Let me check real quick

#

M190 works alone

#

Just tested on the console to confirm it

#

I oversaw this:
{% if printer.heater_bed.temperature > 50.0 %} # pre-soak bed up too print job temp
Remove it

cobalt pond
#

ah yess I was wondering about that aswell

grave pawn
#

The {% endif %} too ofc

cobalt pond
#

there we go

 {% if (printer.heater_bed.target == 0) %}   # skip preheating if bed is on
    M190 S{params.BED_TEMP|default(printer.heater_bed.target, true) } # wait for bed temp
    M104 S160
    TEMPERATURE_WAIT SENSOR=extruder MINIMUM=159 MAXIMUM=161
 {% endif %}
... rest of stuff
grave pawn
#

Yes, that looks better ^^

cobalt pond
#

bingo its soaking now we wait so i can test pause/resume

#

This start is much better!

#

I have option to pre-soak at my desired by having it not idle at the start of print but if it is idle it soaks the bed first, then heats the nozzle to 160c which has the side-effect of allowing the bed to soak a bit longer at target for heat coverage