LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How control main VI while runing a subVI?

Hi, I want to create a GUI that will pop-up a window (using subVI) when I click on a button on the main screen. The problem is when the pop-up window is on the top of the main screen, I could not control the main any more. I want as many pop-up windows appear as many time I click on the button on the main screen.
Ex: I click on the button on the main screen, then pop-up window appears. While the pop-up window open, I click the button on the main screen and another pop-up window opens.
Any idea to make it work? Thanks.
0 Kudos
Message 1 of 10
(3,605 Views)
What are you trying to achieve do with the multiple pop up windows? Messages, calculations or control?
One way to create multiple instances (which are not re-entrant) of the same subvi is to make it a template, by saving it to *.vit. This will make multiple individual copies of this vi. Select the appropriate pop-up window appearacne from VI Properties -> Appearance.
Use the invoke node to call multiple cases of this vi (use the Run VI method and set the Auto Disp to true which will close all references when you close the vi). Plus you can check the following link for more info.
Let me know if you have any other questions.
0 Kudos
Message 2 of 10
(3,602 Views)
Thanks for your respone. My application is a software that will control and report status of oil valve on oil platform. Each pop-up window will control one valve.
0 Kudos
Message 3 of 10
(3,591 Views)
I have more than 200 button that will send difference input to the same subvi. How to open the same subvi simultaneous. I tried re-entrant, but the subvi does not appear. I also tried to use the invoke node to call multiple cases of this vi, only the first time works, the second one does not take action until the first one is closed. Any suggestion will be appreciated.
0 Kudos
Message 4 of 10
(3,577 Views)

Can you please post an example of your code with what youre trying to accomlish?

If you have saved the vi as a *.vit (vi template) using the invoke should work when you call this vi.

Here is an example of something similar.

0 Kudos
Message 5 of 10
(3,571 Views)
The attached is my sample vi. Thanks for your help.
0 Kudos
Message 6 of 10
(3,565 Views)

Hi David,

I have modified your vi to use the Invoke Node method. Have a look at the changes made in the main and subvi to give you idea of what to do.

Hope this helps.

 

0 Kudos
Message 7 of 10
(3,561 Views)
Hi David, I got it work by using invoke node as your suggestion. However, the Vis send to me are in Labview 7.1, could you convert it to 7.0. I like to learn the way you do it. I am greatly appreciate your help. 
0 Kudos
Message 8 of 10
(3,550 Views)

I run the application under vi is ok, but i build it and run under an .exe it give me the message below. How to avoid this error?

Fatal Internal Error: 'linker.cpp", line 1926
LabVIEW Version 7.0

You will lose any unsaved work. For more assistance in resolving this problem, please relaunch LabVIEW, or contact National Instruments.

0 Kudos
Message 9 of 10
(3,545 Views)

David,

Do you have express VIs in your executable? If so, I think this error is part of a bug that appears to have been fixed in 7.1. But one workaround is to convert your express VIs to subVIs. This can be done by right-clicking the express VIs and selecting "Open Front Panel". This will convert the code in the Express VI to a subVI and you can then save the subVI. See if this helps any.

 

Tyler S

0 Kudos
Message 10 of 10
(3,527 Views)