Blog post by Shahrokh Yousefi, Controls Engineer, Patti Engineering Texas Office
The Object-Oriented (O-O) approach to programming has long proven successful in software applications, but is not common in industrial automation software development. There are many benefits to this approach that could make it a good fit for your project.
Object-Oriented Modeling allows for:
- continuous changes in the software
- easier maintenance of applications
- reuse of code
- more efficient communication
Easily modifiable code has become important with recent trends such as flexible manufacturing facilities and shorter product life cycles.
Current PLC programming practices take a long time to verify. Verification is usually conducted during a trial run of production. The O-O process can reduce logic errors before implementation.
When developing an industrial automation system, before thinking about technological aspects, such as hardware components, bus systems, etc., one has to fully understand the problem to be solved. Hence, a deep analysis of the automation problem to be solved is necessary. It is important to know that object-orientation approach cannot be realized with only using an object-oriented language, but it is a new way of thinking along the development process.
In a typical automation project, the features of the manufacturing facility have to be determined from different sources –CAD drawings, part lists, component catalogs, and textual functional descriptions. Then they are integrated into software code by the control engineer.
Currently, the analysis and design phases are not common in industrial engineering. A robust analysis design phase can make it possible to do the information integration step before implementation to avoid misunderstanding. One has to choose to spend the time up front in these phases or on the job site redesigning and implementing the code in front of customers.
Therefore, when shifting to Object-Oriented modeling, industrial engineers must first make another shift- moving to a three-phase system.
In most applications, program code is written in low-level languages such as ladder diagram. However, PLC ladder logic gives only microscopic view of the system processes, and lacks semantic and conceptual integrity. As a result, it is difficult for factory automation engineers to have an overall perspective of the interaction of system components.
The main feature of Object-Oriented software design is making reusable function blocks. It can be modeled as the structural programming approach in the high-level software programming methods.
The features of Object-Oriented modeling techniques include:
- the interaction of objects,
- hierarchical composition of objects, and
- the reuse of objects.
In O-O method, the system structure should be based on unchanging elements. In automation projects, this structuring process can be based on the physical structure of the technical plant. Such component-based structuring tends to be more stable than one based on system functionality. Since the real automated system is operated by the signal sending and receipt among manufacturing equipments such as PLC, sensors, and actuators, it is essential to describe the interactions of automated system components in detail for the robust design of device-level control.
UML, a language for presenting Object-Oriented design methodologies, provides diagrams as modeling tools (see chart below). Of these, the activity diagram is most suitable for control logic flow modeling. It can describe the dynamic behaviors of a typical plant with regard to input/output events in sequential manner. It also can easily represent most control logic flow routing types such as sequential, join, split, and iteration routing.
|Class diagram||, , |
|Composite structure diagram|||
|*Activity diagram*||, , |
|UML state machine|||
|Use case diagram||, |
|Interaction overview diagram|
Another advantage of this strategy is to encapsulate information in manageable entities and to avoid technology-dependent decision making. In addition, this method serves as a helpful communication tool to all stakeholders involved in the automation project with the help of different presentation language diagrams.
Considering all advantages of O-O design method, should all projects be completed using this method? Actually, probably not. In some cases, it can add unnecessary complexity to a simple project. Like many other project decisions, choosing a specific methodology should take into account the culture, strategy and long term objectives of the organization and also features of the project and stakeholders.
 Kwan Hee Han, and Jun Woo Park (2007). Development of Object-Oriented Modeling Tool for the Design of Industrial Control Logic. Fifth International Conference on Software Engineering Research, Management and Applications, 353-358.
 Isidro Calvo, Marga Marcos, Dario Orive, and Isabel Sarachaga (2002). Using Object Oriented Technologies in Factory Automation. 28th Annual IEEE Conference of the Industrial Electronics Society, 2892-2897.
 Dieter Spath (1996). Virtual Reality – An Approach to improve the Generation of fault free software for Programmable Logic Controllers (PLC). Proceedings of Second IEEE International Conference on Engineering of Complex Computer Systems, 43-46.
 Matthias Schreyer, and Mitchell M. Tseng (2000). DESIGN FRAMEWORK OF PLC-BASED CONTROL FOR RECONFIGURABLE MANUFACTURING SYSTEMS.
 Carlos Eduardo Pereira (1997). APPLYING OBJECT-ORIENTED CONCEPTS TO THE DEVELOPMENT OF REAL-TIME INDUSTRIAL AUTOMATION SYSTEMS. Proceedings of Third International Workshop on Object-Oriented Real-Time Dependable Systems, 264-270.
 Kwan Hee Han, Seock Kyu Yoo, Bohyun Kim, Geon Lee. Rapid Virtual Prototyping of PLC-Based Control System. RECENT ADVANCES in AUTOMATION & INFORMATION, 21-26.
 Jin-Shyan Lee, and Pau-Lo Hsu (2000). A PLC-Based Design for the Sequence Controller in Discrete Event Systems. Proceedings of the IEEE International Conference on Control Applications, 929-934.
 Pablo Darscht, Alceu Heinke Frigeri, and Carlos Eduardo Pereira (1995). Building up Object-Oriented Industrial Automation Systems: Experiences Interfacing Active Objects with Technical Plants. Proceedings of IEEE International Workshop on Factory Communication Systems, 53-61.