MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.23k stars 19.22k forks source link

M109 Does not work at cooling down the temperature #4039

Closed Amachete closed 8 years ago

Amachete commented 8 years ago

Hello

If I write in my firt lines of my gcodes files:

M109 S195: Extruder at 195ºC

It Works, It waits up to extruder reaches 195ºC.

But If I write in my last gcodes, at the end of the File:

M109 S50;
M81; Shut off the power supply

It does not wait up to the extruder reaches 50ºC, and shuts off the supply, which makes risky for the Extruder support, because the heat can go up through the heat sink as the 12v power supply is off therefore the extruder fan is off too. I want to cool down the extruder temperatura before shutting off the power supply.

Let me know if you can replicate this issue.

Thank you.

Blue-Marlin commented 8 years ago
 * M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
 *        Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
 *        IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
brainscan commented 8 years ago

Actually I've noticed this recently too, and I do use M109 R60 in my end code. I wanted to test it a few more times to be sure but if other people are noticing it too then maybe it has stopped working. M190 R still seems to work. If I have more time today I'll check it again to be sure.

Sent from my iPhone

On 14 Jun 2016, at 09:45, Makaira notifications@github.com wrote:

  • M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
  • Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
  • IF AUTOTEMP is enabled, S B F. Exit autotemp by any M109 without F — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
thinkyhead commented 8 years ago

@Amachete You should use M109 R50 if you want it to wait. M109 S50 does not wait for cooling.

thinkyhead commented 8 years ago

I've noticed this recently too, and I do use M109 R60

Please test with RCBugFix. We're not aware of any issue with this.

Amachete commented 8 years ago

"M109 S50" does not work and "M109 R50" does not work either...on RC6

I will try this evening with BUGFIX, and I will let you know.

2016-06-15 5:35 GMT+02:00 Scott Lahteine notifications@github.com:

I've noticed this recently too, and I do use M109 R60

Please test with RCBugFix. We're not aware of any issue with this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/4039#issuecomment-226079812, or mute the thread https://github.com/notifications/unsubscribe/AJoey0AHRRhb25CIGFaz9jWrRGsvTHttks5qL3MYgaJpZM4I1BMM .

brainscan commented 8 years ago

I am using RCBugFix but it's a couple of weeks old, I'm going to download the latest version and check again.

Sent from my iPhone

On 15 Jun 2016, at 04:35, Scott Lahteine notifications@github.com wrote:

I've noticed this recently too, and I do use M109 R60

Please test with RCBugFix. We're not aware of any issue with this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

geekgarage commented 8 years ago

image M109 R45 directly after usingg M109 S245 does not work on latest RCBugFix (downloaded 3 days ago)

So it does not work cooling down.

thinkyhead commented 8 years ago

@geekgarage What are you using for EXTRUDE_MINTEMP? Marlin will not wait for temperatures below half of that value (usually 85°), to prevent wait-forever conditions.

if (wants_to_cool && theTarget < (EXTRUDE_MINTEMP)/2) break;

Perhaps we should allow waiting for temperatures above 45° regardless, but in some hotter parts of the world that might actually be too low. (I hear that in Australia the western desert lives and breathes at 45°.) Also if you have a heated chamber, the temperature may stay above 45°C for a long time.

if (wants_to_cool && theTarget < min((EXTRUDE_MINTEMP)/2, 45)) break;

Another option we haven't explored is to time out if cooling takes too long. So if your heater is turned off, but the temperature hovers at something like 40° then it would also break out of the loop. In any case, we do need to ensure that the wait-for-cooling loop doesn't go forever.

jbrazio commented 8 years ago

Closed by #4169

ProtomakerSprint commented 6 years ago

Can any one help me. Thanks

M190 R32; Seems to go at 54C and not 32C

Marlin (currently 1.1.6 – October 2017)

End code to wait for heat bed to cool before paying a tune and removing the model

Start Temperature is 65 C on the Heat bed for ABS in my case

Inside End G-Code>

; Part removal Temperature M400; Wait for other commands to finish M190 R32; Seems to go at 54C and not 32C : (R instead of S wait for this Temperature M140 S0 ; make sure the bed is turned off.

continue G-Gode play a tube which happens at 54C and not at the 32C requested

AnHardt commented 6 years ago

Your bed is cooling slowly. Turning on the part cooling fan may help.

You also may want to play with https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/Marlin_main.cpp#L7668-L7673 https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/Marlin_main.cpp#L7780-L7789

ProtomakerSprint commented 6 years ago

I have defaults of /**

ifndef MIN_COOLING_SLOPE_DEG

define MIN_COOLING_SLOPE_DEG 1.50

endif

ifndef MIN_COOLING_SLOPE_TIME

define MIN_COOLING_SLOPE_TIME 60

endif

ProtomakerSprint commented 6 years ago

And defaults: // Prevent a wait-forever situation if R is misused i.e. M190 R0 if (wants_to_cool) { // Break after MIN_COOLING_SLOPE_TIME_BED seconds // if the temperature did not drop at least MIN_COOLING_SLOPE_DEG_BED if (!next_cool_check_ms || ELAPSED(now, next_cool_check_ms)) { if (old_temp - temp < MIN_COOLING_SLOPE_DEG_BED) break; next_cool_check_ms = now + 1000UL * MIN_COOLING_SLOPE_TIME_BED; old_temp = temp; } }

ProtomakerSprint commented 6 years ago

Your bed is cooling slowly., Yes my heat bed can take some time to cool :)

ProtomakerSprint commented 6 years ago

I don't have much of a clue what 1000UL is but I wounder if MIN_COOLING_SLOPE_TIME 60 to say MIN_COOLING_SLOPE_TIME 300 could help

Do I just change Mairli_main.cpp then recompile upload as any other normal CONFIGURATION.H type changes, Thank You

I am a "NOOB!"

ProtomakerSprint commented 6 years ago

THANKING YOU AnHardt 2000%

Sorted now:-

Cooling Head Bed before carrying out next instruction.

M190 R32; Seems to go at 54C and not 32C

Ideal to allow Heat Bed to cool to a required Temperature before removing a model part from the Heat Bed

I found that just using the End Code M190 R32; Seems to go at 54C and not 32C : (R instead of S wait for this Temperature), as requested.

This issue seems to happened because my Heat Bed can take some time to cool down, about one degree a minute, half an hour for about 30 C to cool down

After some investigation, thanks to AnHardt, I discovered that changing Marlin_main.cpp code seem to work for me.

Now the Heat Bed Temperature waits until it is 32C as requested before continuing with the next G-Code command.

NOTE: When the M190 R32; command is reached in the End G-Code the 3D Pint Time on the LCD 12864 is lost because the Display will say:-

Bed Heating. (Even though it is cooling) and the Time on LCD 12864 the will restart.

Once the Heat Bed is cooled down to the required temperature it will say:-

Bed Done.

Then the End G-Gode will continue...

End G-Code M400 is most likely not required.

; Wait for Heat Bed to cool down to 32 C ; Part removal Temperature M400; Wait for other commands to finish M190 R32; Seems to go at 54C and not 32C : (R instead of S wait for this Temperature ; Below fails to set cool down at all ; M190 S32 ;set heatbed temperature to 32 ; for cooldown M116 H1 ;wait for heatbed to reach 32 ; M116 H1 ;wait for heatbed to reach 32 M140 S0 ; make sure the bed is turned off.

Marlin (currently 1.1.6 – October 2017)

In Marlin_main.cpp code, about line 7666 Aprox.

if HAS_TEMP_BED

ifndef MIN_COOLING_SLOPE_DEG_BED

#define MIN_COOLING_SLOPE_DEG_BED 1.50

endif

ifndef MIN_COOLING_SLOPE_TIME_BED

/* Protomaker Black Sprint Original

Increase twenty times I am asuming this is seconds. ; Wait for Heat Bed to cool down to 32 C ; Part removal Temperature M400; Wait for other commands to finish M190 R32; Seems to go at 54C and not 32C : (R instead of S wait for this Temperature) ; Below fails to set cool down at all ; M190 S32 ;set heatbed temperature to 32 ; for cooldown M116 H1 ;wait for heatbed to reach 32 ; M116 H1 ;wait for heatbed to reach 32 M140 S0 ; make sure the bed is turned off.

WAS #define MIN_COOLING_SLOPE_TIME_BED 60 */

define MIN_COOLING_SLOPE_TIME_BED 1200

endif

AnHardt commented 6 years ago

The

  #ifndef MIN_COOLING_SLOPE_TIME_BED
    #define MIN_COOLING_SLOPE_TIME_BED 60
  #endif

construct should allow you to define:

 #define MIN_COOLING_SLOPE_TIME_BED 1200

somewhere in your Configuration.h. It is not there by default because we already have too much options. I guess you are the first one who asked for this.

We had more problems with never ending loops when temperatures below room temperature (you can't reach) where ordered.

ProtomakerSprint commented 6 years ago

In Configuration.h , I feel this is more Open Source and better to change instead of the change in Marlin_main.cpp code which works

May be, (hot tried yet), something to change here in Configuration.h >

// Bed temperature must be close to target for this long before M190 returns success

define TEMP_BED_RESIDENCY_TIME 10 // (seconds)

define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one

define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.