On 16.12.15 10:37, andy pugh wrote:
<snip great stuff, filed for reference.>

> LUT5 is extremely useful. It allows you to set up a single output for
> any combination of up to 5 inputs. Great for things like machine
> guards, pneumatic chuck releases etc. (door must be open, spindle must
> not be turning, switch or pedal pressed, for example).

> It gets even more useful of you connect the output back into an input.
> Then it can have different behaviour depending on current state.

Ooh, from that, if the feedback is anded with a couple of inputs, then
an RS flip-flop can be formed, providing memory of a transient
condition. (I'm tentatively imagining a tool carousel, and the LUT5
remembering "we're turning CW" or "we've passed the Home index", etc.
Grab a handful of LUT5s, and who needs Classic Ladder for a micro-PLC
job? (Sorry, couldn't resist getting carried away.)

> I wanted my PSU to be allowed to turn on as long as the bus voltage
> was low and to be able to turn off under any conditions. I did this be
> feeding the machine-on, bus-high, bus-low an current output into 4
> inputs, then spent a little while looking at the truth-table in my
> LUT5 tool.

Ah, you've already done it. If the output is "PSU On", then ISTM you're
defining a latch with gated Set conditions, and an unconditional Reset
input?

The LUT5 then replaces a whole fistful of ANDs & ORs (or NANDs & NORs,
as we'd do in hardware.), two already in the latch, plus whatever input
gating is performed.

> At the moment it behaves the same regardless of the bus-high input,
> but it is one hex number to change to alter that.
> http://linuxcnc.org/docs/2.7/html/man/man9/lut5.9.html
> and the online LUT5 tool
> https://docs.google.com/spreadsheets/d/1_VlL39jUOPpS8Tt9mpRK-eaSTS6C6PHBDoE3JitvLzs/edit?usp=sharing

The ability to define the entire logic behaviour with a single Int is
just mind-bogglingly elegant. (Even if a little mind-warping the first
time a configuration is attempted. :)

Thank you for the food for thought.

Erik

It was 36°C (97°F) in the shade mid-morning when I ventured out to rid
the spouting of flammables, after sweeping leaves & sticks off the roof
yesterday. Heading for 40+ and thunderstorms on the weekend. Could be
fires. (A bit early, but they did make a small start in Spring, already.)
Could be a long summer.

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

Reply via email to