PLC programming method and device based on information model
Through information model and visual view, IO data management problems in traditional PLC programming methods are solved, the intuitiveness and efficiency of PLC programming are realized, and the programming process in complex systems is simplified.
Patent Information
- Application Number
- CN202411296930.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional PLC programming methods are difficult to intuitively manage IO data, and lack of visual interfaces, making it difficult to understand and maintain the code, especially in large systems or complex industrial applications, which are difficult to quickly locate programming objects.
PLC programming method based on information model, by establishing information models and visual views, including ontology views and process views, allows users to intuitively locate and program software and hardware modules and IO data, and use graphical interface tools to generate a tree-like information model , supports drag and drop operations to introduce target nodes into the programming interface.
It improves the intuitiveness and ease of use of PLC programming, allows users to quickly locate and program key nodes, optimizes the programming process, reduces errors, and improves the overall performance of the system.
Smart Images

Figure CN119105397A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of PLC programming, and in particular to a PLC programming method and device based on an information model. Background Art
[0002] PLC (Programmable Logic Controller) programming software is a key tool used to develop and manage PLC systems. PLC programming software provides a user-friendly interface that enables users to create, edit and debug logic control programs to control various devices and processes in automation systems.
[0003] However, the traditional PLC programming method relies on directly manipulating register addresses or variable names to manage IO data, which makes the code difficult to understand and maintain, especially in large systems or complex industrial applications. At the same time, the relevant programming software often cannot intuitively represent or reflect the hardware configuration, process flow and their interrelationships, and lacks an easy-to-understand and interactive visual interface, which makes it difficult for users to intuitively identify and operate components related to specific process flows. Therefore, there is an urgent need for a PLC programming method that can quickly and intuitively locate the programming object. Summary of the invention
[0004] The present disclosure provides a PLC programming method and device based on an information model, aiming to solve the problems existing in the above-mentioned background technology.
[0005] In order to solve the above technical problems, the present disclosure is implemented as follows:
[0006] In a first aspect, an embodiment of the present disclosure provides a PLC programming method based on an information model, the method comprising:
[0007] Establishing an information model based on various software and hardware modules and IO data in the PLC system, wherein the IO data is collected by the PLC system according to the process flow;
[0008] The information model is loaded in the PLC programming software, and a visualization view is established for the information model, wherein the visualization view includes an entity view and a process view, wherein the entity view is used to display the nodes corresponding to the software and hardware modules and their composition relationships, and the process view is used to display the organizational relationships of the nodes corresponding to the software and hardware modules and IO data as the acquisition or control objects in the process flow;
[0009] Locating a target node in the information model in the visualization view according to a key field of a desired programming object;
[0010] In response to the user dragging the target node to the self-programming interface of the PLC programming software, the target node is connected to an editable program for programming.
[0011] Optionally, the information model is established based on various software and hardware modules and IO data in the PLC system, including:
[0012] Identify and enumerate all software and hardware modules in the PLC system, and collect IO data collected by the IO module according to the process flow;
[0013] Create one-to-one corresponding nodes for each software and hardware module and IO data;
[0014] Define the hierarchical structure and association relationship of each node, and define the attribute information of each node, the attribute information includes node ID, node browser name, node name, node type, data type and data value;
[0015] Organize each node according to its own hierarchical structure and association relationship to obtain an information model including the attribute information of each node.
[0016] Optionally, the information model is a tree structure; the information model including attribute information of each node is obtained by organizing each node according to its own hierarchical structure and association relationship, including:
[0017] According to the hierarchical structure and association relationship of each software and hardware module and IO data in the PLC system, determine the hierarchical structure and parent-child node relationship of the nodes corresponding to each software and hardware module and IO data;
[0018] According to the hierarchical structure of each node and the parent-child node relationship, a tree-structured information model is constructed.
[0019] Optionally, an ontology view is established for the information model according to the following steps:
[0020] Determining all ontology nodes in the information model, wherein the ontology nodes are nodes corresponding to the software and hardware modules in the PLC system;
[0021] Organizing and arranging each entity node according to the composition relationship between each software and hardware module in the PLC system;
[0022] Use graphical interface tools to generate visual ontology views.
[0023] Optionally, a process view is established for the information model according to the following steps:
[0024] Determine all process nodes in the information model, where the process nodes are nodes corresponding to the software or hardware modules or IO data that are collected or controlled in the PLC system;
[0025] Organizing and arranging each process node according to the organizational relationship of the process node in the process flow of the PLC system;
[0026] Use graphical interface tools to generate visual process views.
[0027] Optionally, locating a target node in the information model in the visualization view according to a key field of the required programming object includes:
[0028] According to a key field typed by a user in the visualization view, a target node matching the key field is determined, wherein the key field is a node ID or a node browsing name;
[0029] Checking the attribute information of the target node to verify whether the target node is a desired programming object;
[0030] If the verification is successful, the target node is highlighted or marked in the visual view.
[0031] Optionally, in response to the user dragging the target node to the self-programming interface of the PLC programming software, the target node is connected to an editable program for programming, including:
[0032] In response to a user dragging the target node to the self-programming interface of the PLC programming software, triggering a placement event handler, the placement event handler being configured to create a corresponding node object for the target node;
[0033] Creating a node object type icon for the node object, wherein the node object type icon uses a node ID or a node browse name as a unique identifier;
[0034] The target node or the attribute information of the target node is connected to an editable program for programming.
[0035] Optionally, the visualization view includes an extended view, and the extended view is used to display a complete view of the information model;
[0036] The method further comprises:
[0037] In response to a user clicking operation on the node object in the visualization view or the self-programming interface, attribute information of the node corresponding to the node object is displayed in the visualization view or the self-programming interface.
[0038] Optionally, the method further comprises: establishing association relationships between nodes in the information model, wherein the association relationships include reference relationships, operation relationships, and backup relationships;
[0039] When the association relationship between the target association node and other nodes is a reference relationship, the attribute information of the target association node is referenced to the other nodes;
[0040] In the case where the association relationship between the target association node and other nodes is an operation relationship, defining a control instruction for the target association node to operate the other nodes, and performing corresponding operations on the other nodes according to the control instruction;
[0041] When the association relationship between the target associated node and other nodes is a backup relationship, a backup rule for backing up the target associated node to the other nodes is defined, and the data or state of the target associated node is backed up to the other nodes according to the backup rule.
[0042] In a second aspect, an embodiment of the present disclosure provides a PLC programming device based on an information model, the device comprising:
[0043] A model building module, used to build an information model based on various software and hardware modules and IO data in the PLC system, wherein the IO data is collected by the PLC system according to the process flow;
[0044] A view establishment module, used to load the information model in the PLC programming software and establish a visual view for the information model, wherein the visual view includes an entity view and a process view, wherein the entity view is used to display the nodes corresponding to the software and hardware modules and their composition relationships, and the process view is used to display the organizational relationships of the nodes corresponding to the software and hardware modules and IO data as the acquisition or control objects in the process flow;
[0045] A positioning module, used to locate a target node in the information model in the visualization view according to a key field of a desired programming object;
[0046] The programming module is used to connect the target node to an editable program for programming in response to the user dragging the target node to the self-programming interface of the PLC programming software.
[0047] Optionally, the information model building module includes:
[0048] The identification submodule is used to identify and enumerate all the software and hardware modules in the PLC system, and collect the IO data collected by the IO module according to the process flow;
[0049] The creation submodule is used to create a one-to-one corresponding node for each software and hardware module and IO data; the definition submodule is used to define the hierarchy and association relationship of each node, and define the attribute information of each node, the attribute information includes node ID, node browser name, node name, node type, data type and data value;
[0050] The organization submodule is used to organize each node according to its own hierarchical structure and association relationship to obtain an information model including attribute information of each node.
[0051] Optionally, the information model is a tree structure; the organization submodule includes:
[0052] A determination unit, configured to determine the hierarchical structure and parent-child node relationship of the nodes corresponding to each software and hardware module and IO data according to the hierarchical structure and association relationship of each software and hardware module and IO data in the PLC system;
[0053] The construction unit is used to construct a tree-structured information model according to the hierarchical structure of each node and the parent-child node relationship.
[0054] Optionally, the device further comprises:
[0055] An ontology node determination module, used to determine all ontology nodes in the information model, wherein the ontology nodes are nodes corresponding to the software and hardware modules in the PLC system;
[0056] The ontology node organization module is used to organize and arrange the ontology nodes according to the composition relationship between the software and hardware modules in the PLC system;
[0057] The ontology view generation module is used to generate a visual ontology view using a graphical interface tool.
[0058] Optionally, the device further comprises:
[0059] A process node determination module, used to determine all process nodes in the information model, wherein the process nodes are nodes corresponding to the software or hardware modules or IO data as acquisition or control objects in the PLC system;
[0060] A process node organization module, used to organize and arrange each process node according to the organizational relationship of the process node in the process flow of the PLC system;
[0061] The process view generation module is used to generate a visual process view using a graphical interface tool.
[0062] Optionally, the positioning module includes:
[0063] A target node determination submodule, used to determine a target node matching the key field according to a key field entered by a user in the visualization view, wherein the key field is a node ID or a node browsing name;
[0064] A checking submodule, used to check the attribute information of the target node and verify whether the target node is a required programming object;
[0065] The marking submodule is used to highlight or mark the target node in the visual view when the verification is passed.
[0066] Optionally, the programming module includes:
[0067] A node object creation submodule, configured to trigger a placement event handler in response to a user dragging the target node to the self-programming interface of the PLC programming software, wherein the placement event handler is configured to create a corresponding node object for the target node;
[0068] An object type icon creation submodule is used to create a node object type icon for the node object, wherein the node object type icon uses a node ID or a node browsing name as a unique identifier;
[0069] The programming submodule is used to connect the target node or the attribute information of the target node to an editable program for programming.
[0070] Optionally, the visualization view includes an extended view, and the extended view is used to display a complete view of the information model; the device further includes:
[0071] The click module is used to display the attribute information of the node corresponding to the node object in the visual view or the self-programming interface in response to the user's click operation on the node object in the visual view or the self-programming interface.
[0072] Optionally, the device further comprises:
[0073] An association relationship establishment module, used to establish association relationships between various nodes in the information model, wherein the association relationships include reference relationships, operation relationships, and backup relationships;
[0074] A reference module, used for, when the association relationship between the target association node and other nodes is a reference relationship, referencing the attribute information of the target association node to the other nodes;
[0075] An operation module, used for defining a control instruction for the target associated node to operate the other nodes when the association relationship between the target associated node and the other nodes is an operation relationship, and performing corresponding operations on the other nodes according to the control instruction;
[0076] The backup module is used to define a backup rule for backing up the target associated node to other nodes when the association relationship between the target associated node and other nodes is a backup relationship, and to back up the data or status of the target associated node to the other nodes according to the backup rule.
[0077] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of a PLC programming method based on an information model when executed by the processor.
[0078] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a PLC programming method based on an information model are implemented.
[0079] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0080] The present disclosure makes PLC programming more intuitive and easy to understand by establishing information models and visual views, allowing users to quickly and intuitively locate the key nodes of the required programming objects. Users can directly introduce target nodes into the programming interface through simple drag and drop operations, thereby achieving rapid program development. The present disclosure visualizes the functional structure and process flow of hardware and software, providing users with a more intuitive working environment, making the design and debugging of control logic more direct and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for describing the embodiments of the present disclosure are briefly introduced below.
[0082] Figure 1 It is a schematic diagram of the steps of a PLC programming method based on an information model according to an embodiment of the present disclosure;
[0083] Figure 2 It is a schematic diagram of a mapping relationship between a PLC ontology and an information model shown in an embodiment of the present disclosure;
[0084] Figure 3 It is a simplified schematic diagram of a PLC programming software interface shown in an embodiment of the present disclosure;
[0085] Figure 4 It is a structural block diagram of a PLC programming device based on an information model shown in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0087] In order to solve the problems of poor visualization of software, hardware and process flow and low programming efficiency in related technologies, the present disclosure aims to optimize the programming process by creating and using information models and their related visualization views, thereby improving the comprehensibility and maintainability of the program, reducing programming errors and improving the overall performance of the system. Figure 1 FIG. 1 is a schematic diagram of a PLC programming method based on an information model according to an embodiment of the present disclosure. Figure 1 As shown, the method includes:
[0088] Step S101, establishing an information model based on various software and hardware modules and IO data in the PLC system, wherein the IO data is collected by the PLC system according to the process flow;
[0089] Step S102, loading the information model in the PLC programming software, and establishing a visualization view for the information model, wherein the visualization view includes an entity view and a process view, wherein the entity view is used to display the nodes corresponding to the software and hardware modules and their composition relationships, and the process view is used to display the organizational relationships of the nodes corresponding to the software and hardware modules and IO data as the acquisition or control objects in the process flow;
[0090] Step S103, locating a target node in the information model in the visualization view according to a key field of the required programming object;
[0091] Step S104, in response to the user dragging the target node to the self-programming interface of the PLC programming software, the target node is connected to an editable program for programming.
[0092] Involving step S101, in the disclosed embodiment, the hardware and software modules are the hardware modules and software modules contained in the PLC system. The hardware modules include the physical devices of the PLC, such as IO modules, CPU modules, power modules, communication modules, etc., and the software modules include the operating system, driver, programming software, communication protocols, etc. of the PLC. IO data is the data obtained by the PLC from a device or module with input and output characteristics through the IO module. IO data is divided into input data (such as sensor readings, switch states) and output data (such as control signals, actuator commands). It can be understood that the hardware and software modules are static information of the PLC system body, while IO data is dynamic information collected based on the PLC body.
[0093] The information model is established based on various software and hardware modules and IO data, and is an abstraction and description of various software and hardware modules, IO data and their relationships in the PLC system. The present disclosure does not limit the structure and hierarchy of the information model, and each hierarchy in the information model can be nested or topologically based on the actual PLC system and production environment.
[0094] Involving step S102, the information model established in step S101 needs to be loaded into the PLC programming software. The information model can be stored in XML, JSON or other structured file formats. By parsing these files, the information model is loaded into the PLC programming software. Based on the model information obtained by parsing, a visualization view is established for the information model to intuitively display the content in the information model, directly reflecting the physical architecture and control association relationship of the PLC system. The visualization view includes an entity view and a process view.
[0095] The ontology view is used to display the nodes corresponding to the software and hardware modules and their composition relationships, helping users (programmers) understand the hardware and software structure of the PLC system. For example, in a certain PLC system, the software and hardware modules are shown in Table 1. Each software and hardware module and its components will be displayed in the ontology view in the structure of the information model. For example, users can see the input and output channels contained in the IO module, the sensors and actuators connected to each channel, the processor and memory of the CPU module, the input and output of the power module, and the various ports of the communication module in the visualized and hierarchical structure of the ontology view.
[0096] The process view is used to show the organizational relationship of the nodes corresponding to the software and hardware modules and IO data as the acquisition or control objects in the process flow, helping users understand and optimize the control logic, so that the specific process flow is visualized. In the embodiment of the present disclosure, the organizational relationship is also the acquisition or control relationship, which reflects the controlled objects and control objects of each software and hardware module and each IO data. In an example of a conveyor belt control process, for the PLC system shown in Table 1, sensor 1 is specifically a start sensor, sensor 2 is specifically a stop sensor, and actuator 1 is specifically a conveyor belt motor. Then the process view of the IO module part should show the following logic: start sensor (input channel 1) → detect signal → transmit to processor; stop sensor (input channel 2) → detect signal → transmit to processor; processor judges according to input signal → sends motor control signal to output channel 1 → controls conveyor belt motor. Therefore, the input data of the start and stop sensors come from the specific input channel of the IO module, and the motor control signal is output to the output channel of the IO module. Here, only the acquisition / control relationship of the IO module is explained. Similarly, the nodes of the remaining modules are also similarly mapped to the actual hardware modules and software functions.
[0097] Through the main body view, users can clearly understand the configuration and connection of each part of the PLC system, while through the process view, users can clearly understand the logic and execution of each process flow. Combining the two, users can fully grasp the functions and operations of the PLC system.
[0098]
[0099] Table 1
[0100] In step S103, the user enters or selects a key field in the visualization view to search and locate the target node, allowing the user to quickly find the corresponding target node. For example, if the key field is the name of a sensor, the user can enter the sensor name in the body view or process view, and automatically locate the sensor node in the visualization view based on the sensor name. After the target node is located, the user can confirm whether the target node is the required programming object as needed, specifically, by viewing the node's attribute information.
[0101] Involving step S104, the user can complete the drag operation with the mouse, click the target node and drag it to the programming area. After the target node is dragged to the programming interface, optionally, a program framework or template is automatically generated by the PLC programming software, including basic information and default settings of the target node. For example, if the target node is a sensor, the program framework includes the initialization code, data acquisition code, etc. of the sensor. The user edits the program logic of the target node according to actual needs. The programming logic may include data acquisition, processing, conditional judgment, control signal output, etc. For another example, if the target node is a start sensor, the user needs to write logic to detect the sensor signal and trigger the corresponding control operation, such as starting a conveyor belt.
[0102] The present disclosure makes PLC programming more intuitive and easy to understand by establishing information models and visual views, allowing users to quickly and intuitively locate the key nodes of the required programming objects. Users can directly introduce target nodes into the programming interface through simple drag and drop operations, thereby achieving rapid program development. The present disclosure visualizes the functional structure and process flow of hardware and software, providing users with a more intuitive working environment, making the design and debugging of control logic more direct and efficient.
[0103] Exemplarily, the information model is established based on various software and hardware modules and IO data in the PLC system, including:
[0104] Identify and enumerate all the software and hardware modules in the PLC system, and collect the IO data collected by the IO module according to the process flow; create a one-to-one corresponding node for each software and hardware module and IO data; define the hierarchy and association relationship of each node, and define the attribute information of each node, the attribute information includes node ID, node browse name, node name, node type, data type and data value; organize each node according to its own hierarchy and association relationship to obtain an information model including the attribute information of each node.
[0105] Before establishing the information model, the entire PLC system is first comprehensively identified and scanned to identify and enumerate all existing software and hardware modules. As shown in Table 1, the software and hardware modules include hardware modules (such as IO modules, CPU modules, power modules, communication modules, etc.) and software modules (such as PLC operating system, driver, programming software, communication protocol, etc.). Next, the IO data collected by the IO module is collected. IO data is dynamic and includes sensor readings, switch states (input data), and control signals and actuator commands (output data).
[0106] Create a corresponding node for each identified hardware and software module and collected IO data. The node is the basic unit in the information model, representing a specific part of the PLC system. Node types include hardware module nodes (such as IO module nodes, CPU module nodes), software module nodes (such as operating system nodes, driver nodes) and IO data nodes (such as sensor nodes, actuator nodes). Each node needs to have a clear hierarchy and association relationship to reflect the overall architecture of the PLC system and the relationship between each part. The nodes corresponding to the IO module and the CPU module are nodes belonging to the same level, and the nodes corresponding to the sensor and the processor are nodes of another level. The sensor node (input) is associated with the CPU processor node (processing), and the CPU processor node is associated with the actuator node (output). In addition, each node also needs to define detailed attribute information, including node ID, node browser name, node name, node type, data type and data value. Specifically, the node ID is an identifier that uniquely identifies the node; the node browse name is the name used for user interface display; the node name is the official name of the node; the node type is the type of the node, such as hardware node, software node, IO data node; the data type is the type of node data (such as integer, floating point number, string, etc.); the data value is the current data value or state of the node. In the above example of the conveyor control process, for input channel 1 (sensor node), its attribute information can be defined as: node ID = 1, node browse name = Start_Sensor, node name = Start sensor, node type = input data, data type = Boolean value, data value = 0. Finally, all nodes are organized according to the defined hierarchical structure and association relationship to form a complete information model. In the information model, each node has defined its own attribute information, so the information model can be used to represent the physical structure, control logic, and real-time data of the PLC system.
[0107] Figure 2 is a schematic diagram showing a mapping relationship between a PLC ontology and an information model according to an embodiment of the present disclosure, such as Figure 2As shown in the figure, the entire PLC system is abstracted as an overall object, namely the PLC object, in the information model. The PLC object represents the collection of the entire PLC system, including all hardware and software modules. Through the mapping relationship, the information model can fully describe the overall architecture and functions of the PLC system. More specifically, the physical properties of the PLC system (such as voltage, current, position, etc.) are mapped as variables, describing the actual physical characteristics of the PLC system and helping users understand the physical state of the system. Operations in the PLC system (such as start, stop, restart, etc.) are mapped as methods, defining the functions that the PLC system can perform, and are represented as methods of the PLC object in the information model. Each hardware and software module in the PLC system (such as IO module, CPU module, etc.) is mapped as an object. Each hardware and software module exists as an independent object in the information model, representing the components of the PLC system. The attribute information of each hardware and software module (such as the input and output channels of the IO module, the processor and memory of the CPU module, etc.) is mapped as a variable, describing the detailed attributes of the module. For example, the attributes of the IO module include input channels and output channels, and the attributes of the CPU module include processor type and memory size. In the information model, these attributes are mapped to variables. For example, the input channel 1 of the IO module is mapped to a variable, indicating the sensor connected to the channel; the processor type of the CPU module is mapped to a variable, indicating the specific model of the processor. The subcomponents inside the module (such as the specific channels of the IO module, the processor and memory of the CPU module, etc.) are mapped to sub-objects, which further decompose the internal structure of the module and describe its detailed composition. The reference relationship between modules (such as the attribute of a module referencing another module) is mapped to a reference attribute relationship. These relationships reflect the interdependence and association of different parts in the system. The above mapping relationship from the PLC ontology to the information model can clearly represent the various components of the PLC system and their interrelationships in the information model, thereby realizing the visualization and efficient programming of the system. The information model not only helps users understand the overall architecture and detailed configuration of the system, but also supports the rapid positioning and editing of programming objects, improves programming efficiency and system performance, and provides a basis for subsequent visualization view generation and programming operations.
[0108] Exemplarily, the information model is a tree structure; the information model including attribute information of each node is obtained by organizing each node according to its own hierarchical structure and association relationship, including:
[0109] According to the hierarchical structure and association relationship of each software and hardware module and IO data in the PLC system, the hierarchical structure and parent-child node relationship of the nodes corresponding to each software and hardware module and IO data are determined; according to the hierarchical structure and parent-child node relationship of each node, a tree-structured information model is constructed.
[0110] In the disclosed embodiment, the information model can be a typical tree structure. First, determine the position of each node in the overall structure, that is, the hierarchical structure of each node. Then, according to these hierarchical structures, determine the parent node and child node relationship of each node to reflect the logical connection between the nodes. In the PLC system shown in Table 1, the top-level node can be defined as the main controller (root node) of the PLC system, the second-level node can be defined as the hardware module node and the software module node, the third-level node (the child node under the hardware module) can be defined as the IO module node and the CPU module node, the fourth-level node (the child node under the IO module) can be defined as the input channel node (sensor node) and the output channel node (actuator node), and similarly, the fourth-level node (the child node under the CPU module) also includes a processor node and a memory node. It can be seen that the main controller of the PLC system is the root node, and all other nodes are its child nodes. The hardware module and the software module are the second-layer nodes, which are directly subordinate to the PLC system. There are IO modules and CPU modules under the hardware module, which are the child nodes of the hardware module, respectively, in the third layer, and the input channel 1, input channel 2 and output channel 1 under the IO module are the fourth-layer nodes, which are the child nodes of the IO module, and the processor and memory under the CPU module are the fourth-layer nodes, which are the child nodes of the CPU module. The operating system, driver and programming software under the software module are the third-layer nodes, which are the child nodes of the software module. According to the hierarchical structure and parent-child relationship described above, a tree-structured information model is constructed, which helps to clearly represent the subordinate relationship and connection relationship between nodes. As mentioned above, here only the hierarchy and correlation analysis of the tree structure is carried out by taking the actual production scene as an example, which does not mean that the present disclosure limits the number of levels or a fixed structure. The information model can be constructed in layers according to the configuration of the hardware and software modules of the actual PLC system.
[0111] The tree-structured information model clearly shows the hierarchy and connection relationship of each part, making it easier to understand and manage the PLC system. The tree-structured information model makes programming, debugging and maintenance easier, improving the understandability and maintainability of the PLC system.
[0112] Exemplarily, the ontology view is established for the information model according to the following steps:
[0113] All ontology nodes are determined in the information model, where the ontology nodes are nodes corresponding to the software and hardware modules in the PLC system; the ontology nodes are organized and arranged according to the composition relationship between the software and hardware modules in the PLC system; and a visual ontology view is generated using a graphical interface tool.
[0114] Determine the ontology nodes of all hardware modules in the PLC system from the information model. These ontology nodes are the nodes corresponding to the software and hardware modules in the PLC system, reflecting the actual physical devices, which is equivalent to the mapping of the PLC ontology. According to the composition relationship between the various software and hardware modules in the PLC system, these ontology nodes are organized and arranged to show the hierarchy and relationship between each module. In the PLC system shown in Table 1, the composition relationship of some modules is as follows: the power module is connected to the CPU module, the CPU module manages the IO module and the communication module, the PLC operating system runs on the CPU module, the driver interacts with the IO module and the communication module, the programming software transmits data through the communication module, and the communication protocol supports the data transmission of the communication module. Table 2 shows the simplified ontology view logic under this logic:
[0115]
[0116] Table 2
[0117] Finally, a graphical interface tool is used to generate a visual ontology view. The graphical interface tool can be a dedicated PLC programming software that supports displaying the above ontology nodes and their relationships in a graphical manner.
[0118] Through the above steps, an intuitive ontology view can be created to help users clearly understand the hardware and software structure of the PLC system and the relationship between them. This visual ontology view can improve the comprehensibility and maintainability of the program, thereby optimizing the programming process, reducing programming errors, and improving the overall performance of the system.
[0119] Through the above steps, an intuitive process view can be created to help users clearly understand the control flow and logical relationship of the PLC system. The visual process view can optimize the programming process, allowing users to better understand and debug the control logic, thereby reducing programming errors and improving the overall performance of the system.
[0120] Exemplarily, a process view is established for the information model according to the following steps:
[0121] All process nodes are determined in the information model, where the process nodes are nodes corresponding to the software or hardware modules or IO data that are acquisition or control objects in the PLC system; the various process nodes are organized and arranged according to the organizational relationship of the process nodes in the process flow of the PLC system; and a visual process view is generated using a graphical interface tool.
[0122] Determine all process nodes in the information model. Process nodes represent the software and hardware modules or IO data that are collected or controlled in the PLC system. Process nodes mainly include input and output data, such as sensor readings and actuator control signals. According to the organizational relationship of process nodes in the process flow of the PLC system, these process nodes are organized and arranged to show the process and logical relationship of process nodes in actual operation. In the example of the conveyor belt control process mentioned above, some of the organizational relationships of process nodes are as follows:
[0123] 1. The start sensor detects the start signal;
[0124] 2. The control processor receives a start signal;
[0125] 3. The control processor determines the start signal and sends a control signal to the conveyor motor;
[0126] 4. The conveyor belt motor starts;
[0127] 5. The stop sensor detects a stop signal;
[0128] 6. The control processor receives a stop signal;
[0129] 7. The control processor determines the stop signal and sends a stop signal to the conveyor motor;
[0130] 8. The conveyor motor stops. According to the above process flow, the process nodes are arranged as: start sensor node, start sensor reading node, control processor node, conveyor motor control signal node, conveyor motor node, stop sensor node, stop sensor reading node, control processor node, conveyor motor control signal node, conveyor motor node. Table 3 shows the simplified ontology view logic under this logic. As shown in Table 3, the process flow summary of the two branch lines of the motor control conveyor is shown horizontally from left to right.
[0131]
[0132] Table 3
[0133] Finally, a graphical interface tool is used to generate a visual process view, which supports the graphical display of the above process nodes and their relationships.
[0134] Through the above steps, an intuitive process view can be created to help users clearly understand the control flow and logical relationship of the PLC system. The visual process view can optimize the programming process, allowing users to better understand and debug the control logic, thereby reducing programming errors and improving the overall performance of the system.
[0135] Figure 3is a simplified schematic diagram of a PLC programming software interface shown in an embodiment of the present disclosure, such as Figure 3 As shown, the PLC programming software interface is designed with multiple views and interactive areas to enable users to efficiently perform programming and system management. The main interfaces include: main body view, process view, extended view and self-programming interface. Users can browse by clicking on different views (main body view, process view, extended view) on the interface. The arrangement position and fixing method between the views are not limited in this disclosure.
[0136] Exemplarily, locating a target node in the information model in the visualization view according to a key field of a required programming object includes:
[0137] According to the key field typed by the user in the visual view, a target node matching the key field is determined, where the key field is a node ID or a node browse name; the attribute information of the target node is checked to verify whether the target node is the required programming object; if the verification passes, the target node is highlighted or marked in the visual view.
[0138] According to the key fields typed by the user in the visualization view, determine the target nodes that match the key fields. Scan the information model according to the key fields to find the matching target nodes. Suppose the user needs to find the nodes related to "start sensor". The user types the key field "start sensor" in the search box of the visualization view. The key field can be a node ID or a node browse name. Suppose the ID of the "start sensor" node is "SensorStart001" and the browse name is "start sensor node". Scan the information model according to the key fields typed by the user to find the nodes that match the key field "start sensor". The following matching results are found: Node ID: SensorStart001, Node browse name: Start sensor node.
[0139] After finding the matching target node, further check the attribute information of the target node to ensure that it is the required programming object. Assume that the attribute information of the matched target node is as follows:
[0140] Node ID: SensorStart001;
[0141] Node Browse Name: Start sensor node;
[0142] Type: sensor;
[0143] Location: Conveyor belt entrance;
[0144] Current status: Active, verify these attribute information, such as: whether the node type is "sensor", whether the node position is at the conveyor belt entrance, whether the node current status is active, if the attribute information meets the requirements, confirm that the target node is the required programming object, and highlight or mark the target node in the visual view so that users can quickly locate it. Through the above steps, users can quickly and accurately locate the required programming object in a complex PLC system, greatly improving the efficiency of programming and debugging.
[0145] Exemplarily, in response to the user dragging the target node to the self-programming interface of the PLC programming software, the target node is connected to an editable program for programming, including:
[0146] In response to the user dragging the target node to the self-programming interface of the PLC programming software, a placement event handler is triggered, and the placement event handler is configured to create a corresponding node object for the target node; create a node object type icon for the node object, and the node object type icon uses a node ID or a node browse name as a unique identifier; and connect the target node or the attribute information of the target node to an editable program for programming.
[0147] like Figure 3 As shown, the self-programming interface can be a view adjacent to the visualization view, or the self-programming interface can be configured in the interface of the visualization view according to user needs. In response to the user dragging the target node to the self-programming interface of the PLC programming software, the placement event handler is triggered, and the placement event handler is responsible for processing the user's drag and drop operation. The placement event handler first creates a corresponding node object for the target node. In the programming environment, this node object contains all the attribute information of the target node. Creating a node object type icon for the target node object is equivalent to making the target node have a graphic symbol representation in the self-programming interface. The icon is used as a visual representation of the node object in the self-programming interface, and the node ID or node browse name is used as the unique identifier. For example, a graphic symbol is created for "start sensor node object", which is represented as a sensor icon and identified as "SensorStart001" or "start sensor node". Finally, the icon of the target node and its attribute information are connected to the editable program, and the user can reference and operate the node object of the target node or the attribute information of the target node in the program.
[0148] Through the above steps, users can intuitively and conveniently connect the target nodes in the visualization view to the PLC programming environment, and quickly write control logic to achieve automatic control of the system.
[0149] Exemplarily, the visualization view includes an extended view, and the extended view is used to display a complete view of the information model; the method further includes:
[0150] In response to a user clicking operation on the node object in the visualization view or the self-programming interface, attribute information of the node corresponding to the node object is displayed in the visualization view or the self-programming interface.
[0151] like Figure 3 As shown in the figure, the visualization view includes an extended view based on the main view and process view. The extended view shows a complete view of the information model, including all nodes and their hierarchical structure and association relationships. The user switches to the extended view in the PLC programming software, which shows a complete view of the information model, including all hardware modules, software modules and IO data. The user can view and navigate the hierarchy and association relationships of each node in the extended view.
[0152] When the user clicks on a node object in the visualization view or the self-programming interface, the system will respond to the click operation and display the detailed attribute information of the node object. Suppose the user sees a sensor node in the process view and clicks on it to view the detailed information. The interface will display all the attribute information of the sensor. Optionally, the attribute information is displayed in a fixed window or a small window that follows. The display window can be adjusted according to the user's configuration. Providing an intuitive visualization view, users can easily view and operate the node objects in the information model and quickly perform programming and debugging.
[0153] Exemplarily, the method further includes:
[0154] An association relationship is established between each node in the information model, and the association relationship includes a reference relationship, an operation relationship and a backup relationship; when the association relationship between the target association node and other nodes is a reference relationship, the attribute information of the target association node is referenced to the other nodes; when the association relationship between the target association node and other nodes is an operation relationship, a control instruction for the target association node to operate the other nodes is defined, and corresponding operations are performed on the other nodes according to the control instruction; when the association relationship between the target association node and other nodes is a backup relationship, a backup rule for backing up the target association node to the other nodes is defined, and the data or status of the target association node is backed up to the other nodes according to the backup rule.
[0155] In the information model, associations are established between nodes to reflect the interactions and dependencies between components in the system. Associations can help users understand and operate these components, making programming more intuitive and efficient. Specifically, there are three types of associations: reference relationships, operation relationships, and backup relationships.
[0156] A reference relationship is defined as a node that can reference the attribute information of another node. Reference relationships are often used to reuse the same data or configuration in different contexts. Suppose in a PLC system, there are two sensor nodes "Temperature Sensor 1" and "Temperature Sensor 2" with the same calibration parameters. The calibration parameters of "Temperature Sensor 1" can be referenced in the "Temperature Sensor 2" node without having to define these parameters repeatedly.
[0157] An operation relationship is defined as one node can operate another node, usually involving control instructions and execution logic. For example, a controller node as a target associated node can send a control signal to an actuator node, triggering it to perform a specific operation. Assume that a PLC system has a controller node "Controller 1" and an actuator node "Motor 1", and the controller node needs to start and stop the motor node. Establish an operation relationship between the "Controller 1" node and the "Motor 1" node, and define the control instructions of the "Controller 1" node to the "Motor 1" node, such as start and stop.
[0158] The backup relationship is defined as the data or state of a node can be backed up to another node, ensuring that the PLC system can be restored to a normal state when a failure occurs. The backup relationship involves the definition and execution of backup rules. Assume that a PLC system has a data node "Data Node 1" as the target association node and a backup node "Backup Node 1". The data of "Data Node 1" needs to be backed up to "Backup Node 1" regularly. Establish a backup relationship between the "Data Node 1" node and the "Backup Node 1" node, and define the data backup rules of the "Data Node 1" node, such as backing up once every hour.
[0159] By establishing the above-mentioned association relationships, PLC programming software can provide powerful functions to help users efficiently manage and operate each node in the information model and ensure the reliability and maintainability of the PLC system.
[0160] Figure 4 is a structural block diagram of a PLC programming device based on an information model shown in an embodiment of the present disclosure, such as Figure 4 As shown, the device comprises:
[0161] A model building module 201 is used to build an information model based on various software and hardware modules and IO data in the PLC system, wherein the IO data is collected by the PLC system according to the process flow;
[0162] A view establishment module 202 is used to load the information model in the PLC programming software and establish a visual view for the information model, wherein the visual view includes an entity view and a process view. The entity view is used to display the nodes corresponding to the software and hardware modules and their composition relationships. The process view is used to display the organizational relationships of the nodes corresponding to the software and hardware modules and IO data as the acquisition or control objects in the process flow.
[0163] A positioning module 203, configured to locate a target node in the information model in the visualization view according to a key field of a required programming object;
[0164] The programming module 204 is used to connect the target node to an editable program for programming in response to the user dragging the target node to the self-programming interface of the PLC programming software.
[0165] Exemplarily, the information model building module includes:
[0166] The identification submodule is used to identify and enumerate all the software and hardware modules in the PLC system, and collect the IO data collected by the IO module according to the process flow;
[0167] Create submodules to create one-to-one corresponding nodes for each software and hardware module and IO data;
[0168] A definition submodule is used to define the hierarchical structure and association relationship of each node, and to define the attribute information of each node, wherein the attribute information includes node ID, node browse name, node name, node type, data type and data value;
[0169] The organization submodule is used to organize each node according to its own hierarchical structure and association relationship to obtain an information model including attribute information of each node.
[0170] Exemplarily, the information model is a tree structure; the organization submodule includes:
[0171] A determination unit, configured to determine the hierarchical structure and parent-child node relationship of the nodes corresponding to each software and hardware module and IO data according to the hierarchical structure and association relationship of each software and hardware module and IO data in the PLC system;
[0172] The construction unit is used to construct a tree-structured information model according to the hierarchical structure of each node and the parent-child node relationship.
[0173] Exemplarily, the device further comprises:
[0174] An ontology node determination module, used to determine all ontology nodes in the information model, wherein the ontology nodes are nodes corresponding to the software and hardware modules in the PLC system;
[0175] The ontology node organization module is used to organize and arrange the ontology nodes according to the composition relationship between the software and hardware modules in the PLC system;
[0176] The ontology view generation module is used to generate a visual ontology view using a graphical interface tool.
[0177] Exemplarily, the device further comprises:
[0178] A process node determination module, used to determine all process nodes in the information model, wherein the process nodes are nodes corresponding to the software or hardware modules or IO data as acquisition or control objects in the PLC system;
[0179] A process node organization module, used to organize and arrange each process node according to the organizational relationship of the process node in the process flow of the PLC system;
[0180] The process view generation module is used to generate a visual process view using a graphical interface tool.
[0181] Exemplarily, the positioning module includes:
[0182] A target node determination submodule, used to determine a target node matching the key field according to a key field entered by a user in the visualization view, wherein the key field is a node ID or a node browsing name;
[0183] A checking submodule, used to check the attribute information of the target node and verify whether the target node is a required programming object;
[0184] The marking submodule is used to highlight or mark the target node in the visual view when the verification is passed.
[0185] Exemplarily, the programming module includes:
[0186] A node object creation submodule, configured to trigger a placement event handler in response to a user dragging the target node to the self-programming interface of the PLC programming software, wherein the placement event handler is configured to create a corresponding node object for the target node;
[0187] An object type icon creation module, used for creating a node object type icon for the node object, wherein the node object type icon uses a node ID or a node browsing name as a unique identifier;
[0188] The programming submodule is used to connect the target node or the attribute information of the target node to an editable program for programming.
[0189] Exemplarily, the visualization view includes an extended view, and the extended view is used to display a complete view of the information model; the apparatus further includes:
[0190] The click module is used to display the attribute information of the node corresponding to the node object in the visual view or the self-programming interface in response to the user's click operation on the node object in the visual view or the self-programming interface.
[0191] Exemplarily, the device further comprises:
[0192] An association relationship establishment module, used to establish association relationships between various nodes in the information model, wherein the association relationships include reference relationships, operation relationships, and backup relationships;
[0193] A reference module, used for, when the association relationship between the target association node and other nodes is a reference relationship, referencing the attribute information of the target association node to the other nodes;
[0194] An operation module, used for defining a control instruction for the target associated node to operate the other nodes when the association relationship between the target associated node and the other nodes is an operation relationship, and performing corresponding operations on the other nodes according to the control instruction;
[0195] The backup module is used to define a backup rule for backing up the target associated node to other nodes when the association relationship between the target associated node and other nodes is a backup relationship, and to back up the data or status of the target associated node to the other nodes according to the backup rule.
[0196] The embodiment of the present disclosure also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes in the above-mentioned PLC programming method embodiment based on the information model are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0197] The disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process in the above-mentioned PLC programming method embodiment based on the information model is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other.
[0198] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods and devices. Therefore, the embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0199] The embodiments of the present disclosure are described with reference to the flowcharts and / or block diagrams of the methods and devices according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0200] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.
[0201] Finally, it should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "include..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements. The above is a detailed introduction to a PLC programming method and device based on an information model provided by the present disclosure. The present disclosure is explained in detail using specific examples in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and its core idea of the present disclosure; at the same time, for those of ordinary skill in the art, according to the idea of the present disclosure, there will be changes in the specific implementation method and scope of application. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
Claims
1. A PLC programming method based on information model, characterized in that: The method comprises: Establishing an information model based on various software and hardware modules and IO data in the PLC system, wherein the IO data is collected by the PLC system according to the process flow; The information model is loaded in the PLC programming software, and a visualization view is established for the information model, wherein the visualization view includes an entity view and a process view, wherein the entity view is used to display the nodes corresponding to the software and hardware modules and their composition relationships, and the process view is used to display the organizational relationships of the nodes corresponding to the software and hardware modules and IO data as the acquisition or control objects in the process flow; Locating a target node in the information model in the visualization view according to a key field of a desired programming object; In response to the user dragging the target node to the self-programming interface of the PLC programming software, the target node is connected to an editable program for programming.
2. The method according to claim 1, characterized in that The information model is established based on various software and hardware modules and IO data in the PLC system, including: Identify and enumerate all software and hardware modules in the PLC system, and collect IO data collected by the IO module according to the process flow; Create one-to-one corresponding nodes for each software and hardware module and IO data; Define the hierarchical structure and association relationship of each node, and define the attribute information of each node, the attribute information includes node ID, node browser name, node name, node type, data type and data value; Organize each node according to its own hierarchical structure and association relationship to obtain an information model including the attribute information of each node.
3. The method according to claim 2, characterized in that The information model is a tree structure; the information model including attribute information of each node is obtained by organizing each node according to its own hierarchical structure and association relationship, including: According to the hierarchical structure and association relationship of each software and hardware module and IO data in the PLC system, determine the hierarchical structure and parent-child node relationship of the nodes corresponding to each software and hardware module and IO data; According to the hierarchical structure of each node and the parent-child node relationship, a tree-structured information model is constructed.
4. The method according to claim 1, characterized in that: Follow the steps below to build an ontology view for the information model: Determining all ontology nodes in the information model, wherein the ontology nodes are nodes corresponding to the software and hardware modules in the PLC system; Organizing and arranging each entity node according to the composition relationship between each software and hardware module in the PLC system; Use graphical interface tools to generate visual ontology views.
5. The method according to claim 1, characterized in that Follow the steps below to create a process view for the information model: Determine all process nodes in the information model, where the process nodes are nodes corresponding to the software or hardware modules or IO data that are collected or controlled in the PLC system; Organizing and arranging each process node according to the organizational relationship of the process node in the process flow of the PLC system; Use graphical interface tools to generate visual process views.
6. The method according to claim 4 or 5, characterized in that The locating a target node in the information model in the visualization view according to a key field of the required programming object includes: According to a key field typed by a user in the visualization view, a target node matching the key field is determined, wherein the key field is a node ID or a node browsing name; Checking the attribute information of the target node to verify whether the target node is a desired programming object; If the verification is successful, the target node is highlighted or marked in the visual view.
7. The method according to claim 2, characterized in that: In response to the user dragging the target node to the self-programming interface of the PLC programming software, the target node is connected to an editable program for programming, including: In response to a user dragging the target node to the self-programming interface of the PLC programming software, triggering a placement event handler, the placement event handler being configured to create a corresponding node object for the target node; Creating a node object type icon for the node object, wherein the node object type icon uses a node ID or a node browse name as a unique identifier; The target node or the attribute information of the target node is connected to an editable program for programming.
8. The method according to claim 7, characterized in that The visualization view includes an extended view, and the extended view is used to display a complete view of the information model; The method further comprises: In response to a user clicking operation on the node object in the visualization view or the self-programming interface, attribute information of the node corresponding to the node object is displayed in the visualization view or the self-programming interface.
9. The method according to claim 1, characterized in that: The method further comprises: establishing association relationships between nodes in the information model, wherein the association relationships include reference relationships, operation relationships, and backup relationships; When the association relationship between the target association node and other nodes is a reference relationship, the attribute information of the target association node is referenced to the other nodes; In the case where the association relationship between the target association node and other nodes is an operation relationship, defining a control instruction for the target association node to operate the other nodes, and performing corresponding operations on the other nodes according to the control instruction; When the association relationship between the target associated node and other nodes is a backup relationship, a backup rule for backing up the target associated node to the other nodes is defined, and the data or state of the target associated node is backed up to the other nodes according to the backup rule.
10. A PLC programming device based on an information model, characterized in that: The device comprises: A model building module, used to build an information model based on various software and hardware modules and IO data in the PLC system, wherein the IO data is collected by the PLC system according to the process flow; A view establishment module, used to load the information model in the PLC programming software and establish a visual view for the information model, wherein the visual view includes an entity view and a process view, wherein the entity view is used to display the nodes corresponding to the software and hardware modules and their composition relationships, and the process view is used to display the organizational relationships of the nodes corresponding to the software and hardware modules and IO data as the acquisition or control objects in the process flow; A positioning module, used to locate a target node in the information model in the visualization view according to a key field of a desired programming object; The programming module is used to connect the target node to an editable program for programming in response to the user dragging the target node to the self-programming interface of the PLC programming software.
11. The device according to claim 10, characterized in that The information model building module includes: The identification submodule is used to identify and enumerate all the software and hardware modules in the PLC system, and collect the IO data collected by the IO module according to the process flow; Create submodules to create one-to-one corresponding nodes for each software and hardware module and IO data; A definition submodule is used to define the hierarchical structure and association relationship of each node, and to define the attribute information of each node, wherein the attribute information includes node ID, node browse name, node name, node type, data type and data value; The organization submodule is used to organize each node according to its own hierarchical structure and association relationship to obtain an information model including attribute information of each node.
12. The device according to claim 11, characterized in that The information model is a tree structure; the organization submodule includes: A determination unit, configured to determine the hierarchical structure and parent-child node relationship of the nodes corresponding to each software and hardware module and IO data according to the hierarchical structure and association relationship of each software and hardware module and IO data in the PLC system; The construction unit is used to construct a tree-structured information model according to the hierarchical structure of each node and the parent-child node relationship.
13. The device according to claim 10, characterized in that The device also includes: An ontology node determination module, used to determine all ontology nodes in the information model, wherein the ontology nodes are nodes corresponding to the software and hardware modules in the PLC system; The ontology node organization module is used to organize and arrange the ontology nodes according to the composition relationship between the software and hardware modules in the PLC system; The ontology view generation module is used to generate a visual ontology view using a graphical interface tool.
14. The device according to claim 10, characterized in that The device also includes: A process node determination module, used to determine all process nodes in the information model, wherein the process nodes are nodes corresponding to the software or hardware modules or IO data as acquisition or control objects in the PLC system; A process node organization module, used to organize and arrange each process node according to the organizational relationship of the process node in the process flow of the PLC system; The process view generation module is used to generate a visual process view using a graphical interface tool.
15. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 9 are implemented.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Visual programming logic distribution control system and implementation method
CN106325233A
Visual programming control system, method and device
CN108594746A
Method for directly realizing control by process logic topological graph
CN109782720A
Soft PLC configuration software generation system based on FPGA platform
CN110376959A
Visual programming system
CN110704044A
Cited By
Compiling method and device of programmable logic control system and electronic equipment
CN120832151A
