LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer subvi panel exactly onto the main vi panel

I have searched and studied the title question in this forum, but can't seem to find a solution for my specific situation...wonder if someone had a similar problem that is solved to his/her satisfaction.

I have built a vi that has multiple graphs displayed on its front panel. The graphs were all configured to my satisfaction in the vi's block diagram with property notes. Now I want to have a main vi to call this subvi a few times and display the subvi's panel in the main vi panel exactly as it is appeared in the subvi panel. I do not want to reconfigure the graph's property nodes in the main vi as the configuration is very complex and extensive.

I am using LabView 7 base package and have no access to subpanel functionality or picture indicators so I cant have the main vi just display a picture file generated by the sub vi, even though I only need the display of sub vi panel and can live without transfering data from sub vi.

It seems that my only route is to creat a referece control, wire it to the subvi connector pane, then in the subvi do the property notes configuration. I am running into two problems in this route:

1) in my original sub vi, the property note were created by right click the mouse while having the mouse on one of the graph indicators. The property node created this way does not have a wiring connector to the control reference from the main vi.

2) if I go to the function\application\property note, I can generate a property note with a control reference wiring option. But this property node is not the same as I created for the graph indicator using "righh click mouse method".

I must have missed something basic here, and definitely appreciate someone to point to a clearer direction.

Thanks in advance.
0 Kudos
Message 1 of 12
(3,703 Views)
If all the properties are static, you can just copy the graph over and it will stay the same.

It seems to be that your properties change dynamically depending on the data, so this is not an option. You could just drag the entire diagram, including all property nodes to the new subVI diagram. Now just righ-click on all property nodes, select "link to..." and choose the correct graph of the subVI. Shouldn't be too much work. 🙂
Message 2 of 12
(3,690 Views)
I'm not sure I quite understand the problem. If you want to update the graphs in the main VI instead of the subVI, right click on the property nodes in the subVI and select Deisconnect From Control. The property node is then converted to one you can connect to a reference. If you also create a Value property that you wire data to, there is no need for the subVI to have any indicators at all. If you want to modify indicators in the main and subVI, then you will need to have both the local property nodes and those for the reference since they would be modifying two separate objects. I usually don't bother unless I want to display the subVI's front panel.
Message 3 of 12
(3,686 Views)
yes, indeed i need to change the panel properties dynamically. Thanks for pointing out draging the whole diagram which i have not thought of. In my case, i already have the subvi's panel configured, so I need to drag the subvi diagram into the main vi a few times, as I am calling the subvi in the main vi a few times. thanks again...i am still open to another solution though as my property notes configuring the subvi panel is a real messy one.
0 Kudos
Message 4 of 12
(3,674 Views)
Thanks for the suggestions, and I need to clarify my problem a little:

Since my subvi's panel is done already, I like to use it in my main vi, and I need to used it 3 times in the main vi. By 3 times, I mean I have 3 spacial sections in my main vi panel, each section will be displaying the subvi's panel with slight difference due to difference parameters used in calling the subvi. Since my subvi's panel is prety involved in configuring, I want the least amount of work to achieve this goal, i.e., to use the subvi's panel without much reconstructing the panel in the main vi.

My question is if I creat a reference control in the main vi, it seem to be a method to transfer main vi's panel property into subvi? How do I do the opposite? i.e., having the subvi's panel transfered to the main vi?

Thanks again for more input!
0 Kudos
Message 5 of 12
(3,671 Views)
Since the goal is to modify the main VI's indicators, the best way is how I mentioned. Pass a reference to the subVI and instead of local property nodes, write to the reference's property nodes. The only other way is to pass the values of all the property nodes you've set in the subVI through the subVI's connector and in the main VI, write those values to property nodes of the graphs.
0 Kudos
Message 6 of 12
(3,659 Views)
Dennis, thanks for your reply. Somehow I still have trouble associate the control reference with its property node. As you can see in the attached example vi, if connect the control ref to the property node after disconnecting from control, the subvi is no longer runable. Or if i chose "link to" control ref on the property node, the connection between the values and the property node will be broken. There must be something simple i missed, and please forgive my poor knowledge with passing references in LabVIEW.
0 Kudos
Message 7 of 12
(3,644 Views)
Oops, forget the main vi.
0 Kudos
Message 8 of 12
(3,640 Views)
An easy way to create a control reference of the correct type is to right click on the graph, select create referecnce, then on the reference, right click and select create control. This new control is of the correct type and can be wired to the reference property node.
0 Kudos
Message 9 of 12
(3,639 Views)
Thanks for the quick reply, unfortunately i am using LabView 6.1 and 7.0 which can't open your vi in LabView 7.1. Could you resubmit a lower version one. Thanks again.
0 Kudos
Message 10 of 12
(3,633 Views)