PLC program execution system

By introducing a unified interactive interface and multiple actuators into the PLC program execution system, the problem of users being unable to select the execution mode is solved, the system's flexibility and scalability are achieved, and the difficulty and time of replacement are reduced.

CN120386279BActive Publication Date: 2025-11-14SHENZHEN HUICHEN AUTOMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510886027.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-14
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

The existing PLC program execution system lacks flexibility, and users cannot choose the execution mode, resulting in high coupling, difficulty, and long time when replacing the execution system.

Method used

A PLC program execution system is provided, including a runtime system and an actuator, which are connected through a unified interactive interface. It supports interpreted, compiled, and JIT actuators, and the implementation method is flexible and selectable.

Benefits of technology

It improves the flexibility and scalability of the PLC program execution system, reduces code coupling, and shortens the time required to replace the actuator.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386279B_ABST
    Figure CN120386279B_ABST
Patent Text Reader

Abstract

This disclosure provides a PLC program execution system, relating to the field of programmable logic controller (PLC) technology. It includes a runtime system and an execution mechanism. The runtime system stores data and performs network interactions, and has a unified interaction interface. The execution mechanism is connected to the runtime system through the interaction interface and is used to access memory and the network, selecting an implementation method to execute the PLC program. The execution mechanism can be implemented as an interpreted executor, a compiled executor, or a JIT executor. This disclosure, through the execution mechanism in the PLC program execution system, allows for the selection of an implementation method from multiple options to execute the PLC program. This flexible selection of implementation methods improves the flexibility of the PLC program execution system and solves the problem of insufficient flexibility in related technologies where users cannot choose the execution method of the PLC program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of programmable logic controller (PLC) technology, and more specifically to a PLC program execution system. Background Technology

[0002] Currently, the Programmable Logic Controller (PLC) products available on the market all use a fixed and singular method for executing PLC programs. In related technologies, PLC program execution systems do not allow users to choose which method to use to execute the PLC program's logic. Such PLC program execution systems are rigid, fixed, and lack flexibility.

[0003] There is currently no effective technical solution to the problem that users cannot select the execution mode of PLC programs and that the technology lacks flexibility. Summary of the Invention

[0004] The main purpose of this disclosure is to provide a PLC program execution system to solve the problem of inflexibility in related technologies where users cannot select the execution mode of PLC programs.

[0005] To achieve the above objectives, this disclosure provides a PLC program execution system, comprising:

[0006] A runtime system is used to store data and perform network interactions, and the runtime system has a unified interaction interface.

[0007] An actuator is connected to the runtime system through the interactive interface, and is used to access memory and network through the interactive interface to select an implementation method to execute the PLC program. The implementation methods of the actuator include interpreted executor, compiled executor and JIT executor.

[0008] Optionally, the runtime system includes:

[0009] The network manager is used to communicate with external devices over a network, acquire input signal data and output signal data from the external devices, and interact with the host computer.

[0010] Memory mechanisms are used to store data;

[0011] The interaction interface is connected to the network manager and the memory mechanism respectively, and is used to configure the read / write parameters and network parameters of the execution mechanism. The read / write parameters include the location of the data to be read or written in the memory mechanism and the amount of data to be read or written. The network parameters include the address for network interaction.

[0012] Optionally, the actuator can also be replaced by selecting different implementation methods during PLC runtime or software configuration compilation.

[0013] Optionally, the actuator can also be used to dynamically add or delete the actuator.

[0014] Furthermore, the PLC program execution system is a plug-in PLC program execution system.

[0015] Optionally, the interpreter is used to interpret and execute program logic operations by parsing the bytecode instructions generated by the compiler when compiling the PLC program.

[0016] Optionally, the compiled executor is used to directly compile the PLC program into machine code instructions and run the program directly on the operating system of the PLC main hardware.

[0017] Optionally, the JIT executor is used to convert bytecode instructions into machine code instructions at runtime to improve operating efficiency.

[0018] Optionally, the runtime system is compiled into a dynamic library.

[0019] Optionally, the actuator is compiled into a dynamic library.

[0020] In the PLC program execution system provided in this embodiment, a runtime system is used to store data and perform network interactions. The runtime system has a unified interaction interface. An execution mechanism connects to the runtime system through this interaction interface to access memory and the network, and selects an implementation method to execute the PLC program. The execution mechanism can be implemented as an interpreted executor, a compiled executor, or a JIT executor. Through the execution mechanism in the PLC program execution system, a choice can be made between various implementation methods to execute the PLC program. This flexible selection of implementation methods improves the flexibility of the PLC program execution system and solves the problem in related technologies where users cannot choose the execution method of the PLC program, resulting in a lack of flexibility. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this disclosure, the accompanying drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is an architecture diagram of the PLC program execution system provided in the embodiments of this disclosure. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.

[0024] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this disclosure are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product or device.

[0025] Furthermore, the terms "installation," "setup," "equipped with," "connection," "linking," and "socketing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium, or an internal connection between two devices, components, or parts. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.

[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0027] Currently, the Programmable Logic Controller (PLC) products available on the market all use a fixed and singular method for executing PLC programs. In related technologies, PLC program execution systems do not allow users to choose which method to use to execute the PLC program's logic. Such PLC program execution systems are rigid, fixed, and lack flexibility.

[0028] Furthermore, for PLC program execution systems with a fixed and single execution method, the code may have high coupling during programming. If users want to improve operating efficiency and replace the current execution system, the high coupling of the code will make the replacement difficult and time-consuming.

[0029] To address the aforementioned problems, this disclosure provides a PLC program execution system, the architecture of which is shown in the diagram below. Figure 1 As shown, the PLC program execution system includes:

[0030] The runtime system is used to store data and perform network interactions. The runtime system has a unified interaction interface; the runtime system provides a unified interface for accessing memory and the network.

[0031] The actuator connects to the runtime system via an interactive interface, allowing it to access memory and the network, and select an implementation method to execute the PLC program. The actuator can be implemented as an interpreted executor, a compiled executor, or a JIT executor. Based on a unified interactive interface, there can be multiple implementation methods for the actuator, rather than a single, fixed one.

[0032] The actuator accesses memory and interacts with the network through a unified interactive interface. Using this unified interactive interface, there are multiple different implementation methods. One implementation method is selected to execute the PLC program. It can be an interpreted executor, a compiled executor, or a JIT executor, or other implementation methods. For example, if an interpreted executor is selected, it will act as the actuator to execute the PLC program; a JIT executor is similar to the Just-In-Time compilation method of the JVM.

[0033] This disclosure allows the execution mechanism in a PLC program execution system to select one of multiple implementation methods to execute the PLC program. The implementation method is flexible and selectable, which improves the flexibility of the PLC program execution system and solves the problem of lack of flexibility in related technologies where users cannot choose the execution method of the PLC program.

[0034] Furthermore, by dividing the PLC program execution system into two parts—the runtime system and the execution mechanism—a unified interaction interface is provided, reducing the coupling between codes, decreasing the difficulty of replacing the execution mechanism, and shortening the time required to replace the execution mechanism.

[0035] In one optional embodiment of this disclosure, the runtime system includes:

[0036] The network manager is used to communicate with external devices over a network, acquire input and output signal data from these devices, and interact with the host computer. External devices are devices other than the PLC program execution system. Network communication with external devices can be achieved through their IP addresses.

[0037] The memory mechanism is used to store data; the memory mechanism is expandable and can expand the memory; furthermore, the memory mechanism and the execution mechanism can form a program executor, which can be used to execute the logic of the PLC program, and at the same time, acquire input signal data and set output signal data through the interaction interface; in this embodiment of the disclosure, the network manager, the memory mechanism and the interaction interface are integrated to form a runtime system;

[0038] The interaction interface connects to the network manager and the memory mechanism, respectively, and is used to configure the read / write parameters and network parameters of the actuator. Read / write parameters include the location of the data being read or written in the memory mechanism and the amount of data being read or written. Network parameters include the address used for network interaction. For example, when configuring the actuator's read / write parameters, one can specify which memory location to read from, how many bits or bytes to read, where to place the read data, and which memory location to write to, how many bits or bytes to write, and the content of the written data. When configuring the actuator's network parameters, the address can be a network address or an IP address. The network address is used to access the network, and the device's IP address is used to interact with other devices on the network to achieve remote data reading or writing.

[0039] In one optional embodiment of this disclosure, the actuator is further configured to be replaced by selecting different implementation methods during PLC runtime or software configuration compilation. During runtime, the PLC program execution system can have multiple different implementation methods, serving as multiple different actuators, allowing users to flexibly select the execution method of the PLC program and improve operating efficiency. Based on a unified interactive interface, the actuator can be implemented in multiple ways, and different implementation methods can be flexibly selected to replace the actuator during PLC runtime or software configuration compilation, improving operating efficiency and further enhancing the scalability of the PLC program execution system.

[0040] This disclosure is based on a unified interaction interface, which reduces the coupling between code, reduces the difficulty of replacing the execution mechanism, and shortens the time of replacing the execution mechanism.

[0041] In one optional embodiment of this disclosure, the actuator is also used for dynamically adding or deleting actuators.

[0042] In a preferred embodiment of this disclosure, the PLC program execution system is a plug-in PLC program execution system.

[0043] This disclosure is based on a unified interactive interface, and the actuator can be implemented in multiple ways. In addition to the three types of interpreter, compiler and JIT actuator, the implementation methods of the actuator can be dynamically added or deleted to expand the PLC program execution methods. Such a PLC program execution system is plug-in, which can improve the scalability of the PLC program execution system.

[0044] In one optional embodiment of this disclosure, an interpreted executor is used to interpret and execute program logic operations by parsing the bytecode instructions generated by the compiler when compiling the PLC program. The interpreted executor is based on bytecode instructions; as long as the memory structure remains unchanged, regardless of the bytecode instruction format, other parts of the PLC program execution system will not be altered.

[0045] In one optional embodiment of this disclosure, a compiled executor is used to directly compile the PLC program into machine code instructions and run the program directly on the operating system of the PLC main hardware.

[0046] In one optional embodiment of this disclosure, a JIT-type executor is used to convert bytecode instructions into machine code instructions at runtime to improve operating efficiency. The JIT-type executor is based on bytecode instructions; as long as the memory structure remains unchanged, regardless of the bytecode instruction format, other parts of the PLC program execution system will not be altered.

[0047] In one alternative implementation of this disclosure, the runtime system is compiled as a dynamic library. The runtime system is typically compiled as a dynamic library.

[0048] In one optional embodiment of this disclosure, the execution mechanism is compiled as a dynamic library. Execution mechanisms are generally also compiled as dynamic libraries.

[0049] As can be seen from the above description, this disclosure achieves the following technical effects:

[0050] This disclosure allows the execution mechanism in a PLC program execution system to select one of multiple implementation methods to execute the PLC program. The implementation method is flexible and selectable, which improves the flexibility of the PLC program execution system and solves the problem of lack of flexibility in related technologies where users cannot choose the execution method of the PLC program.

[0051] By dividing the PLC program execution system into two parts, the runtime system and the execution mechanism, a unified interaction interface is provided, which reduces the coupling between codes, reduces the difficulty of replacing the execution mechanism, and shortens the time of replacing the execution mechanism.

[0052] Based on a unified interactive interface, there are multiple ways to implement the actuator. The actuator can be flexibly replaced by selecting different implementation methods during PLC runtime or software configuration and compilation, thereby further improving the scalability of the PLC program execution system.

[0053] It should be understood that various aspects of this disclosure may be implemented individually or in combination with one or more other aspects. It should also be understood that the descriptions and specific embodiments herein are intended for illustrative purposes only and are not intended to limit the scope of this disclosure.

[0054] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A PLC program execution system, characterized in that, include: A runtime system is used to store data and perform network interactions, and the runtime system has a unified interaction interface. An actuator is connected to the runtime system through the interaction interface, and is used to access memory and network through the interaction interface to select an implementation method to execute the PLC program. The implementation methods of the actuator include interpreted executor, compiled executor and JIT executor. The runtime system includes: The network manager is used to communicate with external devices over a network, acquire input signal data and output signal data from the external devices, and interact with the host computer. Memory mechanisms are used to store data; The interaction interface is connected to the network manager and the memory mechanism respectively, and is used to configure the read / write parameters and network parameters of the execution mechanism. The read / write parameters include the location of the data to be read or written in the memory mechanism and the amount of data to be read or written. The network parameters include the address for network interaction, which is a network address or an IP address.

2. The PLC program execution system according to claim 1, characterized in that, The actuator is also used to be replaced by selecting different implementation methods during PLC runtime or software configuration compilation.

3. The PLC program execution system according to claim 1, characterized in that, The actuator is also used in a way that allows for the dynamic addition or deletion of the actuator.

4. The PLC program execution system according to claim 3, characterized in that, The PLC program execution system is a plug-in PLC program execution system.

5. The PLC program execution system according to claim 1, characterized in that, The interpreted executor is used to interpret and execute program logic operations by parsing the bytecode instructions generated by the compiler when compiling the PLC program.

6. The PLC program execution system according to claim 1, characterized in that, The compiled executor is used to directly compile the PLC program into machine code instructions and run the program directly on the operating system of the PLC main hardware.

7. The PLC program execution system according to claim 1, characterized in that, The JIT executor is used to convert bytecode instructions into machine code instructions at runtime to improve operating efficiency.

8. The PLC program execution system according to claim 1, characterized in that, The runtime system is compiled into a dynamic library.

9. The PLC program execution system according to claim 1, characterized in that, The execution mechanism is compiled into a dynamic library.

Citation Information

Patent Citations

  • Hybrid compiling method of programmable logic controller, storage medium and program product

    CN113485228A