MarkCG Posted September 7, 2011 Report Share Posted September 7, 2011 (edited) Hi all, I am facing a bit of a dilemma. I've written quite a few programs using one or more QSMs. I usually use the JKI string based state machine. They are perfectly fine for the applications I've so far developed. Those would be mainly UI and data processing for desktop instruments of one kind or another, or control systems that don't have more than one or two modes of operation. Now, however, I need to implement some control algorithms for large machines that will be quite complex. I saw right a way that a typical flat QSM won't cut it... the number of different modes the machine can be in would would make this pretty difficult to handle. I really don't think a flat QSM is good for anything much more complex than something like the National Instruments "Soda Machine" example it likes to use so much. My first thought use the Statechart module, and this would do exactly what I need it to do and make it easy to implements all the various substates, concurrent processes, etc . However, this is tough sell because it means money has to be spent, and that's just something that the powers that be may or may not choose to do, regardless of whether it would save development time and money in the long run. My second thought was to create my own Hierarchical state machine. I would do so using a stringbased state machine, and use tokens to denote substates. I can then have a state with as many substates as I like. It wouldn't be nearly as pretty as the Statechart diagrams and take longer to implement, but it would at least be more easily debuggable than the current setup. Has anyone tried making their own string based HSM, and if so, do you have any advice for me? Edited September 7, 2011 by Sergeant Manners Quote Link to comment
Tim_S Posted September 7, 2011 Report Share Posted September 7, 2011 Have you done a paper design yet? You may be quite surprised what is appropriate when you start breaking a large design into smaller components. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted September 7, 2011 Report Share Posted September 7, 2011 Almost all of my apps are state machines within state machines. Take a look at these two galleries on the dark-side to get some ideas. http://forums.ni.com/t5/media/gallerypage/user-id/9539/album-id/9000 http://forums.ni.com/t5/media/gallerypage/user-id/9539/album-id/9006 Ben 2 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.