-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
LCD menu_move: Treat rotational axes in angular degrees #24334
LCD menu_move: Treat rotational axes in angular degrees #24334
Conversation
d62272c
to
6f2dfd9
Compare
EDIT: The following problem is now also fixed: With these changes, move distances are as expected. but in inch mode (G20), rotational axes are moved slower than expected from the LCD (no problem when sending G-Code or with linear axes). Any ideas what causes this? |
1fa9ca8
to
ea7602c
Compare
Note that the |
3022e5d
to
2e15ca2
Compare
With your edits, this does not work as intended: when in inch mode, the positions of linear axes shown in the move axis menu are wrong after moving the linear axis via the LCD. Also, when moving rotational axes via the LCD in inch mode, rotational axes move 25.4 times slower than in metric mode. |
I fixed the regression in the displayed position. To deal with feedrate for rotational axes in inch mode, I guess an alternative would be to introduce a second variable Marlin/Marlin/src/module/planner.cpp Line 2315 in 58d1b1b
|
The problem is, that for G1/G2/G3 commands, the motion system does not know if the feedrate has to be interpreted in length units or in degrees until line Marlin/Marlin/src/module/planner.cpp Line 2168 in 58d1b1b
fr_mm_s . If we want that fr_mm_s in planner.cpp holds the value as expressed in °/s for moves that involve only rotational axes, we would have to give the parser the ability to decide whether a given move command involves any linear axes or not.
|
We should be expressing feedrates in mm/s for all axes in the G-code. Then we do any required math to produce a limited feedrate for all the axes in the move - whatever makes the most sense for the combined move. That final feedrate needs to be determined at the kinematics level. That is how it applies for something like a SCARA. And in the case of a SCARA the feedrate of the rotary axes actually changes throughout the move, as required to maintain the linear feedrate. When determining the total distance for a move that includes linear axes, plus one or more rotary axes, my suggestion would be to build an initial feedrate based on the linear motions and then apply their speed limits. Then look at how fast the rotary axes are being asked to move at that point, and further limit speed based on their maximum degrees-per-second limits. If a rotary axis were involved in determining a final toolhead position, then we would need to build kinematics, but for setups with additional anonymous linear / rotary axes, we can only follow the moves and apply their configured limits in a direct per-axis manner. |
If i unterstand you correctly, This PR in its original form was doing exactly what you proposed for the case of missing kinematics. With the Addition that for moves that involved no linear axis, the feedrate was Not the axis Limit feedrate but the specified feedrate, Interpreted in deg/s. That is what NIST RS274NGC/LinuxCNC in its default state (CANON_XYZ feedreference mode, „trivial kinematics“) calls for. I am in favour of any changes that achieve the same with cleaner code. And yes, i would Love to have an Multi-axis kinematics that allow Tool length compensation and an Option to Interpret feedrate as Surface Speed of the Tool Center Point Along the toolpath. |
Yeah, I realized later that in the angular case the prior inches-to-mm conversion on input would definitely mess with things. So, that means the feedrate either needs to be un-done later, or skipped on input from the G-code when the move only involves one axis. If it can be skipped right on input, that would be best. It is handled by one particular The trickier problem is that the For now, it makes the most sense for Marlin to provide a persistent rotary feedrate (stored in degrees/s) and parameters to set/use it. At the most simple, something like It's kind of non-standard to the Marlin idiom, but it's not that major compared to how far some firmwares have pushed G-code standards. |
Neat idea. |
This should wait until tombrazier's arc optimizations are merged. Let me know whether I am on the right track with today's commits, or not. So far I made the basics work (two seperate feedrates, ZONESTAR_LCD with MarlinUI, AXIS4_ROTATES, INCH_MODE_SUPPORT) What works:
Missing:
|
6ad4e7e
to
b0163e1
Compare
97117d0
to
5979aab
Compare
e5c295f
to
163ab3e
Compare
If we consider rotational axes and inch mode niche features, I can offer to revert to the original simpler solution (https://github.com/DerAndere1/Marlin/tree/rotational_axis_fix) . It is not as complete as this PR in its current state but it requires much less changes as you can see from this diff: |
d0b57d3
to
f7bce46
Compare
2a0c7c3
to
b89168f
Compare
c624e13
to
e6f1b07
Compare
9c65146
to
4f65466
Compare
6f36581
to
9dfe654
Compare
c792921
to
37fb26b
Compare
I think we can close this. #26174 was merged and is a much easier solution which also works well with my 5 axis inverse kinematics |
Description
Without this PR, LCD move menu could not be used for rotational axes, especially in inch mode.
With this PR, the LCD move menu treats rotational axes in degrees
Requirements
ZONESTAR_LCD
,I_DRIVER_TYPE ...
,AXIS4_ROTATES
,INCH_MODE_SUPPORT
Benefits
Configurations
Marlin_PR24334_config1.zip
Related Issues