Is your LabVIEW project still using global variables and While loops? It’s time to refactor

Many LabVIEW projects developed before 2010 rely on several parallel While loops communicating through global variables, an architecture that has significant limits today.

Refactoring industrial software in LabVIEW

Many LabVIEW projects developed before 2010 rely on several parallel While loops communicating through global variables. While this approach may have worked at the time, today it has significant architectural limits.

Global variables make code vulnerable to race conditions, leading to intermittent malfunctions that are hard to reproduce. These problems are notoriously difficult to track down and can compromise the stability of the application, especially as the system grows or changes.

Issues to address

To complicate matters further, these legacy systems often lack:

  • Documented requirements
  • Adequate documentation
  • A modular or scalable structure

In most cases, only the original developer, when still available, can find their way around the system, relying more on memory than on the clarity of the code. When the time comes to update the hardware or add new features, problems are practically inevitable.


A new era for LabVIEW architecture

Around 2008 the situation began to change. With the introduction of queues and the Queued Message Handler (QMH) model, NI began guiding developers toward more structured, modular architectures. Since then, more solid frameworks have emerged, such as:

  • DQMH (Delacor Queued Message Handler, now DQMH Consortium, since 2019)
  • Actor Framework (NI, since 2012)
  • Workers-based models by Scarfe Controls (since 2012)
DQMH Consortium

These architectures encourage more robust development practices: decoupling, reusability, maintainability and scalability.

The refactoring cycle

The refactoring cycle

How we plan

We organize the work around three key moments:

  • Sprint Plan: during Sprint planning we define priorities and goals.
  • During the Sprint: we carry out code reviews to ensure quality and consistency.
  • After release to production: we analyze any technical debt (Tech Debt) and functional gaps (Functional Gap), so we can improve in the following cycles.

💡 Our recommendation

If your LabVIEW software dates back to the early 2000s, it is time to consider refactoring or modernizing the application. Preserving the value of your software means giving it solid, modern foundations.

👉 Contact us to book your introductory session and find out how to modernize your industrial software.

 Privacy Notice