LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modeless SubVI does not load


@MoReese wrote:
He has a run-time menu and he is calling the VI from this menu (i.e. File>>Load .INI).  His VI is evidently tucked inside of a case structure and the case gets executed when the menu item is select; therefore, the VI is being called from his main.  I believe I have it right.

 


Now I get you point. Yes, I placed the VI inside the main menu loop so the EXE knows about the modeless form when it comiles it. Now I changed that in the example so it is called by reference as Ray.R suggested.

0 Kudos
Message 41 of 51
(1,299 Views)

@MoReese wrote:

This will open your front panel.  Is this what you want?

 

open fp.png

 

 


Ok, I modified it per your example and added another menu item: File > Modeless2 (see attached).

 

It works (kinda) with the following issues:

 

1. The forms (Modeless, Modeless2 VIs) appears on background, and not on the top of the Main vi.

2. These forms donot run, even though they are set to "Run When Opened" 

3. When you run them, they become fixed (not resizable).

 

But other than that, they are independent. Now how do we fix the issues above?

 

 

 

0 Kudos
Message 42 of 51
(1,290 Views)

@Vladiator wrote:
 

 

1. The forms (Modeless, Modeless2 VIs) appears on background, and not on the top of the Main vi.

 

It runs on top of my main on my system.

 


@Vladiator wrote:

 

2. These forms donot run, even though they are set to "Run When Opened" 

 

The modeless VI runs on my system.  It closes when the stop button is pressed.

 


@Vladiator wrote:

 

3. When you run them, they become fixed (not resizable).

 


You can control this in VI properties>>Window Appearance.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 43 of 51
(1,283 Views)

Re:

1. Ok, my fault - the Activate was set to False. When it is set to True, it works.

2. Still do not run when opened from the menu.

3. The Modeless forms are set to floating, and I expect the borders should be sizable, however they become fixed (modal) when the forms run.

 

2 and 3 - are those LV 2009 issues? 

0 Kudos
Message 44 of 51
(1,278 Views)

I've tested the code on LV2011 and it worked the same way, no difference with 2009.

 

0 Kudos
Message 45 of 51
(1,268 Views)

Hello Vladiator,

 

I have also tested the code (LV 2011) and did not run into any problems in terms of your constraints 1,2,3 , however both windows don't remain in front of the main vi front panel and I'm not quite sure if you are looking for that functionality in the first place. If you wish to insure that both windows remain in front of the main front panel you might wish to check out the following URL: http://digital.ni.com/public.nsf/allkb/5FEB0ED42C700C9B86256EEB00527ECE?OpenDocument.

 

Ultimately, it seems that some of your questions may be stemming from window properties settings which can be manually set under VI properties, or programmatically set in the properties for the VI class. If you get stuck there are a great deal of resources in terms of KB's that address most of the questions you may have related to controlling your vi window properties.

 

Regards,

Blayne Kettlewell

 

 

0 Kudos
Message 46 of 51
(1,252 Views)

Blayne 


@Blayne K wrote:

Hello Vladiator,

 

I have also tested the code (LV 2011) and did not run into any problems in terms of your constraints 1,2,3 . 

 

 


Wait a minute - there are still issues with 2 and 3:

2)  the modeless forms do not run when opened form the main form menu - even though they are set to "Run When Opened". I have not tested the functionality in run-time mode, however it does not work when running from LabVIEW 2011.

3)   The Modeless forms are set to floating, and I expect the borders should be sizable, however they become fixed (modal) when the forms run (manually set to run).

 

Can you confirm this by running the example Modeless2.zip above? Thanks!

0 Kudos
Message 47 of 51
(1,237 Views)

Hello Vladiator,

 

I was mistaken last night and double checked this morning to find out you were correct about 2 & 3. I found internal documentation of a similar issue with subVI calls and property node settings which stated the following "This is not a bug. The "Exec:Run When Opened" has a note in the documentation that says this property is ignored when you load the VI using VI Server..."

 

I did find a way for you to explicitly force the subvi to run by using an invoke node with the "Run VI" method, which may provide you with an acceptable workaround (2). As for (3) all you need to do is add in the property node selection FP.Resizable and that should allow you to resize the window after explicitly running it. I have also attached the VI with "modeless" forum exhibiting what I think you are looking for in terms of functionality.

 

Hope this helps!

Blayne Kettlewell

0 Kudos
Message 48 of 51
(1,229 Views)

Hello Vladiator,

 

Try this out.  The sub-vi will open when the open VI.vi is executed.  It will close when the OK button is pressed on the fp of the opened VI.  I hope this helps.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
Download All
0 Kudos
Message 49 of 51
(1,218 Views)

It is missing an Untitled 2.vi which is a part of Open VI.vi 

0 Kudos
Message 50 of 51
(1,213 Views)