LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
gt3000

New State Machine 'Run-time Data' structure or Property Node to help new users

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

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:

2018-02-22 11_58_36-VirtualBox.pngNewer 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.

2018-02-22 12_35_25-VirtualBox.png

Looking forward to the feedback.

George T.
Senior Applications Engineer
National Instruments UK and Ireland
12 Comments
drjdpowell
Trusted Enthusiast

> I frequently have multiple shift registers instead of a single bundled shift register. 

Lately I have been separating whatever the "key thing" is that the loop uses and putting that on a separate shift register, while bundling all the rest of less-commonly-used stuff:

Shift Register Use.png

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.