LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing control data to subvis

hi, i'm new to labview and i'm trying to modify an existing vi. there is a main page with a couple of buttons which open subvis. when you open the subvis though, the controls are all set to the defaults. i want to be able to load a configuration file on the main page and have the subvis get passed the data so that when they open, their controls all have the saved values. so far i'm having trouble passing the data from the main page to the subvis. apparently the connectors need to be wired to something on the front panel, but i need some data to be passed to a function (a flattened string). i have no idea how to do this. any help with this would be appreciated
0 Kudos
Message 1 of 4
(2,635 Views)
You should probably start with the LabVIEW tutorial. Go to the LabVIEW help and do a search for connector panes. Later versions of LabVIEW have a turorial that explains the concept.
0 Kudos
Message 2 of 4
(2,635 Views)
i searched help and they brief instructions on how to use the connector panes. i understand that you wire them to front panel controls, but i'm trying to pass some data through to a function on the block diagram? is there a way to get it there?
0 Kudos
Message 3 of 4
(2,635 Views)
You're missing some fundamental concepts here.

On your main diagram, you place a VI icon.

You wire data from controls, constants, and other functions to the CONNECTORS of the subVI.

The CONNECTORS of a subVI are placeholders, or representatives of its CONTROLS and INDICATORS. You decide which (if any) controls and indicators are tied to which CONNECTORS (and thus available to other VIs) by using the wiring tool on the front panel, but you cannot see any wires here.

The CONTROLS and INDICATORS of a VI have parallels on the block diagram - they're called TERMINALS.

THEY'RE ALL THE SAME THING. The data on the wire from the main travels to the CONNECTOR, the subVI's CONTROL and the subVI's TERMINAL at the same time. If the subV
I's panel is not open - the subVI's control won't do anything - it's not necessary.

Start with a new, empty VI. Place a new control on it. Look at the block diagram - you also have a new terminal on it! The terminal is the block diagram's way of getting the data from the control.

The CONTROL is concerned with the appearance of the data. For numeric inputs, the control handles how many dec. places to show, what font to use, min and max values, and stuff like that.

The TERMINAL is for the block diagram, and it cares nothing about that. It reads the control and gets a number from it. End of story.

The CONNECTOR is a way for a parent VI to set the input values of a child VI, and read the output values from a child VI.

It's important to realize that you cannot wire to a VI you create unless and until you choose a connector pattern and connect that VI's controls / indicators to connectors. This wiring step determines how the parent VI may connect to it.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 4
(2,635 Views)