06-22-2006 10:59 AM
I think it is a little difficult for some to make comments on state machine versus other programming techniques when the only method they program is a state machine or qsm. That is the fundamental problem I see. Unfortunately, unless you have truly programmed with other methods, you can't really say one technique is better, yet I often hear that stance.
I often use a dynamic loader test sequencer for test applications and the code is often, with the exception of the actual test, copied right from application to application. I use state machines too but in these cases the main application is surely modified more than my test sequencer. There are cases where a state machine is optimal but I often put those cases as the ones that are not a sequence of tests. NI of course sells TestStand for those who don't want to write a test sequencer, but there are many variations and I use my own.
I like all archnitectures, not just state machines and variations of it.
All the best,
06-23-2006 10:40 AM
06-23-2006 11:11 AM
Let me disagree... it depends if you have 1 or 2 loops (with one filling in the Q, and the second to execute orders), if one loop it's possible to draw a flow chart !
Wiebe@CARYA a écrit:
One thing that cannot be done with a queued state machine (but can be done with a state machine):
Document it as a flow chart.
___________________________________________________________________________________________________________
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
06-26-2006 07:40 AM
06-26-2006 08:18 AM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
06-26-2006 10:40 AM
06-26-2006 02:04 PM - edited 06-26-2006 02:04 PM
Message Edited by Daklu on 06-26-2006 12:05 PM
06-26-2006 09:40 PM
06-26-2006 11:54 PM
@Daklu - As this is my statement, I feel the need to answer. Working without any add-ons or toolkits you can not program object oriented. There is no way to define classes with private or public methods, create objects of them or use inheritance between classes - just to mention the obvious things.
There are some toolkits that allow you to do this, but unless it is not really necessary, stick to the dataflow.
What do you mean with "..because there are no methods?"?
06-27-2006 07:29 AM
object oriented "like" structures can be accomplished. The real missing piece is enforcing private members although with some checking I guess that can be accomplished. There is even seudo inheritance but it is limited. Even the NI goop that is planned will have limited inheritance. I would wait a while before I tackled goop. If you want to look at it for an introduction then I would suggest the openG package as it is free and is probably as good as any other method out there. Some aspects of the implementation show good ways to implement code. As a side note, I think most methods of programming can be accomplished with Labview.