LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting front panels to different block diagrams

When using LabView, we are working with an oscilloscope driver provided on the website. We have everything running properly, but we had a question about convenience. Is there any way to place the control for a numeric value on the front panel not corresponding to the block diagram. Exactly, we have a subvi which controls a specific numeric value, and we would like to be able to set that numeric value on the main front panel, as opposed to having to open the subvi front panels and control the different values from there. Is there a way we can connect them outside the subvi? Thanks for any help.
0 Kudos
Message 1 of 4
(2,852 Views)
If your subVI has the control wired to the connector pane, all you have to do in the main VI is right click the terminal on the subVI and choose Create>Control. If you look at just about any of the shipping examples that use a subVI, you'll see front panel controls on the main setting values in a subVI.
0 Kudos
Message 2 of 4
(2,852 Views)
Labview will do this very nicely. Although you could do this with a global variable they take up more memory
so try this method.

step 1. open front panel of the VI that you want to copntrol.

Step 2. go to the icon in the upper right hand corner and right click on the icon and select show connector

Step 3. click on empty space on icon or if there is no space (right click on that connector and select add terminal) then click on the control that you want to control.

Step 4 save VI and close

Step 5 in main VI if VI you just modified shows up white right click on it and select relink to sub VI.

Step 6 right click on the output of sub VI and select create contol and this will put it on the front panel and will allow you to control your sub vi.

from t
here the possibilities are endless. Also if you are new to labview there is a good book that I would suggest it is called Labview for everyone by Jeffrey travis.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 4
(2,852 Views)
If you are wanting to change the values in the subvi from the main vi front panel while the vi is running then you may want to send a reference to the subvi to the control on the front panel instead of using a control in the subvi. The methods discussed above will only pass the current value of the front panel to the subvi when the subvi is called.
0 Kudos
Message 4 of 4
(2,852 Views)