On Friday 24 November 2017 09:22:42 andy pugh wrote: > On 24 November 2017 at 13:20, Gene Heskett <[email protected]> wrote: > > Because I do not know the gear ratio(s) that exists between the > > motor, where this new encoder is now driven from, and the spindle, I > > want to setup a temporary count=true condition in the spindle > > encoder so that I can determine the number of A pulses from the > > encoder on the motor that go by from index pulse to index pulse from > > the encoder on the spindle. > > Can you not simply rotate the motor 10x by hand and do the > calculations?
Considering that the encoder on the motor is a 1000 line encoder, thats a vanishingly small difference. I would much rather just get the figure it comes up with. Even if I watch its counts with a halmeter as I slowly turn the spindle, I would feel I am much for accurate letting the electronics count itself. It will take me a bit to code that up in hal, but it would be a figure thats spot on. The only thing thats random is for one (the next one) index pulse if I change gears. I've made that very easy since I rigged a bias feed into the illegal 2 inputs of the mux4 so as to keep the motor turning at 20 to 30 rpm when the gears are disengaged AND the spindle is enabled. No more reaching for whatever is in the spindle to rotate it a few degrees so the gears will engage. The thing thats preventing me from processing the index is that the index pulse isn't there by the time the next module in the addf sequence occurs as by then the index has gone already, so the only way to do that is with pure hardware. Do-able but it would take me 2 weeks to run down the free standing logic chips that would require. I have yet to capture an index pulse on the halscope. The z pulse, yes, but not the actual, resets everything index. So the best I can do is count A pulses and do a *4 on that. I can envision a better way yet, but I'd have to work out the logic on paper first and arrange the addf's so its done in one cycle. That might even be preferable since theres not a huge chance the correct figure is actually a modulo 4. In fact that may be the best way in the long run. But I still have some housework to do before I can start that. We humans are a messy lot. :) Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
