#define LASER_SYNCHRONOUS_M106_M107 breaks Fan control in LCD Menu
THE-BOW opened this issue · 20 comments
Did you test the latest bugfix-2.0.x
code?
Yes, and the problem still exists.
Bug Description
When i activate the option #define LASER_SYNCHRONOUS_M106_M107 i can no more control the fanspeed on my LCD (CR10_STOCKDISPLAY).
When i turn on the printer the fan runs at full speed but the LCD shows 0%
Changing the value does nothing even if i reclick to change the value again.
Controlling the fanspeed in Octoprint, Pronterface or the connected touchscreen works.
Bug Timeline
Marlin 2.0.9.1
Expected behavior
I expect to change the fanspeed :-)
Actual behavior
Nothing happens except the new value is showing in the status screen.
Steps to Reproduce
No response
Version of Marlin Firmware
2.0.9.1
Printer model
CR10 and Ender-2
Electronics
SKR V1.3 (CR10) and SKR Mini E3 V2 (Ender-2)
Add-ons
BL-touch (on both machines) and Laser (on CR10)
Bed Leveling
ABL Bilinear mesh
Your Slicer
Other (explain below)
Host Software
Other (explain below)
Additional information & file uploads
This is the config for my CR10 - I have the same bahaviour on my Ender-2.
Commented out the save homing section in the healthcheck because my bl-touch is on the right ;-)
#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255
Also not working. Preheats but fan does not turn on.
When i activate the option #define LASER_SYNCHRONOUS_M106_M107 i can no more control the fanspeed on my LCD (CR10_STOCKDISPLAY).
Which pin is your laser hooked up to? What about your fan?
I did no changes in the pins configuration.
The partcooling fan is connected to board P2_03 (FAN) - controlled by M106 P0...
The laser is connected to board P2_04 (HE1) - controlled by M106 P1...
Whatever happend both are still respondig to a serial command...
Hi @thisiskeithb
Any more information required?
Problem still exist in 2.0.9.2-Bugfix.
Printer: CR-10
Motherboard: BOARD_BTT_SKR_V1_3
Hardware:
- BLTouch (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
- Laser (Pin P2_04 -> IF Hotends ==1 then FAN1)
- Display1 (CR10_STOCKDISPLAY)
- Display2 (Bigtreetech TFT35 V1.2 on Serial)
- OctoPi (on Serial)
Platformio: default_envs = LPC1768
Fanspeed could be adjusted over OctoPi and Bigtreetech TFT35 but not on CR10_STOCKDISPLAY
All other Functions on CR10_STOCKDISPLAY working as expected...
a wild guess. looking at what M106/M107 does with an without LASER_SYNCHRONOUS_M106_M107 vs what the menu does
Can you give this test a try?
diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h
index 56138a15bd..f65ed4e5d1 100644
--- a/Marlin/src/lcd/menu/menu_item.h
+++ b/Marlin/src/lcd/menu/menu_item.h
@@ -27,6 +27,11 @@
#include "../../inc/MarlinConfigPre.h"
+#if ENABLED(LASER_SYNCHRONOUS_M106_M107)
+ #include "../../module/planner.h"
+#endif
+
+
void lcd_move_z();
////////////////////////////////////////////
@@ -476,6 +481,7 @@ class MenuItem_bool : public MenuEditItemBase {
inline void on_fan_update() {
thermalManager.set_fan_speed(MenuItemBase::itemIndex, editable.uint8);
+ TERN_(LASER_SYNCHRONOUS_M106_M107, planner.buffer_sync_block(BLOCK_FLAG_SYNC_FANS));
}
#if ENABLED(EXTRA_FAN_SPEED)
Are you doing both laser burns and 3D printing on the same unit? Never mind I see that in the info now.
#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 Also not working. Preheats but fan does not turn on.
Does not appear to be implemented in the code.
Are you doing both laser burns and 3D printing on the same unit? Never mind I see that in the info now.
Hi @descipher
im using the CR10 as printer and as Laserengraver too.
I made a mount for the laser on the left of my hotend and a connector to power it on the FAN1 port.
I published it here -> https://www.thingiverse.com/thing:2997540
Using M106 P1... to fire up the Laser and the regular M106 to set the fan speed for the partcooling while printing.
The partcooling FAN also gives me air for the laser to keep the smoke away...
Never had a problem to control both FAN connectors on the CR10_STOCKDISPLAY until the last two Firmwareupdates...
Can you give this test a try?
@ellensp
Sure - I just need to figure out how to implement the changes. :-D
Regularry im just editing the configs... :-(
I tested bugfix-2.0.x with @ellensp 's update and it corrects the issue on my test atmega2560/ramps 1.4, FAN1_PIN (D8) is driven correctly from the menu's second fan item. The cause is related to a change that removed an update fans when fan count > 1. That condition no longer exists. I have included the fix in #22690.
see Marlin/src/lcd/menu/menu_item.h in the PR.
@descipher
Hi, ive tested the #22690 laser.gcode.inline.fix.
The fan-control on the LCD works there as expected on my BOARD_BTT_SKR_V1_3 (LPC1768) with CR10_STOCKDISPLAY
PREHEAT_1_FAN_SPEED
does not appear to be implemented in the code.
It is, as part of ui.material_preset
, but the way that material presets are applied differs slightly between LCD controllers, so I'm working on standardizing that a bit now.
I thought I'd confirm the issue still exists in the bugfix-2.1.x branch and also applying @ellensp 's patch to menu_item.h still fixes the issue. I could create a PR if it helps to get this fix in but I'm not up to speed with code yet to comment if its an appropriate fix.
I just got a 24v Creality laser that attaches to an Ender's 24v part fan using a Y cable and so I enabled this fan sync option to get ready to test it. Before testing the laser, I first went looking for any 3d printing regressions the fan sync option caused and setting fan speed in menu is all I've found.
Once I get into full blown laser testing, I hope to try out #22690 branch and I'll report back there.
I could create a PR if it helps to get this fix in but I'm not up to speed with code yet to comment if its an appropriate fix.
We're still waiting for #22690 to be merged.
Fixed in #22690 ping @thinkyhead for merge.
Since this bug is fixed in #22690, I'll close this issue.
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.