Closed loop spindle control

More
01 Feb 2014 20:53 #43398 by DavidNicholls
I am looking for a way to drive the pncconf utility to configure my spindle for closed loop PID control. I can output a PWM signal to 'suggest' a speed to the controller and I can monitor the speed of the spindle via encoder feedback. Both of these signal paths use a MESA 7i43 interface card. I would just like to introduce a PID loop to manage the 'suggestions' made by the PWM signal and the 'observations' made by the encoder signals. i.e. if the spindle slows under load, I would like the PWM signal to 'suggest' that it try harder.

I can see the image on linuxcnc.org/docs/html/config/pncconf.ht...pindle_configuration along with the 'tip' that indicates that this option will not be visible unless "the proper option was selected on previous pages". Does anyone know what the "proper options" would be?

I know there are examples of configuring the HAL files manually but I find that avenue daunting. I like the ease of use provided by the PNCconf utility but I would also like my spindle to maintain speed under load. Can I have both?

I should mention that I'm running LinuxCNC version 2.5.3 (in case a later version has the functionality I'm after)

Thanks
David Nicholls

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

More
02 Feb 2014 02:22 #43404 by cmorley
Replied by cmorley on topic Closed loop spindle control
Im sorry I believe I removed that option during a bug fix session and forgot to put it back in.
You will have to add it manually.
If you look at how pncconf connects PID to an axis it should help you figure out how to do it.

Chris M
The following user(s) said Thank You: DavidNicholls

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

More
02 Feb 2014 17:27 #43424 by DavidNicholls
Thanks for the response. I found a couple of places in the code and I have been able to see the screen that allows a PID loop control for the spindle. I needed to manually connect the pid.s.enable signal but the spindle now turns. It doesn't yet turn at the requested speed so I imagine I have some of the other settings wrong still but the PNCconf question is settled. If I come up with a complete solution to my problem I will post any PNCconf changes here but it might take me a little while.

In any case, thanks for the help.

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

More
03 Feb 2014 20:59 #43490 by andypugh

It doesn't yet turn at the requested speed so I imagine I have some of the other settings wrong still but the PNCconf question is settled.


Any PID will need to be tuned. I would suggest getting as close as you cam with P, I, D all zero and adjusting only FF0 at about the middle speed, then add in some I to make it correct everywhere, then perhaps a bit of P to make it work faster. (but you might well not need the P).

A spindle will typically mainly be controlled by FF0, which is largely identical to the original open-loop config.
The following user(s) said Thank You: DavidNicholls

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

More
04 Feb 2014 04:33 #43517 by DavidNicholls
Thanks for the suggestion. Although I do have servo motors on the axes I have used the Gecko drivers so I haven't had to manually tune them except for a couple of trim pots on the controllers.

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

More
11 Mar 2014 08:12 #44646 by bottleworks

Im sorry I believe I removed that option during a bug fix session and forgot to put it back in.


Any plans to reintroduce it? In time, I would like to do this to a second machine I'm working on. I'm not going to do it until I remove the variable speed belt drive and that will be a while. If this can be configured via a GUI, the better!

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

More
11 Mar 2014 12:59 #44650 by cmorley
Replied by cmorley on topic Closed loop spindle control
probably not for the 2.5,x series, but for 2.6 yes.

Chris M

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

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