Jump to content
Sign in to follow this  
i2dx

SubPanel / multiple Event Structures Problem

Recommended Posts

Hi Folks,

i have a problem using multiple event-structures with subpanels. to be more precise:

i have a main VI with a subpanel in which several VIs are called for different tasks. These "Sub-VIs" are called via VI-Server (Reference --> set Controls --> Run VI [wait until finished: FALSE, auto dispose Refnum = FALSE]) and terminate themselfes. I have allready checked if they maybe do not terminate correctly before unloading from the subpanel, they are terminated.

the problem is:

the event structure in the main VI misses events:

i have 2 booleans and a cluster of 6 booleans on the front panel of the main VI and the events on the single boolean controls are not recognized by the event structure (even if there is a allready terminated sub-vi without event-structure in the subpanel) after calling a "Sub-VI" with an event structure in it. on the other hand, the events on the booleans in the cluster are still recognized.

an easy way to "fix" this problem would be to drag all boolean controls into the cluster. But i would prefer to know why this happens.

If anyoune knows what's going on there, please let me know. If you need some code examples, i have uploaded some screenshots to my homepage. i cant show you the complete code, because the project is very large. if you need more information, please let me know

mainvi.jpg

the Main VI (Queued State Machine)

runvi.jpg

running a "Sub-VI"

mainfp.jpg

Main-Frontpanel the Buttons "Einstellungen" and "Ende" arre the missed ones

Share this post


Link to post
Share on other sites

Do your two booleans are (in the written code) handled by the event structure? If so and the two booleans are "latch" booleans, then they have to reside IN the corresponding event cases.

Although an event structure handles the event of controls, it does NOT read the control. This means for booleans with latch they never get read if you don't have them (the control terminal not a ref/local variable/property node) in the structure. Your event is handled only once.

Hope this helps...

Didier

Share this post


Link to post
Share on other sites

thanks for the help

unfortunately this did not help. the control terminals are in the event structure, and i dont need the value but only the event on the latching boolean (to start an action ...)

the strange thing is: one of my former co-workers has build a large application (1000+ vis) based on subpanels / multiple event-structures and did never experience such problems. unfortunately i can't show him the code, because he is working for a competitor now.

best regards,

cb

Share this post


Link to post
Share on other sites

First, please review this topic:

http://forums.lavausergroup.org/index.php?showtopic=771

It contains recommendations for posting images to the LAVA Forums. It is not acceptable to post large images inside posts.

--------

Now for your problem. You state the following:

I have 2 booleans and a cluster of 6 booleans on the front panel of the main VI and the events on the single boolean controls are not recognized by the event structure after calling a "Sub-VI" with an event structure in it.

Do you mean that if you do NOT call a "Sub-VI" with an event structure in it, everything works fine?

Also I noticed this:

post-2-1105080768.gif?width=400

I hope you are not splitting this reference. It is not recommended to split or share user events between event structures. Perhaps this is your problem.

Share this post


Link to post
Share on other sites

Michael,

sorry for the inconvenience with the large images. if you can manage that i will edit the original post and use attatchments. now i am unable to edit because you moved the topic ?

----

Do you mean that if you do NOT call a "Sub-VI" with an event structure in it, everything works fine?

Exactly. This is the problem, and i can not figure out, why this happens. MY guess is, that i have found a very nasty bug in LV OR i am to stupid. In my experience strange behaviour like this (especially if you know that it is working in other projects) is either a very very very stupid bug in my software or a very nasty bug in LV ...

You guess right, i do not split the user event. In fact i dont use it in this project. It's part of my project template and i did not remove the user event till yesterday, but that did not solve the problem anyway.

finally i have removed the subpanel in this project and do it the "old style" with pop-up SubVIs, but i still would like to know what's went wrong ...

best regards,

cb

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.