lut5 does have a description in the manual that may shed more light than 
the man page on non binary brain cells.

http://linuxcnc.org/docs/2.6/html/hal/rtcomps.html#sec:lut5

On 6/3/2015 6:29 AM, andy pugh wrote:
> On 3 June 2015 at 11:51, Rick Lair <[email protected]> wrote:
>> To a certain extent, I guess I didn't fully understand how the lut5
>> component worked,
> LUT5 is really obvious to programmers to the 1 in 10 people who think
> in binary. And a bit of a puzzle to the others.
>
> It would be possible to achieve the same result in HAL with ordinary
> logic functions, but I think it is more confusing and it is a little
> harder to alter the logic.
>
> For example
> flood = flood AND (NOT mist)
> mist = (NOT flood) AND mist
> spindle = flood AND mist
>
> loadrt and2 count = 3
> loadrt not count=2
> ...
> addf and2.0 servo-thread
> addf and2.1.servo-thread
> addf and2.2 servo-thread
> addf not.0 servo-thread
> addf not.1 servo-thread
> ...
> net flood-cmd iocontrol.0.coolant-flood => and2.0.in0  and2.3.in0  not.0.in
> net not-flood not.0.out => and2.1.in1
> net mist-cmd iocontrol.0.coolant-mist=>  and2.1.in0  and2.3.in1  not.1.in
> net not-mist not.1.out => and2.0.in1
>
> net flood-out and1.0.out => gm.0.rs485.0.relay-0
> net mist-out and2.1.out => gm.0.rs485.0.relay-1
> net spindle-out and2.2.out => gm.0.rs485.0.relay-2
>
>


------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to