use lut5: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Lut5 http://www.linuxcnc.org/docs/devel/html/man/man9/lut5.9.html
$ lut5 -n4 'i0 or i1 or i2 or i3' # expression = i0 or i1 or i2 or i3 #in: i4 i3 i2 i1 i0 out weight # 0: 0 0 0 0 0 0 # 1: 0 0 0 0 1 1 0x2 # 2: 0 0 0 1 0 1 0x4 # 3: 0 0 0 1 1 1 0x8 # 4: 0 0 1 0 0 1 0x10 # 5: 0 0 1 0 1 1 0x20 # 6: 0 0 1 1 0 1 0x40 # 7: 0 0 1 1 1 1 0x80 # 8: 0 1 0 0 0 1 0x100 # 9: 0 1 0 0 1 1 0x200 #10: 0 1 0 1 0 1 0x400 #11: 0 1 0 1 1 1 0x800 #12: 0 1 1 0 0 1 0x1000 #13: 0 1 1 0 1 1 0x2000 #14: 0 1 1 1 0 1 0x4000 #15: 0 1 1 1 1 1 0x8000 # setp lut5.N.function 0xfffe Am 30.12.2011 um 00:04 schrieb Spiderdab: > Hi all, i need to compare 4 inputs into hal (a limit value on each of 4 > motors) and if one of them is true the output will be true. (it is a > tetrapod, so only one motor-limit at a time can be true, fisically.) > > The fastest way in my mind is to use 3 or2 components, so i compare two > or2 outputs as the third or2 inputs, and i know that will work, but is > there some way i can solve the same logic with less components? > > p.s. 'till now i called 18 loadrt, between scale, and2, mux2, abs, mult2 > and comp... > Do them slowdown my sistem or i don't have to worry? > > thanks, Davide > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
