LabVIEW Open Source – The NI Icon Editor

Following the acquisition by Emerson, NI (National Instruments) has launched a new strategy to open up parts of LabVIEW, including developing the tool as open-source software. This was presented in NI’s keynote at NI Connect 2024 by Elijah Kerry and Jim Kring. In short, we have now the opportunity to improve LabVIEW in the community. The first project is the Icon Editor and its source code, which has been made available on GitHub. If you are curious about the process and the status of the project, please read this post.

The Icon Editor

The choice fell on the Icon Editor because it is already modular and has been for many years. This meant the path to success was shorter than starting from scratch. The Icon Editor software is written in LabVIEW, meaning that every time you create icons, you are launching a small LabVIEW program inside LabVIEW itself. The Icon Editor has existed since the beginning of LabVIEW, so the code is old. It was rewritten for LabVIEW 2009 due to the introduction of object-oriented code. There is a good article on LabVIEW Wiki about the general use of the Icon Editor and its various tools.

The Icon Editor Project as Open Source

This open-source project serves as a pilot initiative where NI is learning and adapting processes to accept contributions from the community. This includes how to develop the code, manage the project, and how NI R&D can integrate the resulting product into the next version of LabVIEW, among others. Additionally, NI needs to ensure usage rights for the code developed as part of the project. This also means that NI’s future open-source-projects depend on the success of the Icon Editor project to open more areas for community improvement.

The Icon Editor Steering Committee is led by Sergio Velderrain from NI, along with others from the community, including myself. The purpose of the committee is to discuss and revise the processes in terms of, e.g.:

    • 1) How the project accepts code from external contributors
    • 2) How to process improvements to, in this case, the Icon Editor

As a result, the process has been revised multiple times since the group started. The development process for the project follows Git Flow, with a stable main branch and a more volatile development branch. The advantage of this approach is that if you’re already familiar with Git Flow, it is easy to get started. All new additions to the project start as a “Discussion,” which can become an “Issue” and eventually be implemented in a future LabVIEW version.

What Has Happened So Far?

The first accomplishment of the project was creating a LabVIEW-based Continuous Integration (CI) system to run all unit tests and generate new software builds. Unit tests are essential in software development to ensure that existing features still work despite changes. In the LabVIEW environment, it is not common to use Test-Driven Development (TDD). Here, you write the test before writing the code. Then, you develop the code until the test passes. In the Icon Editor project, LUnit is used to write unit tests. Unit tests are a great entry point for getting involved in an open-source project.

Another early lesson for the steering committee was realizing that swapping out the Icon Editor for testing wasn’t as simple as expected. However, this has since been resolved, and the solution makes it easier to test your code. You can stay updated on the project here.

Finally, we’ve also made a big effort to improve the documentation to a level where it’s easy for new developers to get started.

For You as a Developer

Participating in or starting an open-source project is a great opportunity for improving your software development skills. In this project, NI sets the development standards, so that part is taken care of. There is a need for new feature development and bug fixing, but there is also a need for documentation and tests that cover the implemented features and bugs.

Another important lesson is learning to limit your changes to the specific feature that you’re working on (it reduces the scope of each change). It can be tempting to fix several issues on the same branch, but that can have consequences if the branch needs to be rolled back. In such cases, removing one fix also removes the others in the same branch.

You will also get familiar with how LabVIEW is built modularly, how to use the new LabVIEW Add-on features, and much more. Overall, you will become a better developer by working on open-source projects. If the LabVIEW Icon Editor is not your cup of tea, there are plenty of other projects to dive into. It is completely free, and you are welcome to use the LabVIEW Community Edition for the purpose, if it is a free, open-source project.

See you at GitHub 😉

/Jesper Kjær Sørensen, Systems Engineer – GPower

Share:

LinkedIn
Facebook
Email
#blog

Previous Posts