Blog

Modular PLC Code

6 Benefits of Modular PLC Code

Not all PLC code is created equal. Too often every bit of code is developed from scratch for a specific machine. Each device on the machine has custom code to control it. Each device on the machine has an custom alarm built and tested specifically for that output. Each device has a custom set of buttons and displays on the HMI which may or may not allow for manual control. As a result, code for each device must be painstakingly written, reviewed, and tested on every machine. This process takes precious engineering and production time.

Modern PLCs allow for modular code where a program is created from existing libraries of feature-rich pre-tested code which can be quickly assembled into a finished product. Machines can be up and running more quickly and more consistently. Engineering time is decreased and the machine will be in production, producing product, more quickly and consistently.

Here are the top reasons to ensure your factory runs on modular code:

1. Reusable

The fundamental components which make up machines in industrial automation are the same across many machines. Pneumatic cylinders, valves, VFDs and servos have very different roles in different machines.  However, the fundamental control of these devices is identical across different machines. This similarity allows for libraries of pre-written and pre-tested code to be created for all common devices. Rather than implement logic to control a device for each machine, the logic from the library can be used.

Bringing in library code immediately implements control of a device with minimal development. In addition, commissioning time will greatly decrease because the code has already been tested. library code add great features such as HMI objects which display detailed fault information and enable manual control – with no added engineering time.

2. Extendable

Modular code is written in a way that allows for control of devices in many different situations. Products change over time, and a machine has to change with it. When a situation arises that requires changes to the functionality of the machine, code changes are minimized because the modular code can be configured differently, often from the HMI, rather than changing code.

3. Flexible

Many OEMs build variants of a similar machine to fit customer needs. With modular code, one master code can be written which contains different modules that are invoked for the specific feature set of each machine. If a new feature is to be added, it can be written as another module. All existing code stays the same, and any machines without the new feature can run the new code with the additional code laying dormant.

One set of code simplifies maintenance, minimizes development cost, and allows a consistent product line. Lastly, it allows for adding features onto an existing machine without changing any code.

4. Consistent

Modular code allows for the same building blocks to be reused for every machine in a factory regardless of the functionality. As a result each machine has a consistent code base and user interface. Maintenance staff can be trained on one machine’s code and they will be able to service any machine in the factory. Similarly, operators can be trained on how one machine’s HMI works and they’ll be competent across the floor.

5. Reliable

Testing new code can be a tedious process. Typically validating the core functionality of machines proceeds quickly and smoothly when a controls engineer is present. However, once a machine has passed testing and started production too often small edge case bugs start to appear over the first few weeks or even months of production. Modular code from libraries minimizes this drawn out testing process. Code has already been thoroughly tested on other machines before commissioning even began. The edge case bugs have been discovered and fixed. Therefore, modularly programmed machines can be ramped-up faster and more reliably than fully custom code. 

6. Complete

With fully custom code, each function of every device must be programmed individually. For example, a pnuemtic cylinder may need control by the PLC program, HMI control for the operator, and bi-directional interlocks to prevent damage. Often, some of this functionality will be excluded on systems with a compressed timeline or smaller budget. With modular library code this functionality is all added automatically for each device without adding additional programming time or cost. Functionality such as easy to use HMI controls of devices may not be critical to the core functionality of the machine, but make service much easier and faster. Rather than pick and choose which manual operation is needed, modular code allows every feature to be implemented every time.

Modular PLC Code Maximizes Output and Minimizes Cost

Utilizing a modular code structure reduces the time spent programming, troubleshooting, and maintaining a machine leaving more time for stable production of product to increase the bottom line. 

Maskine maintains an internal library of code which allows us to always provide customers with modular code for every machine we program. Contact us today to find out how we can use modular code in your machine to maximize output and minimize cost.

Share this post

Leave A Comment

Let's work together to solve your automation problem

Call 480-900-2170