-
Notifications
You must be signed in to change notification settings - Fork 133
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
G2 ZAxis Moves Not Completing #537
Comments
Good spotting @madgrizzle. I'm not in a position to make that change or test it - can you do that? |
I agree that after 332 looks like a more logical place for that line to go. I'm not in a position to test it either but I can put the call out on the forums and hopefully recruit some testers |
Yeah, but after thinking about it, I'm not sure its the cause of the problem. The issue was a G1 Z-0.8 F30 move not completing... I'm thinking maybe if it only happens at that depth, then it might be a binding issue of some sort (maybe its bottoming out). Need more info, |
If the file runs in FAKE_SERVO mode but fails with real equipment, that would further suggest a mechanical cause. |
Originally reported in forum Ground Control not using correct Z height I think I have found the problem but looking through change history I can't understand what was going on. Axis::read() is reporting the current encoder position whilst it is still moving and not the last target dimension set by Axis::write() or Axis::set(). I thought that gcode is executed sequentially and waits until motors have stopped moving from previous command? It looks like the next Gcode command can start processing before this (even using fakeServo). There is Axis::setpoint() which seems to return the last target dimension but I have no idea why its is named setpoint and it does not appear to be used anywhere. If you change GCode.cpp line 778 from You will see that Z does reach target dimension. Before this change, testing with fakeServo, the Z stopped at -7.96 for me. Afterwards it stops at -8 as expected. Using physical equipment will probably make the discrepancy worse. Test GcodePlanar G2This exhibits the problem because Z is not provided in the G2 line.
Helical G2This always works because Z is provided.
Perhaps zAxis.setpoint() should be renamed zAxis.readTarget()? |
I'm using my phone to look at all this, but if you look at the end of the arc function, you will see rightaxis.endmove and leftaxis.endmove called, but not zaxis.endmove. Compare the arc function with coordinatedmove and you'll see the difference. |
@madgrizzle That might be another problem. The problem I am talking about happens before arc() starts. Z1 passed to arc() is already wrong. If the G2 code line does not have Z in it then Z2 is also wrong because it equals Z1. Removing my fix and adding |
Yeah, I agree.. but if we are inside the code to fix one thing, might as well fix something else that's there. I'm wondering if loop is being exited one step too early. |
I have created pull request with fix. #539 |
Firmware/cnc_ctrl_v1/Motion.cpp
Line 348 in 400db40
In the G0/G1 moves (coordinatedMove) this function is higher up in the loop than in G2/G3 moves (arc). I think this needs to be moved up to be after line 332?
The text was updated successfully, but these errors were encountered: