From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

stupid terminal question

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
0 Kudos
Message 1 of 3
(2,447 Views)
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
0 Kudos
Message 2 of 3
(2,447 Views)
No, terminals are not bi-directional. Your first mistake is in your definition
of an indicator on the sub-vi. An indicator is an output of a vi. A control
is an input to a vi. A main vi runs and writes data to an indicator. If you
want that data to be passed to a sub-vi, that sub-vi needs a control that
will receive the data from the main vi. You can modify the data and output
it to an indicator on the sub-vi.
"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 ma
in 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
0 Kudos
Message 3 of 3
(2,447 Views)