Jump to content

Hierarchical State Machines, Statechart module, and advice


Recommended Posts

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 by Sergeant Manners
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.