On 26 November 2014 at 18:00, Eric H. Johnson <[email protected]> wrote:
> I need to set a couple outputs based on which tool is selected. I only have > 3 tools. I expect others have run into this issue. So far the easiest way I > see is to convert iocontrol.0.tool-number into a float and then use > comparators on that value to set the states of my outputs. I think I would use mux_generic, with the integer selector linked to the tool number. (though you would still have to convert tool-number from signed to unsigned) http://www.linuxcnc.org/docs/html/man/man9/mux_generic.9.html You could either use more then one, of type "bit" or use type "unsigned" then convert the bit patterns to output pins using "bitslice" http://www.linuxcnc.org/docs/html/man/man9/bitslice.9.html This seems like a case where an extra field in the tool database would be rather handy. -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
