JMH wrote:
> Hi,
>
> I have a stupid question, are terminals bi-directional? That is, can a terminal
> do input as well as output? How do I distinguish? If a sub vi has a numeric
> INDICATOR wired to a terminal, that makes it an input, but if it is a numeric
> control wired to a terminal it is then an output? I need to get data that
> was set in a main panel into a sub vi in the diagram, as I said in my last
> post, but I cannot seem to do it. Any help would be most appreciated. Thanks
> very much
>
> JMH
See my post to your previous question.
This input, output, control , indicator, business is confusing for new users.
A terminal (on the connector pane) will be can be *Either* an input or an
output (but not both at the same time). This is determined by what you
wire to it.
Now here is the tricky part. When you do this on SubVis the terminals
*APPEAR* to be the opposite of what you wire to them. When we talk
about these it is best to refer to the controls / indicators, as sources and
sinks.
One is the source of data , the other is the sink of the data. The role that the
control or indicator takes depends on where you look at it in the data flow chain.
Here is a simple example.
VIMain has Sub1 and Sub2 on its diagram.
Sub1 has a control#1, wired to indicator#1. Control#1 is on the left terminal
and indicator#1 is on the right terminal. Sub2 looks exaclty the same, except
the items are named Control#2 and Indicator#2.
I drop these on VImain and wire from the right terminal of Sub1 to the left
terminal of Sub2.
I set the value of control#1 , and run VIMain. Control#1 sources the value and
Indicator#1 sinks it.
Since this is tied to Sub2, Indicator#1 immediately *Sources* the value,
Control#2, sinks it.
Control#2 *Sources* the value and Indicator#2 sinks the value and all Vis stop.
If you always wire Controls to the left hand terminals and Indicators to the Right
hand terminals
it makes it much easier. Also turning on the help and passing the cursor over a
subVI will show
you what these terminals are tied to. If the wire goes to the left this is a
control and is the SubVIs *INPUT*
if the wire goes to the right it is tied to an Indicator and is the SubVIs
*OUTPUT*.
Hope this makes it a little more clear.
Kevin Kent