LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to use a VI i n c l u d i n g i t s G U I many times in an other VI. How to approach?

I designed a mini VI with 4 switches and an indicator and some logical intelligence between the components.

In my application I need this construct many times and want to avoid tedious copying.

Is there a way to use this VI including the graphical representation in an other VI? It should work like a "custom super control".
Looking at VI controls I missed the programming code.
If I include the VI as a window I could not handle the graphical positioning.

I am too new with lab view to find out what to do.
0 Kudos
Message 1 of 12
(3,305 Views)
Hi Tom,

you can customize this behaviour via File->VI Options or just hitting "Strg I" (I'm not sure with the menu names, because I'm using the german version of LabView).
There are two items important. First, "Execution" where you can choose if the called VI is the only instance of this VI or not and of course the priority of execution of the VI and similar options.
Second, well let's call it "Look and Feel" of the GUI Window. It is the second menu item above the "Execution" item. There you can choose a customized look an feel of the GUI of the VI. There you can choose that the GUI should be dislayed when the VI is called in the main VI besides other options.

Hope this will help you! Please, let me know if you have problems with with my description of the
menu items. I will try then to get a proper translation.

Stephan
0 Kudos
Message 2 of 12
(3,305 Views)
Hello,

thank you for the hint, but I think this is not the solution.

I cannot place the sub vi graphically ("it is no custom control") and I need it to be displayed all the time (status of digital outputs).

I believe, the solution may be found in ActiveX or something like this.

Tom
0 Kudos
Message 3 of 12
(3,305 Views)
Hi Tom,

did you try the "slide" option where you can choose the behaviour of the window?
In this modus the window of the SubVI is always on top and you can place it where you want on the screen.

Stephan
0 Kudos
Message 4 of 12
(3,305 Views)
Hi,

You should have a look at vi templates (*.vit). You can combine the
templates with sub panel technology, or with floating panels. See the
attachment. Hide the string indicator, so the look better in the sub panel.

I've put all the code in the diagram. To make things nice, put the property
nodes in sub vi's, and add error handling. Nice icons help to better
understand te code.

It isn't very difficult, but it isn't beginner level...

Regards,

Wiebe.

"TomFromELMAKO" wrote in message
news:50650000000800000050DE0000-1079395200000@exchange.ni.com...
> I designed a mini VI with 4 switches and an indicator and some logical
> intelligence between the components.
>
> In my application I need this construct many times and want to avoid
> t
edious copying.
>
> Is there a way to use this VI including the graphical representation
> in an other VI? It should work like a "custom super control".
> Looking at VI controls I missed the programming code.
> If I include the VI as a window I could not handle the graphical
> positioning.
>
> I am too new with lab view to find out what to do.



[Attachment read string control main.vi, see below]


[Attachment string control.vit, see below]
Download All
0 Kudos
Message 5 of 12
(3,305 Views)
Hello,

where it is?

The behavior of the window is rather wrong. It seems that all instances work on the same GUI, I need n GUIs.

There must be another solutuion.

Tom
0 Kudos
Message 6 of 12
(3,305 Views)
Hi Tom,

I attached a picture of the Menus I have used to call the GUI of one SubVI. Hopefully it will help you to find the menu items but as I already mentioned I'm using a german version of LabView.
Well, as far as I know, if you call the SubVI more than once than you have more GUIs displayed and you can use their values according to your wiring in your main VI.

But of course there is more than one way to achieve this and certainly a handier one.

Stephan
0 Kudos
Message 7 of 12
(3,305 Views)
Hello,

thank you very much. But my Lab View is 6.1 yet...

I'll try to do it such way.

Regards,

Tom
0 Kudos
Message 8 of 12
(3,175 Views)
Hello,

thank you very much. I have to go now.

I wish you a nice weekend. More on monday...

Regards

Tom
0 Kudos
Message 9 of 12
(3,305 Views)
Tom,

LV6.1 doesn't have sub panels, nor floating windows...

Regards,

Wiebe.



"TomFromELMAKO" wrote in message
news:506500000005000000EA9B0100-1079395200000@exchange.ni.com...
> Hello,
>
> thank you very much. But my Lab View is 6.1 yet...
>
> I'll try to do it such way.
>
> Regards,
>
> Tom
0 Kudos
Message 10 of 12
(3,175 Views)