Jump to content

How to use dynamic event structure?


Recommended Posts

First, I do not know how to use dynamic event structure as a subvi?

I upload two vi.

Second, I do not know how to improve dynamic event structure with While Loop, Case Structure in the Dynamic event.vi

if i use dynamic event structure in this vi, when i run the vi, and click on the button of the panel, i can not use any button.

could anyone help me?

Thanks

jackmax

Link to comment

QUOTE (jackmax @ May 18 2009, 10:56 AM)

First, I do not know how to use dynamic event structure as a subvi?

I upload two vi.

Second, I do not know how to improve dynamic event structure with While Loop, Case Structure in the Dynamic event.vi

if i use dynamic event structure in this vi, when i run the vi, and click on the button of the panel, i can not use any button.

could anyone help me?

Thanks

jackmax

You should show us the VI. There are too many reasons for the buttons to lock so that information is not useful.

Link to comment

Something I had to find out the hard way when I started using the event structure is that if you use a latching type button you have to put the terminal for the button inside the event structure value change event for it to use it. Have a look at using one of the templates such as the "Dialog Using Events" as a starting point. There are also a lot of examples in the example finder, search for event-driven.

Link to comment

Hi Jackmax

I had a look at your code and think you might need a bit more understanding of while loops and how the event structure works before jumping into something like dynamic events in sub vis, it's pretty advanced stuff.

In the example you gave there was really no need to use dynamic events in the sub vi, an ordinary event structure in the main vi would be fine with a sub vi that runs once and exits with no while loop. If you have a subvi with a while loop inside another vi's while loop it will lock up it's caller until it finishes. An event structure will stop the loop until one of the event cases happen or if it has a timeout wired to it.

If you really want to use a dynamic event in a sub vi here are your example vis with something like I think you might be after. The same functionality could be covered a much simpler way though.

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...

Important Information

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