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
[bugfix-2.0.x]Slow down near the bed center.When JUNCTION_DEVIATION is enabled in Delta. #11103
Comments
Disabling |
We've merged a number of changes to the motion planner today. Please test the latest code to see if the issue is solved or not. |
I tried the latest version. |
@thinkyhead : This is probably caused by the way junction deviation works (and i am a bit surprised the older jerk code does not also cause a slowdown: If you think very carefully how delta motors move when going through the middle of the circular bed, you will notice there is a change of direction of all the motors. All linear actuators must go from "expanding" to "contracting" or viceversa, and the jerk/junction code considers this a 180 degree direction change movement, as it does not take into account it is driving a Delta printer, and always thinks it is driving a cartesian one. There is a very good question and i don´t have the answer to it: There IS a motor direction change, so speed should be reduced to nearly 0, otherwise steps could be lost, but, driving a Delta printer that "sudden" motor direction change does not translate into a direction change of the Delta effector printing head. Somehow, i think deltas have to apply the jerk code not to the motor movements, rather than, to the effector movements. I guess you will run exactly into the same issues with your SCARA robot... ;) Basically, Deltas and SCARA robots needs 2 algorithms limiting the maximum junction speed:
You use just the lowest speed of all 1) and 2) algorithms as maximum junction speed, and i think it should work |
The maximum allowable max_jerk_speeds, accelerations and max_sppeds are are properties of the stepper motor. They are completely determined by the current and the motor on the on side of the equation and the involved masses, the amount they move and external forces (gravity). For every position a delta can have we can determine what masses (mainly 1 carriage, 3 arms, effector) center of gravity is moving how far when we just move one step. However - since we can't calculate this on the fly we have to set the worst case values. Traditionally - if we don't lose steps - we can raise the values until we lose steps - minus a safety margin. Because this can be done per motor we have to see them as independent. So for the junction deviation calculation they are 90° to each other. |
@AnHardt : I do agree with the idea that
But that applies to the original Jerk code: That is why on delta/SCARA jerk is the 2nd) algorithm that should always run. The junction deviation algorithm deals about the speed of cornering, thus it is related to the effector movement, not the motors themselves. That is why i proposed a different algorithm for deltas: Compute maximum junction speed based on Junction deviation (this must be done using cartesian coordinates) and also compute maximum junction speed based on motor jerk limitations(old jerk algorithm) (and this calculation must be done in Alpha/Beta/Gamma Delta axis. Then use the lowest speed of the 2 as a maximum allowable junction speed. This should allow higher jerk values to be used, and higher accelerations, but properly handle cornering speeds of the effector |
@ejtagle @JxpA |
@AnHardt ... I don't have a Delta myself, but i thought it was something like http://www.thinkyhead.com/_delta/ ... |
@AnHardt |
I assume you did Speeds will tend to be limited more by Again, don't forget The other thing is that on Delta (and SCARA) the feedrates are given (from the slicer's perspective) with respect to the motion in Cartesian space, but when feedrates are passed on to the planner they apply to the steppers. If consideration isn't given to the kinematic conversion, then a single feedrate ends up translating into variable feedrates at the effector. I already added feedrate conversion for SCARA, and this works very well for those kinematics. We just need to duplicate the work I did for SCARA and apply it to Delta, so that the feedrate is converted from Cartesian space into the appropriate feedrate for the carriages. That algorithm first converts the Cartesian feedrate to the nominal move duration (presuming instant acceleration), and uses the change in carriage positions to convert to an appropriate carriage feedrate to pass on to the planner. It requires a SQRT, so it might reduce the top speed a little bit, or require fewer segments-per-second to be able to keep up. |
@thinkyhead I tried it. Error message: #define AUTO_BED_LEVELING_BILINEAR
|
Thanks for testing! I'm happy to hear it's moving more consistently now. And, the compile error is now fixed. |
I tried a fixed version, and compiled successfully. |
Thanks, @JxpA. Now the only question is whether the feature should be enabled by default, since it is actually more correct. There's no real reason to turn off |
The new option has been merged, and is enabled by default. It probably shouldn't ever be disabled, even though doing so might save on some processing. But the option is left in place in case there emerges a script to convert G-code to direct stepper movement for deltas. |
I made some prints with Marlin, the latest version today.
|
I rolled back the version to #11153. |
@JxpA : The I do suspect you are maxing out the processing capabilities of your board. Are you using a 32bit controller, or an AVR based controller? |
@ejtagle : I am using Arduino due and Ramps-FDv2 (DIY). After enabling LA, I tried each with the settings below(E step and K-Factor are correctly set).
|
Sounds like |
@thinkyhead Two messages are now sent from LA during printing.
|
I wonder if the top speeds are now allowing Linear Advance to get to a point of overload. Are you using the |
No, I disabled it. |
Since I fixed the issue via the use of
I agree with disabling |
@thinkyhead : There WAS a discussion on that problem related to JUNCTION_DEVIATION. Junction deviation (and also jerk!) should be computed on the cartesian coordinate system. |
@ejtagle I partially agree with you. Junction deviation should be performed on the nozzle movement in the Cartesian coordinate system and jerk should then be performed on the individual stepper movements. For Cartesian printers, the junction deviation calculation may be all that's necessary, but I think both are needed for kinematic machines due to the indirect relationship of the motor movement and nozzle movement. |
I agree that we don't want an individual stepper to experience too high a jerk, and so that should be limited at the stepper level. Then there's the separate question of how to figure junction deviation at the level of a kinematic machine's cartesian motion, and whether/how to apply a separate jerk calculation at the cartesian level when junction deviation is not in use.
I do recall that discussion. I guess it was left dangling, and we forgot to disallow JD for kinematic machines for the time-being until we worked out the solution. |
Exactly that was the idea @thinkyhead .. |
@tcm0116 I tested Marlin - 2.0.x_fwretract (16e55db). |
@JxpA - That's odd. I tested using your configuration files, and while the steps/mm were different, my printer homed upward as expected every time. Additionally, I've been using my same configuration files for my printer throughout my testing, and I haven't seen that issue. I'm not really sure what's going on. Can you try the latest bugfix-2.0.x to see if that exhibits the same issue? I just pushed a new commit to #11578 that attempts to correct |
@tcm0116 I tried the latest version of Marlin, but the same thing happened. Next I tested Marlin-2.0.x_fwretract (77b9304). Digression: |
Your solution of removing As for the weird behavior, since there are re-calculations done on the Try this:
|
The calculations done on In addition, I think @JxpA indicated that he was able to replicate the issue using the current bugfix-2.0.x. |
@JxpA - I loaded your configuration files, but I'm unable to replicate the issue. I tried running the following sequence:
Could you see if that simple sequence is enough to replicate the issue, or are there more commands required? Also, have you had a chance to evaluate how the other changes are working? |
@JxpA - I was able to replicate your issue by following the steps below:
I'll try and see if I can debug why that's happening. |
@JxpA - I've isolated the issue down to the second time |
It might be the
|
@thinkyhead I shut off the main power supply to stop the effecter descent. Case 1. Run Marlin used bugfix-2.0.x (7th Sep.) and Marlin-2.0.x_fwretract (77b9304). G-code used for the test. |
@tcm0116 I tested the printing with Marlin-2.0.x_fwretract (77b9304). In Marlin of the past, there was a problem of runaway when the nozzle approached the tower's periphery like this way. #11332 I tested whether I can print the first layer without problems using that model. |
@teemuatlut I believe you're correct. It looks like on startup, Marlin calls What I think is happening is that the One solution to the problem is to call |
It appears we can't remove
That could work. |
I'll try adding |
@thinkyhead see #11827 |
See #11103 (comment) Co-Authored-By: tcm0116 <tcm0116@users.noreply.github.com>
See #11103 (comment) Co-Authored-By: tcm0116 <tcm0116@users.noreply.github.com>
See #11103 (comment) Co-Authored-By: tcm0116 <tcm0116@users.noreply.github.com>
See #11103 (comment) Co-Authored-By: tcm0116 <tcm0116@users.noreply.github.com>
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. |
Hi,
Yesterday I replaced the stepping motor on the XYZ axis from 1.8 deg. to 0.9 deg..
The motor driver continues to use TMC 2130.
I changed the microsteps setting and flashed latest Marlin.
Then, the delta effectors began to make a strange movement.
I took a video of the situation.
https://i.imgur.com/cVv1aw8.mp4
In the video I run X +50mm twice and then run X -50mm twice.
Movement slows down in the area of about 40 mm radius at the center of the bed.
Before changing the motor, it was always running at constant speed.
Do you know why the movement slows down at the center?
Configuration.zip
The text was updated successfully, but these errors were encountered: