JA13 scarakins wrong trajectory
- andypugh
-
- Offline
- Moderator
-
- Posts: 23262
- Thank you received: 4927
But I set P=20 why these is not a good idea??
You could try not using a PID loop at all. How does that work?
Use of a HAL PID loop is a moderately recent development, though back in the early days of EMC2 it was the only way to do it.
Stepper systems work pretty well without a PID loop in HAL. You connect motor-position-cmd to the stepgen position pin, connect the feedback pins to make sure that the system has managed to make all the steps, and that's it. That might be an experiment well worth doing with your machine, so that you only have one PID loop in the system, the hardware one in the servo drive.
With the switch to PREEMPT-RT kernel support it has been noticed that much larger latency can be tolerated with a Mesa card setup if the stepgen is driven by a PID loop in HAL. This is just a way to automatically compensate for thread jitter. But it isn't a a typical PID loop that needs tuning, all the loop parameters are known and the P, I, D and FF terms can all be derived analytically.
If your servo-thread rate is 1000uS / 1ms / 1kHz then the only correct number for the P term is 1000. If your serv-thread rate is not 1kHz then you might need a 500 or 2000. But unless you have an unfeasibly fast servo-thread rate a P-gain of 20 can not be correct.
So, my suggestion would be first to comment-out the PID parts of the setup, change the stepgens to position mode an run a "classic" stepper system. That will help decide if the figure-8 problem is due to the servo drives or due to corner-rounding in the LinuxCNC trajectory planner. Then you can try exact-path mode in the planner to eliminate that possibility. (to an extent, that might limit speed so much that you can't tell if the problem is still there)
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
- Posts: 18434
- Thank you received: 5034
If you get a following error, that means there are stepgen issues
if you dont get a following error, it means you have servo/trajectory/kins issues
Please Log in or Create an account to join the conversation.
- bkt
-
Topic Author
- Offline
- Platinum Member
-
- Posts: 1211
- Thank you received: 113
@ AndyPugh
If your servo-thread rate is 1000uS / 1ms / 1kHz then the only correct number for the P term is 1000. If your serv-thread rate is not 1kHz then you might need a 500 or 2000. But unless you have an unfeasibly fast servo-thread rate a P-gain of 20 can not be correct.
1) sorry ... not understand these term :unfeasibly ... my english is google translate level ...
2) so P is SERVO_PERIOD (LCNC) related or my hardware servo-thread period related?
My servo drive is a YASKAWA type .... normal 1ms timing .... so I understand that you are referring to the hardware yaskawa .... so P = 1000 becomes the time within which the MESA cards respond instead of PREEPT - RT if the latency is too high and would cause "holes during transmission of stepper wawes ". Is I correct what I understood?
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
- Posts: 18434
- Thank you received: 5034
you are violating the stepgen acceleration or velocity limits with your kins
P = 1000 at a 1 ms servo thread means that stepgen position errors are fixed an the end of the next period
this is identical to the built in stepgen position mode
This 1 MS is LinuxCNCs servo thread period and has nothing to do with external hardware/mechnics
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
- Posts: 4987
- Thank you received: 1455
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
- Posts: 4987
- Thank you received: 1455
I certainly hope you are not setting the P setting in your servo drives to the same value as we are telling you to set the P in the Linuxcnc ini file? These should be completely unrelated P values.
Please Log in or Create an account to join the conversation.
- bkt
-
Topic Author
- Offline
- Platinum Member
-
- Posts: 1211
- Thank you received: 113
and
... in these case really no sense my settings.... and I see noting vibration at these because LCNC not have enought time to send correct step signal at 1ms thread ... so yaskawa took a few crumbs of Position step and " concluded the trajectory on its own ... I must observe that though the placements are always correct .... at this point the only conclusion is that : I have set wrong yaskawa , I set incorrectly the ini file .... I try to do some calculations .... just one more question : what do these parameters in my case ?P = 20 the right setting. (SERVO_PERIOD = 50000000)
DIRSETUP = 500
DIRHOLD = 500
STEPLEN = 500
STEPSPACE = 500
Why is set in standards pncconf to 1000? i 1ms related?
Regards
Giorgio
Please Log in or Create an account to join the conversation.
- bkt
-
Topic Author
- Offline
- Platinum Member
-
- Posts: 1211
- Thank you received: 113
regards
giorgio
Please Log in or Create an account to join the conversation.