Also, after analyzing the code a bit further, it seems gearchange also has an error. The scale value (for gear 2, the "high" gear) is used to divide the speed in. This means that gear 2 is a lower gear, not a higher gear as the documentation indicates. I.e. gear 2 would be divided by the back gear ratio of 8.3 in my example to yield speed-in/8.3 = speed-out. That may explain the issues you’ve had with your rewrite. In other words, it does indeed work for a Bridgeport type machine or any other machine utilizing backgears as "gear 2" but the documentation indicates the reverse of the actual arrangement. I hope that makes sense.
> On Dec 15, 2020, at 9:16 AM, Matthew Herd <herd.m...@gmail.com> wrote: > > Ahh, very interesting. For the time being I’ll work on my own component and > see what I find. Thanks Andy! > >> On Dec 15, 2020, at 9:12 AM, andy pugh <bodge...@gmail.com> wrote: >> >> On Tue, 15 Dec 2020 at 13:57, Matthew Herd <herd.m...@gmail.com> wrote: >>> >>> https://github.com/LinuxCNC/linuxcnc/commit/0b113e98a1621d3e8aa6467eb535b514f0da3d5b#diff-667b45662b7da3b4712ad1ead290305621b11f4d0e9569f095879d1c9eff5525 >>> >>> <https://github.com/LinuxCNC/linuxcnc/commit/0b113e98a1621d3e8aa6467eb535b514f0da3d5b#diff-667b45662b7da3b4712ad1ead290305621b11f4d0e9569f095879d1c9eff5525> >> >> It was a long time ago, so I am fuzzy on the details (it dates back to >> before I had push rights to LinuxCNC, so the commits were made by >> others) >> >> Looking at the history it seems that my changes altered the way that >> the ratios were calculated, and that broke the backwards compatibility >> that I was aiming for. >> https://github.com/LinuxCNC/linuxcnc/commits/master/src/hal/components/gearchange.comp >> >> -- >> 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 >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users > _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users