PID Tune Problem and Clarification

More
8 years 11 months ago - 8 years 11 months ago #102387 by Bello
Hi All,
I need to tune my Machine and my PID.
I understood from what I'm reading on the web , that this is a critical step that is struggently for all.
I read more topic about the PID tune procedure but I cannot obtain a right configuration for my machine.

Starting from this official guide linuxcnc.org/docs/html/motion/pid-theory.html I would understand:

"Increase the P until the output of the loop oscillates." What means this phrase? Which is the oscillation, how can I check it (halscope)?

From this guide also gnipsel.com/linuxcnc/tuning/servo.html I read:

"P - Tune to maximum stiffness without oscillation. "

but I cannot understand what is really required to observe here.

Can you help me please?
In case, can you suggest other guide that can help me please?

Thanks in advance
Last edit: 8 years 11 months ago by Bello.

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

More
8 years 11 months ago #102430 by jtc
The following user(s) said Thank You: Bello

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

More
8 years 11 months ago - 8 years 11 months ago #102525 by Bello
Hello,
thank you, I have tuned the PID now. But still there is an issue when the CNC using it.

If the PID (optical line) is enabled the X axis during the program, suddenly is shifting/loosing its position of 0,004 of.
This shift will increment during the program use.
My doubts here:

1) could that depends for the PID configuration that is set in velocity mode? should be configured in position mode?
If yes, can someone help me to do it?

2) Is some misconfiguration on my PID configuration (file FEEDBACK.hal)?

3) Could depends from stepgen missing/wrong configuration?

I'm attaching my config files in order to give you all details.
NOTE: The CNS is working as expected without PID enabled but I think a tune could be required in order to improve the existing stepgen configuration

Please help me.
Last edit: 8 years 11 months ago by Bello.

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

More
8 years 11 months ago #102533 by Todd Zuercher
I think there are problems in your hal files.
1st I don't believe that comments at the end of a line of hal code are allowed. (this will cause the whole line to be ignored.)
2nd it doesn't look like your encoder feedback is working (it isn't addf-ed into any threads.) and without feed-back the PID won't work.

Why are you adding 6 encoder channels for a 3 axis machine and only using 1 of them?
Both of these functions need added to threads for the software encoder counter to work, encoder.update-counters needs to be addf-ed to the base thread and encoder.capture-position needs to be addf-ed to the servo thread.
The following user(s) said Thank You: Bello

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

More
8 years 11 months ago - 8 years 11 months ago #102539 by Bello
Your questions and observations are right because I haven't upload my FULL configuration.
I have attached the complete configuration now. (I'm removing the comments in a newest on)
I have 4 encoders into panel.hal file, 1 encoder on ANT_MPG.hal file and 1 encoder on FEEDBACK.hal.

I have already added to threads encoder.update-counters and encoder.capture-position (see panel.hal) and I think the PID and feedback are loaded fine because I have tuned it using halscope and calibration.

Can you help me to understand what I have missing because I still have 0.004 of shift (that increasing with the movement) and seems that isn't correct automatically.

Thanks in advance
Last edit: 8 years 11 months ago by Bello.

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

More
8 years 11 months ago #102557 by Bello
I'm using this optical line :

it.aliexpress.com/item/High-accuracy-mac...s.9042311.0.0.b4PES0

and after done more tests and after read more topics on the web I'm arrived at conclusion that the issue could me in the optical line TTL output and parallel port.

I understood also that I have a backslash on my CNC of 0.004 and that if I use the BACKSLASH into ini without use the optical line is corrected fine.

I have also tried to use the encoder.N.x4-mode TRUE in order to manage the quadrature but no luck, seems result and the shift is not corrected and improve during the direction change.

I hope that the issue is more clear for you also.

Have you any siggestion or experiences on that?

Thanks in advance

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

Time to create page: 0.389 seconds
Powered by Kunena Forum