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

More
5 years 9 months ago #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.

Please Log in to join the conversation.

More
5 years 9 months ago #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

Please Log in to join the conversation.

More
5 years 9 months ago #195839 by cmorley
does resolvers also have the velocity-rpm pin?

Please Log in to join the conversation.

More
5 years 9 months ago #195841 by PCW

Please Log in to join the conversation.

More
5 years 9 months ago #195844 by cmorley
Thanks - pushed the fix to 2.8/master

Please Log in to join the conversation.

More
5 years 9 months ago #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.

Attachment not found

Attachment not found



Hope you can help me
Steffen

Please Log in to join the conversation.

More
5 years 9 months ago #196431 by PCW
Note that the encoder velocity signal "spindle-vel-fb-rpm" is not connected to anything

Code:
#******************* # 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:

Code:
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:

Code:
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:

Code:
#addf scale.spindle servo-thread

Please Log in to join the conversation.

More
5 years 9 months ago #196440 by Steffen
Hi PCW,

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

Please Log in to join the conversation.

More
5 years 9 months ago #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

Please Log in to join the conversation.

More
5 years 9 months ago #196442 by Steffen
here are the new files.

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

Attachment not found

Attachment not found

Please Log in to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum