11-21-2007 12:00 PM
Nice article!
However, I found that if we keep separate notions for state, action, and event, think (and treat) the code in the cases of the consumer loop as actions rather than states, maintain separate queues for events and actions, not only it allows creating a more flexible and powerful architecture, but, most importantly, developing code on a higher level of abstraction (when in this state and this event happens I need to do this, this and this action and switch to that state). Please see the following for further discussion and a more advanced architecture:
Despite the pattern discussed there doesn't support hierarchical states (for those implemented see labhsm.com) I found it much more powerful and flexible (yet producing uniformly looking and easily modifiable/maintainable code) than the standard producer consumer single queue QSM pattern.
03-13-2008 02:09 PM
03-14-2008 02:35 PM
09-03-2008 04:43 PM
Hi,
This is an excellent article. Thanks, Anthony.
A question for everyone: has anybody made any progress in integrating labview classes into their QSMs? If so, can you describe how you've used classes?
Quick comments to Anthony:
1) I agree that the queuing/dequeing operations probably should have error handling.
2) If you're using a global variable (Exit) across all of your loops and subvi's, won't this global actually prevent the separate loops/subvi's from being "chunked" and distributed to multiple processors? I may be wrong about this, but if I'm not, you may want to handle this differently, e.g., with a functional global or with more queue messaging. Otherwise, I think your code may wind up running mostly on one processor, even on a 4- or 8-core machine. Can anyone with more knowledge confirm that the global variable will actually prevent parallel processing here?
Regardless of the issues above, really nice article.
Thanks,
Eric
09-03-2008 05:02 PM
tst,
I don't suppose your code to clone the VIs and typedefs is freely available? 😉
09-04-2008 02:13 AM
11-05-2009 10:19 AM
Hello, i cannot find the article Days of the Queued state machine are now behind...
can someone post me the correct link for this?
thanks
Riccardo
Stradis:
Your comments are appreciated. I
am revising the article and will definitely include the material. I
have yet to install LabVIEW 8.5 but once I do I will review your
examples. I also spotted an interesting LAVA thread on this same topic
which questions whether the Days of the Queued State Machine are now behind us.
I will include a link to that discussion as well. Regarding that
specific thread, I think the queued state machine is still important
because it can be adapted to take advantage of LabVIEW upgrades and
features such as LV Classes and hyperthreading.
Anthony L.
11-05-2009 10:30 AM - edited 11-05-2009 10:34 AM
🙂 Well I have changed my handle such that I do not need to worry about changing it again.. But I am still using my (OK, several of us worked together on this over the years, so should read OUR) QSM architecture relatively unchanged in the past 3 years. Just curious, why you revived this thread after so long?
[EDIT] Never mind... I see what your real question is.. You should post this to the LAVA forum, as they have redone their website in the last several months and ask where the archive may exist... if it exists [/EDIT]
11-05-2009 11:14 AM
Riccardo-99 wrote:...
Your comments are appreciated. I am revising the article and will definitely include the material. I have yet to install LabVIEW 8.5 but once I do I will review your examples. I also spotted an interesting LAVA thread on this same topic which questions whether the Days of the Queued State Machine are now behind us. I will include a link to that discussion as well. Regarding that specific thread, I think the queued state machine is still important because it can be adapted to take advantage of LabVIEW upgrades and features such as LV Classes and hyperthreading.
Anthony L.
That thread (along with about 500 of my posts ) were lost in the LAVA crash of 2009.
Goolge remebers it but not LAVA.
Try posting over there to see if they can find it in their archives.
Ben
11-05-2009 11:26 AM
Ben,
Isn't there a website that collects old versions of pages on the web? I don't remember that name of it, nor have time to research today, but maybe there is an archived version there?
-p