Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix runout sensor for mixing extruder #20327

Merged

Conversation

the-real-orca
Copy link
Contributor

Description

Fixing runout sensor to use actually triggering extruder / sensor. The actual (virtual) extruder cannot be used with mixing setup as it is not necessarily mapping to a single extruder.

The triggering sensor can now be used as parameter (%t) for the FILAMENT_RUNOUT_SCRIPT.
e.g. "M600 T%t"

Benefits

Enables runout sensors and runout script for mixing extrude setup.

Configurations

Configuration.h / FILAMENT_RUNOUT_SENSOR section:

WATCH_ALL_RUNOUT_SENSORS: Triggers runout script for all sensors (not only the one for the active sensor). This is automatically enabled for MIXING_EXTRUDER.

Related Issues

Related to bug report #19877

Marlin/src/feature/runout.cpp Outdated Show resolved Hide resolved
Marlin/src/feature/runout.h Show resolved Hide resolved
return runout_mm_countdown[active_extruder] < 0;
static inline uint8_t has_run_out() {
uint8_t sensor_bitmask = 0;
LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (runout_mm_countdown[i] < 0) SBI(sensor_bitmask, i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also seems to ignore whether your feature is enabled?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies to everything below this in the file also.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The state is checked for all sensors, however a runout is only triggered for the active extruder / sensor or when WATCH_ALL_RUNOUT_SENSORS is enabled.

Marlin/src/inc/SanityCheck.h Outdated Show resolved Hide resolved
thinkyhead added a commit to MarlinFirmware/Configurations that referenced this pull request Mar 1, 2021
@thinkyhead thinkyhead merged commit 713de87 into MarlinFirmware:bugfix-2.0.x Mar 1, 2021
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
thinkyhead added a commit that referenced this pull request Apr 30, 2021
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
@tommylux
Copy link

tommylux commented Feb 1, 2022

Is the runout sensor issue now fixed for the likes of A20T?
At least my last bugfix firmware build is 2022-01-17, and at lease my E2 (extruder 3) sensor is not working.
Incidentally, I have the config set to:
#define NUM_RUNOUT_SENSORS 3 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_PIN 66
#define FIL_RUNOUT2_PIN 67
#define FIL_RUNOUT3_PIN 54 // TL apparently 54 not 68 according to #19877 (comment)

The runout sensor didn't work.

crx-cooper added a commit to crx-cooper/Marlin that referenced this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] M600 (Filemant Change) not working in filament runout script for mixing extruders
6 participants