JKI Blog

JKI State Machine Best Practices

Jan 16, 2015 2:02:16 PM Published by Jim Kring Leave a comment

At a recent JKI Team “LabVIEW Lunch” (where the team gets together to eat and talk shop), we were discussing best practices for using the JKI State Machine, an easy-to-use yet powerful state machine template we created to help LabVIEW developers write code faster (and can even help you pass the Certified LabVIEW Developer exam).

2014-05-13_18-28-23

As a result of this meeting, we had a lot of great ideas and we decided that we would publish some of them for your feedback and to share them with others in the community.

Here is a list of JKI State Machine Best Practices:
(I'll be updating this list as new articles come out)

Note: Be sure to use the JKI State Machine Editor; It helps you follow these best practices automatically.

  1. Don’t hide your state strings in subVIs
  2. Don’t add code and logic inside the Event Structure
  3. Keep the Original Size (i.e. don’t grow the structures)
  4. Use macros instead of “chaining” together sequential states
  5. Left-justify State Strings instead of Right-justify

We'd like to hear about your best practices for using the JKI State Machine. Please post comments and suggestions, below.  And, if you have ideas for making the JKI State Machine better, please post them to the JKI State Machine GitHub Issue Tracker.

And a note from our sponsor: At JKI we use the JKI State Machine every day to help our our clients get their innovative high-tech products and technology to market fast. If you need help taking your system software to the next level or reach an important milestone, contact us to learn more about our services.

Tags: design pattern, JKI State Machine, LabVIEW, LabVIEW tip, JKI State Machine, state machine

Subscribe to Email Updates

Recent Posts

Posts by Topic

see all