Spotlight on InfoComm 2019


Quick Tips for Programming Control Systems

The basics of how to program a reliable control system that will meet your clients’ functionality expectations.>

Steve Greenblatt

Although the objective in control system programming is to deliver a reliable system that meets the client’s specifications and expectations, the programming is as much an art as it is a science.

There are many ways to skin this cat: the owner, user, even the integrator does not always know the differences between a well-written, forward-thinking system and one that is created on the fly.

Why does this matter if both appear to meet functionality requirements and deadlines? Unlike a piece of art, control system programs are not final. Systems are flexible so that they can be modified based on preferences, improved to include additional features and enhanced functionality and upgraded to accommodate equipment changes.

Well Designed Program vs. On-the-Fly Program
When you look at preferred programming code, think of the initial program as the foundation. Just as a building constructed on a weak foundation will be unstable and weakened with each modification or renovation, a system built on a haphazard or inflexible structure will require a total overhaul any time the user wants to make a modification.

Preferred programming code practices provide a stable foundation that allows the user to modify and enhance the system. Best practices for programming include:

  • Organizing code in a logical manner
  • Using an approach to coding that is better suited to debugging and modification
  • Avoiding coding style that sacrifices readability or flexibility
  • Including programming comments
  • Preparing for future expansion
  • Maintaining functional, consistent code blocks or modules
  • Consolidating similar systems into a common code set for ease of maintenance
  • Maintain a revision history that is backed up and documented

As owners, users and integrators begin to understand the importance of program design and development, they see the value of a well-designed program and its ease of use, flexibility and value over time. Without knowledge of how program design affects control systems in the long run, those who save money up front will face major costs, loss of time and limited equipment performance.

A more advanced perspective to consider is the use of programming architecture to consolidate development time, reduce testing time, minimize maintenance costs and improve the longevity of the system.

There are coding and design techniques that can be used to program a system that encompasses multiple system types and accommodates system variations from room to room. The advantage being that only one program (albeit a more advanced program) has to be written and supported to cover multiple systems. The win that is gained because all rooms are using the same version of code, maintain consistent operation, and can be updated efficiently and effectively.

The long-term gain can simply be realized once something as small as a text change or device driver needs to be updated. The amount of time needed to make changes can be reduced exponentially if 100 systems are using the same code vs. each running their own unique program.