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] Y-Axis Motor Shake with ZV Input Shaping Enabled Only on Y-Axis #27475

Closed
1 task done
johnnychang924 opened this issue Oct 13, 2024 · 5 comments
Closed
1 task done

Comments

@johnnychang924
Copy link

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

Yes, and the problem still exists.

Bug Description

When ZV input shaping is enabled only on the Y-axis (with the X-axis shaping disabled), the Y-axis motor experiences strong shaking and skips steps during movement. The issue does not occur when input shaping is enabled on both axes or when it is completely disabled.

Bug Timeline

new bug

Expected behavior

Smooth motion of the Y-axis with accurate positioning when input shaping is applied only to the Y-axis.

Actual behavior

The Y-axis motor shakes violently and skips steps, resulting in significant inaccuracies in positioning. This makes the printer unusable.

Steps to Reproduce

  1. Configure Marlin firmware to enable ZV input shaping only on the Y-axis:
    INPUT_SHAPING_X_AXIS disabled
    INPUT_SHAPING_Y_AXIS enabled

  2. Start any movement or home the printer.

Version of Marlin Firmware

2.1.2.4

Printer model

Ender-3 Pro with switchwire mod

Electronics

creality 4.2.2

LCD/Controller

cr-10 stock

Other add-ons

I use stock extruder motor as y-axis motor.

Bed Leveling

UBL Bilinear mesh

Your Slicer

Cura

Host Software

SD Card (headless)

Don't forget to include

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

Additional information & file uploads

I am using a CoreXZ 3D printer, and in Marlin, CoreXZ configurations do not support input shaping on the X-axis. Therefore, I need to use input shaping only on the Y-axis.
Configuration.zip

@SMH17
Copy link

SMH17 commented Oct 14, 2024

I'm facing this critical issue too, and mostly the shift happens on Y axis although some prints show problem on X at same time, but it happens with input shaping enabled on both axes. So, I think that your claim about the issue not occurring when enabled on both X and Y axis could be just by coincidence.

It seems working normal then suddenly it goes crazy: a stepper rattling noise with a shift of bed to a significantly higher than normal Y position, continuing to print "normally" in a then heavily misaligned position behind the correct layer alignment, without any gradual shifting till the next recurrence of the problem.

  • The problem represents itself also with low print speed and without mechanical problems as loose belts etc.
  • Reducing or bumping stepper voltage doesn't seem to have any effect on the frequency of the issue.
  • Enabling or disabling S_CURVE_ACCELERATION doesn't affect the issue too.

I haven't tried disabling STEALTHCHOP yet, that is the next in my list of suspect co-factors.

I have seen many issues related to shifting that are closed due to inactivity, without any related fix, I think the autoclosing of issues like this should be prevented till a proper determining of the cause of the problem and fix, otherwise these remains hidden and not properly addressed.

EDIT
Reproduced exactly the same issue also with input shaping totally disabled, the issue in my case is this.

@johnnychang924
Copy link
Author

Thank you for your reply! It seems like we're experiencing different issues. In my case, the machine works perfectly fine when input shaping is completely disabled, with no step skipping or vibrations on any axis. The problem only arises when ZV input shaping is enabled exclusively on the Y-axis. This contrasts with what you're describing, where you encounter the issue even with input shaping disabled.

@ellensp
Copy link
Contributor

ellensp commented Oct 19, 2024

Please test the bugfix-2.1.x branch to see where it stands. If the problem has been resolved then we can close this issue. If the issue isn't resolved yet, then we should investigate further.

there is also #define INPUT_SHAPING_Z in bugfix-2.1.x

@johnnychang924
Copy link
Author

As I am unable to access my 3D printer right now, I will perform further tests next weekend and update you on the results.

@MarlinFirmware MarlinFirmware deleted a comment from moriamoria Oct 23, 2024
@MarlinFirmware MarlinFirmware deleted a comment from moriamoria Oct 23, 2024
@MarlinFirmware MarlinFirmware deleted a comment from moriamoria Oct 23, 2024
@MarlinFirmware MarlinFirmware deleted a comment from moriamoria Oct 23, 2024
@johnnychang924
Copy link
Author

I have tested the input shaping feature on the bugfix-2.1.x branch, and I can confirm that the previous issue has been fixed. However, I encountered a new compile-time error in Marlin when I enabled input shaping only on the Y-axis with #define SHAPING_MENU. I believe this is a separate issue, so I will close the previous one. Below is the console output:

In file included from Marlin/src/lcd/menu/../../inc/MarlinConfigPre-1-axes.h:40,
                 from Marlin/src/lcd/menu/../../inc/Conditionals-1-axes.h:32,
                 from Marlin/src/lcd/menu/../../inc/MarlinConfigPre.h:27,
                 from Marlin/src/lcd/menu/menu_advanced.cpp:27:
Marlin/src/lcd/menu/menu_advanced.cpp: In lambda function:
Marlin/src/lcd/menu/menu_advanced.cpp:571:92: error: 'SHAPING_FREQ_X' was not declared in this scope; did you mean 'SHAPING_FREQ_Y'?
  571 |           ACTION_ITEM_N(AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(AXIS, (SHAPING_FREQ_X) ?: (SHAPING_MIN_FREQ)); ui.refresh(); });
      |                                                                                            ^~~~~~~~~~~~~~
Marlin/src/lcd/menu/../../inc/../core/macros.h:620:26: note: in definition of macro 'THIRD'
  620 | #define THIRD(a,b,c,...) c
      |                          ^
Marlin/src/lcd/menu/../../inc/../core/macros.h:208:29: note: in expansion of macro '___TERN'
  208 | #define __TERN(T,V...)      ___TERN(_CAT(_NO,T),V)  // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
      |                             ^~~~~~~
Marlin/src/lcd/menu/../../inc/../core/macros.h:207:29: note: in expansion of macro '__TERN'
  207 | #define _TERN(E,V...)       __TERN(_CAT(T_,E),V)    // Prepend 'T_' to get 'T_0' or 'T_1'
      |                             ^~~~~~
Marlin/src/lcd/menu/../../inc/../core/macros.h:206:29: note: in expansion of macro '_TERN'
  206 | #define TERN_(O,A)          _TERN(_ENA_1(O),,A)     // OPTION ? 'A' : '<nul>'
      |                             ^~~~~
Marlin/src/lcd/menu/menu_advanced.cpp:574:7: note: in expansion of macro 'TERN_'
  574 |       TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y_AXIS))
      |       ^~~~~
Marlin/src/lcd/menu/menu_item.h:333:5: note: in expansion of macro '_MENU_INNER_F'
  333 |     _MENU_INNER_F(TYPE, ##V);             \
      |     ^~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_item.h:420:55: note: in expansion of macro '_MENU_ITEM_N_F'
  420 | #define MENU_ITEM_N_F(TYPE, N, FLABEL, V...)          _MENU_ITEM_N_F(TYPE, N, false, FLABEL, ##V)
      |                                                       ^~~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_item.h:444:56: note: in expansion of macro 'MENU_ITEM_N_F'
  444 | #define ACTION_ITEM_N_F(N, FLABEL, ACTION)             MENU_ITEM_N_F(function, N, FLABEL, ACTION)
      |                                                        ^~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_item.h:445:54: note: in expansion of macro 'ACTION_ITEM_N_F'
  445 | #define ACTION_ITEM_N(N, LABEL, ACTION)              ACTION_ITEM_N_F(N, GET_TEXT_F(LABEL), ACTION)
      |                                                      ^~~~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_advanced.cpp:571:11: note: in expansion of macro 'ACTION_ITEM_N'
  571 |           ACTION_ITEM_N(AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(AXIS, (SHAPING_FREQ_X) ?: (SHAPING_MIN_FREQ)); ui.refresh(); });
      |           ^~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_advanced.cpp:574:30: note: in expansion of macro 'SHAPING_MENU_FOR_AXIS'
  574 |       TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y_AXIS))
      |                              ^~~~~~~~~~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_advanced.cpp: In lambda function:
Marlin/src/lcd/menu/menu_advanced.cpp:571:92: error: 'SHAPING_FREQ_X' was not declared in this scope; did you mean 'SHAPING_FREQ_Y'?
  571 |           ACTION_ITEM_N(AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(AXIS, (SHAPING_FREQ_X) ?: (SHAPING_MIN_FREQ)); ui.refresh(); });
      |                                                                                            ^~~~~~~~~~~~~~
Marlin/src/lcd/menu/../../inc/../core/macros.h:620:26: note: in definition of macro 'THIRD'
  620 | #define THIRD(a,b,c,...) c
      |                          ^
Marlin/src/lcd/menu/../../inc/../core/macros.h:208:29: note: in expansion of macro '___TERN'
  208 | #define __TERN(T,V...)      ___TERN(_CAT(_NO,T),V)  // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
      |                             ^~~~~~~
Marlin/src/lcd/menu/../../inc/../core/macros.h:207:29: note: in expansion of macro '__TERN'
  207 | #define _TERN(E,V...)       __TERN(_CAT(T_,E),V)    // Prepend 'T_' to get 'T_0' or 'T_1'
      |                             ^~~~~~
Marlin/src/lcd/menu/../../inc/../core/macros.h:206:29: note: in expansion of macro '_TERN'
  206 | #define TERN_(O,A)          _TERN(_ENA_1(O),,A)     // OPTION ? 'A' : '<nul>'
      |                             ^~~~~
Marlin/src/lcd/menu/menu_advanced.cpp:574:7: note: in expansion of macro 'TERN_'
  574 |       TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y_AXIS))
      |       ^~~~~
Marlin/src/lcd/menu/menu_item.h:333:5: note: in expansion of macro '_MENU_INNER_F'
  333 |     _MENU_INNER_F(TYPE, ##V);             \
      |     ^~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_item.h:420:55: note: in expansion of macro '_MENU_ITEM_N_F'
  420 | #define MENU_ITEM_N_F(TYPE, N, FLABEL, V...)          _MENU_ITEM_N_F(TYPE, N, false, FLABEL, ##V)
      |                                                       ^~~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_item.h:444:56: note: in expansion of macro 'MENU_ITEM_N_F'
  444 | #define ACTION_ITEM_N_F(N, FLABEL, ACTION)             MENU_ITEM_N_F(function, N, FLABEL, ACTION)
      |                                                        ^~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_item.h:445:54: note: in expansion of macro 'ACTION_ITEM_N_F'
  445 | #define ACTION_ITEM_N(N, LABEL, ACTION)              ACTION_ITEM_N_F(N, GET_TEXT_F(LABEL), ACTION)
      |                                                      ^~~~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_advanced.cpp:571:11: note: in expansion of macro 'ACTION_ITEM_N'
  571 |           ACTION_ITEM_N(AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(AXIS, (SHAPING_FREQ_X) ?: (SHAPING_MIN_FREQ)); ui.refresh(); });
      |           ^~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_advanced.cpp:574:30: note: in expansion of macro 'SHAPING_MENU_FOR_AXIS'
  574 |       TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y_AXIS))
      |                              ^~~~~~~~~~~~~~~~~~~~~
Marlin/src/lcd/menu/menu_advanced.cpp: In function 'void menu_advanced_settings()':
Marlin/src/lcd/menu/menu_advanced.cpp:643:16: warning: unused variable 'is_busy' [-Wunused-variable]
  643 |     const bool is_busy = printer_busy();
      |                ^~~~~~~
*** [.pio/build/STM32F103RE_creality/src/src/lcd/menu/menu_advanced.cpp.o] Error 1

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

No branches or pull requests

3 participants