09-29-2009 09:14 AM
I'm starting a large project and need a state machine. I can't decide on whether to use a case structure or event structure. Is there an article or other information that describes criteria for selecting between the two approaches?
Thank you,
Chuck
Solved! Go to Solution.
09-29-2009 09:23 AM
Normally a state machine is implemented with a case structure. It's possible to implement it with an event structure, but it's not the way I'd go. I think the two articles you really want to read are:
09-29-2009 09:32 AM
Hi Chuck,
Well case structures and event structures differ quite alot. Here's a link for indepth information on Event Structures, and using them in state machines: http://zone.ni.com/devzone/cda/tut/p/id/2962. Hopefuly this will help you make up your mind.
Let me know if you have any questions after reading it.
Regards,
09-29-2009 11:49 AM
Chuck,
You may actually use both event structure and case structure, i.e., put an event structure in one of the case structure of your state machine to watch for user events such as front panel events. I also found it useful to have two parallel state machines with one to handle time consuming states and the other to handle easy states so that user interfaces are very responsive. Just my 2 cents.
Regards,
Bryan