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):
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:
which hides this:
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.