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] Not defining BABYSTEP_ALWAYS_AVAILABLE causes steppers and controller fan to run continueslly after baby stepping #27530

Open
1 task done
rondlh opened this issue Nov 13, 2024 · 2 comments

Comments

@rondlh
Copy link
Contributor

rondlh commented Nov 13, 2024

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

If BABYSTEP_ALWAYS_AVAILABLE is not defined, then in babystep.cpp the stepper timeout is not reset:

TERN_(BABYSTEP_ALWAYS_AVAILABLE, gcode.reset_stepper_timeout());

This causes the steppers to stay enabled without timeout and the controller fan to run continuously after using baby stepping. So if you use baby stepping after a print to quickly adjust the Z-offset then there is a side effect.

Bug Timeline

Unknown

Expected behavior

Stepper timeout and controller fan timeout as defined, no unexpected side effects of apparently unrelated option (BABYSTEP_ALWAYS_AVAILABLE).

Actual behavior

Stepper stay activated, controller fan run continuously after using baby stepping.

Steps to Reproduce

  1. Don't define BABYSTEP_ALWAYS_AVAILABLE (configuration_adv.h)
  2. Define BABYSTEPPING (configuration_adv.h)
  3. Define USE_CONTROLLER_FAN (use a low IDLE time: ### CONTROLLERFAN_IDLE_TIME 5 and DEFAULT_STEPPER_TIMEOUT_SEC 10). (configuration_adv.h)
  4. Make some baby steps and check if the steppers stay active and the controller fan keeps running.

The code shows what happens, babystep.cpp

TERN_(BABYSTEP_ALWAYS_AVAILABLE, gcode.reset_stepper_timeout());

The stepper timer will not be reset, which causes the steppers to stay enabled, and the controller fan to run continuously when BABYSTEP_ALWAYS_AVAILABLE is not defined.

Version of Marlin Firmware

Latest bugfix

Printer model

Custom

Electronics

MKS Monster8 V1.0

LCD/Controller

BTT TFT35 V3.0

Other add-ons

MKS EBB42 CAN Toolhead, BLTouch 3.1

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Simplified configuration for testing:

Configuration_adv.zip

@classicrocker883
Copy link
Contributor

my guess is it cannot do babysteps after it has timed-out. that is why BABYSTEP_ALWAYS_AVAILABLE resets the stepper timeout.
because those functions have if (!can_babystep(axis)) return;
and can_babystep() returns (ENABLED(BABYSTEP_WITHOUT_HOMING) || !axis_should_home(axis));

so in your testing, try having BABYSTEP_WITHOUT_HOMING enabled

@rondlh
Copy link
Contributor Author

rondlh commented Nov 13, 2024

@classicrocker883 Thanks for your response.

my guess is it cannot do babysteps after it has timed-out. that is why BABYSTEP_ALWAYS_AVAILABLE resets the stepper timeout. because those functions have if (!can_babystep(axis)) return; and can_babystep() returns (ENABLED(BABYSTEP_WITHOUT_HOMING) || !axis_should_home(axis));

so in your testing, try having BABYSTEP_WITHOUT_HOMING enabled

I just did a test with BABYSTEP_ALWAYS_AVAILABLE undefined:

  1. After a reset baby stepping doesn't work (as expected, BABYSTEP_WITHOUT_HOMING is not defined)
  2. G28(home) then wait for the controller fan to switch off (after stepper timeout).
  3. Baby stepping works fine, the controller fan and steppers are activated, but... they never switch off afterwards.

So it seems baby stepping works fine even after the stepper/controller fan timeout.
If I force the reset line, then baby stepping still works, but afterwards the steppers/controller fan switch off.

BABYSTEP_WITHOUT_HOMING doesn't make much sense in my book, but I guess there are use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants