07-02-2008 06:09 PM
07-02-2008 06:38 PM
07-03-2008 08:30 AM
@Dennis wrote:
Using two different event structures in separate frames is bad design. Each event handler is always capturing events. This is described in the on-line help for event structures. Open the help and click the 'caveats and recomendations' link.
That's bothersome. I use sequences all the time and nobody has ever commented that my code is badly designed. I wonder why NI provides that function if it promotes poor code design. You did say "often" and not "always" so I have an out. :^)
@Dennis wrote:
Using a sequence structure in itself is often a sign of bad design. Better to use a state machine or use dataflow with error in/out clusters.
07-03-2008 08:34 AM
07-03-2008 08:37 AM
kc64 wrote:
I read the caveats and recommendations several times. I recognize that my example vi shows two event structures in one loop but, in my application , this is not the case. I don't see any clear instruction on that help page that would indicate that I have broken some rule of event structure use.That's bothersome. I use sequences all the time and nobody has ever commented that my code is badly designed. I wonder why NI provides that function if it promotes poor code design. You did say "often" and not "always" so I have an out. :^)
07-03-2008 08:43 AM
07-03-2008 08:45 AM
I don't understand. You first say that your example does have two event structures in a single loop and the then you say it's not the case. If you have two events structures in a sequence structure, they are in the same while loop.
I read the caveats and recommendations several times. I recognize that my example vi shows two event structures in one loop but, in my application , this is not the case. I don't see any clear instruction on that help page that would indicate that I have broken some rule of event structure use.
07-03-2008 08:49 AM
07-03-2008 08:59 AM - edited 07-03-2008 08:59 AM
You can't have separate frames of the same sequence structure in different loops. It's impossible.
07-03-2008 09:23 AM
Denis, you physically can, but the program won't work 😉
R