Temperature control for Heating Bed
-
@bernardomattiucci ........but you've got else M140 S0. If temp is below 40, then M140 S50. It temp is above 50, then M140 S40. So if temp is between 40 and 50, then neither of those conditions will be met so the "else" will apply (M140 S0). Which means that the bed will be turned off at any temperature above 40, and on at temperature below 40 effectively controlling it at 40. If that's what you want to do then simply use M140 S40 and be done with it.
-
@deckingman the else is part of the job layer check, not the temperature check so it will only be turned off when the job is equal to or above 20 layers
-
@deckingman As @jay_s_uk said, That M140 S0 is related to layer control and is activated from layer 20 and up. This is because, after 3 hours of printing, the bed temperature is stable at 30°C and is more than enough to maintain the part. So there is no need, at the moment, to have the bed heater on (in winter we will see...).
-
@bernardomattiucci said in Temperature control for Heating Bed:
@deckingman As @jay_s_uk said, That M140 S0 is related to layer control and is activated from layer 20 and up. This is because, after 3 hours of printing, the bed temperature is stable at 30°C and is more than enough to maintain the part. So there is no need, at the moment, to have the bed heater on (in winter we will see...).
Ahh - apologies for missing that "else" being related to the layer value. So, yes, I'd have thought your proposal should work.
-
I modified the code slightly to keep the heater on at the set temperature of 50° for the first 5 layers.
if {state.status} = "processing" if {heat.heaters[1].active} > 0 if {job.layer} > 5 if {job.layer} < 20 if {heat.heaters[0].current} < 40 M140 S50 if {heat.heaters[0].current} > 50 M140 S40 else M140 S0 else M140 S50
the problem is that, at the beginning of printing, I get the following error:
Error: in file macro line 3 column 27: meta command: cannot convert operands to same type
The error occurs when I manually activate the heaters (hotend and bed) and then run the press
-
I fixed the errors in the code.
if job.build != null if job.layer != null && job.layer <= 5 M140 S50 elif job.layer != null && job.layer > 5 if job.layer < 20 if heat.heaters[0].current < 40 M140 S50 if heat.heaters[0].current > 50 M140 S40 else M140 S0
-
I would like to make a change to the code, but I don't know how to do it.
if job.layer < 20
I would like to consider 20% and not layer number 20.
How should I modify the code? -
@bernardomattiucci you would have to calculate what 20% of job.file.numLayers is
-
if job.build != null if job.layer != null && job.layer <= 5 M140 S50 elif job.layer != null && job.layer > 5 if ((job.file.numLayers*20)/100) < 20 if heat.heaters[0].current < 40 M140 S50 if heat.heaters[0].current > 50 M140 S40 else M140 S0
seems to be working
-
More update
if job.build != null if job.layer != null && job.layer < 5 M140 S50 if job.layer != null && job.layer >= 5 && job.layer < (job.file.numLayers*20)/100 if heat.heaters[0].current < 40 M140 S50 if heat.heaters[0].current > 50 M140 S40 if job.layer != null && job.layer > (job.file.numLayers*20)/100 M140 S0