User | Kudos |
---|---|
6 | |
5 | |
2 | |
2 | |
2 |
State Machine Sample Projects and LabVIEW courses teach that you can create a 'stack' or 'run-time' data cluster, which is passed to every state via default tunnels and a shift register on the While Loop. Screenshot from the State Machine in LabVIEW 2017 SP1, below:
Newer LabVIEW programmers need to make a leap from the structure called 'cluster' and the feature called 'shift register' in order to apply them as a very powerful, and now standard, practice of using a cluster to store the data for that State Machine.
My suggestion is that a unique type is added, called 'State Machine data' or 'Run-time data' so that the new user experience is more intuitive for the use of structure that promotes maintainability and readability.
In LabVIEW 201x, this could be something similar to the Channel Wire dialog, to prompt a user to input all their data types up-front, according to their design.
In LabVIEW NXG, this could be a native part of the While Loop, and the user could use the Properties dialog from the right hand side.
Once the 'State Machine Data' is configured, any Case Structure that the data is wired to will populate with a Node appropriate to that environment, such as an Unbundle or a growable Node similar to an Event Structure, in LabVIEW 201x, or a Property in NXG.
I've seen other posts about a State Machine Case Structure hybrid, but that is not what I'm suggesting. I still believe that primitive structures should be the choice, and I'm focused on getting people to write good code, with less barriers to understanding.
Looking forward to the feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.