LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subvi's & tabs

Im having a problem learning how to wire things in between different case structures or vi's.  Lets say I want to have a panel that displays a temperature.  I want another pop up panel via a button that says configuration(that i think needs to be a subvi) that would have numeric controls to compare to the temperature on the first panel and light up some leds.  Pretty simple stuff, I just dont have enough room on the first page to put all the controls on that page.  I initially thought just creating a subvi would do the trick but havent found any examples that have a this kind of example.  Please point me to this kind of example or tutorial. 

 

So i then i tried using tabs.  I found the "Tab Control Properties.vi".  It is not exactly what i wanted but i am trying to edit it to see how i can make it work for my purposes.  I delete the knob from the 1st tab and delete the tank from the 2nd tab.  Then i right click on the knob left and create a reference to this knob and wire this to the tank left on the 2nd tab.(so i have a reference knob and tank in the 2nd case structure)  It then tells me there is an error that doesnt seem to make sense.  "These cannot be wired together because their data types do not match.  The type of the source is Knob Refnum double.  The type of the sink is double. "

 

thanks in advance,

 

im a beginner obviously

 

 

0 Kudos
Message 1 of 5
(2,938 Views)

Tabs are basically a clever way to group and show/hide controls. All controls belong to the tab control, they're just not shown at the same time (something many solve manually by visibility property).

 

It sounds like you simply want to show the Knob value on the tank? If so, just connect the Knob control to the tank indicator. If you're making it Event driven the Knob's Value change event is a natural place to place both items and the action.

 

The reference is just that, a reference, that cannot be transformed into a value directly. You can, however, connect the reference to a property node to get different parameters about the referenced object (as value, enabled state or visibility).

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 5
(2,917 Views)

As for the Settings sub-vi, a tab is a simpler solution, but a sub-vi also works. Just make a simple panel that sends a cluster or the individual controls out. If you want to make it clever you make such a sub-vi as an Action Engine (AE) where a Set-command will show the panel for modification and other wise it's a silent read for the program to get the values.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 3 of 5
(2,916 Views)

I will try what you suggested with the subvi using a cluster as the interface back to the vi. 

 

But regarding the tabs I think I have already done as you suggested.  I am still getting the previous error I mentioned.  I am including the picture that shows the two different cases for the tab.  One page has the knob the other has the tank.  I created a reference for the knob and wired it up yet still gives me the error.  I must be missing something simple...

thanks

0 Kudos
Message 4 of 5
(2,875 Views)
You simply cannot wire a reference to an indicator. If you want to have the knob set the value of the tank, simply wire the terminals together. If you are placing code in different cases for the tab, that is really not at all necessary. A tab is usually not wired anything.
0 Kudos
Message 5 of 5
(2,869 Views)