From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub VI indicator is an INPUT. Why?

The attached sub-VI is designed to use one user input to control two channels on an analog input board.  I start with a control (wired to an input terminal of the sub-VI) and end with two indicators (wired to output terminals of the sub-VI connector).  This subVI is placed on the block and then the values are fed into the Build Array VI, because the two analog inputs are eventually going into a DAQ Assistant.  However, when I wire the sub-VI to the Build Array VI, I get a bad wire and the message that I have attached an input to another input.  My question is, "How is the sub-VI indicator an input?  I thought it was the other way around for sub-VI's."  Is the problem actually in the Build Array VI?

Thanks,
Brad
0 Kudos
Message 1 of 6
(2,774 Views)
I'm guessing you have some hidden wire under a terminal that is causing a problem.  Press Ctrl-B to remove all bad wires.  Then try wiring it up again.  If it doesn't work, respond to this post with a sample VI that *contains* the subVI you previously attached, so we can actually see the bad wires in action.
 
-D
0 Kudos
Message 2 of 6
(2,765 Views)
We can't tell from just the subVI, it appears to be correct. Except that there is no need to use the property node to read the Steerer Value in each case of the Case Structure, just wire directly from the tunnel on the structure frame to each of the Add functions. Never use a property node when you can wire directly.

The problem is likely in this VIs parent VI. You probably have mistakenly wired the output of the Build Array to one of the outputs of this subVI. Double check your wires to see if that's the problem and let's know.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 3 of 6
(2,757 Views)
Thank you both for your input - there wasn't a problem with the sub-VI after all and you helped me without knowing.  When I went to make an example VI that would use the subVI, it plugged right in with no problems.  There must have been something in residual memory that told the VI that those were inputs and not outputs of the subVI....I have no idea. 

Thanks again!
0 Kudos
Message 4 of 6
(2,735 Views)
'glad you solved it. 😄
 
As an additional note to the comment by Ed about overuse of property nodes, you should further simplify the code. For example the addition operation and the diagram constant (5) is the same in all cases, thus they can be moved outside the case structure. Don't duplicate code, re-use!
(See image. The TRUE case is of course wired across).
 

Message Edited by altenbach on 04-14-2006 12:31 PM

0 Kudos
Message 5 of 6
(2,725 Views)
Beautiful!  Thanks for the tip.

Brad
0 Kudos
Message 6 of 6
(2,708 Views)