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.
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.
12-20-2012 02:30 PM
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???
Solved! Go to Solution.
12-20-2012 02:41 PM - edited 12-20-2012 02:42 PM
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...
12-20-2012 02:44 PM
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.
12-20-2012 02:51 PM
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...
12-20-2012 03:02 PM
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.
12-20-2012 04:08 PM
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.