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

Acceleration violations in linuxCNC 2.7 and 2.8 #546

Closed
pcw-mesa opened this issue Dec 30, 2018 · 12 comments
Closed

Acceleration violations in linuxCNC 2.7 and 2.8 #546

pcw-mesa opened this issue Dec 30, 2018 · 12 comments

Comments

@pcw-mesa
Copy link
Collaborator

Both current versions of LinuxCNC have acceleration constraint violations in some circumstances
While testing a forum posters gcode files ( https://forum.linuxcnc.org/9-installing-linuxcnc/35744-not-a-bug-report ) i found that I could get acceleration violations with one of the test files: \

http://freeby.mesanet.com/1.ngc

I have aggressive velocity and acceleration limits on my test configuration: 20 IPS and 200 IPS^2
and that may play a part, but this error is reproducible in both 2.7 and 2.8 (first error around line 920)

http://freeby.mesanet.com/28ferror.png
http://freeby.mesanet.com/28ferrorb.png

The second plot has the ferror limits widened enough so the following error fault is not generated

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Jan 1, 2019

I discovered that AFAICT this bug is triggered by very small G64 PXXX values
The example files provided on the forum had G64 P0.001 in mm
if this is set to .003 or greater the acceleration constraint is not violated

@samcoinc
Copy link
Collaborator

samcoinc commented Jan 1, 2019 via email

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Jan 2, 2019

Yes I remember. This (tiny G64 Pxxx values) seem to mainly effect configs with high velocity/acceleration. It looks like the forum posters issue is not the same, I can duplicate it here with a mm LinuxCNC 2.8 config:

http://freeby.mesanet.com/fe28.png

Axis A (Joint3) has a maximum velocity of 200 degrees per second and acceleration of 2000 degrees
per second^2 you can see that it violates the acceleration constraint by about 50% and the violation is not dependent on PXXX values ( Interestingly, it does go away with G61 however )

@robEllenberg
Copy link
Collaborator

Thanks for providing the scope traces and test program. It was possible to slice out a short (20 line) portion of it to reproduce the issue in sim. Would you mind giving my fix branch a try to see if the fix works on your platform?

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Jan 5, 2019

Sure, how do I get you patches? bear with me, I have a terrible flu so keep it simple :-)

@robEllenberg
Copy link
Collaborator

robEllenberg commented Jan 7, 2019 via email

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Jan 7, 2019

OK tested that branch, I does seem to fix the "small G64PXXX value" problem
but I still get the same acceleration error (looks like acceleration exceeds constraint by 50%)
in the 1_wrap.ngc file with my configuration:

http://freeby.mesanet.com/a-err.png

(bottom trace is acceleration, ini file constraint is 2000 but acceleration reaches ~3000)

@robEllenberg
Copy link
Collaborator

Is that at the end of the program? It looks like it's coming up to the last segment too fast; possible an issue with the optimizer. Is 1_wrap.ngc different from 1.ngc linked above? If so, could you post a link to it? I'll try to reproduce it with the debug output on and see where it's failing.

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Jan 8, 2019

Sorry I didn't include that, here it is

http://freeby.mesanet.com/1_wrap.ngc

With my config I get the fault around line 420

@robEllenberg
Copy link
Collaborator

Thanks! I was able to reproduce it by doing a find / replace of "Y" with "A" in the original file as well. I just pushed a fix to that same branch (currently running in sim locally without violations so far). There was a parabolic blending case where it wasn't reducing acceleration correctly, causing the violation you saw.

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Jan 8, 2019

Yay! and thanks! both bugs fixed AFAICT

@SebKuzminsky
Copy link
Collaborator

We believe this is fixed in 2.7 and newer: 04d7be9

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

5 participants