11-02-2011 02:49 AM
Hello everyone
Just thought I would share with you all a little snippet of code to highlight an idea I have been looking at whereby you can use user events to creat an event driven state machine (without queues).
Each state being represented as a user event.
This idea was sparked by a presentation given by Justin Goeres at NI Week about private and public scoped user events. I have also seen similar architectures appear on the NI forums in recent week.
The nice thing about user events is that they are 1 to many, so you could have several "Event machines" all registered to respond to a single user event. Got to be careful here.
Please feel free to comment good or bad on this idea, I am currently trying to use this concept in a medium sized "out of hours" project so I guess I will find out soon enough if there are any drawbacks.
Cheers
Chris Roebuck
11-02-2011 06:45 AM
Ooops , forgot to say. Once unzipped, open and run EventMachine_Main.vi , this should also launch the API tester
Enjoy !