JKI Blog

What you need to know about the State Machine Objects framework: Intro

Feb 1, 2016 12:31:32 PM Published by Javier Ruiz Leave a comment

Over the next few weeks I will be sharing the main things you need to know about JKI’s State Machine Objects (SMO) framework for LabVIEW, including what it is, how it works, how it can help you develop scalable applications, and how you can collaborate to make the framework even better! In addition, I will be sharing videos that will show you how to make your next LabVIEW application successful using the SMO framework.

Let’s start from the beginning...

What is the SMO framework?

The State Machine Objects (SMO) framework is an open-source and lightweight development framework for LabVIEW that is in continuous development by the JKI team and the LabVIEW community. Remember the JKI State Machine? The SMO framework extends the functionality of the JKI State Machine and allows you to create extendable and modular applications in LabVIEW using object-oriented design.

With the SMO framework you can spawn multiple state machines that run asynchronously and have them communicate to each other via events.

How does it work?

When you drop a new instance of an SMO class into your LabVIEW block diagram and call its Create method, the framework initializes all the necessary components of the state machine and gets it ready to run. Then, it’s just a matter of calling the Start method and voila, your state machine is running asynchronously. When you are ready to stop the state machine call the Stop method. If you want to discard the state machine for good, you can call the Destroy method and the framework does the rest.


What are the main components?

One of the beauties of the SMO framework is that it is lightweight and easy to understand. By far, the main component in any SMO class is the Process.vi method. This is where your state machine lives and where you’ll want to make most of your modifications (make a nice looking UI, etc). Another important component is the [your class name].TestLauncher.vi method, which is basically an example on how to launch your SMO class.


How to get the SMO framework?

By now you must be asking yourself “how do I get this awesome framework?” The answer is simple, download and install the JKI SMO Editor using VI Package Manager. This will install the SMO framework and create a utility in the LabVIEW Tools menu to build new SMOs from various templates. From there, you can open one of our example projects and start creating your own applications.

Watch the video below on how to create your first SMO class!


How to collaborate and improve the SMO framework?

At JKI, we truly want you to collaborate in making the SMO framework even better! All the source code is available on our GitHub repository where you can download it, create forks, make your own changes, and post ideas for features. In addition, the JKI SMO Community Group is a great place to have discussions about your ideas and feedback.
Next time I will be sharing how to create a good-looking user interface with the SMO framework.

Until next time…


Tags: Community, JKI State Machine, LabVIEW, labview tools network, open source, State Machine Objects

Subscribe to Email Updates

Recent Posts

Posts by Topic

see all