On Saturday 25 November 2017 08:21:07 Gene Heskett wrote: > On Saturday 25 November 2017 05:59:19 andy pugh wrote: > > On 25 November 2017 at 03:36, Gene Heskett <[email protected]> > > wrote: > > > But sitting here thinking as I edit the hal file, (I can get into > > > all sorts of trouble doing that) the encoders position value is > > > determined by the existing scale factor I believe > > > > Do your gear ratio calcs based only on counts. > > If index-enable is true, (it is) which ack the man page: > > encoder.N.index-enable bit i/o > When true, counts and position are reset to zero on the > next rising edge of Phase-Z. At the same time, index-enable is reset > to zero to indicate that the rising edge has occurred. > > Which because I want the total counts, I should use rawcounts which is > not reset? Thats what I have it coded for atm anyway, but I've not yet > added an updown for the Z counter. Working on that now. > > Thanks Andy. > > Cheers, Gene Heskett
Got that running, using rawcounts, but I am not getting an integer number for an answer. 14,095.11 for low gear. And 7,161.26 for high gear. This is for 100 turns of the spindle, which is indicating a hair over 100 rpms on the uncalibrated tach with the scales set at a value between those answers. One comparator set for 5.5, the other set to lock its mux2 at 105.5 The mux2.outs are fed to a sum2, with the one that stops at 5.5 set for a gain of -1.0000000 so its a subtraction at its output. That frozen value is then fed to kcalc and /100 for the above values. Looking at the 3 signals with halscope, triggered on the same rising edge of the z pulse, which is the end of it, the servo-threads quantization because of it nominally 1 kilohertz period, doesn't have a fixed phase relationship with the a/b signals. Trying again with the spindle just creeping along at 25 or so rpms. And get 7161.24 for high gear, and 14,095.23 for low gear. So it seems repeatable to a very small fraction of a %. What conclusion would you reach based on the above? Other than ripping out the opto's on those 2 input channels of the bob. Speaking of opto's, SainSmart seems to have a micro sized board, with led input tallys and 24 mill buffering but without mentioning opto anyplace in the propaganda on amazon, for $18/copy. I may wait till Monday and see if I can confirm the lack of optos as being a plus. If useing these things, where can the individual cables be obtained, the ones that fit the white sockets on these boards? That would simplicate the hookup for sure. See at: <https://www.sainsmart.com/products/cnc-5-axis-breakout-board-for-stepper-motor-driver?utm_medium=cpc&utm_source=googlepla&variant=45099994132&gclid=EAIaIQobChMI5tqQgY7a1wIV0LXACh19Nwm5EAQYAiABEgJ9OvD_BwE> Is anyone here using it? Its been around since 2012 it seems. 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
