-
Notifications
You must be signed in to change notification settings - Fork 86
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
Loss of position #147
Comments
Do you have more details? |
I send you the gcode |
I have now run your test file on a STM32F446 with your settings using my machine simulator. Both the reported positions (in the real time report) and the simulator step counts return to 0. What is the stepper driver specification for the minimum dir to step pulse setup time? And can you answer these questions asked previously, if possible? The reported position is correct? |
good day terjeio, the servo dirve is brand xinje ds2, tembien test with a leadshine is d508, vexta asd2-a |
No, it might be faster than the other ports. If the dir -> step delay is too small for the drivers this could lead to the drivers losing or incorrectly interpreting step pulses. The AMASS used by Grbl/grblHAL to smooth step pulses may introduce some seemingly random delay between dir transitions to next step pulse thus most of the time keeping signalling within driver tolerances. |
terjeio, look try with the esp32 and grblhal and also with the rp2040 and the same thing happens, I uploaded grblhal to the bluepill and also does the same servos lose steps, but if I upload the 6-AXIS-USBCNC-GRBL with this servos work well there is some small problem in the code, if you could try it with a motor so you realize what's happening |
Have you tried with setting $29 to a value >= 1? |
Already tested and still the same.... |
Ok, again then: The reported position is correct? |
Well, that is why it loses position. grblHAL:
ioSender supports the character counting method (agressive buffering) that attempts to keep the input buffer relatively full, this for smoother motion. Many legacy senders does not and implement stop (or rather pause) by simply stop sending commands to the controller. If ioSender did that you would risk the machine running for quite some time before coming to a halt. This is, IMO, dangerous and the reason for adding the new stop command. So for a controlled halt of motion when ioSender is used with a grblHAL controller first press Feed hold, and after motion has stopped press Stop. This will ensure position is not lost. Due to a user request ioSender will use the same protocol as other senders when the controller is Grbl based, it just stops sending new commands. IIRC the label on the Stop button should change to Pause when motion is ongoing to as feedback to the user - note I am not able to recheck that now. This explains why Grbl controllers does not lose position. |
Well that also happens if I let the gcode finish, my question is why with the bluepill and the other code that does not happen? |
Well, then we are back to my unanswered questions... |
well, I think this is a big problem because if you have a large cnc and the gcode is extensive. |
Good morning Terjeio, Is there any way to solve this problem? |
First it has to be identified where the problem is located. I will do my part when I am back home by retesting the ESP32 and RP2040 drivers. I anyone are willing to donate a closed loop driver/motor combo that may help as I currently do not have one available. |
Good morning Terjeio... |
I need to know when you run a test to completion is the position error the same every time or does it vary (is random)? |
Good morning Terjeio..... Working on an engraving gcode when it finishes I run it again and I see that the engraving is a couple of millimeters off in X,Y,Z. |
You have different run times with the same gcode file? I want to know if the same file consistently produces the same error every run or if there is some randomness.
So the displayed position differs from the programmed one?
That is a lot - several thousand steps. |
I have now run several tests successfully with the ESP32 driver (latest commit) connected to my simulator, are you sure the stepper drivers are tuned correctly? |
Good morning terjeio.... |
FYI the ESP32 driver had issues with I2S stepping that I have now fixed. Depending on which ESP32 board you are testing with this may be the cause of your problems. |
Hello Juank, Have you tried normal steppers? I read some servos could be in speed precise or position precise. Regards |
good day JoachimF, I have tried with a dm556 driver and a nema 23 motor. |
good morning terjeio....
I have a problem with the code, I realized that it is losing steps in a large gcode, I did several tests with servomotors which give higher performance acceleration and precision, but in a small gcode the servos return without problem to their initial position, but when the gcode is large the servos lose position, I have several controllers, the f411, f401, rp2040, and with all the same thing happens, but try with a bluepill f103 and this code https://github.com/robomechs/6-AXIS-USBCNC-GRBL
and it works fine.... also try with an esp32 and fluidnc and it works fine, do you know what could be happening?
The text was updated successfully, but these errors were encountered: