hey guys

just reporting back here with my success with the dual feedback

i have 0.1mm backlash still in the ballscrew or somewhere

and i have a magnetic scale on the machine also

with a encoder on the end of the ballscrew

i copied the examples on online of how they did that massive mill and its
working awesome

the mill rapids down or feeds down to 0.02 to 0.05 and then the I value
from the second PID takes over and moves the last tiny bit

which takes a second or so

and it stops right where it should everytime within 0.01mm  the scale says
it's perfect to 0.003 on the screen.  and no dithering

next issue thought is homing with index

either to the motor encoder or scale z pulse



i have my x and y axis homing perfectly with encoder index

but i can't get linuxcnc to home this z axis to index.  homing without
index works fine though.

i think it is because linuxcnc internals throws a hissy fit because i have
a hacked up PID system with two forms of feedback getting summed together

any ideas would be great

cheers

Andrew

On Mon, Jan 5, 2026 at 11:04 AM gene heskett <[email protected]> wrote:

> On 1/4/26 01:36, gene heskett wrote:
> > On 1/4/26 00:23, andrew beck wrote:
> >> hey stuart
> >>
> >> yeah the ballscrew is connected both ends.  i think one end has the big
> >> angular contact bearings etc
> >>
> >> and the other only has deep groove ends probably (its much smaller
> >> than the
> >> driving end)
> >>
> >> on my other two cnc mills they have angular contact bearings both
> >> ends and
> >> the screws are stretched between them slightly with a tiny bit of
> >> preload
> >>
> Probably should clarify here. The tension isn't meant to stretch the screw,
> but to pull it tight enough there's no lengthwise backlash under normal
> working loads despite a few microns of wear.  On my sheldon, the z screw
> has only a sliding ball bearing on the right end, so the double bearing on
> the left controls the end play.  After a decade of light use, I'm still
> under 2
> thou of play acc a .0001 dial.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> >>
> >> hey guys
> >>
> >> i was reading the link that sam sent two and it looks like the two Pid
> >> loops are running side by side  and then the outputs are added together
> >> before going to the servo drive
> >>
> >> would i be correct in thinking that they are using the "sum"
> >> component in
> >> linuxcnc to do that?
> >>
> >> if so this is getting pretty simple
> >>
> >> cheers
> >>
> >> andrew
> >>
> >> On Fri, Jan 2, 2026 at 3:07 PM Stuart Stevenson <[email protected]>
> >> wrote:
> >>
> >>> HI,
> >>>   I don't think the LinuxCNC control scheme is cascaded or nested. I
> >>> would
> >>> call it parallel.
> >>>
> >>>   The only backlash problem I can imagine is if the backlash causes the
> >>> motor to dither trying to maintain position because cutting forces
> >>> move the
> >>> axis enough to cause the control to try to correct the axis position.
> >>>
> >>>   Is the ball screw supported on each end? If it is, then, is it
> >>> possible
> >>> the screw has some stretch preload.
> >>>
> >>> regards
> >>> Stuart
> >>>
> >>> On Thu, Jan 1, 2026 at 4:10 PM andrew beck <[email protected]>
> >>> wrote:
> >>>
> >>>> hey guys
> >>>> sam i just looked at that link you sent
> >>>>
> >>>> that looks pretty cool
> >>>>
> >>>> only thing is i don't know is if it will work to reduce the backlash
> >>> issue
> >>>> i am getting.  I have about 0.10mm of backlash on each axis.  half of
> >>> that
> >>>> is from the thrust bearings which is fixable with new bearings
> >>>> the rest is from the ball nut i think and i am not willing to fix that
> > Those tiny ball screws stuart sold me 25 years ago were just a hair
> > sloppy.
> > I found the balls .001 bigger on ebay and restuffed the nuts. One of them
> > is in the Y of my sheldon, and has about a thou of backlash today. I had
> > to make a cage for the nut with teeny grub screws to stop the nuts end-
> > play in the cage.  So oversized balls are one possibility. Ticklish
> > work tho.
> >>>>
> >>>> but i can only try it.
> >>>>
> >>>> does anyone want to have a go with making a config like they did?  one
> >>> axis
> >>>> would be best  I am struggling to get my head around the different
> >>> layers.
> >>>> i probably need to write it all out or use a diagram or something.
> >>>>
> >>>> regardless i am sure i will work it out.  just might take some brain
> >>> cells
> >>>>
> >>>>
> >>>> cheers
> >>>>
> >>>> Andrew
> >>>>
> >>>> On Fri, Jan 2, 2026 at 4:54 AM Sam Sokolik <[email protected]>
> wrote:
> >>>>
> >>>>> This was also John k..  I would trust his solution.  He is the one
> >>>>> that
> >>>>> came up with hal in linuxcnc... (Among other things).
> >>>>>
> >>>>> On Thu, Jan 1, 2026, 9:49 AM andy pugh <[email protected]> wrote:
> >>>>>
> >>>>>> On Thu, 1 Jan 2026 at 15:41, andy pugh <[email protected]> wrote:
> >>>>>>> On Wed, 31 Dec 2025 at 22:14, andrew beck <
> >>> [email protected]>
> >>>>>> wrote:
> >>>>>>>> just looking for a config example if possible for a mesa card
> >>> from
> >>>>>> someone
> >>>>>>>> that has this nested PID loop setup.
> >>>>>>> This may not be as effective as you would hope. Cascaded PID
> >>> loops...
> >>>>>> Actually, what was done with the MPM jigmill wasn't a cascaded PID.
> >>>>>> What was done there was to run a P + FF control based on the motor
> >>>>>> encoder and an I control based on the linear scales.
> >>>>>>
> >>>>>> Then the two controllers were summed together to create a PID
> >>>>>> controller, but with I using a different feedback source than P and
> >>> D.
> >>>>>> --
> >>>>>> atp
> >>>>>> "A motorcycle is a bicycle with a pandemonium attachment and is
> >>>>>> designed for the especial use of mechanical geniuses, daredevils and
> >>>>>> lunatics."
> >>>>>> — George Fitch, Atlanta Constitution Newspaper, 1912
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> Emc-users mailing list
> >>>>>> [email protected]
> >>>>>> https://lists.sourceforge.net/lists/listinfo/emc-users
> >>>>>>
> >>>>>
> Cheers, Gene Heskett, CET.
> --
> "There are four boxes to be used in defense of liberty:
>   soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>   - Louis D. Brandeis
> Don't poison our oceans, interdict drugs at the src.
>
>
>
>
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to