I tried the option "#define PROBING_HEATERS_OFF" because I want to avoid having the heat bed on while the bed level probing is in progress.
I was expecting that probing would wait until the heat bed turns off (visually heat bed light goes out).
However probing begins whilst heat bed is still active. Eventually during probing the heat bed will turn off.
My start G-Code is as follows:
...
M190 S70 ; Wait for bed temperature to reach target temp
M140 S0 ; Disable heated bed
G29 ; Begin with bed leveling
...
Try M190 R69 just before the M140 S0
The R parameter says to wait for both heating & cooling.
No glory. Same symptoms persist.
I took a look at the code and the intent to turn off the bed (along with all extruder heaters) is there.
Looks like the heaters are disabled when the Z axis is descending for the probe and then immediately re-enabled as the Z axis is raised.
Do you see the red LED blinking at all?
If I understand you correctly then the led coming from the heat bed should turn off when the nozzle is going down and the heat bed led should go back on when the nozzle is moving up again.
If that's so then I should set the g-code like this to do the test:
M190 S70 ; Wait for bed temperature to reach target temp
G29 ; Begin with bed leveling
Correct?
Update: I did the test with above code. While the nozzle was moving down and doing it's first bed leveling the led from the head bed / and the led on the main board were still on.
Hmm, I've enabled PROBING_HEATERS_OFF and it works as expected - on G28 the bed LED goes off as the sensor makes its slow approach, and on G29 the bed LED goes off for the downward movement and comes back on as soon as the probe starts to move up again.
@benlye Could you please post the complete g-code sequence so that I can try to duplicate your test.
First I did:
M140 S70;
G28;
G29;
Then I did:
M190 S70;
G28;
G29;
You can clearly see the bed LED switch off during both tests - I made a short video which I'll link shortly.
Thanks. Video would be great.
I'll give it a try later in the day.
Great.
Could you also add the 2 configs you are using. I'm assuming you are running v1.1.4. I'd like to do a comparison with my setup.
Configuration.h
Configuration_adv.h
Printer is an Anet A8 running bugfix-1.1.x built yesterday.
Hmmmm.... please save the files as a zip as I can't download the files as is :-/
'Raw' view is your friend, but here you go.
Marlin.zip
OK, I've done the first test:
M140 S70; Heat bed to 70掳C with LED coming on.
G28; LED from bed turns off (however a little late for my taste) and after homing is complete turns on again.
G29; LED never turns off while bed is still heating up!
I can provide video if needed.
Update
I have now made changes to the default config settings that are provided with Marlin 1.1.4. and compared relevant settings @benlye config settings.
//#define BED_LIMIT_SWITCHING // Default active
I then ran PID tuning for the bed:
// Anet A8 12V heated bed with Kapton and external MOSFET run@70掳C
#define DEFAULT_bedKp 424.78
#define DEFAULT_bedKi 69.09
#define DEFAULT_bedKd 652.89
Now running the commands G28 and G29 the LED will go OFF and ON as intended! :-)
The consequence I see is that we need to update the configs that are included in Marlin for the Anet printer. There are also other settings that need to be changed to more suite the Anet. I think I'll open a new thread for that.
It would be interesting to nail down which change made the difference. I would guess that it's PIDTEMPBED vs. BED_LIMIT_SWITCHING. It would be interesting if PROBING_HEATERS_OFF only works with PIDTEMPBED enabled - my assumption is that is not intended.
If PIDTEMPBED is enabled then BED_LIMIT_SWITCHING must be disabled or else the compilation will fail.
I too believe using PIDTEMPBED did the trick.
If PIDTEMPBED is enabled then BED_LIMIT_SWITCHING must be disabled or else the compilation will fail.
Yes, that is clear.
I was able to reproduce the behaviour you see, but even more erratically - sometimes the bed went off, other times it stayed on. I believe that this is because my homing rate on Z is slower than default so probing takes longer on my printer.
I suspect this is the problem:
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
#if ENABLED(BED_LIMIT_SWITCHING)
#define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
#endif
#endif
And I confirmed that if you set set BED_CHECK_INTERVAL to 1000 the heater is disabled as expected when using BED_LIMIT_SWITCHING.
If you update the subject of this issue to include that, someone may come along and tag it as a bug then work out how to fix it correctly ;-)
Best you give me an example of what to put in the subject :-)
I'd make it "PROBING_HEATERS_OFF doesn't work as expected with BED_LIMIT_SWITCHING"
LOL, you missed my edit ;-)
I thought it sounded corky.... but hey, U da boss :-D
Please test to see whether #9543 allows PROBING_HEATERS_OFF to work better with BED_LIMIT_SWITCHING.