LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a "Smart" OR Gate

Solved!
Go to solution

@nathand wrote:

[...]  No LabVIEW function will proceed until data is available all of its inputs [...]


Me too!  That's exactly what I thought as I was reading the OP.  Perhaps hockystar31 can chime in.

 

For what it's worth, if an OR wrapped in a sub VI with default inputs will work, so will a wire.  If hockystar31 intends to use the sub VI with only one input wired, what advantage does he get over using a wire?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 11 of 26
(1,671 Views)

I'm answering more and more questions like that...  Here's a post I made a few days ago in response to this:

 


@NikoP wrote:

I'm working in labview and I need to compare to a value with zero, if this value is zero the output should be zero, does somebody know any tool for this?


 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 12 of 26
(1,666 Views)

@nathand wrote:

 It sounds like we're in agreement about the short-circuit evaluation - did you mean me, or jyang72211, when you wrote that you couldn't understand how I came to that conclusion?


I was referring to your conclusion. I'm not saying it's wrong - I just didn't see the question that way at all. I assumed the user came from a text-based background and was simply looking for a way to create a short-circuit OR gate, which is, by definition of course, contrary to LabVIEW's dataflow paradigm.

0 Kudos
Message 13 of 26
(1,652 Views)

@smercurio_fc wrote:
... which is, by definition of course, contrary to LabVIEW's dataflow paradigm.

 

An Action Engine with actions like...

 

Init - Clears an array of booleans

Set Input State - Accepts parameter used as an index to choose which boolean to set-clear

Evaluate Output - Does an an Array Or

 

is perfectly fine in LV and would allow the inputs and output operations at anytime in any order.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 26
(1,639 Views)

Ben, you kind of lost me on how an Action Engine deals with a OR gate needing both inputs before the node can be evaluated....

0 Kudos
Message 15 of 26
(1,629 Views)

@smercurio_fc wrote:

Ben, you kind of lost me on how an Action Engine deals with a OR gate needing both inputs before the node can be evaluated....


 

THe AE would only look for one of the inputs at a time so there would only be a dependancy for one input at a time. I'm imagining three loops with two of the loops developing an "Abort" and the third loop a "Time to Abort?" to evaluate the inputs pushed by the other two loops at what ever time they want to push their value.

 

I'm not saying THAT IS THE SOLUTION. I'm offing it as yet another way to look at the challenge.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 26
(1,626 Views)

I'm sticking with my solution - a wire.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 17 of 26
(1,610 Views)

Thanks for all of your help guys!

 

And as some of you suggested, I am more familar with text based programming languages and was only introduced to LabVIEW a few weeks ago.

 

My goal was to have an OR Gate attached to a case structure that wouldn't execute until either one of the OR Gate values become true.  Unfortunately, I couldn't really get that to work, so I tried creating a case structure with a true leading directly thru and a false posessing a "while" loop that waits for the necessary input until continuing.  Because of some other restrictions, having 20 of these running concurrently was too slow of a soution, so I need to try a completely different setup.  But thanks for all the help guys! 🙂

0 Kudos
Message 18 of 26
(1,607 Views)

@hockeystar31 wrote:

... having 20 of these running concurrently was too slow of a soution, so I need to try a completely different setup.  But thanks for all the help guys! 🙂


 

The action Engine approach will easily scale.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 19 of 26
(1,604 Views)

Ben wrote:

The action Engine approach will easily scale. 



I'm reading your Nugget on AE's now, thanks!  I'm totally unfamiliar with them, so I'm having trouble seeing how it applies here but I'll read on through before asking anything and wasting everyone's time.

0 Kudos
Message 20 of 26
(1,590 Views)