On Monday 27 February 2017 09:01:47 andy pugh wrote:

> On 27 February 2017 at 13:49, Gene Heskett <ghesk...@shentel.net> 
wrote:
> > What I wanted was a binary counter, whose individual bitN outputs
> > could drive the selN lines of a mux16, thereby selecting the gain to
> > be applied to the jogwheel output.
>
> Mux-generic can be driven by an integer (and, possibly usefully for
> you, you can also use the bit-inputs to "shift" the selection.)
> http://linuxcnc.org/docs/2.7/html/man/man9/mux_generic.9.html
>
> http://linuxcnc.org/docs/2.7/html/man/man9/updown.9.html
> Looks like the solution to the counting up and down part.
>
> One slight inconvenience is that updown is S32 out and mux_generic is
> U32 in.

Which the s32 says updown can count negative values, which is good. That 
means I can design for all speeds in both directions.

Humm, and what does it do when the input is an s32 representing a 
negative? Say of a -3 or a -14 (no floats allowed)?

I'll start with the updown and see if I can make the min/max behave as 
desired. I had rejected it originally because of the logic needed to 
determine the direction, derived by a wcomp from the encoders velocity 
output, and applied to a not and 2 and2's to derive the step up for that 
pin, or the step down for the other.

How wide, in terms of inputs, can I make a single instance of this 
mux_generic?  Sounds interesting but a bit of a bear to properly setup 
with all those options. 16 is likely overkill with a 1,2,5 sequence to 
the gain. In practice, 6 or 7 would be sufficient I think, if not 
overkill.

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

Reply via email to