linear scale and AC servo set up - sanity check

More
4 years 4 weeks ago #253371 by chienMouille
Hi,

I'm attempting to convert a rather standard milling machine. I have an AC servo as well as a 5um linear glass scale. I have a really hard time setting the feedback PID of the scale. I am coming to you all for a sanity check.

I haven't connected the servo feedback to the 7i95 mesa card, but have tuned it as best as I could to have it react fast and be stiff. The TTL signal of the scale is connected to the first encoder input of the 7i95. The servo is commanded by a dir/pulse position output. Any type of tuning I'm attempting with the scale seems to make things much worst than without the scale feedback at all. 

Am I wrong with the basic set up, e.g. the fact that the servo encoder is not feedbacking to the mesa card messes it all up?

Thanks a lot in advance

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

More
4 years 4 weeks ago - 4 years 4 weeks ago #253376 by Todd Zuercher
What are the problems your having? Exactly what is worse with the tune when you have the linear scales feedback connected?

Start by testing the servo's movements with the linear scale and the normal Mesa open loop stepper configuration, except connect the feedback from the linear scale to "joint.N.motor-pos-fb" (keep the stepgen's position feedback connected to the PID loop). Then compare the joint position feedback and following error with the stepgen position feedback and PID error with Halscope. You may be surprised with how much they may disagree and when. Doing this is going to show you two things, the state of tune of your servo drive's position loop, and how much lost motion you have.

This will also be a sort of a baseline, you won't be able to expect to achieve better stability than the drive's current state of tune.

You will also find that the P settings when using real position feedback will need to be significantly lower than the P setting for the openloop stepgen system (in other words P will need to be a lot less than 1000.)

You need to remember that any lost motion (aka backlash) in the system between the servo, it's feedback and the linear scale will result in either reduced response performance, cause instability or both. Adding a linear scale does not eliminate the problems caused by backlash. Adding linear scale the can reduce and change the effects of the backlash but won't remove them. Best to fix your mechanical problems rather than try to band-aid them.

PS, No, the fact that the servo's rotary encoder isn't feeding back to Linuxcnc, should not be causing any problems.
Last edit: 4 years 4 weeks ago by Todd Zuercher. Reason: add PS
The following user(s) said Thank You: chienMouille

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

More
4 years 4 weeks ago - 4 years 4 weeks ago #253380 by chienMouille
Thank you so much!

The problem mainly is that however I try and tune it (following guides on the forum) it quickly ends up oscillating a lot on the target or moving to it in slow motion. And the following error is huge.

Indeed I have a couple of tenths of backlash as I haven't yet changed the leads crew and totally being carried away at trying to tune this motor on the current setup.

I will post pictures of the scopes tomorrow, I'd be very curious of your analysis in reading them, if you don't mind.

I will reduce the Hal configuration to your suggestion too. If you could point me to a guide or example of stepgen-encoder Hal configurations it would be super useful for later as well. I'm having a hard time understanding the feedback and pid Hal setup. I have so far made a dummy encoder configuration in pncconf and copied what seemed relevant to my Hal file.

I could post the state of the Hal and ini files tomorrow too if useful.

Thanks a lot!
Last edit: 4 years 4 weeks ago by chienMouille.

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

More
4 years 4 weeks ago #253382 by Todd Zuercher
The biggest work is adding all the configuration to set up reading the encoder and it's scaling. Are you sure you have the encoders scaling, and directions correct? Do that first, Also it might be helpful to post copies of your hal and ini files.

Switching from the usual PNCconfig open loop stepgen configuration to an encoder feedback closed loop one is relatively simple and only requires changing and or adding a few lines of halcode to disconnect the pid feedback from the stepgen's feedback and replacing it with the encoders. Then you have to tune the PID.
The following user(s) said Thank You: chienMouille

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

More
4 years 4 weeks ago #253383 by Todd Zuercher
There are example configs posted on the forums with step/dir servos using encoder feedback to close the position loop in Linuxcnc. I know I've posted some myself. Try using the forum's search funcion (being sure to not limit the date of the search results.)
The following user(s) said Thank You: chienMouille

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

More
4 years 4 weeks ago #253385 by tommylight
Code:
step dir encoder site:linuxcnc.org
In google will return every post on this site containing those words:
www.google.com/search?q=step+dir+encoder...ABAQ&sclient=gws-wiz
The following user(s) said Thank You: chienMouille

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

Time to create page: 0.199 seconds
Powered by Kunena Forum