This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

abornality in dynamic VI calling

Hi:

    I just met a strange problem when I using the event structure and dynamic VI calling.There are four button in the program which represent four different VI calling (dynamic VI calling)

 

 

      Each VI is working well separately.

 

     When they are calling by a"host VI", three of them are working properly(When the value of the three buttons changed,  the front pannel of the according VI would be appeared and the VI would be running until the user stop it )

 

     But there is a VI can not work properly when they are called by the "host vi" (It is also working well separately)

 

  In normal condition, the VI which is called by the host would appear in the front of the host VI and running until the user stop it artificially.

   

  In abnormal condition, the VI which is called by the host would appear in the back of the host VI and since then ,neither the host VI nor the called VI can response the user action, the only way to stop the VI is using ctrl+alt+Del and cancel the labview task .

 

   what can lead the difference? All of the VI are in the same priority and execution system. 

 

Thanks for your replying

 

0 Kudos
Message 1 of 10
(2,426 Views)

That behaviour might be caused by improper settings for the modality of the dialog.

So please check and compare the VI settings of your subVIs.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 10
(2,416 Views)
Probably the VI property of the non functional VI is not set to "Modal".

Btw. you don't need to set the main VI to modal. Making the main vi modal
isn't good for anything, and it makes things a lot more difficult (like
accessing the diagram).

Regards,

Wiebe.


0 Kudos
Message 3 of 10
(2,406 Views)

Thanks Wiebe. and Norbert:

 

  All the VI I used is in its default setting. But some worked properly while some not.

 

 where can I modify the VI is modal or not ? I look through the VI property and find nothing about it .

 

Thanks again.

 

aaa1982

0 Kudos
Message 4 of 10
(2,397 Views)

I think it is easier for us if you zip the files (the four subVIs and your calling VI) and attach it in this post.

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 10
(2,392 Views)
VI properties (CTRL-I), Window Appearance, Customize.

If the main vi isn't modal, and the sub vi isn't modal, you don't need to
use CTRL-Alt-Del to stop the program. You can use the task bar (windows) or
ATL-Tab to set the covered window to the front...

Not sure why it works for the other three windows, but if the sub vi's
aren't modal, you can always click in the main window, and lose the front
panel of the sub vi. So, they should be set to modal, or floating, at least
in most cases (perhaps not for debug windows and stuff like that).

Regards,

Wiebe.


0 Kudos
Message 6 of 10
(2,384 Views)

Thanks for your repling.

 

All the windows behavior property about the VI are default.The check of the modal is not selected.

 

 I once wanted to simulated the question with two VI , one is the host VI(simulated ) and the other is the "problematic sub_VI(actual )" which is called by the host VI.

 

 In my opinion If the problem still exist in the simulated condition, I can post the zip of the two VI on this forum.

 

 But the dynamic calling  is always working well in the simulated situation.

 

 It is likely that the strange problem is only exist in my real application program which I can not post it here.

 

 What is more interesting?

 

I turn on the "high light execution" and debug the host VI step by step. when the "problematic sub-vi" is calling, it is working properly.

 

Then I turn off the "high light execution" , but the "problematic sub-vi" still working properly. The ugly problem which confused me for about two days disappeared in an unexpected way.

 

I try to run the host VI agian and agian, the problem did not appear any more.

 

now I was so puzzled . what cause the problem and what solved it?

 

Thanks for your repling.

 

aaa1982

 

 

 

0 Kudos
Message 7 of 10
(2,367 Views)

Does your subVI which is causing the problem contain calls to other dialogs? Are there DLLs included?

I can imagine that you have a task/thread-switching issue. So you could modify the problematic subVI to execute in the UI thread (vi settings >> execution >> preferred execution system, set to "user interface" ).

 

hope this helps,

Norbert 

Message Edited by Norbert B on 01-26-2009 09:10 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 10
(2,363 Views)

aaa1982 wrote:

...

 

 What is more interesting?

 

I turn on the "high light execution" and debug the host VI step by step. when the "problematic sub-vi" is calling, it is working properly.

 

Then I turn off the "high light execution" , but the "problematic sub-vi" still working properly. The ugly problem which confused me for about two days disappeared in an unexpected way.

 

I try to run the host VI agian and agian, the problem did not appear any more.

 

now I was so puzzled . what cause the problem and what solved it?

 

Thanks for your repling.

 

aaa1982

 

 

 


This sounds like a race condition. Make sure you are enforcing the correct order of execution.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 10
(2,359 Views)
If none of the VI's are modal, this problem won't go away. Try this. Call a
dynamic VI. It will be on top. Then, click the main vi, and the sub vi will
disappear behind it. This could also happen when the vi starts slow, or by
some stange race condition.

So again, you need to make the popup vi's modal if you don't want them to
ever disappear behind the main vi.

Regards,

Wiebe.


0 Kudos
Message 10 of 10
(2,341 Views)