On Wednesday 15 November 2017 10:02:23 Peter C. Wallace wrote: > On Wed, 15 Nov 2017, Gene Heskett wrote: > > Date: Wed, 15 Nov 2017 09:14:49 -0500 > > From: Gene Heskett <ghesk...@shentel.net> > > Reply-To: "Enhanced Machine Controller (EMC)" > > <emc-users@lists.sourceforge.net> > > To: emc-users@lists.sourceforge.net > > Subject: Re: [Emc-users] For Peter C. Wallace > > > > On Sunday 12 November 2017 05:12:54 andy pugh wrote: > >> On 12 November 2017 at 01:49, Gene Heskett <ghesk...@shentel.net> > > > > wrote: > >>> If I write a hal thing that changes the value pushed into the > >>> encoder's scale input, how much of a time lag might there be to > >>> make it effective? > >> > >> The scaling does not happen in the Mesa layer, it happens in the > >> HAL driver. > >> > >> But, the encoder scale is a parameter, not a pin, so you can't > >> change it in HAL. > >> > >> What I would do would be to pass the hm2_..._position and > >> hm2..._...velocity through a pair of "scale" HAL functions with the > >> scaling factor for both chosen by a "mux2" controlled by the gear > >> selection before connecting to the motion... pins. > >> > >> You might be able to use the "gearchange" component for this (or, > >> specifically, two more instances of the component) as this is > >> basically what it does, ie switch between two scales. > > > > That I can do, but it does bring up a related question. Actually 2 > > or 3. > > > > 1. How long, probably in cycles, does it take motion to recover when > > it finds a huge change in either its position, or velocity inputs > > which the scale switching causes? > > > > 2. at what point does the accumulated position overflow? or is > > position reset to zero on the index pulse? Seems to me like it ought > > to be, but I don't recall anyone saying. > > > > I intend to temporarily set up a counter to be frozen and reset in > > one pulse, useing probably an edge module to tap the index pulse to > > transfer the counter to a sample-hold, then reset the counter when > > the edge recovers from a very short output pulse, with the > > sample-hold becoming the value for the 2 scale modules for that > > gear. By running the motor slow, I ought to be able to define the > > unknown, in this case the actual gear ratio when in each of its 2 > > gears. Or maybe even use it as the scale.n.gain input since its a > > pin, however I'd expect a count or more to be skipped at the higher > > motor speeds and that would confuse the scale values derived. Not a > > Good Thing. > > > > Best to carve it into the ini file once determined. > > > > 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> > > I dont think any of that is needed, as long as you do not change the > gear ratio in the middle of a spindle synchronized move.
Which would wreck the part so thats why I alway cut air with the first pass. Cautious George. But having that ratio right for each gear is important, something I can't know w/o taking it apart and counting teeth, a major teardown that I will precede by ordering the best quality bearings to put in as I reassemble it, in place of the roller skate crap in there now. Unless I can count from index to index to get that count. Setting that up in hal code is 30x easier than the mechanical teardown. > Spindle synchronized moves always start at index = spindle position 0, > and dealing with the spindle position "steps" is all handled in motion True, but the size of those steps determines the working tpi. Must be correct else motion may put a step function into Z at the index when it comes around again. That could be interesting in a bad way if it requires a couple backlash takeups in the middle of a 30 ipm synchronized move. But you knew all that. I'm just thinking out loud. :) Thank you, Peter. > Peter Wallace > Mesa Electronics 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 Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users