On Tue, 2009-03-10 at 01:54 -0400, Stephen Wille Padnos wrote: ... snip > To do that, you need to use weighted_sum. > There is no gray code converter at the moment, though it should be > pretty easy to write one. > > - Steve
Steve: Oops, your right, I used weighted_sum on my Hardinge tool changer. ... ### TURRET ### # create signals for tool loading loopback linkpp iocontrol.0.tool-prepare iocontrol.0.tool-prepared linkpp iocontrol.0.tool-change turret.0.position-change linkpp turret.0.position-changed iocontrol.0.tool-changed # decode turret encoder inputs net ones ppmc.0.din.06.in wsum.0.bit.0.in net twos ppmc.0.din.07.in wsum.0.bit.1.in net fours ppmc.0.din.08.in wsum.0.bit.2.in net eights ppmc.0.din.09.in wsum.0.bit.3.in # wsum.N.hold bit in net TurretCurrentPosition wsum.0.sum turret.0.position-current net TurretRequestedPosition iocontrol.0.tool-prep-number turret.0.position-requested ... I checked out gray code on wikipedia and the advantage of gray seems to be with using mechanical switches to sense position. With gray, you don't need to wait for switches to settle to get a valid code, since only one switch changes between positions. I'll be using clock bits to control when the bits get read, so I'm tending toward using binary, or the magnetic analog sensor. ----------- Kirk http://www.wallacecompany.com/machine_shop/ ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
