JA13 scarakins wrong trajectory

More
24 Jun 2016 11:30 #76543 by andypugh

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)
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
24 Jun 2016 13:26 #76552 by PCW
Replied by PCW on topic JA13 scarakins wrong trajectory
This is why i suggested using a small following error for the stepgen
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.

More
24 Jun 2016 13:53 #76557 by bkt
Replied by bkt on topic JA13 scarakins wrong trajectory
@PCW ... i explain my better about ferror = 0.1 ... if try with these value of ferror, the scara move correct but only with really lower velocity or with single axis mouvement (no teleop) ... with teleop mode mouvement obtain follow error ... so I set my ferror in these way (8,5 .. 6,5 etc etc). Ferror according to your reasoning should be small and at high speed is a little speed?

@ 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.

More
24 Jun 2016 14:18 - 24 Jun 2016 14:20 #76561 by PCW
Replied by PCW on topic JA13 scarakins wrong trajectory
if it works without following errors with small ferror limits with single axis jogging this suggests
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
Last edit: 24 Jun 2016 14:20 by PCW.
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
24 Jun 2016 14:33 - 24 Jun 2016 14:47 #76565 by Todd Zuercher
What Andy meant by "unfeasibly fast servo-thread rate" was, that it would be not make sense to try to run Linuxcnc at a servo thread rate slow enough to make a P = 20 the right setting. (SERVO_PERIOD = 50000000)
Last edit: 24 Jun 2016 14:47 by Todd Zuercher.

Please Log in or Create an account to join the conversation.

More
24 Jun 2016 14:57 #76570 by Todd Zuercher
P=20 in the Linuxcnc PID for controlling the velocity mode stepgen in the Mesa card's FPGA. will cause a large following error, and undershoot. Kind of like having too little P in an ordinary servo system.

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.
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
24 Jun 2016 15:04 - 24 Jun 2016 15:06 #76572 by bkt
Replied by bkt on topic JA13 scarakins wrong trajectory
Ok ... so P=1000 -> 1ms LCNC servo-period ...


and

P = 20 the right setting. (SERVO_PERIOD = 50000000)

... 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 ?
DIRSETUP   = 500
DIRHOLD    = 500
STEPLEN    = 500
STEPSPACE  = 500

Why is set in standards pncconf to 1000? i 1ms related?

Regards
Giorgio
Last edit: 24 Jun 2016 15:06 by bkt.

Please Log in or Create an account to join the conversation.

More
24 Jun 2016 15:15 - 24 Jun 2016 15:16 #76577 by bkt
Replied by bkt on topic JA13 scarakins wrong trajectory
do not worry .... as you can see are not expert in the knowledge about LCNC what and how to do things .... language is often a source of misunderstanding for me ... but I understand enough to not confuse the two P (drive & LCNC) .... basically do not understand how the pid parameters could influence the step commands in a mesa 7i76 .... now I realized that the whole thing has been adapted to allow you to make a closed loop even with step dir .... only which in my case I do not have an encoder ... and the previous step is used as a signal ...

regards
giorgio
Last edit: 24 Jun 2016 15:16 by bkt.

Please Log in or Create an account to join the conversation.

Time to create page: 0.255 seconds
Powered by Kunena Forum