jackmax Posted May 19, 2009 Report Share Posted May 19, 2009 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 Quote Link to comment
mross Posted May 19, 2009 Report Share Posted May 19, 2009 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. Quote Link to comment
Karissap Posted May 20, 2009 Report Share Posted May 20, 2009 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. Quote Link to comment
jackmax Posted May 20, 2009 Author Report Share Posted May 20, 2009 I am sorry! I have upload a compressed file but did not notice it was failed. Quote Link to comment
mross Posted May 20, 2009 Report Share Posted May 20, 2009 QUOTE (jackmax @ May 19 2009, 09:43 AM) I am sorry! I have upload a compressed file but did not notice it was failed. Sorry, I can't use LV8.6. Quote Link to comment
Karissap Posted May 22, 2009 Report Share Posted May 22, 2009 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.