closed loop using linear scales vs rotary encoders

More
10 Nov 2015 08:03 #65061 by axk
Hi, Ive searched and couldn't find a similar situation so please pardon me if this is a redundant question.

I've got a smooth-stepper based milling machine with Teco servos and Teco drives. It is being run by Mach3 as a step-direction setup.
I need a bit more accuracy out of the machine than I am getting.

I'd love to have absolute table position fed back to linux cnc so I can be rid of backlash issues (I've got around .001" or .002" on x,y,z), but over the course of a three hour job the Y-zero will drift a tiny bit. Maybe I've got the backlash wrong? Anyhow, I wanted to close the loop and feed positional data back to the PC.

Can LinuxCNC use the current setup run in step-dir mode with the teco drive closing the loop to the servo AND take into account data from a linear scale for absolute positioning?
OR must linuxcnc also have servo encoder data in addition to the linear scales?

The reason I'd go with closed loop to the servo drive is for simplicity sake, and utilize the linear scale data for positioning. I was wondering if lacking the servo encoder input will make the system oscillate or never reach a steady position due to backlash, or am I over thinking it?

thanks in advance

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

More
10 Nov 2015 12:26 #65072 by andypugh
Yes, this can be done. There are a number of ways, but a fairly simple one would be to have a PID with limited authority tweaking the value of an "offset" HAL component.

The usual way, though, would be to have two pid loops in parallel, but that means converting your current step/dir position control to velocity mode with a position PID. wiki.linuxcnc.org/cgi-bin/wiki.pl?Combin..._Devices_On_One_Axis

I think that the "offset" idea might work better in your case. linuxcnc.org/docs/2.7/html/man/man9/offset.9.html

Depending on the scale resolution, you might be able to do it with a single layer of PID.
The following user(s) said Thank You: axk

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

More
10 Nov 2015 16:48 #65080 by Todd Zuercher
I have a machine set up using step/dir controlled servos with position feedback to Linuxcnc. While this machine is only using the encoder feedback from the servo motors. I see no reason why the feed back could not be from another source (such as linear scales), as long as that feed back is high enough resolution.

I am using a Mesa 5i25/7i85S combination for the hardware step generation and encoder reading, and the stepgen is controled in velocity mode by a single PID loop in Linuxcnc.

While this works fine, I am not sure there was any real advantage to it compared to the more traditional open loop hardware stepgen. The main advantage i saw was simplified tuning from having the encoder feed back available in Linuxcnc, and not having to hook a scope up to the drives to tune them. That and not having to home the axis all the time to find out where the axis was, just once at power up. Before I had the encoder feed back, the machine had to be re-homed any time a drive was disabled.

I think absolute encoders are a little trickier to configure. (Never tried to use one with Linuxcnc myself.)
The following user(s) said Thank You: axk

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

More
10 Nov 2015 17:32 #65083 by axk
Gentlemen, thanks for the replies.

You've both mentioned the resolution of the linear scale. How fine a scale should I need?
If the scale is graduated to .0001" is that sufficient? I'd like to keep accuracy of the table's position to .0005" or even within .001" of what the glass scale reads, assuming I can get good repeatability.

As it stands I'm +/- .001" for repeatability on a return-to-zero after homing/zeroing, but over a long job the zero will drift from cumulative back and forth error. If I didn't have that drifting zero I'd probably be OK with the whole system as is. I suppose if there was a way to home it a few times during the job, I'd be OK too.

Todd, just curious if you have you measured the accuracy improvement to your system by using feedback from servo encoder feedback? If you disabled it and measured absolute movement with an indicator would it be less accurate than a measurement taken with the encoder feedback enabled?

Andy, thanks for the pointers to the wiki. Are there any example ini files available that would show what an actual configuration would look like? I'm still very new to this and hope to get better acquainted with linuxcnc when I order my 7i80 and try to get it communicating to my spare box.

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

More
10 Nov 2015 17:55 #65086 by LearningLinuxCNC
Just one note that if you have mechanical backlash in the system of 0.002" you still may not get the results you are looking for. As the cutting forces may move the mechanics when the direction of the cutting forces change. This will happen before the PID loop can correct for it possibly giving you less than desirable results.

Make sure the linear scales are attached to the mechanics after the source of backlash. This will minimize the error but it will still be susceptible to the above problem.

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

More
10 Nov 2015 18:09 #65088 by axk
If I go that route, the plan was to install linear scales (likely glass scales) in the same locations as a typical DRO would go. I'd be installing the X-axis scale straight to the table, the Y-axis scale to the saddle, and the Z-axis scale on the column and head.

Thanks for the feedback. That was the type of oscillation I was a little concerned about using just linear scales as input.

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

More
10 Nov 2015 18:17 - 10 Nov 2015 18:44 #65089 by Todd Zuercher
I believe that having or not having the encoder feed back on my machine would not make any measurable difference in the accuracy of my machine. What I'm stuck with is trying to work around the faults of a marginal machine design (large, heavy, flexible frame and sub-optimal gearing with under powered servos makes a pretty bad combination) all lent them selves to made getting a good tuning, with acceptable performance very difficult to achieve on this system. I think this thing was designed more with step motors in mind, then they stuck on servos instead. I think if the servos had about twice the mechanical advantage, it might work a lot better.

Enough about my pos, If you are having trouble with additive inaccuracy, that would not be because of backlash (at least not directly), but is actually drift. (the equivalent of lost steps in a stepper system). If you are having drift, you should try to figure out where it is coming from. Having encoder feedback to Linuxcnc will only correct it if the source was somewhere between the servo drive and Mach3. If the source is mechanical (such as slipping on a shaft coupling) or a problem with a bad encoder signal (from bad wiring, electrical interference) and it needs to be fixed.

Backlash is the slop, or end play during changes of direction, and it doesn't add up. Like for example if you move 2 inches in one direction then an inch back, you might be 1.005" from your starting point and you would say you have 0.005" of backlash. But no matter how far you move, or how many times you change direction you should still only ever be off at the most 0.005".

For feed back resolution you'll probably want at least 0.0001", and that might not be fine enough for good velocity estimation (at least if used alone). The existing servo motors encoders are probably much finer. Using both for feed back would be the dual loop setup Andy mentioned.
Last edit: 10 Nov 2015 18:44 by Todd Zuercher.

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

More
10 Nov 2015 19:26 #65090 by axk
Now that you mention it, I've only seen the problem of drift when using the 4th axis. If I have something set in a vice mounted to the table all is fine, even for longer jobs. My rotary table and tail stock are about 33" apart. I wonder if one of them is not perfectly square, meaning my part is not correctly centered and rotating off-center :sick: . That might explain why I'm seeing this alignment issue which gets progressively worse the farther I get from my rotary table! The mis-alignment is about .005" about half way between the two but becomes visible when you machine half the part, rotate 180 and machine the other half and they dont quite line up.

This did not used to be the case, I wonder if I've bumped one end out of alignement with the other or they're just not square to the x-axis. It would seem I have some investigating to do this evening. Thanks for jogging my mind on this.

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

More
12 Nov 2015 00:22 #65155 by axk
I spent last night double checking everything. The y-axis has .002 backlash because my gibs are loose. X has .001, and Z has .001. I could push hard on the table in the y-axis direction and move it .002. I'm going to tighten things up and remeasure backlash.

I examined my rotary table's alignment. It was true to within .002 across the 33" span, I can live with that :) . I then checked the work piece itself more closely, the first side was fine, alignment was great from start to finish. The other side was the one that out by more than .005. Next I checked the gcode. The first side was cut at 130IPM. The flip side was cut at 150IPM. I suspect I may have y-axis acceleration a wee-bit high for that speed. I'm going to try again at 130IPM across the board and see if sanity prevails.

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

More
12 Nov 2015 18:06 - 12 Nov 2015 18:06 #65171 by Todd Zuercher
Hope you can straighten out your problems.

PS. I don't think improperly configured accelerations could cause drift on a open loop step/dir servo setup in Linuxcnc (at least not without setting off some alarms somewhere). Lost steps with a stepmotor yes, servo highly unlikely. I don't know how Mach and the Smooth Stepper work, so I could not tell you if you may or may not be on the right track. If you are exceeding maximum step rates and your servo drives or smooth stepper aren't smart enough to set an alarm, then I guess it could be possible.
Last edit: 12 Nov 2015 18:06 by Todd Zuercher.

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

Time to create page: 0.312 seconds
Powered by Kunena Forum