Design of a Soft PLC with Integrated Monitoring and Configuration Functions
2026-04-06 07:38:36··#1
Abstract: The development trend of industrial control configuration software is inevitably towards new soft PLCs that integrate control strategy configuration and monitoring configuration functions. Based on the analysis of existing industrial control configuration software, this paper proposes the architecture design and implementation process of a new soft PLC, and discusses the functional structure of the control strategy configuration software module and the monitoring screen configuration software module, as well as the data connection model between the control strategy configuration and the monitoring screen configuration. Based on this data connection model and functional structure, industrial control configuration software with both control strategy configuration and monitoring screen configuration functions based on the soft PLC architecture was developed. Keywords: Configuration software; Embedded PLC technology; IEC61131-3; Soft PLC 1. Introduction PLCs (Programmable Logic Controllers) have wide applications in industrial control. However, currently, PLCs from different companies on the market are all self-contained systems, and their hardware interfaces and programming environments are incompatible. Even in ladder diagram programming, which is the most widely used language in PLCs, the syntax structure and addressing modes of different companies are not completely the same. This has affected the upgrading, improvement, and widespread use of PLC technology. With the introduction of the IEC 61131-3 standard, industrial control products conforming to this programming standard have emerged on the market. These industrial control products have compatible input/output interfaces and programming environments compliant with the IEC 61131-3 standard. However, existing systems only provide configuration software (programming environments) for control strategy programming (using ladder diagram language, IL instruction language, etc.), lacking a complete programming environment for monitoring configuration. Commercially available configuration software only addresses monitoring configuration issues, lacking a good solution for critical control strategy configuration, merely using pure script programming as a supplement to control functions. Therefore, general-purpose configuration software integrating control strategy configuration functions (soft PLCs compliant with the IEC 61131-3 standard) and monitoring screen configuration functions will inevitably become the mainstream development direction. Designing industrial control software with monitoring configuration functions based on soft PLC software requires solving the data exchange technology between the soft PLC and monitoring configuration software modules, i.e., the driving problem of the monitoring configuration data source. This paper proposes a method to solve this problem: during control strategy configuration, a data file can be automatically generated based on the strategy file. This data includes power input/output port information, control loop output data, alarm data, and fault data. Based on this data file, monitoring functions such as monitoring screen driver blocks, alarm function blocks, and data logging function blocks are written using standard programming methods. 2. Software Architecture 2.1 Control Strategy Configuration Software Module Configuration refers to the generation of control or monitoring strategy programs using intuitive programming methods (such as ladder logic). The control strategy configuration software is a software PLC based on the IEC61131-3 standard. It can implement the functions of a standard hardware PLC on a traditional PC platform using software. Its architecture is shown in Figure 1, including a control strategy editing module, debugging module, compilation module, connection module, communication module, virtual machine running module, data driver module, I/O interface and device driver module, simulation module, project management module, and other interface management and help information components. The control strategy editing/debugging component is the most fundamental functional module in the configuration software. Based on the IEC 61131-3 standard, it provides users with a standard programming environment, primarily supporting six programming languages including LD, IL, and ST. The LD language uses ladder logic to generate control strategies. The input information for the control strategy editing module comes from the user's control application code, ultimately generating a proprietary intermediate file for the compilation module. The compilation and linking module performs syntax and semantic checks on the user-written program code, ultimately generating target code independent of the runtime environment. The communication module establishes an information channel between the editing and runtime environments, handling functions such as code downloading, issuing operation commands and hardware configuration parameters, and reading runtime status variables. The virtual machine is the core of the entire configuration software. Independent of the control configuration editing environment, its role is to execute the target code generated by compilation and linking, completing the corresponding control functions. During the execution of the target code in the virtual machine, it continuously reads, processes, and outputs information from the I/O modules, thereby realizing the control functions. The simulation module can simulate interface hardware devices, allowing the user-written program to run even without the hardware, thus shortening the development cycle. The project management module is responsible for saving user-compiled control strategy files, printouts, and managing access permissions. [align=center] Figure 1: Control Strategy Configuration Software Architecture[/align] 2.2 Monitoring Configuration Software Module In the control, monitoring, and management layers of a control system, the monitoring layer not only provides real-time on-site monitoring and control but also facilitates information transmission. Monitoring configuration refers to using intuitive programming methods (such as animation and graphic combinations) to complete corresponding monitoring screens, alarm information, and historical data archiving based on the control strategy, the control flow, and intermediate variables within the control flow. The monitoring configuration software is a software editing environment that implements monitoring configuration functions. It provides users with flexible and diverse configuration methods and a user-friendly development interface; its built-in software modules can easily implement various functions of the monitoring layer and provide decision-making data information to the management layer. The basic architecture of the monitoring configuration software is shown in Figure 2, mainly composed of data tables, a graphical configuration module, a real-time database configuration module, a project management module, and graphical and database operation components. The development environment for the monitoring configuration software consists of a graphical configuration module, a real-time database configuration module, and a project management module. The runtime environment comprises the graphical and database runtime components. The data driving the generated graphics after configuration originates from the data tables automatically generated during the control strategy configuration process. Data table generation is a key technology for seamlessly integrating control strategy configuration and monitoring configuration. The graphical configuration module provides an operation interface and process screen monitoring generation functions, serving as the primary programming tool in the monitoring configuration software. Adhering to the operating system's graphical standards and employing object-oriented graphics technology, it provides powerful drawing editing, animation linking, and scripting tools. During animation linking, the data source driving the animation is selected from the data table, and through a series of user data files, the final graphical target application system is generated for use by the graphical runtime environment. The real-time database configuration module is the configuration tool for establishing the real-time database. It can define the structure, data connections, data types, and various related parameters of the real-time database. Its main data source is the data tables automatically generated during control strategy generation. [align=center]Figure 2. Monitoring Configuration Software Architecture[/align] 2.3 Data Driving Between Control Strategy Configuration and Monitoring Configuration Based on the soft PLC software, designing software with monitoring configuration functions requires solving the data exchange and message transmission between the soft PLC and the monitoring configuration software modules. This paper proposes a method to solve this problem: during control strategy configuration, a data file can be automatically generated based on the strategy file. The data includes power input/output port information, control loop output data, alarm data, and fault data. Based on this data file, monitoring functions such as monitoring screen drive function blocks, alarm function blocks, and data recording function blocks are written using standard programming methods. The integration of control strategy configuration software and monitoring configuration software hinges on the data driving technology between control strategy configuration and monitoring screen configuration, i.e., the generation of monitoring configuration data sources. During control strategy configuration, control strategy files written in ladder diagram language or other languages can be uniformly converted into instruction tables. The role of the data driving module is to dynamically scan the instruction table and I/O configuration table to obtain the address information of the input data area, output data area, and intermediate variable storage area, thereby generating a dynamic data table file. During monitoring configuration, the data source for both graphical configuration and real-time database configuration can be uniformly obtained from the dynamic data table. Its architecture is shown in Figure 3. The dynamic data table is actually a data network table that records the mapping information from memory addresses to input/output ports. During graphical configuration, the expressions driving the animation are edited in the data source properties dialog box, and the variables involved come from the dynamic data network table. During the execution of the control strategy target code, as the input and output are refreshed, the data in the data area continuously changes, and the monitoring screen also performs corresponding actions under the drive of the data. The real-time database simultaneously records the input and output values at different times. [align=center] Figure 3 Data driving between control strategy configuration and monitoring configuration[/align] 3. Conclusion Using the structure described in this paper, the control strategy configuration function and the monitoring configuration function are integrated into one configuration software, forming a new type of soft PLC based on the IEC61131-3 standard. The industrial control configuration software developed using this technology not only has intuitive control strategy configuration functions (using both ladder diagram language and instruction list language), but also intuitive monitoring configuration functions, easily enabling dynamic screen display, alarms, and real-time data recording. Currently, only basic sequential control and screen monitoring functions are implemented, but this architecture can eventually be expanded into a mature industrial control configuration software product. References [1] karl-heinz, John. Michael, Tiegelkamp. IEC61131-3 Industrial Automation Programming System Development [M]. Beijing: Translated and published by the Secretariat of China Association for the Application of Mechatronics Technology, 2003, 71-223. [2] Cecilio Blanco, Miguel A. Perez, Juan C. Alvarez, Juan Carlos Campo and Francisco J. Ferrero, An Intrinsic Safety PLC with a Graphic Programming Environment [A], Industrial Electronics Society, 1998. IECON '98. Proceedings of the 24th Annual Conference of the IEEE, Volume: 3, 31 Aug.-4 Sept. 1998, Pages: 1649 - 1652 vol.3. [3] Jan Thieme, Hans-Michael Hanisch, Model-based generation of modular PLC code using IEC61131 function blocks [A], Industrial Electronics, 2002. ISIE 2002. Proceedings of the 2002 IEEE International Symposium on, Volume: 1, 8-11 July 2002, pages: 199 - 204 vol.1. [4] Aspern, Jens, SPS software development with International Electronical Commission 61131[M]. Huethig publishing house Heidelberg, 2000. [5] Chi Junping, Wang Bin, Li Yeyou. Application of modular programming method in PLC program development[J]. Microcomputer Information, 2005, 6: 26-27