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: 

Why can I only connect an Indicator to an Indicator?

Solved!
Go to solution

When I use a sub VI with a table or array or just a string text box I can only read it if it is an indicator.  If it is a CONTROL Labview says "You have connected an INPUT of Sub VI to an INPUT of Array SubSet".  When I use an indicator, I can't type into the text box when the VI runs.  And I can't run it if the text box is a control??????

Please help!

 

PS, why is "LabVIEW" not in the spell check???

0 Kudos
Message 1 of 6
(2,545 Views)

I don't understand what you are describing. But in general the thing to remember is that a control is an input to a subVI and an indicator is an output from a subVI - which is why you can't type into an indicator while a subVI is running - it's pointless. Whatever value you typed in would be overwritten with what the subVI set the output to.

 

It sound like you have some pretty basic misunderstandings as to how LV works. Perhaps you might want to work through a few tutorials?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(2,541 Views)

In the subVI, the control is the input to the subVI.  The indicator is the output of the subVI.

 

At the main VI level, the terminal of the subVI that is connected to a control, is a sink for the data wire in the main VI.  The terminal of the subVI that is connected to an indicator is the source of data for a wire in the main VI.  It's not completely clear from your description, but it sounds like you might have two controls or data sources connected to each other.

 

I would recommend looking at the online LabVIEW tutorials to learn how subVI's work.
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

If you still have problems, then post back here with your main VI and your subVI so we can see what it is you're doing and can better explain to you how to fix it.

0 Kudos
Message 3 of 6
(2,536 Views)

Thanks for the help.  I understand what you are saying.  Now I just wish I knew how to do this...  I need a table in a sub VI that I can edit at runtime and read in the main VI.  I thought it would be simple, but then it goes only in the backwards direction...

0 Kudos
Message 4 of 6
(2,530 Views)
Solution
Accepted by topic author SteveTTC

Are you opening up the subVI when it runs?

 

Your table should be a control.  When your subVI is called, you can prefill that control with data that you pass in through a connector terminal.

 

What is your subVI doing while you are editing the table inside of it?  Other calculations?  Just waiting?  How do you end the subVI in order to pass the data back out?

 

When you are ready for the subVI to end, you can pass the data from your table control to a table indicator inside the subVI.  The table indicator could be hidden or off-screen.  That table indicator would be connected to a subVI terminal on the connector panel.  When the subVI returns from its execution back to the main VI, the new updated data that is in the hidden table indicator will now be present on the wire in the main VI.

Message 5 of 6
(2,523 Views)

So I connected a control to the indicator in the same window and hid the indicator that connnects to the remote terminal.  Clunkly, but it does work.

 

Thanks for the help.

0 Kudos
Message 6 of 6
(2,507 Views)