LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to create a pop-up window appear from Labview Interface. In this window, I will have a slide control and an image taken from a camera. The main VI have to run while pop-up window is open. How can I do ?

When I pushed a button, this pop-up window has to appear. There will be a slide control and a picture from a camera in this window. Is it possible to make appear this windows while main VI Interface continue to run ? How can I do this ? Thank you for your answers.
Cyril.
0 Kudos
Message 1 of 20
(5,423 Views)
Here you go. This is simple example. Maybe not the best way, I am just
beginner in LV and still not comfortable with data flow that much. I prefer
events, so I would change this to use Event Structures.

When you click on OK button on SliderMain, it opens Slider.vi. Now both
windows are open and you can interact with both. Now if you click on OK
again with Slider.vi open, you run into problems. Only thing I did was
change VI properties of slider.vi, mainly window appearance.


vishi


"Cy" wrote in message
news:506500000008000000B5860000-1042324653000@exchange.ni.com...
> I would like to create a pop-up window appear from Labview Interface.
> In this window, I will have a slide control and an image taken from a
> camera. The main VI hav
e to run while pop-up window is open. How can I
> do ?
>
> When I pushed a button, this pop-up window has to appear. There will
> be a slide control and a picture from a camera in this window. Is it
> possible to make appear this windows while main VI Interface continue
> to run ? How can I do this ? Thank you for your answers.
> Cyril.



[Attachment SliderMain.vi, see below]


[Attachment Slider.vi, see below]
Download All
0 Kudos
Message 2 of 20
(5,420 Views)
In this example, you CANNOT interact with the main VI when the subVI is running. You've done a normal dialog box where the execution is passed to the subVI and everything waits until the subVI is closed. If you coud interact with the subVI, then you would be able to stop it with your stop button, but you can't. One way is to have two separate while loops. One has the subVI call and then another is the main. Another way is to use VI Server to dynamically open and run the subVI. I've attached modifications to Slider Main and Slider subVI that quickly demonstrates that technique. Note that there would be additional work required to pass data to the subVI and to close the subVI when the main stops.
Download All
0 Kudos
Message 3 of 20
(5,420 Views)
Hi, I can't open the two labview VI. Labview reply "load error code 8 : could not load VI resource"
How can I repair this problem ?
Thank you.
Cyril.
0 Kudos
Message 4 of 20
(5,420 Views)
Your solution is efficient and powerful but it looks also very difficult. I have made the example with two separate while loops and this solution is very easy. I would like to know the advantages I could have by using your solution instead of a "more classical" one like the one I made.
Thank you for your answers.
Cyril.
0 Kudos
Message 7 of 20
(5,420 Views)
You would need 2 while loops in the main program or use my example. In your example, the main VI will not be able to do anything until the subVI is closed. What you've done is the typical way to call a dialog box subVI and that's fine but when you said you wanted the main VI to continue to run, I assumed you want to do other processing while the subVI is open.
0 Kudos
Message 9 of 20
(5,420 Views)
Dennis,

I am not clear when you say that main VI waits till subVI is done. When I
click on OK button, subVI is opened. Now I can slide the slider on subVI and
at the same time, I can click on the Boolean button on the Main VI. If subVI
was opened as a diaglog box, I wouldn't even be able to click on main VI.

BTW - Thanks for your solution. I wish there was some book which tells these
tips & tricks. This forum has been great help.

vishi

"Dennis Knutson" wrote in message
news:506500000005000000B3EF0000-1042324653000@exchange.ni.com...
> In this example, you CANNOT interact with the main VI when the subVI
> is running. You've done a normal dialog box where the execution is
> passed to the subVI and everything waits until the subVI
is closed. If
> you coud interact with the subVI, then you would be able to stop it
> with your stop button, but you can't. One way is to have two separate
> while loops. One has the subVI call and then another is the main.
> Another way is to use VI Server to dynamically open and run the subVI.
> I've attached modifications to Slider Main and Slider subVI that
> quickly demonstrates that technique. Note that there would be
> additional work required to pass data to the subVI and to close the
> subVI when the main stops.
0 Kudos
Message 10 of 20
(5,153 Views)