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

[BUG] Runout sensor requires manual turn on after triggering #16161

Closed
karabas2011 opened this issue Dec 9, 2019 · 11 comments
Closed

[BUG] Runout sensor requires manual turn on after triggering #16161

karabas2011 opened this issue Dec 9, 2019 · 11 comments

Comments

@karabas2011
Copy link

Bug Description

I use Runout sensor ( actually 2 in 1, runout and spool loop)
During printing when first triggering I see menu
where I choose extrude more or turn sensor ON.
I press On and it continues printing. But sensor now is actually OFF. And no second triggering is possible until I go to main menu settings and turn on the sensor!

My Configurations

Marlin 2.0 29-nov-2019
skr1.3 lcd MKS mini 12864 V2
TMC2208

Steps to Reproduce

  1. Start print
  2. force runout to trigger
  3. continui
    4 force runout to trigger

Expected behavior: [What you expect to happen]
Pause as many times as it triggers

Actual behavior: [What actually happens]

Paused only first triggering
So menu item - turn on sensor - does not do anything. Or does not apply.
Marlin.zip

Additional Information

Yes I can hack it to insert function to menu that will autoturn on sensor

  • Provide pictures or links to videos that clearly demonstrate the issue.
  • See How Can I Contribute for additional guidelines.
@InsanityAutomation
Copy link
Contributor

That menu item toggles the state if the sensor is currently off. It probably needs a condition added to either never or always show it next to continue for motion monitoring sensors, since input state cannot be used directly there.

@karabas2011
Copy link
Author

My hack. Is it correct?

void menu_pause_option() {
  START_MENU();
  #if LCD_HEIGHT > 2
    STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER);
  #endif
  ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_PURGE, [](){ pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; });
  #if HAS_FILAMENT_SENSOR
    // if (runout.filament_ran_out)
      runout.enabled = true;
      runout.reset();
      EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset);
   // else
  #endif
      ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_RESUME, [](){ pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; });
  END_MENU();
} 

@karabas2011
Copy link
Author

I think it is old bug. M119 is not in sync with FIL_RUNOUT_INVERTING, and the whole runout code behaviouring is inverted.

@InsanityAutomation
Copy link
Contributor

Its going to need a bit more than that as the extui handler needs updating as well to take 3 potential responses for runout in case of the encoder style and it needs to be set for only the encoder style.

@karabas2011
Copy link
Author

karabas2011 commented Dec 11, 2019

No encoder at all. Just one endstop for runout and extra tension
photo_2019-12-11_11-50-00

@karabas2011
Copy link
Author

karabas2011 commented Dec 16, 2019

  #if HAS_FILAMENT_SENSOR
    if (runout.filament_ran_out) { 
      runout.enabled = false;
      EDIT_ITEM(bool, MSG_RUNOUT_SENSOR0, &runout.enabled, runout.reset); 
      }
    else {
      runout.enabled = true;
      runout.reset();
   //   EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset);
    }
  #endif

Where MSG_RUNOUT_SENSOR0 is a reminder to activate sensor.

But if I start print with unactivated sensor, it calls pause but does not allow to turn on sensor...
Only manually via Settings

@tpruvot
Copy link
Contributor

tpruvot commented Dec 16, 2019

see PR #16230 it should fix that

@karabas2011
Copy link
Author

karabas2011 commented Dec 17, 2019

Thanx! It fixes problem with start printing pause ( when I forget to close sensor )
But for my type of sensor I need menu to prevent resume until I close the sensor.
this is what my code currently does.

BTW No beeps on filament change! How to make it beep as set in Configuration_adv ?

@karabas2011
Copy link
Author

karabas2011 commented Dec 23, 2019

New problem
Menu Resume does not reflect off-state of sensor until you rotate encoder!
When you press "Purge more" regenerated menu assumes the sensor ON and misses menu item Sensor On/OFF, but if you rotate encoder that menu item appears(if sensor really off)!

So ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_PURGE, []{ pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; });
does check state of sensor incorrectly.

@boelle
Copy link
Contributor

boelle commented Jan 7, 2020

seems this one was solved, if a new issues had surfaced create a new PR for that

if this issue is not solved we can reopen

@boelle boelle closed this as completed Jan 7, 2020
@github-actions
Copy link

github-actions bot commented Jul 3, 2020

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.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants