LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

no connection "required" for VI outputs?

I realize this has been the case for ever but why can't a VI output connection be set to be "required"?

I suppose there are some deep reasons for that, but in the specific case at hand, I am passing a control value as an input to a subVI and I want to update the control in calling VI with the new calculated value.

I want to do that in many cases and different locations in my diagram, and I KNOW that if I come back to that code in a month, I will forget to update the control with its new calculated value. A nice reminder would be to break the VI if I do not connect the subVI output to something (I will figure out what I need to connect it to).

Of course I could pass a reference to the control and to the update within the subVI (which I am going to do)...

0 Kudos
Message 1 of 34
(2,530 Views)

Two thoughts

 

1) The bug discoverd by Micael Avaliotis while beta testing the early version of LVOOP was fixed. (see link Yair will provide after I post this)

 

2) Speculating... LV use data dependacies to determine when to schedule a VI for execution. making an output required would be turn things inside out since it places a data dependacy on something other than the VI. I guess in the end all it would do to the VI is enusre that is never the last thing to execute.

 

Interesting thought!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 34
(2,527 Views)

Have a look at this:

http://lavag.org/topic/6271-whats-wrong-with-this-picture/


___________________
Try to take over the world!
Message 3 of 34
(2,526 Views)

I read the LAVA thread, and as usual, it went 30,000 feet above my head (not withstanding the fact that I could not even see the picture that was supposedly wrong).

So what is evil in a "required" output? It would seem to me that in a "data flow" programming language, having a pipe flowing a lot of information that should not be lost is a natural thing to force the user to take care of...

The example of error clusters that SHOULD be handled (mentioned in the LAVA thread) seems legit to me...

0 Kudos
Message 4 of 34
(2,518 Views)

On the surface the idea has some merit. Give me some time to think and I may yet find a fly in that ointment.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 34
(2,515 Views)

Here is a possible "Why" that first requires review of LV trivia.

 

Trivia:

LV compiler and scheduler are very smart. They will examine our code and put together machine code that will do what we draw. Part of the functions it perfoms is to look for un-used code and tossing it. One of the "signs" of un-used code is a code snippet that has an output that is not used. If LV "sees" that construct it will toss the code producing a value that is not used.

 

Switching to "fly on the wall" mode:

 

R&D1 : Why don't we let users set outputs as "required"?

 

R&D2: But if over-used, all of the work that went into tossing code will be invalidated if people over-use the "required Output" setting!

 

R&D3: Good point! If it can make LV look bad, let's just leave that idea out... until they force us to put it in."

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 34
(2,511 Views)

Are you saying that if a subVI has an output connected in one place then the compiled code is different from the case where it is not connected anywhere?

Then my example does not change anything to the optimization: I am precisely asking to avoid forgetting to connect a given output in some places of my diagram...

0 Kudos
Message 7 of 34
(2,507 Views)

Yes, in theory the code would be different.

 

The negative comes into play when people make all outputs "required" so that nothing can be tossed.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 34
(2,503 Views)

Are you suggesting that this would be a feature that should require proof of a CLA certification?

0 Kudos
Message 9 of 34
(2,497 Views)

I'd have to pass a test every 2 years to set that option?

 

Probably better stuffed into the VI set-up so noobs don't find it and we can display a warning along the lines of phrase I recall reading in the NI white paper on threading and how to configure priority where under the section on setting priority it said (from memory of course)

 

"You should never have to change priority but if you choose to change what you should not then you can go to this screen where you should not go and change this setting that you should never change." The original was better.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 34
(2,490 Views)