Network version PLC programming platform and PLC programming method

By introducing the network disk service module into the network version of the PLC programming platform, the problem of online storage and compilation in the existing technology is solved, and the flexibility and efficiency of PLC programming for users anytime and anywhere are realized. Online compilation and storage are supported, which improves team collaboration and data security.

CN120631375APending Publication Date: 2025-09-12KYLAND TECH CO LTD

Patent Information

Application Number
CN202510967476.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing network version of PLC programming platform cannot realize online storage of program files or process files, resulting in users being unable to perform online compilation anytime and anywhere.

Method used

A network version PLC programming platform is provided, which is combined with the network disk service module to realize the online storage and compilation of PLC project resources. It includes editing service components, compilation service components and network disk service modules, supports the configuration, compilation and debugging of PLC project resources, and performs data storage and transmission through the network disk.

Benefits of technology

It enables users to compile and store PLC programs online anytime and anywhere, improves programming flexibility and efficiency, and supports multi-user information sharing and data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631375A_ABST
    Figure CN120631375A_ABST
Patent Text Reader

Abstract

The invention provides a network version PLC (Programmable Logic Controller) programming platform and a PLC programming method, and the network version PLC programming platform comprises an editing service component which is used for responding to a configuration operation request for PLC project resources from a user terminal and configuring the PLC project resources; the compiling service component is used for responding to a compiling operation request for the PLC project resources from the user terminal and compiling the PLC project resources to generate a target program; the network disk is used for storing PLC project resources or target programs; and the network disk service module is used for writing the configured PLC project resources or the generated target program into a network disk, or reading the corresponding PLC project resources from the network disk so as to enable the editing component to perform configuration, or enable the compiling component to perform compiling. According to the method and the device, online storage of related files in the PLC programming process is supported, so that more flexible online compiling at any time and any place is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This solution belongs to the field of industrial control technology, and in particular refers to a network version PLC programming platform and a PLC programming method. Background Art

[0002] In modern industrial automation technology, PLCs are widely used control devices. They also come with supporting PLC programming software to facilitate programming, compiling, and debugging. Currently, these programming software options fall into two main categories: traditional standalone desktop versions and network-based versions.

[0003] Compared to stand-alone PLC programming platforms, network-based PLC programming platforms allow users to compile PLCs over the internet, eliminating the tedious task of installing and maintaining stand-alone PLC programming platforms locally. For example, Chinese patent application number 202411247264.7 discloses a PLC programming language compilation method based on the BS architecture.

[0004] However, current network-based PLC programming platforms, such as the Chinese patent application No. 202411247264.7, only provide a compilation process on the network side. Therefore, users are required to compile program files locally in advance. After the network side compiles, the files need to be downloaded locally. Online storage of program files or process files is not supported, making it difficult to achieve online compilation anytime and anywhere.

[0005] In view of this, it is a technical problem to be solved to provide a network version PLC programming solution to support online storage of program files or process files, so as to support more flexible online compilation anytime and anywhere. Summary of the Invention

[0006] In view of the above problems in the prior art, the present invention provides a network version PLC programming platform and a PLC programming method, so that users can perform online compilation of PLC programs and online storage of related files anytime and anywhere.

[0007] To achieve the above objectives, the present application provides a first aspect of a network version PLC programming platform, comprising:

[0008] The editing service component is used to respond to the configuration operation request for the PLC project resources from the user terminal and configure the PLC project resources;

[0009] The compile service component is used to respond to the compile operation request for the PLC project resources from the user terminal, and compile the PLC project resources to generate the target program;

[0010] A network disk, used to store the PLC project resources or target program;

[0011] The network disk service module is used to write the configured PLC project resources or the generated target program into the network disk, or read the corresponding PLC project resources from the network disk so that the editing component can perform the configuration, or the compilation component can perform the compilation.

[0012] As a possible implementation method of the first aspect, the network disk service module includes: a network disk core network service module, which is used to provide data transmission services for uploading or downloading the network disk; a network disk management module, which is used to implement at least one of the following: file management, log management, data encryption management, file sharing management, or data security configuration management related to data storage, and user management or user authority management related to access control.

[0013] As a possible implementation of the first aspect, the editing service component includes: a PLC project engineering management module, which is used to execute the configuration of the project engineering to generate a project engineering file when the configuration operation request is to configure the PLC project engineering; a hardware configuration configuration management module, which is used to execute the configuration of the hardware configuration to generate a hardware configuration file when the configuration operation request is to configure the hardware configuration; and an algorithm configuration configuration management module, which is used to execute the configuration of the algorithm configuration to generate an algorithm configuration file when the configuration operation request is to configure the algorithm configuration.

[0014] As a possible implementation of the first aspect, the compilation service component includes: an engineering compilation preprocessing and data verification service module, which is used to perform format checking, dependency parsing, data integrity, and / or correctness verification on the PLC project resources; a compilation front-end service module, which is used to perform syntax analysis and semantic analysis on the PLC project resources to generate an intermediate representation; and a compilation back-end service module, which is used to convert the intermediate representation into a target program.

[0015] As a possible implementation of the first aspect, the system further includes a debugging component, the debugging component including: a breakpoint debugging module, configured to respond to a debugging request from a user terminal, so as to enable the user to set a breakpoint in a PLC project resource, execute a target program in a target PLC in a single step, monitor variable status, or monitor the execution process of the target program;

[0016] The operation control service module is used to respond to the operation control request from the user terminal to control the target PLC to start, pause, or stop the target program according to the user's control instructions, or perform heartbeat detection on the target PLC.

[0017] As a possible implementation method of the first aspect, it also includes: an API module, used to receive the configuration operation request, compilation operation request, breakpoint debugging request or run control request from the user terminal, and forward it to the PLC project engineering management module; the PLC project engineering management module is also used to trigger the editing service component, compilation service component, or debugging component to respond to the corresponding request based on the received request.

[0018] As a possible implementation method of the first aspect, it also includes: a log service module, which is used to record events of the configuration process, compilation process, debugging process, and / or control operation process of PLC project resources through log files; the network disk is also used to store the log files; the network disk service module is also used to write or read the log files provided by the log service module into the network disk.

[0019] A second aspect of the present application provides a PLC programming method, using any network version PLC programming platform described in the first aspect, the method comprising:

[0020] receiving a request from a user terminal;

[0021] When the request is identified as a compile operation request, the PLC project resource to be compiled by the compile operation request is read from the network disk;

[0022] Compiling the PLC project resources through the compilation service component to generate a compilation result file including the target program and writing it to the network disk;

[0023] The compiled result file written into the network disk is returned to the user terminal.

[0024] As a possible implementation of the second aspect, the method specifically includes: the PLC project engineering management module receives a request from the user terminal through the API module; when the PLC project engineering management module identifies the request as a compilation operation request, it requests the PLC project resources to be compiled by the compilation operation request from the network disk service module, and receives a HASH value returned by the network disk service module that has a mapping relationship with the storage location of the PLC project resources in the network disk; the engineering compilation preprocessing and data verification service module requests the PLC project resources from the network disk service module according to the HASH value, and receives the PLC project resources returned by the network disk service module; the engineering compilation preprocessing and data verification service module, the compilation front-end service module, and the compilation back-end service module complete the compilation process of the PLC project resources, generate a compilation result file containing the target program, and upload the compilation result file to the network disk through the network disk service module; the PLC project engineering management receives the compilation completion status information broadcast by the network disk service module, downloads the compilation result file from the network disk through the network disk service module, and returns it to the user terminal through the API module.

[0025] As a possible implementation method of the second aspect, it also includes at least one of the following: when the request is identified as a configuration operation request, responding to the configuration operation request through the editing service component to configure the PLC project resources; writing the configured PLC project resources to the network disk through the network disk service module; when the request is identified as a breakpoint debugging or operation control request, reading the target program from the network disk through the network disk service module and installing it to the target PLC; executing the debugging process through the breakpoint debugging module, or controlling the target PLC to run the target program according to the user's control through the operation control service module.

[0026] A third aspect of the present application provides a computing device, comprising: a processor, and a memory on which program instructions are stored, wherein when the program instructions are executed by the processor, the processor executes any one of the PLC programming methods described in the second aspect.

[0027] To sum up, the network version of the PLC programming platform provided by this application integrates the network disk service module and the network disk, so that users can use the editing service components and compilation service components provided by the platform to perform PLC configuration and compilation. During the process, relevant data, such as PLC project resources (i.e., the written code) or intermediate and result data of the compilation process, are stored in the cloud network disk, so that users can use the data stored in the network disk anytime and anywhere to continue to configure PLC project resources (i.e., write code), or compile, or debug, etc., providing developers with a convenient and flexible development method.

[0028] Furthermore, the core network service module of the network disk can be used to realize data transmission services to the network disk. The network disk management module can be used to realize transmission management, file management, user management, security management, etc.

[0029] Furthermore, since PLC project resources, compilation information, and debugging information are all stored on the cloud drive, this information can be provided to multiple online users simultaneously, enabling information sharing and improving team collaboration and work efficiency. Furthermore, since this information is stored on the cloud drive, the cloud drive's security mechanisms can be applied to enhance data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of a network version PLC programming platform provided in the first embodiment of the present application;

[0031] Figure 2 This is an architectural diagram of the network version PLC programming platform provided in the second embodiment of the present application;

[0032] Figure 3 A flowchart of a PLC programming method provided in the third embodiment of the present application;

[0033] Figure 4 Flowchart of the compilation process in the PLC programming method provided in the fourth embodiment of the present application;

[0034] Figure 5 A flowchart of the configuration process in the PLC programming method provided in the fifth embodiment of the present application;

[0035] Figure 6 A flowchart of the debugging process in the PLC programming method provided in the sixth embodiment of the present application;

[0036] Figure 7 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solution provided by this application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of this application are mainly for illustrating possible implementation methods of the technical solution of this application and should not be interpreted as the sole limitation of the technical solution of this application. It is known to those skilled in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by this application is also applicable to similar technical problems.

[0038] It should be understood that the network version PLC programming solution provided in the embodiments of the present application includes a network version PLC programming platform, the architecture of the network version PLC programming platform, a PLC programming method, a computing device, a storage medium, etc., wherein the programming method includes PLC project resource configuration (i.e., code editing), compilation, debugging, operation control, etc. Because the principles of solving the problems of these technical solutions are the same or similar, some repetitions may not be repeated in the introduction of the following specific embodiments, but it should be regarded as having been referenced between these specific embodiments and can be combined with each other.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. In the event of any inconsistency, the meanings described in this specification or the meanings derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application. In order to accurately describe the technical content in this application and to accurately understand the present invention, the following explanations or definitions are given for the terms used in this specification before describing the specific embodiments:

[0040] 1. Microservices: Microservices are a software development and deployment architecture in which an application is split into multiple small, independent microservice modules. Each microservice module is an independent functional module that can be independently developed, deployed, expanded, and maintained, facilitating subsequent iterative development of functions, responding quickly to new functional requirements, and improving system maintenance efficiency.

[0041] 2. Hash value: In this application, a hash value is a value calculated using a hash algorithm based on the file content, which uniquely identifies the file content. This application also uses the hash value as an index to map the file's storage location on the network disk. This allows the hash value to quickly locate the storage address on the network disk. The storage address can also be referred to as the storage location.

[0042] 3. PLC Integrated Development Environment (IDE) and Runtime Environment (RTE):

[0043] A PLC IDE is a development platform for the PLC. An IDE typically integrates a variety of development tools and functions, such as a source code editor, compiler, debugger, etc. In this application, a network-based PLC programming platform can be considered an IDE.

[0044] A PLC's real-time engineering (RTE) refers to the set of components, services, hardware, and other resources required for the PLC to run its programs. The RTE can be a real device, such as the hardware and software deployed on a computer, industrial computer, or edge server to support the PLC's program execution. Alternatively, the RTE can be a simulated device, such as the virtual hardware and software deployed in a virtual machine or container (Docker) to support the simulated PLC's program execution.

[0045] 4. PLC project resources, including: project engineering files, hardware configuration files, algorithm configuration files. The contents of these files constitute the source code.

[0046] The project engineering file is used to define the project properties and the resources contained in the project. Among them, the project properties include the PLC project engineering identifier (Project ID), version number, creation time, user information, etc. Among them, the resources contained in the project define the identifiers of the hardware configuration files, POU identifiers, library files, and other resources or library files that the project engineering depends on, that is, it is used to indicate which hardware configuration files, POUs, library files belong to the project engineering, as well as other resources or library files that the project engineering depends on, so that the required resources can be correctly loaded during compilation. Among them, the project properties and the resources contained in the project are usually displayed in the form of a project engineering directory. Common formats of project engineering files include .prj or .xml.

[0047] Hardware configuration files define the specific configuration of the PLC, including the PLC serial number (PLC SN), PLC model, CPU type, I / O module configuration (such as I / O baud rate, data bit length, stop bits, etc.), and communication parameters (such as IP address and MAC address). Hardware configuration files are used to map variable names in program code to specific PLC hardware during compilation. Common formats for hardware configuration files include .hwd and .xml.

[0048] An algorithm configuration file (also known as a program code file) contains the user-written algorithm configuration (which can also be called control logic). This includes the main control logic and the unit control logic corresponding to the custom Point-of-Use Units (POUs). The main control logic corresponds to the main program and determines how the PLC responds to external signals and controls output devices. The unit control logic defines the execution logic for the corresponding custom POU, which implements a specific function or algorithm. Common formats for algorithm configuration files include .st, .ld, .fb, or .func.

[0049] 5. PLC ID, used to uniquely identify a PLC in the PLC programming platform. The PLC ID can include any one or any combination of the following: PLC serial number, IP address, MAC address, model, etc.

[0050] 6. Code and Program: Code refers to readable instruction text (such as source code). Code can be displayed in various formats, including ladder diagrams, ST diagrams, and text. The different parts of the source code are documented in project files, hardware configuration files, and algorithm configuration files. A program refers to the executable machine instruction code (i.e., binary instructions) generated after compilation.

[0051] The network version PLC programming solution provided by this application integrates the PLC programming platform on the network side with the network disk, and realizes the programming, compilation, debugging and other functions of the user based on the PLC on the network side through the PLC programming platform on the network side, and stores the PLC project resources (such as project engineering files, hardware configuration files, algorithm configuration files, etc.) created by the user and the compilation results, debugging result files, etc. through the network disk, thereby supporting users to write programs, compile, debug, etc. based on the network version PLC programming platform anytime and anywhere, thereby improving the flexibility and efficiency of PLC programming. On the other hand, since it is stored in the network disk, it is also possible to realize the sharing needs of multiple users for the PLC project resources, compilation, debugging results, etc. stored in the network disk, or synchronize them to different clients. The present application is introduced below in conjunction with the accompanying drawings and various embodiments.

[0052] Figure 1 A schematic diagram of a network version PLC programming platform provided in the first embodiment of the present application is shown. The network version PLC programming platform includes an editing service component, a compilation service component, a network disk, and a network disk service module, wherein:

[0053] The editing service component is used to respond to a configuration operation request for a PLC project resource from a user terminal and configure the PLC project resource. In some embodiments, the PLC project resource includes a project engineering file, a hardware configuration file, and an algorithm configuration file.

[0054] The compile service component is used to respond to the compile operation request for the PLC project resources from the user terminal, and compile the PLC project resources to generate the target program.

[0055] A network disk is used to store the PLC project resources or target program. In some embodiments, the network disk is also used to store process files, such as compiled intermediate files, debugged process files, and log files.

[0056] The network disk service module is used to write the configured PLC project resources or the generated target program into the network disk, or read the corresponding PLC project resources from the network disk so that the editing component can perform the configuration, or the compilation component can perform the compilation.

[0057] In some embodiments, the network disk service module includes a network disk core network service module and a network disk management module, wherein:

[0058] The network disk core network service module is used to provide data transmission services for uploading or downloading network disks. In some embodiments, the data transmission services for uploading and downloading include the transmission protocol used, the encrypted transmission protocol, etc.

[0059] The network disk management module is used to implement at least one of the following: file management, log management, data encryption management, file sharing management, or data security configuration management related to data storage, and user management or user authority management related to access control.

[0060] In some embodiments, the editing service component includes a PLC project management module, a hardware configuration management module, and an algorithm configuration management module, wherein:

[0061] The PLC project engineering management module is used to execute the configuration of the project engineering to generate a project engineering file when the configuration operation request is to configure the PLC project engineering.

[0062] The hardware configuration management module is used for executing the configuration of the hardware configuration to generate a hardware configuration file when the configuration operation request is to configure the hardware configuration.

[0063] The algorithm configuration management module is used to execute the configuration of the algorithm configuration to generate an algorithm configuration file when the configuration operation request is to configure the algorithm configuration.

[0064] In some embodiments, the compilation service component includes an engineering compilation preprocessing and data verification service module, a compilation front-end service module, and a compilation back-end service module, wherein:

[0065] The project compilation preprocessing and data verification service module is used to perform format checking, dependency parsing, data integrity, and / or correctness verification on the PLC project resources.

[0066] The compilation front-end service module is used to perform syntax analysis and semantic analysis on the PLC project resources to generate an intermediate representation.

[0067] The compilation backend service module is used to convert the intermediate representation into a target program.

[0068] In some embodiments, a debugging component is further included, wherein the debugging component includes a breakpoint debugging module and a run control service module, wherein:

[0069] The breakpoint debugging module is used to respond to debugging requests from the user terminal to enable the user to set breakpoints in the PLC project resources, execute the target program in the target PLC in a single step, monitor variable status, or monitor the execution process of the target program.

[0070] The operation control service module is used to respond to the operation control request from the user terminal to control the target PLC to start, pause, or stop the target program according to the user's control instructions, or perform heartbeat detection on the target PLC.

[0071] In some embodiments, an API module is further included, which is used to receive the configuration operation request, compilation operation request, breakpoint debugging request or operation control request from the user terminal and forward it to the PLC project engineering management module;

[0072] The PLC project engineering management module is further used to trigger the editing service component, compiling service component, or debugging component to respond to the corresponding request according to the received request.

[0073] In some embodiments, the PLC project engineering management module is specifically configured to trigger a compilation service component to compile PLC project resources to generate a target program upon receiving a compilation operation request.

[0074] In some embodiments, the PLC project engineering management module is specifically used to trigger the breakpoint debugging module to execute the debugging process when receiving a breakpoint debugging operation request, so as to enable the user to set breakpoints in the PLC project resources, execute the target program in the target PLC in a single step, monitor the variable status, or monitor the target program execution process.

[0075] In some embodiments, the PLC project management module is specifically configured to, upon receiving an operation control operation request, trigger the operation control service module to control the start, pause, or stop of the target program running on the target PLC according to user control, or to perform online status detection on the target PLC, for example, by detecting the PLC's heartbeat. The heartbeat refers to the communication connection status between the PLC and a host computer (such as the network-based PLC programming platform) or other device.

[0076] In some embodiments, a log service module is further included for recording events of the configuration process, compilation process, debugging process, and / or control operation process of the PLC project resources through log files;

[0077] The network disk is also used to store the log files;

[0078] The network disk service module is further configured to write or read the log files provided by the log service module into or from the network disk.

[0079] In some embodiments, the PLC project engineering management module is specifically used to: when receiving a configuration operation request and identifying that the configuration operation is to configure the PLC project engineering, execute the configuration of the project engineering to generate a project engineering file; when identifying that the configuration operation is to configure the hardware configuration, trigger the hardware configuration configuration management module to execute the configuration of the hardware configuration to generate a hardware configuration file; when identifying that the configuration operation is to configure the algorithm configuration, trigger the algorithm configuration configuration management module to execute the configuration of the algorithm configuration to generate an algorithm configuration file.

[0080] In some embodiments, the log files generated by the log service module can be used for querying or analysis. In some embodiments, the recorded events can be categorized by operation to include: user login and logout information, compilation operation information, debugging operation information, program execution information, etc.; these events can be categorized by content to include: operation information (such as the aforementioned operation information), operation information, alarm information, etc.

[0081] In some embodiments, the API module is further configured to return the results of the operation to the user terminal for presentation to the user. In some embodiments, the API module also has the capability of traffic management and client security control, such as adding a whitelist or blacklist to the client security control. For example, an API routing / gateway control function is integrated, such as the API module can set the IP addresses allowed to access (whitelist) and / or the IP addresses prohibited to access (blacklist) to control which clients can communicate with, and can also set a traffic control mechanism to prevent the network version of the PLC programming platform from being overloaded due to sudden client traffic or malicious attacks.

[0082] In some embodiments, the above-mentioned user terminal is used to realize human-computer interaction, provide users with a visual interface for program programming, and receive user operations on the visual interface, etc. The user terminal can be a WEB terminal (such as a WEB terminal on a PC, PAD, mobile phone, etc.), or it can be a PC-side software (such as a client) or an APP-side of a mobile device (such as an APP as a client) application. Among them, the WEB terminal is used for users to access the network version of the PLC programming platform through a browser. Based on the existing WEB implementation, it forms a BS (Browser-Server) architecture with the network side, which has the characteristics of no installation and cross-platform; the PC terminal is used for users to enter the PLC programming software through a personal computer, usually requiring the installation of a client, forming a CS (Client-Server) architecture with the network side, supporting offline operation, and suitable for more complex development projects; the APP side can also form a CS (Client-Server) architecture with the network side. The APP side is usually installed on a mobile device (such as a PAD, mobile phone) to provide convenient mobile access capabilities.

[0083] In some embodiments, the hardware configuration management module executes the configuration of the hardware configuration to generate a hardware configuration file, wherein the hardware configuration includes, for example, information such as the PLC model, I / O parameters, and communication address in the PLC project configured on the user terminal interface. In some embodiments, the user terminal interface displays the hardware device icon displayed by calling the hardware configuration library through the hardware configuration management module. The user can configure the PLC model, I / O parameters, communication address, etc., such as the IP address or MAC address, by dragging, clicking, or entering operations. After the configuration is completed, a hardware configuration file is generated to ensure that the PLC program can interact correctly with the hardware device. The hardware configuration file will be written to the network disk through the network disk service module.

[0084] In some embodiments, the algorithm configuration management module executes the configuration of the algorithm configuration to generate an algorithm configuration file. When configuring, the configuration is performed, for example, through an FBD function block diagram, an LD ladder diagram, etc. In some embodiments, the user terminal interface displays logic icons (such as normally open nodes, normally closed nodes, coils, reset coils, etc.) displayed by calling the algorithm configuration library through the algorithm configuration management module, as well as program block icons representing certain functions (such as start, emergency stop, alarm, etc.). The user can configure the algorithm configuration (i.e., program logic) in a graphical (FBD or LD ladder diagram) manner through operations such as dragging, clicking, and input, and generate an algorithm configuration file. The algorithm configuration file is written to the network disk through the network disk service module.

[0085] In some embodiments, the above-mentioned engineering compilation preprocessing and data verification service module, compilation front-end service module, compilation back-end service module, breakpoint debugging module, operation control service module, and log service module can be implemented as microservice modules, which can be deployed on a private cloud, public cloud, or Intel server through a container (Docker). Each microservice module is an independent functional module that can be independently developed, deployed, expanded, and maintained, facilitating the elastic expansion of resources of the network version PLC programming platform, while making it easier to carry out subsequent iterative development of functions, thereby improving the maintenance efficiency of the network version PLC programming platform.

[0086] In some embodiments, a simulated PLC can also be deployed in the container (Docker), and a simulated RTE is deployed in the container to support the operation of the simulated PLC. When implementing the above-mentioned debugging, the compiled target program (i.e., binary code) is downloaded to the simulated PLC for running to realize debugging of the target program.

[0087] Regarding the network disk service module, it includes a network disk core network service module and a network disk management module. From a certain perspective, the network disk core network service module is used to realize the underlying data transmission, and the network disk management module realizes the upper-level user authentication (corresponding to user management), file security (such as file encryption), file management (such as finding files to be transferred, adding / deleting / checking files, etc.), log management (recording relevant information of data transmission), etc. involved in data transmission. When accessing the network disk through the network disk service module, the network disk core network service module and the network disk management module are generally required to cooperate to realize data transmission, such as receiving the request and confirming the transmission method through the network disk management module, the network disk core network service module performs data transmission, and the network disk management module replies with the transmission completion information, etc.

[0088] In some embodiments, the user management includes account creation, permission allocation and authentication, and provides users with operating permissions for the business application layer; the log management is used to record the system's operation log, including the execution, setting, storage and other information of the business logic included in the business application layer; the security management is used by the administrator to set security policies such as data security and user permissions for the business application layer; the transmission management is used to manage how to transmit, such as data subpackaging, breakpoint resumption, fault retransmission, etc.; the file management is used to organize, search, add, delete, share and other management of uploaded project resources and files.

[0089] In some embodiments, the network disk also stores various other resources that support the PLC project, which can be used by users during programming, compilation, and debugging. These resources can be packaged into JSON files and stored on the network disk. When each module (including the aforementioned microservice module) needs a resource, it can request the corresponding resource from the network disk through the network service module. These resources can be, for example, standard library files that can be used by any PLC project, such as function libraries and function block libraries.

[0090] Among them, in the embodiment of this application, the design of the network disk service module and the network disk is listed as follows:

[0091] 1) The contents stored in the network disk include: project engineering files, hardware configuration files, algorithm configuration files, log files, target programs, etc. It can also store some standard library files, such as function libraries, function block libraries, etc.

[0092] 2) File storage on the cloud disk: For all the aforementioned files (excluding the target program), one approach is to package them into JSON format using protobuf technology for storage. Specifically, the original file is converted into a binary sequence using protobuf, then encapsulated as JSON for storage. This approach combines the compactness of binarization, reducing storage and transmission overhead, with the flexibility of JSON structure, adapting to various file structures. This storage method facilitates cloud disk storage and network transmission.

[0093] 3) Mapping mechanism for quick access: Establish a mapping relationship between the PLC project engineering identifier, the HASH value of the PLC project resources, the storage location of the PLC project resources in the network disk, and the storage location of the target program in the network disk.

[0094] Among them, if the project engineering files, hardware configuration files, and algorithm configuration files included in the PLC project resources are stored independently, it can also be: establish a mapping relationship between the PLC project engineering identifier, the project engineering file HASH value, the hardware configuration file HASH value, the algorithm configuration file HASH value, the project engineering file storage location in the network disk, the hardware configuration file storage location in the network disk, the algorithm configuration file storage location in the network disk, and the target program storage location in the network disk.

[0095] Through the mapping mechanism, the network disk service module uses the storage address to read and write data with the network disk. When the network disk service module interacts with the editing component, compilation component, debugging component, etc., it interacts based on the PLC project engineering identifier or HASH value, and does not expose the storage location of the network disk outside the network disk, thereby improving data security.

[0096] 4) Notification mechanism, such as a publish-subscribe mode notification mechanism, which publishes corresponding events when a file stored in the network disk is updated. The module that subscribes to the corresponding service (such as the PLC project engineering management module) receives the corresponding event and promptly updates the PLC project resources cached in the network version of the PLC programming platform.

[0097] In some embodiments, the above modules (including microservice modules) can interact with each other based on RestAPI for data.

[0098] Next, further Figure 2 The architecture diagram of the network version PLC programming platform provided by the second embodiment of the present application is introduced. Figure 1 The network version of the PLC programming platform shown in the figure, as well as the underlying layers and user terminal sides involved, are classified and layered. Figure 2 As shown in the figure, it is divided from top to bottom into presentation layer, API layer, business application layer, service center layer, data storage layer, and operating environment layer.

[0099] The presentation layer includes the aforementioned user terminal side. It provides a visual interface for user programming and facilitates human-computer interaction. This visual interface includes drop-down menus, icon controls, dialog boxes, display pages, and more, supporting user operations such as dragging, clicking, and typing.

[0100] IO configuration, software programming, compilation, downloading, operation, monitoring

[0101] The API layer includes the aforementioned API module. The API module includes various API interfaces for the presentation layer to call when performing corresponding operations. For example, these include PLC project configuration, hardware configuration (such as IO configuration), algorithm configuration (i.e., software programming), compilation, downloading, running, debugging, monitoring, and other user presentation layer operations. These API interfaces are encapsulated by the backend processing logic corresponding to the various operations.

[0102] Among them, the business application layer includes the aforementioned PLC project engineering management module, hardware configuration management module and algorithm configuration management module, that is, it includes the editing component, and also includes the network disk management module in the network disk service module.

[0103] The service center layer includes the aforementioned microservice modules, namely the compilation and debugging components. These include, for example, the project compilation preprocessing and data verification service module, the compilation front-end service module, the compilation back-end service module, the breakpoint debugging module, the operation control service module, and the logging service module. It also includes the core network service module within the network disk service module. The resulting microservice architecture allows for flexible deployment and expansion, enabling elastic resource expansion. This also facilitates subsequent iterative development of features and enables prompt and rapid response to new functional requirements, improving system maintenance efficiency.

[0104] The data storage layer consists of databases, such as MySQL, Redis, file servers, and cloud platform containers (Docker), which are used to implement various data storage functions within the networked PLC programming platform. For example, each microservice module is deployed in a cloud platform container, and the data and program code involved in program writing, compilation, and debugging are stored in MySQL, Redis, or file servers.

[0105] Among them, the operating environment (referring to the operating environment of the network version of the PLC programming platform of this application) is the corresponding hardware layer, such as a private cloud server, a public cloud server, an Intewell server, etc. The database of the data storage layer can be centrally deployed on one server or distributed in multiple servers as needed.

[0106] The data storage layer and operating environment are used to support the operation of the upper layer by providing a hardware environment (such as CPU, memory, communication modules, and other hardware) and storage methods to enable the operation, caching, and network disk functions of the network version PLC programming platform in the cloud. In some embodiments, the non-storage portion of the network version PLC programming platform can be deployed on a public cloud server to facilitate user access, and the network disk can be deployed on the enterprise's private cloud server to ensure the privacy and security of this data.

[0107] Figure 3 The third embodiment of the present application provides a PLC programming method, which uses the network version PLC programming platform of the first embodiment for programming. The method includes the following steps S10-S40:

[0108] S10: A request from a user terminal is received.

[0109] S20: When the request is identified as a compile operation request, the PLC project resources to be compiled by the compile operation request are read from the network disk.

[0110] S30: Compiling the PLC project resources through the compilation service component to generate a compilation result file including the target program, and writing the file into the network disk.

[0111] S40: Returning the compilation result file written into the network disk to the user terminal.

[0112] In some embodiments, step S10 specifically includes: the PLC project engineering management module receives a request from the user terminal through the API module.

[0113] In some embodiments, step S20 specifically includes: when the PLC project engineering management module identifies that the request is a compilation operation request, requesting the PLC project resources to be compiled by the compilation operation request from the network disk service module, and receiving the HASH value returned by the network disk service module that has a mapping relationship with the storage location of the PLC project resources in the network disk; the engineering compilation preprocessing and data verification service module requests the PLC project resources from the network disk service module according to the HASH value, and receives the PLC project resources returned by the network disk service module.

[0114] In some embodiments, step S30 specifically includes: the engineering compilation preprocessing and data verification service module, the compilation front-end service module, and the compilation back-end service module complete the compilation process of the PLC project resources, generate a compilation result file containing the target program, and upload the compilation result file to the network disk through the network disk service module.

[0115] In some embodiments, step S40 specifically includes: the PLC project engineering management receives the compilation completion status information broadcast by the network disk service module, downloads the compilation result file from the network disk through the network disk service module, and returns it to the user terminal through the API module.

[0116] In some embodiments, the method further includes: when the request is identified as a configuration operation request, responding to the configuration operation request via an editing service component to configure PLC project resources; and writing the configured PLC project resources to a network disk via a network disk service module. In some embodiments, configuring the PLC project resources includes configuring the contents corresponding to the project engineering files, hardware configuration files, and algorithm configuration files.

[0117] When the target program is generated after the compilation is completed, the target program can be debugged at this time. In some embodiments, it also includes: when the request is identified as a breakpoint debugging or a run control request, the target program is read from the network disk through the network disk service module and installed into the target PLC; the debugging process is executed through the breakpoint debugging module, or the run control service module is used to control the target PLC to run the target program according to the user's control.

[0118] In some embodiments, the target PLC is a real device, and the corresponding RTE corresponding to the PLC also includes a real device. For example, the RTE can be a PC or other related hardware on the user side (for example, an industrial computer / laboratory table connected to the PC serial port, and the industrial computer / laboratory table has the PLC). The PC can communicate with this network version of the PLC programming platform. The debugging can be to read the target program (i.e., binary code) from the network disk, transfer it to the PC, and download it to the PLC for execution to perform the debugging.

[0119] In other embodiments, when the target PLC is a real device, the corresponding RTE may also be a server, such as an Intewell server (the Intewell server may be deployed as an edge server) and other related hardware (such as an industrial computer / laboratory table connected to a PC serial port, etc., where the industrial computer / laboratory table has the PLC). The debugging may also be to read the target program (i.e., binary code) from the network disk, transfer it to the Intewell server, and download it to the PLC for execution to perform the debugging.

[0120] In some embodiments, requests from the user terminal for configuration or compilation of PLC project resources, and requests for breakpoint debugging or run control of the generated target program are all received by the API module and sent to the PLC project engineering management module. The PLC project engineering management module then triggers different modules to perform corresponding operations based on different requests, as follows:

[0121] The PLC project engineering management module receives a configuration operation request, and when identifying that the configuration operation is to configure a PLC project engineering, executes configuration of the project engineering to generate a project engineering file; when identifying that the configuration operation is to configure a hardware configuration, triggers the hardware configuration configuration management module to execute configuration of the hardware configuration to generate a hardware configuration file; when identifying that the configuration operation is to configure an algorithm configuration, triggers the algorithm configuration configuration management module to execute configuration of the algorithm configuration to generate an algorithm configuration file;

[0122] When the PLC project engineering management module receives a compilation operation request, it triggers the compilation service component to execute the compilation of the PLC project resources to generate the target program;

[0123] When the PLC project engineering management module receives a breakpoint debugging operation request, it triggers the breakpoint debugging module to execute the debugging process;

[0124] When the PLC project engineering management module receives the operation control operation request, it triggers the operation control service module to control the target PLC to run the target program according to the user's control.

[0125] In some embodiments, when the PLC programming platform executes a configuration operation or compilation operation request for PLC project resources, or a breakpoint debugging or run control request for a generated target program, the network disk service module can store the data generated after executing this request to the network disk, or read the corresponding data from the network disk to execute this request. This data includes PLC project resources, target programs, compilation result files, debugging result files, log files, etc.

[0126] For some possible implementations of the third or fourth embodiment, please refer to the relevant descriptions of the first and second embodiments above, which will not be repeated here.

[0127] In order to further understand the present application scheme, Figure 4 The schematic diagram shown introduces a compilation method of a PLC programming method provided in the fourth embodiment of the present application. In this example, the network disk has stored PLC project resources (PLC project resources include project project files, hardware configuration files, and algorithm configuration files) of a PLC project project previously created by the user (hereinafter referred to as a target PLC project project). This example mainly involves the user performing a compilation process on the PLC project resources of a stored target PLC project project. The method includes the following steps S101-S111:

[0128] S101: The user accesses the PLC programming platform through the Web end. The user selects a PLC project engineering ID on the PLC programming platform interface of the Web end. In this example, the selected PLC project name is the one generated by the user in the project creation phase. Then, the "Compile" control on the Web end interface is clicked, triggering the Web end to send a corresponding API request, which is a compilation request. The compilation request includes the PLC project engineering ID (Project ID). The API module receives the compilation request and sends the compilation request to the PLC project engineering management module.

[0129] S102: After the PLC project engineering management module receives the compilation request from the API module, when it determines that the PLC project resources corresponding to the PLC project engineering identifier are not cached in the device memory of the PLC programming platform, it first sends a data search request message to the network disk service module based on the PLC project engineering identifier. The message carries the PLC project engineering identifier.

[0130] The device memory of the PLC programming platform is, for example, the memory of a server running the PLC programming platform.

[0131] S103: After receiving the data search request message, the network disk service module finds the corresponding HASH value from the pre-stored mapping relationship between the PLC project identifier and the HASH value according to the PLC project engineering identifier carried in the message, and returns it to the PLC project engineering management module.

[0132] The HASH value is mapped to the PLC project identifier and the storage location of the PLC project resources in the network disk. Thus, the network disk service module can locate the storage location of the PLC project resources in the network disk based on the HASH value. These mapping relationships can be stored in a metadata database.

[0133] S104: After receiving the HASH value, the PLC project engineering management module sends a compilation command with the HASH value to the engineering compilation preprocessing and data verification service module to trigger the compilation process.

[0134] S105: After receiving the compile command, the compile preprocessing and data verification service module sends a data request to the network disk service module according to the HASH value in the compile command.

[0135] Then, the network disk service module reads the PLC project resources from the corresponding storage location of the network disk according to the mapping relationship between the HASH value and the storage location of the PLC project resources in the network disk, and loads them into the device memory of the PLC programming platform.

[0136] Then, through the compilation preprocessing and data verification service module, the PLC project resources are format checked, dependencies are parsed, symbols or functions are defined, and the integrity and correctness of the data are verified.

[0137] S106: Performing syntax analysis and semantic analysis on the pre-processed PLC project resources by compiling the front-end service module to generate an intermediate representation.

[0138] The backend service module then compiles the intermediate representation into a target program executable by the PLC. This target program is machine instruction code, or binary code. A compilation result file is generated based on the target program, with the target program as part of the compilation result file. The result file can also include other information, such as the compilation time, warnings, and errors. Warnings and errors are generated when problems are encountered during the compilation process.

[0139] S107: Transmit the compilation result file to the network disk service module.

[0140] S108: The network disk service module saves the received compilation result file to the network disk for persistent storage so as to facilitate subsequent calls.

[0141] At this point, the metadata database can store the following mapping relationship: PLC project ID (ProjectID) - HASH value - PLC project resource storage location on the network disk - compilation result file storage location on the network disk. The network disk service module can then locate the storage location of the PLC project resource and compilation result file on the network disk based on the HASH value.

[0142] S109: The network disk service module broadcasts the compilation status information to inform the PLC project engineering management module of the completion of the compilation task. The compilation status information includes the above-mentioned HASH value.

[0143] S110: After receiving the compilation status information, the PLC project engineering management module requests the compilation result file from the network disk service module.

[0144] The network disk service module responds to the request, reads the compilation result file from the network disk, and provides it to the PLC project engineering management module.

[0145] The PLC project engineering management module may carry the HASH value when requesting the compilation result file, and the network disk service may locate the storage location of the compilation result file in the network disk according to the HASH value to read out the compilation result file.

[0146] S111: The PLC project engineering management module returns the received compilation result file to the WEB end, so as to display the compilation result file on the WEB end.

[0147] At this time, the user can also download the compilation result file through the download function provided in the WEB terminal to save it to his local PC, so as to facilitate downloading the target program in the compilation result file to the PLC connected to the local PC through the local PC.

[0148] In addition, the target program can also be downloaded into the simulated PLC, which will be introduced in the sixth embodiment below.

[0149] In addition, when different users access the network version of the PLC programming platform of this application at the same time through different display layer devices, such as PC, WEB, APP, etc., and access the same PLC project, the PLC project management module can also broadcast relevant information to each device in the display layer, so that different users can obtain the compilation result files separately, and realize the synchronous sharing of compilation result files by these different users.

[0150] In order to further understand the technical solution of this application, Figure 5The schematic diagram shown introduces the PLC project resource configuration process in a PLC programming method provided in the fifth embodiment of the present application. The PLC project resource configuration process corresponds to the code writing process and involves the configuration process of the project engineering file, hardware configuration file, and algorithm configuration file. The method includes the following steps S201-S204:

[0151] S201: A user accesses a PLC programming platform through a web terminal and uses a "New" control on the PLC programming platform interface on the web terminal to create a new PLC project. The new creation request is sent to a PLC project management module through an API module.

[0152] S202: After the PLC project engineering management module receives a new creation request from the API module, the PLC project engineering management module first starts the configuration of the project engineering to generate a project engineering file. The configuration process of the project engineering includes receiving the user's configuration of the project engineering through the PLC project engineering management module to define the project properties and the resources included in the project.

[0153] Project attributes include the PLC project ID, version number, creation time, and user information. The project's resources define the identifiers of the project's hardware configuration files, POUs, and library files, as well as the identifiers of other resources or library files it relies on. This information specifies the hardware configuration files, POUs, library files, and other resources or library files it relies on. These can be displayed on the web-based PLC programming platform interface as a project directory structure.

[0154] The generated project files are uploaded to the network disk as PLC project resources through the network disk service module. The network disk service module generates a hash value based on the PLC project resources and establishes a mapping relationship between the hash value and the PLC project identifier and the storage location of the PLC project resources on the network disk.

[0155] S203: When the user performs hardware configuration through the "Hardware Configuration" control on the PLC programming platform interface on the Web side, the corresponding configuration operation request is sent to the PLC project engineering management module through the API module.

[0156] When the PLC project engineering management module receives a configuration operation request and identifies that the configuration operation is to configure the hardware configuration, it triggers the hardware configuration management module to execute the configuration of the hardware configuration to generate a hardware configuration file.

[0157] The hardware configuration process includes receiving the user's configuration of specific PLC parameters through the hardware configuration management module, such as the PLC serial number (PLC SN), model, I / O module parameters, communication parameters, etc. The user can perform this configuration process on the corresponding page provided on the PLC programming platform interface on the web.

[0158] The generated hardware configuration file and the previous project engineering file are uploaded to the network disk as PLC project resources through the network disk service module to update the stored content. Among them, the network disk service module will update the HASH value according to the current PLC project resources.

[0159] S204: When the user configures the algorithm through the "algorithm configuration" control on the PLC programming platform interface on the Web side, the corresponding configuration operation request is sent to the PLC project engineering management module through the API module.

[0160] When the PLC project engineering management module receives a configuration operation request and identifies that the configuration operation is to configure an algorithm configuration, the algorithm configuration management module is triggered to execute the configuration of the algorithm configuration to generate an algorithm configuration file.

[0161] The algorithm configuration process includes receiving the user's configuration of the main control logic and the corresponding customized POU unit control logic through the algorithm configuration configuration management module. This configuration process can be performed by the user using the graphical configuration tool (such as FBD or LD ladder diagram configuration tool) provided on the PLC programming platform interface on the web.

[0162] The generated algorithm configuration file and the previous project engineering files and hardware configuration files are uploaded to the network disk as PLC project resources through the network disk service module to update the stored content. Among them, the network disk service module will update the HASH value according to the current PLC project resources.

[0163] In the above-described embodiment, the network disk service module generates a hash value for the project engineering files, hardware configuration files, and algorithm configuration files as a complete PLC project resource, and establishes a mapping relationship between the hash value and a storage location and the PLC project engineering identifier. In other embodiments, the network disk service module generates separate hash values ​​for the project engineering files, hardware configuration files, and algorithm configuration files, and establishes a mapping relationship between the separate storage locations and the PLC project engineering identifier, thereby enabling separate storage and reading and writing of the project engineering files, hardware configuration files, and algorithm configuration files.

[0164] In other embodiments, the steps S202-S204 regarding the creation of PLC project resources are all run in memory (for example, the memory of the server running the network version of the PLC programming platform), and the PLC project resources are cached in the memory. When the user clicks the "Save" control on the Web interface, or periodically, the cached PLC project resources are uploaded to the network disk through the network disk service module, and the network disk service module generates a HASH value based on the PLC project resources, and establishes a mapping relationship with the PLC project engineering identifier and the storage location of the PLC project resources on the network disk.

[0165] In other embodiments, as described above, the project engineering files, hardware configuration files, and algorithm configuration files may be stored separately in a network disk. In this case, only the corresponding hardware configuration files and algorithm configuration files may be uploaded in the above steps S203 and S204.

[0166] In order to further understand the technical solution of this application, Figure 6 The schematic diagram shown introduces the debugging process of a PLC programming method provided in the sixth embodiment of the present application, wherein, before debugging, the PLC and its RTE need to be deployed accordingly, and the compilation process has been completed to generate the target program. In this example, the simulation PLC and the simulation RTE are taken as examples for introduction. The simulation PLC and the simulation RTE are deployed in a container and can communicate with the PLC programming platform of the present application. For example, one possibility is: the PLC programming platform is deployed in a container, and the simulation PLC and the simulation RTE are deployed in another container. The containers communicate through virtual network cards, or the containers communicate through memory, etc., to achieve communication between the PLC programming platform and the simulation PLC and the simulation RTE. When debugging, the steps include the following S301-S306:

[0167] S301: The user accesses the PLC programming platform through the Web, selects a PLC project engineering identifier (for example, the PLC project name generated by the user in the project creation phase) on the PLC programming platform interface on the Web, and clicks the "Debug" control on the Web interface. At this time, the client debugging request (the request carries the PLC project engineering identifier) ​​is sent to the PLC project engineering management module through the API module.

[0168] S302: The PLC project management module receives the debugging request and first requests the target program corresponding to the PLC project identifier from the network disk service module. The request carries the PLC project identifier.

[0169] The network disk service module determines the mapped HASH value and the mapped network disk storage location according to the PLC project engineering identifier, reads the target program and provides it to the PLC project engineering management module.

[0170] It should be noted that after the PLC project resources (i.e., source code) are configured (see the fifth embodiment above), the user can select the "breakpoint debugging" control on the PLC programming platform interface on the web side. After the PLC project engineering management module obtains the corresponding instructions through the API module, it calls the breakpoint debugging module to enable the user to set the corresponding breakpoints in the code. Moreover, after the code with breakpoints is compiled through the above compilation process (see the fourth embodiment above), a target program with breakpoints will be stored in the network disk. The target program in this step S302 is the target program with breakpoints.

[0171] S303: The PLC project management module transfers the target program to the simulation RTE and downloads it to the simulation PLC so that the simulation PLC can run the target program. After the download is completed, the PLC project management module can be fed back to the user through the PLC programming platform interface on the web.

[0172] Among them, during the hardware configuration process (see the aforementioned step S203), specific parameters of the simulated PLC are configured, including communication parameters (such as IP, MAC, etc.). Based on the communication parameters, data transmission with the simulated RTE and simulated PLC can be achieved.

[0173] S304: The user clicks the corresponding "run control" control on the Web interface, such as the start button in the control. At this time, the start request sent by the client is sent to the PLC project management module through the API module.

[0174] S305: The PLC project engineering management module triggers the operation control service module and sends instructions to the simulation PLC to enable the simulation PLC to start running the downloaded target program, and monitor the running status of the simulation PLC in real time through the breakpoint debugging module, such as automatically pausing when running to a breakpoint or condition, and obtaining the status of the monitored variables in real time.

[0175] S306: The breakpoint debugging module may return the breakpoint information or the monitored variable status to the PLC project engineering management module, which then returns the information to the PLC programming platform interface on the web side through the API module for display, so that the user can view the debugging information.

[0176] Figure 7 900 is a schematic structural diagram of a computing device provided in an embodiment of the present application. The computing device can execute or implement each optional embodiment of the above method. The computing device can be a terminal, or a chip or chip system inside the terminal. Figure 7 As shown, the computing device 900 includes: a processor 910 , a memory 920 , and a communication interface 930 .

[0177] It should be understood that Figure 7 The communication interface 930 in the computing device 900 shown may be used to communicate with other devices, and may specifically include one or more transceiver circuits or interface circuits.

[0178] The processor 910 may be connected to a memory 920. The memory 920 may be used to store the program code and data. Therefore, the memory 920 may be a storage unit within the processor 910, an external storage unit independent of the processor 910, or a component including both a storage unit within the processor 910 and an external storage unit independent of the processor 910.

[0179] Optionally, the computing device 900 may further include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 via the bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 A line without an arrow is used to represent the bus, but this does not mean that there is only one bus or one type of bus.

[0180] It should be understood that in the embodiment of the present application, the processor 910 can adopt a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. Alternatively, the processor 910 uses one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0181] The memory 920 may include a read-only memory and a random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include a non-volatile random access memory. For example, the processor 910 may also store information about the device type.

[0182] When the computing device 900 is running, the processor 910 executes the computer-executable instructions in the memory 920 to perform any operation step of the above method and any optional embodiment thereof.

[0183] It should be understood that the computing device 900 according to the embodiment of the present application can correspond to the corresponding subject in executing the method according to each embodiment of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 900 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.

[0184] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0185] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0186] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0187] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0188] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0189] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0190] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program is used to execute the above method, which includes at least one of the solutions described in the above embodiments.

[0191] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media.Computer-readable media can be computer-readable signal media or computer-readable storage media.Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof.More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connection with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination thereof.In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0192] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0193] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0194] The computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0195] In addition, the words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0196] In the above description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the steps can be interchanged or they can be executed simultaneously.

[0197] The term "comprising" as used in the specification and claims should not be construed as limiting to what is listed thereafter; it does not exclude other elements or steps. Thus, it should be interpreted as specifying the presence of the features, integers, steps, or components mentioned, but not excluding the presence or addition of one or more other features, integers, steps, or components, or groups thereof. Thus, the expression "a device comprising means A and B" should not be limited to a device consisting solely of components A and B.

[0198] References in this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing throughout this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. Furthermore, in one or more embodiments, the particular features, structures, or characteristics can be combined in any suitable manner, as would be apparent to one of ordinary skill in the art from this disclosure.

[0199] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of protection of the present application, all of which fall within the scope of protection of the present application.

Claims

1. A network version PLC programming platform, characterized by: include: The editing service component is used to respond to the configuration operation request for the PLC project resources from the user terminal and configure the PLC project resources; The compile service component is used to respond to the compile operation request for the PLC project resources from the user terminal, and compile the PLC project resources to generate the target program; A network disk, used to store the PLC project resources or target program; The network disk service module is used to write the configured PLC project resources or the generated target program into the network disk, or read the corresponding PLC project resources from the network disk so that the editing component can perform the configuration, or the compilation component can perform the compilation.

2. The network version PLC programming platform according to claim 1, characterized in that: The network disk service module includes: The core network service module of the network disk is used to provide data transmission services for uploading or downloading the network disk; The network disk management module is used to implement at least one of the following: file management, log management, data encryption management, file sharing management, or data security configuration management related to data storage, and user management or user authority management related to access control.

3. The network version PLC programming platform according to claim 1, characterized in that: The editing service components include: A PLC project management module, configured to, when the configuration operation request is to configure a PLC project, execute configuration of the project to generate a project file; A hardware configuration management module, configured to, when the configuration operation request is to configure the hardware configuration, execute the configuration of the hardware configuration to generate a hardware configuration file; The algorithm configuration management module is used to execute the configuration of the algorithm configuration to generate an algorithm configuration file when the configuration operation request is to configure the algorithm configuration.

4. The network version PLC programming platform according to claim 3, characterized in that: The compilation service component includes: The project compilation preprocessing and data verification service module is used to perform format checking, dependency parsing, data integrity, and / or correctness verification on the PLC project resources; A compilation front-end service module is used to perform syntax analysis and semantic analysis on the PLC project resources to generate an intermediate representation; The compilation backend service module is used to convert the intermediate representation into a target program.

5. The network version PLC programming platform according to claim 4, characterized in that: Also included is a debugging component, the debugging component including: The breakpoint debugging module is used to respond to debugging requests from the user terminal to enable the user to set breakpoints in the PLC project resources, execute the target program in the target PLC in a single step, monitor the variable status, or monitor the execution process of the target program; The operation control service module is used to respond to the operation control request from the user terminal to control the target PLC to start, pause, or stop the target program according to the user's control instructions, or perform heartbeat detection on the target PLC.

6. The network version PLC programming platform according to claim 5, characterized in that: Also includes: An API module is configured to receive the configuration operation request, compile operation request, breakpoint debugging request or operation control request from a user terminal and forward it to the PLC project engineering management module; The PLC project engineering management module is further used to trigger the editing service component, compiling service component, or debugging component to respond to the corresponding request according to the received request.

7. The network version PLC programming platform according to any one of claims 1 to 6, characterized in that: Also includes: The log service module is used to record the configuration process, compilation process, debugging process, and / or control operation process of PLC project resources through log files; The network disk is also used to store the log files; The network disk service module is further configured to write or read the log files provided by the log service module into or from the network disk.

8. A PLC programming method, characterized in that: Using the network version PLC programming platform according to any one of claims 1 to 7, the method comprises: receiving a request from a user terminal; When the request is identified as a compile operation request, the PLC project resource to be compiled by the compile operation request is read from the network disk; Compiling the PLC project resources through the compilation service component to generate a compilation result file including the target program and writing it to the network disk; The compiled result file written into the network disk is returned to the user terminal.

9. The PLC programming method according to claim 8, characterized in that: The method specifically includes: The PLC project engineering management module receives a request from the user terminal through the API module; When the PLC project engineering management module identifies the request as a compilation operation request, it requests the PLC project resource to be compiled by the compilation operation request from the network disk service module, and receives a HASH value returned by the network disk service module that has a mapping relationship with the storage location of the PLC project resource in the network disk; The engineering compilation preprocessing and data verification service module requests the PLC project resources from the network disk service module according to the HASH value, and receives the PLC project resources returned by the network disk service module; The project compilation preprocessing and data verification service module, the compilation front-end service module, and the compilation back-end service module complete the compilation process of the PLC project resources, generate a compilation result file containing the target program, and upload the compilation result file to the network disk through the network disk service module; The PLC project engineering management receives the compilation completion status information broadcast by the network disk service module, downloads the compilation result file from the network disk through the network disk service module, and returns it to the user terminal through the API module.

10. The PLC programming method according to claim 8, characterized in that: Also includes at least one of the following: When the request is identified as a configuration operation request, responding to the configuration operation request through the editing service component to configure the PLC project resources; writing the configured PLC project resources to the network disk through the network disk service module; When the request is identified as a breakpoint debugging or operation control request, the target program is read from the network disk through the network disk service module and installed into the target PLC; the debugging process is executed through the breakpoint debugging module, or the operation control service module is used to control the target PLC to run the target program according to the user's control.

Citation Information

Patent Citations

  • PLC programming language compiling method based on BS architecture

    CN119179489A

Cited By

  • Simulation method, device and equipment of PLC (Programmable Logic Controller) and medium

    CN121634886A