#linuxcnc-devel Logs

Nov 14 2017

#linuxcnc-devel Calendar

03:45 PM mozmck: I'm wanting to use the "logic" HAL component, and I'm not sure about something in the documentation. It says for the personality to add the number of pins to the number which indicates the function, and then convert to hex. I don't understand why "convert to hex"? Is that correct?
03:47 PM Tom_L: i used that... just a sec
03:48 PM mozmck: It looks to me like the conversion to hex is not necessary looking at the code, but I'm sure I'm missing something.
03:48 PM Tom_L: i think i made a simple truth table and added the values up and converted to hex
03:49 PM Tom_L: any value that would translate to true
03:49 PM cradek: I think someone was hesitant to tell people to just add the hex numbers, which would have been more straightforward but maybe less familiar
03:50 PM mozmck: Looks to me like you can just add the decimal numbers just as easily.
03:50 PM cradek: looks to me like the lower two hex digits are the number of inputs, and the upper two are which outputs you want
03:50 PM cradek: yes but it obfuscates which bits are on, which is clear when in hex
03:51 PM mozmck: Yes, they are using the lower digits as the number of inputs, upper are a bit field.
03:51 PM cradek: yeah
03:51 PM cradek: a user interface any programmer would love
03:52 PM Tom_L: apparently i used lut5 instead
03:52 PM mozmck: Well, I'm needing to set these in code so it won't matter as much how clear it is.
03:53 PM mozmck: I do like the user interface :-) Nice and concise!
03:53 PM mozmck: Can you even pass a personality as 0x###?
03:54 PM cradek: I think so
03:56 PM Tom_L: lut5 allows for 5 where logic allows for 16 inputs
03:56 PM Tom_L: quite similar otherwise
04:00 PM mozmck: Yes, I don't know if I'll need more than 5, but it's possible so I wanted to use logic
04:10 PM jepler: logic is useful if you need a predefined type of gate but with a large number of inputs
04:10 PM jepler: lut5 is useful if you have an abnormal type of gate but no more than 5 inputs
04:12 PM Tom_L: good to know, was my first try with either one
04:14 PM mozmck: thanks
04:14 PM jepler: the lut5 documentation could potentially be improved with an example of a nontrivial boolean function
04:16 PM jepler: like the example of the mux equation '(i2 and i1) or (not i2 and i0)' as function 0xca from http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Lut5
04:38 PM JT-Shop: first time I saw that wiki page
04:38 PM JT-Shop: http://linuxcnc.org/docs/2.7/html/hal/rtcomps.html#_lut5
04:41 PM Tom_L: 3 variations of the same thing ;(
04:44 PM JT-Shop: yea :(
04:46 PM Tom_L: why is it when you're trying to get out of town everybody want's something
05:07 PM JT-Shop: just works out that way
06:24 PM mozmck: hi andypugh
06:27 PM andypugh: Hi mozmck. Didn’t know that CandCNC already had a tame LinuxCNC dude :-)
06:28 PM mozmck: haha!