- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- [SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
[SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
- FranseFrikandel
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 2
18 Jan 2021 14:15 - 18 Jan 2021 23:53 #195797
by FranseFrikandel
[SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly. was created 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.
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.
Last edit: 18 Jan 2021 23:53 by FranseFrikandel.
Please Log in or Create an account to join the conversation.
18 Jan 2021 15:51 #195808
by PCW
Replied by PCW on topic Bug: PnCConf does not set up servo spindle PID feedback correctly.
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
(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.
18 Jan 2021 21:59 #195839
by cmorley
Replied by cmorley on topic Bug: PnCConf does not set up servo spindle PID feedback correctly.
does resolvers also have the velocity-rpm pin?
Please Log in or Create an account to join the conversation.
18 Jan 2021 22:13 #195841
by PCW
Replied by PCW on topic Bug: PnCConf does not set up servo spindle PID feedback correctly.
Yes
Please Log in or Create an account to join the conversation.
18 Jan 2021 22:35 #195844
by cmorley
Replied by cmorley on topic Bug: PnCConf does not set up servo spindle PID feedback correctly.
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.
24 Jan 2021 17:02 #196428
by Steffen
Replied by Steffen on topic [SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
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.
Hope you can help me
Steffen
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.
Hope you can help me
Steffen
Attachments:
Please Log in or Create an account to join the conversation.
24 Jan 2021 17:23 - 24 Jan 2021 17:24 #196431
by PCW
Replied by PCW on topic [SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
Note that the encoder velocity signal "spindle-vel-fb-rpm" is not connected to anything
I would change this:
to this:
and remove the scale component since it is not used:
#*******************
# 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
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.
24 Jan 2021 18:12 #196440
by Steffen
Replied by Steffen on topic [SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
Hi PCW,
thank you, i just tested it but still the same problem.
thank you, i just tested it but still the same problem.
Please Log in or Create an account to join the conversation.
24 Jan 2021 18:17 - 24 Jan 2021 18:17 #196441
by PCW
Replied by PCW on topic [SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
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
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.
24 Jan 2021 18:27 #196442
by Steffen
Replied by Steffen on topic [SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
here are the new files.
i have no counts at the pid.s.feedback pin
i have no counts at the pid.s.feedback pin
Attachments:
Please Log in or Create an account to join the conversation.
Moderators: cmorley
- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- [SOLVED] Bug: PnCConf does not set up servo spindle PID feedback correctly.
Time to create page: 0.095 seconds