M140 question
-
I suppose that would make sense for chocolate printers with chill plates.
-
@Phaedrux said in M140 question:
I suppose that would make sense for chocolate printers with chill plates.
There are such printers????
Frederick
-
@fcwilt It's zero degrees Kelvin in °C. A joke, I think. It made me chuckle just a little.
-
@fcwilt said in M140 question:
@Phaedrux said in M140 question:
I suppose that would make sense for chocolate printers with chill plates.
There are such printers????
Frederick
-
OK if we cannot change M140 how about M144
Currently the S parameter takes these values:
S0 = standby
S1 = activeSo how about adding S2 = off or maybe S-1 = off?
You have gathered by now that using a "magic" value of -273.1 in M140 is not my cup of tea.
Frederick
-
@fcwilt I'm not sure that absolute zero could be said to be a magic number! But anyway you also need to consider what happens with the various gcodes that control the extruder temperature, as I think (in some places at least) it uses the same mechanism. I suppose that M568 does allow you to set the heater to be off. Oh and don't forget chamber heaters M141, oddly there does not seem to be a chamber heater version of M144, can that be used for chamber heaters and bed heaters? If not how do you switch them between active and standby?
-
I understand that much of what exists today is a "legacy" of the past.
I'm just a little OCD and using special temp values which don't actually set the temp but turn the heater off - it just seems so wrong!
Perhaps you know this but a "magic number" is a programmers term for using unusual values (like -273.1) to achieve a certain equally unusual outcome.
Maybe that value has been used to turn off the bed heater since the "dawn of time".
But given the existence of M144 which handles "standby and "active" that would seem a logical place to also handle "off" - but it may not make sense at all to those with lots of experience.
Thanks for the feedback.
Frederick
-
@fcwilt Having been a programmer (well strictly speaking a software engineer) for over 40 years I'm very familiar with magic numbers! But I'd still argue that -273.1 (Absolute zero in centigrade) is not a magic number and that turning off the heater when the target temperature is set to it (or any value below it) does make some sort of sense. In temperature terms using 0 degrees C (as in your original suggestion) is more of a "magic" number than 0 Kelvin. If you are more comfortable with 0 then -273.1 maybe we need an option to allow temperatures to be specified in Kelvin?
I'd actually argue that setting the target temperature to -273.1 to disable a heater (which I'm pretty sure works everywhere you can specify a heater target), is more consistent than using the proposed M144 S-1 (to turn off a bed heater) and M568 A0 (to turn off an extruder). At the very least if the proposed change is made to M144, then something needs to be done to allow a similar method of control for chamber heaters.
-
You are aware that:
M140 P0 S60 R30 sets the active and standby temps and they are displayed on the DWC.
M140 P0 S-273.1 turns off the bed heater but doesn't actually change the active and standby temp settings for the bed.
If it was simply the case that actually setting the active temp to -273.1 or less was considered some sort of anomalous condition and thus the bed heater was turned off just to be safe I wouldn't consider it a "magic" number.
But when used as it is now it has nothing to do with setting the active temp and takes on a whole new "role".
However it is really a minor issue. I just like to indulge my OCD side every now and then.
Work wise your 40 years has me beat - I only managed 37 before I decided to take a break.
I started coding for the Intel 8008 microprocessor which quickly gave way to the 8080 and the Z80. Back then the eproms that held the program were all of 256 bytes. Look at the memory we have available today. In addition to that sort of work I had a few jobs coding for mainframes but mostly did apps for Windows.
Thanks for the feedback. It's been fun.
Frederick
-
@fcwilt Maybe use a global variable and set it to -273.1 in config.g, eg
global heaterOff = -273.1
then turn the heaters off by sending
M140 P0 S{global.heaterOff}
?
Then you at least won't have to look at the magic/not magic number!Ian
-
Someone who understands that problems I face!!!!
I will do it.
I already have some 70 global variables. No reason to not add another.
Thanks!
Frederick
-
@fcwilt said in M140 question:
I already have some 70 global variables. No reason to not add another.
Probably worth checking it's not impacting memory too much! Check available memory with M122.
Ian
-
@droftarts said in M140 question:
Probably worth checking it's not impacting memory too much! Check available memory with M122.
At what point should I worry?
My Duet 2 machines report "never used" as 6K , the Duet 3 machines report 22K to 90K.
Thanks for mentioning it.
Frederick