Why does it benefit machine builders to use object-oriented programming (OOP)? Its “abilities” include reusability, scalability, trainability, modularity, traceability and flexibility. Creating definitions, a standard set of terminology and a set of tags will allow you to harness these abilities.
A well-known example for this is PackML. PackML stands for packaging machine language. This was set up by the Organization for Machine Automation and Control (OMAC). PackML was created as a standard for making discrete manufacturing into machine state processes. International Society of Automation (ISA) refers to it as ISA-TR88.00.02. It is a template that may be found more rigidly in pharmaceutical and food, but the idea may be applied to any machine. Similar states and libraries are set up for water processes or continuous processes using chemicals or the like.
Get your subscription to Control Design’s daily newsletter.
Why? It uses object-oriented classes to build software guidance that dictates how the machine should be programmed. The idea was to make programming easier.
I’ve discussed how object-oriented programming is used by programmers in ladder logic and how to use objected-oriented programming to code efficiently. PackML warrants a similar discussion.
PackML may not fit every piece of a process or a machine, so it should be adapted as an example to follow and modify for the benefit of the process it’s being used in. Regardless, PackML libraries may be found “pre-made” in offerings from automation suppliers.
What does it look like? If we borrow from OMAC, then the structure is broken down into areas (Figure 1).
OMAC just uses machine(unit), equipment and component(control), but adding system allows flexibility because you may have more than one line in a system.
In the system, you may create equipment components for sharing between machines that supports each machine. This would be the air, water, utility type support or maybe a robot or the safety. It also allows one supervisory control and data acquisition (SCADA)/human-machine interface (HMI) software to be used for the whole area. Remember, flexibility.
Equipment is exactly what it says: filler, generator, robot, turn table, conveyor, boiler. Components would be valves, switches, temperature or pressure gauges, all of which may be programmed as an object to be called out under the equipment module.
What does our equipment do? PackML defines four modes as standard:
- invalid
- production
- maintenance
- manual.
The names might automatically set people to grumbling, but they can be described as fault, auto, maintenance and manual. This is where the suggestion to adapt the PackML definition to industry and machine is inserted. Why? The idea is good, but it may not match where the original equipment manufacturer (OEM) is in machine building. However, the point is standardization and that is what the OOP tools allow you to do.
There are also 32 total modes in the PackML protocol, and OEMs may create a machine using one mode or all of them. The four standard modes are just a starting point.
PackML state models include a predefinition of state, state command and mode. There are also transitions. Transitions are where modes may be changed. Stopped, aborted, completed and held are transition states.
In the case that you run out of material, next execute would trigger a “second” batch, or consecutive runs. Data may easily be stored and harvested based on naming conventions. If machines are consistently programmed the same way, then field support and training become easier, and this is a selling point for machine builders. It is also simpler to expand on premise. For instance, the S88 hierarchy, based on the ISA-88 standard, becomes enterprise, site, area, process cell, unit, equipment module, control module. This is relatable back to packaging: enterprise, site, area, packaging line, machine, equipment module, control module. In this case, “system” encompasses the enterprise, site, area, line. However, the principles in PackML are modifiable and PLC software development packages allow the customization of libraries to meet OEM needs.