IEC 61131-3 is the first international standard to provide a standardized programming language for industrial control systems. The software design concepts and models described in this standard for industrial control systems are adapted to the current development trends of software and industrial control systems worldwide. It is a very advanced design technology that has not only greatly promoted the advancement of software design in industrial control systems, but also significantly influenced the software design of fieldbus devices. A software system conforming to IEC 61131-3 is a well-structured, reusable, and maintainable industrial control system software. It can be applied not only to PLCs (Programmable Logic Controllers) but also to all software controlling industrial and manufacturing processes, representing an advanced industrial control programming system. The IEC 61131-3 standard consists of two parts: programming and common elements. The programming part describes two important models: the IEC software model and the communication model. Common elements define the data types required in the programming system. This article will theoretically analyze and explain the advantages of the IEC 61131-3 programming system through the description of these two parts of the IEC 61131-3 standard, and allow us to learn about the advanced design concepts described in IEC 61131-3. [b]I. Two Important Models of IEC 61131-3[/b] The IEC 61131-3 standard has two models: the IEC software model and the communication model. These two models constitute the conceptual foundation for implementing a programming system conforming to the IEC 61131-3 international standard. They are not only important markers distinguishing the IEC 61131-3 programming system from traditional PLC programming systems, but also the reason why the IEC 61131-3 programming system is superior to traditional PLC programming systems. The IEC software model theoretically describes how to decompose a complex program into several small, different, manageable parts, and how there are clear and standardized interfaces between these parts; it describes how a PLC can simultaneously load and run multiple independent programs; and it describes how the system can achieve complete control over program execution. The communication model similarly theoretically describes how different Program Organization Units (POUs) exchange information. Program organization units include programs, function blocks, and functions. To better describe the IEC software model, we will first use a practical application system to illustrate the relationship between the IEC 61131-3 software and the actual system, and then further explain the 61131-3 software model. [b]II. Relationship between IEC 61131-3 Software and the Actual System[/b] Figure 1 shows a direct digital control system using a PLC. After the continuous signals from physical sensors are converted into digital sampling signals, the PLC control system can run algorithms such as proportional, integral, and derivative (PID) to generate control signal outputs, ultimately achieving control of the device position. In Figure 1, the IEC 61131-3 software assumes that external values from sensors or transmitters are directly placed in a specific memory area. Simultaneously, the results generated after program execution are also placed in a specific memory area. Updating these memory area values achieves the drive of the actuator or display. The memory mapping to the PLC's I/O devices is not defined in the standard and varies greatly depending on the PLC manufacturer. **III. IEC Software Model** The IEC 61131-3 software model is shown in Figure 2. This software model has a layered structure, with each layer hiding many features of the layers below. This layered structure of IEC 61131-3 forms the theoretical basis for the superiority of IEC 61131-3 software over traditional PLC software, and is a manifestation of the advanced nature of IEC 61131-3 software. Below, we will first describe the concepts of each part of the software model, and then analyze and summarize the advantages of the IEC 61131-3 programming system. 1. Configuration, Resources, Programs, and Tasks At the top layer of the model is the software "configuration," which is equivalent to a PLC software used in a specific application to define the behavior of the PLC. It differs from the actual process of configuring the system. For example, in a complex automated production line composed of multiple PLCs, the software in each PLC is an independent "configuration." A "configuration" can communicate with other IEC "configurations" through defined interfaces. In each configuration, there are one or more "resources." A "resource" not only provides a support system for running the program but also reflects the physical structure of the PLC, providing an interface between the program and the PLC's physical I/O channels. An IEC program can only execute after a "resource" is loaded. Resources are typically placed within the PLC but can also be placed in other systems. An IEC program can be written in different IEC programming languages. A typical IEC program consists of many interconnected function blocks that can exchange data. A program can read and write I/O variables and communicate with other programs. The execution of different parts of a program is controlled by "tasks." Once a "task" is configured, it can control a series of programs and/or function blocks to execute periodically or be triggered by a specific event. IEC programs or function blocks are usually kept in a completely standby state, only executing when periodically executed by a specific configured task or triggered by a change in the state of a specific variable. 2. Function Blocks and Functions The concept of function blocks is an important feature of the IEC 61131-3 standard programming system. Any function block can be programmed using other smaller, more manageable function blocks, thus creating a hierarchical and logically structured program from many function blocks. IEC 61131-3 also allows programmers to generate new function blocks using existing function blocks and other software elements. [align=center]Figure 2: IEC Software Model[/align] Functions are also an important concept in the IEC 61131-3 standard, but they are not represented in the software model and are often confused with function blocks. Functions are software elements that occur during program execution, producing corresponding output results for a series of specific input values, such as arithmetic functions COS(), SIN(), etc. The IEC 61131-3 standard contains a large number of functions for handling different data types. 3. Variables and Access Paths Local variables, global variables, and direct variables can be declared and used within configurations, system resources, programs, functions, or function blocks. Local variables are variables that can only be declared and accessed within a configuration, resource, program, function, or function block; global variables are declared within a program (or configuration) and can be accessed by all software elements within that program (configuration); direct variables are variables directly represented by address variables in the PLC program's memory area. Access paths provide devices for exchanging data and information between different configurations. Variables within each configuration can be accessed by other remote configurations. Data and information can be exchanged between configurations using Ethernet-based networks, fieldbuses, or backplane buses. [b]IV. Mapping from Software Model to Actual System[/b] The mapping from the IEC software model to the actual system has the following different mapping relationships for different systems: 1. Small systems with a single main processor: The model of a small system typically degenerates into a configuration, a resource, and a program. 2. More complex systems with multiple processors: The entire PLC is considered as a configuration, each processor is described by a resource, and one resource supports one or more programs. 3. For distributed PLC systems: Distributed PLC systems contain multiple configurations, with one configuration corresponding to multiple processors. Each processor is described by a resource, and each resource supports one or more programs. The IEC software model can be fully adapted to PLC systems ranging from simple to complex, and even very complex PLC systems, which greatly expands the application scope and fields of traditional PLCs. [b]V. Advantages of the IEC Software Model[/b] The IEC software model has the following advantages: 1. Simultaneous loading, starting, and execution of multiple independent programs in a single PLC: The IEC61131-3 standard allows multiple "resources" within a "configuration," and each "resource" can support multiple programs. This allows multiple independent programs to be loaded, started, and executed simultaneously in a single PLC, whereas traditional PLC programs can only run one program at a time. 2. Achieving complete control over program execution: This "task" mechanism of the IEC61131-3 standard ensures that the PLC system has complete control over program execution. Traditional PLC programs can only scan and execute programs sequentially, and cannot execute a certain part of the program according to the user's actual requirements at a set time. However, IEC 61131-3 programs allow different parts of the program to be executed in parallel at different times and at different ratios, which greatly expands the application range of PLCs. 3. The IEC software model can adapt to a wide range of different PLC structures: The IEC software model is an international standard software model; it is not specific to a particular PLC system but has strong applicability. 4. The IEC software model is suitable for both small PLC systems and large distributed systems. 5. IEC software supports the reusability of program organization units: Software reusability is an important advantage of IEC software. 6. IEC software supports layered design: A complex IEC software can usually be decomposed layer by layer into manageable program units. [b]VI. Communication Models[/b] According to different communication requirements, the IEC 61131 standard specifies the following four communication models: 1. Internal communication: Programs, function blocks, and functions can be interconnected to form a network, and data information can be communicated through this internal network. 2. 3. Local variable communication: Global variables can be used to exchange data between function blocks and other program organizational units. 4. External variable communication: Part 5 of IEC 61131 defines a family of communication function blocks to exchange data over a network. 5. Communication using access paths: Access variables provide a method for accessing specific variables from remote devices. The communication function blocks in Part 5 of IEC 61131 can also read and write ACCESS variables in remote configurations. These four communication models specified in the IEC 61131 standard not only make communication within the IEC programming system flexible and convenient, but also effectively support the communication requirements of the IEC programming system's functional expansion, enabling the next generation of programming systems to more effectively adapt to future developments in new technologies such as networks, fieldbuses, and remote communication. **VII. Common Elements** Common elements describe the variables and data types of all common programming elements used in the five programming languages of IEC 61131-3, the IEC software model, and the communication model. They provide rules for naming these software elements, declaring variables, and initializing variables and data types. They are an indispensable and integral part of implementing the IEC 61131-3 programming system. **VIII. Conclusion** The IEC 61131-3 software is a powerful, technologically advanced programming system well-suited for future development. (Edited by: He Shiping)