LabVIEW Idea Exchange

Showing results for 
Search instead for 
Did you mean: 

Boolean function accept Error Cluster

Status: Completed
Available in LabVIEW 2011

Make possible that Boolean function accept error cluster as input as this example:


StopOnError.png     StopOnErrorCast.png

LabVIEW ChampionArchitect
Dany, I like this and think the next logical step is that any node that accepts a boolean should accept the error cluster as well and unbundle the boolean for evaluation. Rick
Active Participant
The node should display a coercion dot to be complete, the error cluster is coerced into a Boolean type.
André (CLA, CLED)
Trusted Enthusiast
No coercion dot. The datatype is not "coerced" - it is simply compiled so that Dany's two images are functionally equivalent.

I like and support this idea, but how about pushing it one step further (if possible, of course)?

Why not give the boolean operators the ability to accept and evaluate any cluster containing one (and only one) boolean (the error cluster is an excellent example)?

It would sure have saved me many unbundles in some programs...


Using LabView 6.1, soon to be upgraded (I hope)
I have just passed CLAD
My priority: KNOWLEDGE!
I do not support this. The very significance of the term boolean comparison (logical operators) is that it can accept/compare only boolean values. There is a syntax followed in any programming language. The cluster is equivalent of a structure in "C programming".  How does it make sense while doing a boolean comparison for a cluster??
Message Edited by lsn on 07-02-2009 04:08 AM
Knight of NI Knight of NI
Knight of NI

> How does it make sense while doing a boolean comparison for a cluster??


It makes sense if the cluster only has one boolean (which is what you use for the comparison) and LabVIEW already does this for specific cases. Try wiring an error cluster into the Select primitive or into a case structure and see what happens.

Try to take over the world!
yes. i got your point. Thanks for the thought.
Message Edited by lsn on 07-02-2009 07:06 AM

I agreed with that but after few thoughts I realized that boolean functions also accept integer data, so it doesnt make sense to use the boolean value from the error cluster if there is also an integer which is the error code. I don't believe that NI will consider this idea. What would happen if we connect two error clusters to the boolean function inputs? It chooses the error codes or the statuses?

Knight of NI
I don't see any practical use case where you would want to do boolean operations on the error code of the error cluster.  I think it is perfectly legitimate for NI to introduce this functionality where the boolean functions just work on the boolean status part of the error cluster.
Knight of NI

I wrote a tiny utility routine whose icon is a Stop Sign with a question mark inside it.  It "sits" on the error line and has one additional input (called "User Stop") and one additional output (called "Stop or Error").  It's a simple case statement controlled by the error line that either passes User Stop to the output (if no error) or puts a True there.  This makes it mnemonic, without "stretching the definition" of booleans.  Here's how it looks in the code.

[If you are unhappy with the Stop control and "While Stop" wires coming in on top, simply rewire the VI and put the error lines higher up, or bring the other two wires in on the bottom].

User Stop.png