# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## How does implies funciton works?

How does implies funciton works while using numeric controls?

Message 1 of 14
(4,486 Views)

## Re: How does implies funciton works?

So I'll be honest, I've never used this function ever, in 11 years of LabVIEW developemnt, practically using LabVIEW every day in those 11 years (except weekends).  But what I can say is reading the help how it works.  It will invert X then perform a logical OR meaning the output will always be false, unless X is True and Y is false.

So how does this apply to numerics?  It does the same operation on numerics as it would booleans.  So if you provide the inputs as U8 then it will be evaluated as if this implies is in a for loop running 8 times.  In this example all of the numeric outputs will be the same.

Message 2 of 14
(4,446 Views)

## Re: How does implies funciton works?

@srrashme wrote:

How does implies funciton works while using numeric controls?

All boolean function operate bitwise when used with integers. There is nothing special about the implies function.

Message 3 of 14
(4,438 Views)

## Re: How does implies funciton works?

I would suggest using the compound arithmetic function in any case, as I expect it's much easier to read for most people. Then you don't have to worry about how implies works.

___________________
Try to take over the world!
Message 4 of 14
(4,411 Views)

## Re: How does implies funciton works?

I took Symbolic Logic in college (a lot of fun), and can say that "Implies" was one of the most difficult things to handle.  I've used this function a very few times in LabVIEW, but would be hard-pressed to explain "why" I did it, even to myself.  In fact, I'm not sure (without doing a laborious search) I could even find one of those rare examples ...

Bob (... because it's there ...) Schor

Message 5 of 14
(4,386 Views)

## Re: How does implies funciton works?

Implies is quite useful for finding transitions in an array of booleans. Compare current value to previous value.  One of the four possible combinations returns False, telling you where the Transistion corresponding to that combination is.

Lynn

Message 6 of 14
(4,376 Views)

## Re: How does implies funciton works?

@johnsold wrote:

Implies is quite useful for finding transitions in an array of booleans. Compare current value to previous value.  One of the four possible combinations returns False, telling you where the Transistion corresponding to that combination is.

In the past when I needed this I just used a compound arithmatic node.  Is there any benefit over using implies over this?  There certainly is more flexibility with compound arithmatic, because I could choose to invert the first or second input.  I also have the option to be use the AND instead of Or.  So if this value is true AND the last value was false then a falling edge was seen.

Message 7 of 14
(4,369 Views)

## Re: How does implies funciton works?

I think Implies was around before compound arithmentic with invertable inputs. Also, I tend to not think of compound arithmetic until I have more than two inputs. Thus: Laziness.

Lynn

Message 8 of 14
(4,364 Views)

## Re: How does implies funciton works?

Well, I have trained myself and try to train my minions to always use the compound node. It's readable enough and doesn't encourage adding more nodes if more logic is needed.

___________________
Try to take over the world!
Message 9 of 14
(4,348 Views)

## Re: How does implies funciton works?

That is probably a good idea because I use Implies seldom enough that I always need to stop and refresh myself on how it works. Plus an extra inverter is often required.

Now, if I just remember this thread the next time I need it.

Lynn

Message 10 of 14
(4,342 Views)