LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
X.

Allow required outputs in VIs

Status: Duplicate

I have probed the water for this suggestion in this thread and man, it is cold out there!

 

The suggestion is to allow programmers to specify that a VI output connection is "required".

Currently, the only options are "recommended" and "optional".

For instance, the "Error Cluster From Error Code.vi" has a "recommended" error cluster output (that is, BTW, the only output of that VI):

 

Snapshot.PNG

 

Does it make sense? I guess it does. It's like being able to drive without a seat belt or while drunk (on this last topic, I should mention that the French are actually going to require that all cars be equipped with a breathalyzer. French like legislating about anything and everything... I am sure people will still find a way to go around this).

 

My use case is not based on this example, which I through in as a joke. As discussed in the thread I linked to, it will help prevent potential wiring errors such as this one:

 

ScreenHunter_001.jpg which hides this: ScreenHunter_002.jpg

 

I think I am getting the mean and standard deviation but in fact get the mean twice. A nightmare to debug...

I also think that it would be good to have this for error clusters in DAQ VIs (if automatic error handling is turned off, or at least, in this latter case, allow requiring error clusters to be connected to avoid catastrophic failures).

 

Now you may ask, why is "recommended" not good enough?

Answer 1: it does not break the VI calling that subVI and therefore, unless I turn on Warnings in the Error List and sift through all those I don't care about, it is difficult to find. Note that I am not asking anything from the existing VIs. I just want to be able to require this for MY VIs, so that *I* can protect myself from my own sloppiness.

 

Answer 2: Breaking the VI forces you to think about the data flow. If for instance I require that some flag output is checked in the next processing step (handled by a downstream VI), it is because my experience is that this is pretty clever thing to do if you don't want to waste your time.

 

Answer 3: Well, then why are there "Required" inputs? Would not "Recommended" be sufficient :-?

 

As pointed out in the other thread, I am not the first one to suggest this. And there seems to be more vocal opponents to this concept than proponents (so I recommend checking that thread first before repeating the same arguments).

6 Comments
jcarmody
Trusted Enthusiast

If you don't get enough support for this, or you want it right now, you ought to be able to write a QD or JKI RCF plug-in to add a tag to a 'required' indicator.  Another script could examine a folder/project/VI hierarchy for VIs with tagged & unwired indicators.  It seems like it would be easy to do.

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

AristosQueue (NI)
NI Employee (retired)

Not only is this a duplicate, but you were the user who filed the original. 🙂

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/quot-Function-terminal-not-connected-quot-detection-pl...

X.
Trusted Enthusiast
Trusted Enthusiast

I knew it and I banged my head trying to find the thread where I had this little "Add" function illustration! This is exactly the symptoms I am trying to fight with this suggestion: force myself to do thing that I would otherwise not remember to do when coming back to a project a few weeks back.

Thanks.

 

Edit: at least I learned how to take snapshot of contextual menus while trying to illustrate this version...

X.
Trusted Enthusiast
Trusted Enthusiast

Now that I looked back at it more carefully, it is not exactly the same as the other post had two (possibly confusing) suggestions in it. But admittedly, that very suggestion was there without much illustration and justification. In particular it did not link to the thread I am referring to in the first post. I'd favor keeping it separate (I linked back here from the thread Aristos Queue mentioned).

 

@jmcarmody: I am afraid writing a quick drop function is beyond my ability (time wise mostly, but potentially as well due to my limited ability). But that's an interesting suggestion.

MaryH
Member
Status changed to: Duplicate
 
X.
Trusted Enthusiast
Trusted Enthusiast

In hindsight, I don't think this idea is a duplicate of my original one regarding FUNCTIONS.