[SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.

More
18 Jan 2021 14:15 - 18 Jan 2021 23:53 #195797 by FranseFrikandel
Hello,

After rewriting my HAL file and adding spindle-at-speed detection, I found out my spindle was not running at the correct RPM. After some investigation I found out this is because the HAL file generated by PnCConf does not correctly connect any feedback to the spindle PID loop.

Only spindle-fb-rps is connected directly to the signal from the 5i25 encoder signal, however the spindle feedback is connected to the RPM signal instead of RPS (spindle-feedback-rpm). This signal however is not connected anywhere else, meaning there is no RPM feedback going to the PID loop.

I have included an older HAL file that should be almost the exact same as the one generated by PnCConf, only some small alterations and none to the relevant sections. I have since resolved it in my HAL file by simply using the scale component, however this should probably be fixed within PnCConf as well.
Attachments:
Last edit: 18 Jan 2021 23:53 by FranseFrikandel.

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

More
18 Jan 2021 15:51 #195808 by PCW
It would probably be cleaner to use RPM everywhere and avoid the scale component
(since the driver in 2.8 exports the encoder velocity in RPM as well as RPS)

net spindle-vel-fb-rpm <= hm2_5i25.0.encoder.05.velocity-rpm
The following user(s) said Thank You: FranseFrikandel

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

More
18 Jan 2021 21:59 #195839 by cmorley
does resolvers also have the velocity-rpm pin?

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

More
18 Jan 2021 22:13 #195841 by PCW

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

More
18 Jan 2021 22:35 #195844 by cmorley
Thanks - pushed the fix to 2.8/master
The following user(s) said Thank You: tommylight, FranseFrikandel

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

More
24 Jan 2021 17:02 #196428 by Steffen
Hello,

i think i have the same problem, too.

I added the fix in PNCConf today, but i have no spindle regulation anyway.

PNCConf added this line in my HAL file: net spindle-vel-fb-rpm <= hm2_7i76e.0.encoder.00.velocity-rpm

I tested different PID parameters all day.

I`m using a Mesa 7i76e with 7i84s and a Lenze Vector 8200 VFD 0-5V, Speed range 1000-2500rpm.

My HAL and INI is in the attachments.

File Attachment:

File Name: meine_Linu...hine.hal
File Size:10 KB

File Attachment:

File Name: meine_Linu...hine.ini
File Size:4 KB


Hope you can help me
Steffen
Attachments:

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

More
24 Jan 2021 17:23 - 24 Jan 2021 17:24 #196431 by PCW
Note that the encoder velocity signal "spindle-vel-fb-rpm" is not connected to anything

#*******************
#  SPINDLE
#*******************
--------------------------------------------

net spindle-vel-fb-rpm-abs      => pid.s.feedback
# ---Encoder feedback signals/setup---
net spindle-vel-fb-rpm       <=   hm2_7i76e.0.encoder.00.velocity-rpm
I would change this:

setp     scale.spindle.gain 60
setp     lowpass.spindle.gain 1.000000
net spindle-vel-fb-rps        =>     scale.spindle.in
net spindle-fb-rpm               scale.spindle.out       =>   abs.spindle.in
net spindle-fb-rpm-abs           abs.spindle.out         =>   lowpass.spindle.in
net spindle-fb-rpm-abs-filtered  lowpass.spindle.out  

to this:

setp   lowpass.spindle.gain 1.000000
net spindle-vel-fb-rpm    =>   abs.spindle.in
net spindle-fb-rpm-abs    abs.spindle.out   =>   lowpass.spindle.in
net spindle-fb-rpm-abs-filtered  lowpass.spindle.out  

and remove the scale component since it is not used:

#addf scale.spindle            servo-thread
Last edit: 24 Jan 2021 17:24 by PCW.
The following user(s) said Thank You: Steffen

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

More
24 Jan 2021 18:12 #196440 by Steffen
Hi PCW,

thank you, i just tested it but still the same problem.

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

More
24 Jan 2021 18:17 - 24 Jan 2021 18:17 #196441 by PCW
Can you post the current hal/ini files?

Did you look at the pid.s.command and pid.s.feedback pins?
These values are key to diagnosing any closed loop speed control issue
Last edit: 24 Jan 2021 18:17 by PCW.
The following user(s) said Thank You: Steffen

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

More
24 Jan 2021 18:27 #196442 by Steffen
here are the new files.

i have no counts at the pid.s.feedback pin

File Attachment:

File Name: meine_Linu...1-24.ini
File Size:4 KB

File Attachment:

File Name: meine_Linu...1-24.hal
File Size:10 KB
Attachments:

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

Moderators: cmorley
Time to create page: 0.094 seconds
Powered by Kunena Forum