Programmable logic controller program management method, device and equipment and storage medium

Through the integrated program management system, the PLC is backed up and compared and analyzed online in real-time and inefficient PLC data backup is solved, and real-time, effective data management and efficient troubleshooting are achieved.

CN119621433APending Publication Date: 2025-03-14CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411832317.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, the programmable logic controller (PLC) program and data backup method have problems such as untimely and inefficient data backup, which leads to easy loss in unexpected situations and affects the data management effect.

Method used

Through the integrated program management system, a program backup request is sent to the PLC to be backed up, the current program data is determined, and the program data is uploaded to the program management system for repetitive verification. After passing the verification, the data is backed up to the preset program library, and the current program data of the PLC is monitored, and it is compared with the backup data to achieve real-time and effective data management.

Benefits of technology

Real-time and effective backup of PLC data is realized, data loss caused by hardware failure or errors is avoided, production line continuity is ensured, and troubleshooting and repair efficiency is improved through comparative analysis, and data integrity and security are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621433A_ABST
    Figure CN119621433A_ABST
Patent Text Reader

Abstract

The invention provides a programmable logic controller program management method, device and equipment and a storage medium, and the method comprises the steps: sending a program backup request to a programmable logic controller to be backed up, determining the current program data of the programmable logic controller, uploading the current program data to a program management system, performing repeatability verification on the current program data and the program data in the preset program library, backing up the current program data to the preset program library under the condition that the repeatability verification is passed, monitoring the current program data of the programmable logic controller, and comparing the current program data with the backup program data in the preset program library; and obtaining a program data comparison result. The program data of the programmable logic controller are backed up online in real time, the data are backed up timely and effectively, the program data are prevented from being lost or damaged, the program data are compared and analyzed, the data integrity is ensured, and the management effect of the program data of the programmable logic controller is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a program management method, device, equipment and storage medium for a programmable logic controller. Background Art

[0002] Programmable Logic Controller (PLC) is a digital computing electronic system specifically used in industrial environments. PLC uses a programmable memory to store instructions for performing logical operations, sequential control, timing, counting and arithmetic operations. It controls various types of mechanical equipment or production processes through digital or analog input and output. Therefore, the programs and data stored in the PLC are the key to controlling the operation of industrial equipment.

[0003] At present, when the programmable logic controller program and related data are lost or program quality problems occur in unexpected situations (such as system crash, hardware failure, etc.), on-site staff can only manually perform data transmission and backup through traditional backup methods such as a single notebook, CF card, USB flash drive, etc. This backup method has the problems of untimely and low efficiency of data backup, and cannot avoid PLC data loss caused by unexpected situations, affecting the management effect of programmable logic controller data and further affecting equipment operation. Summary of the invention

[0004] In view of this, the present invention aims to propose a program management method, device, equipment and storage medium for a programmable logic controller, so as to solve the problem that the program data of the programmable logic controller is manually backed up, the data backup is not timely and inefficient, and the management effect of the programmable logic controller data is affected, so as to realize real-time and effective programmable logic controller data management.

[0005] According to a first aspect of the present invention, a program management method for a programmable logic controller is provided, which is applied to a program management system, wherein the program management system is communicatively connected with the programmable logic controller, and the method comprises:

[0006] Sending a program backup request to a programmable logic controller to be backed up, and determining current program data of the programmable logic controller;

[0007] Uploading the current program data to the program management system, and performing a repeatability check on the current program data and the program data in the preset program library;

[0008] If the repeatability check passes, backing up the current program data to a preset program library;

[0009] The current program data of the programmable logic controller is monitored, and the current program data is compared with the backup program data in the preset program library to obtain a program data comparison result.

[0010] Optionally, the sending a program backup request to a programmable logic controller to be backed up and determining current program data of the programmable logic controller includes:

[0011] Determine the target programmable logic controller to be backed up by the program management system through a preset interface;

[0012] In response to a user-triggered backup operation or a timer-triggered backup operation, a program backup request is sent to a target programmable logic controller, and current program data of the target programmable logic controller is determined.

[0013] Optionally, uploading the current program data to the program management system and performing a repeatability check on the current program data and the program data in the preset program library includes:

[0014] Uploading the current program data to the program management system through a preset interface;

[0015] The current program data is used to traverse the program data of the preset program library to determine whether the current program data and the program data of the preset program library are repeated, and a repeatability verification result of the current program data is obtained.

[0016] Optionally, the monitoring of current program data of the programmable logic controller, comparing the current program data with backup program data in the preset program library, and obtaining a program data comparison result includes:

[0017] Monitor current program data of programmable logic controller;

[0018] If a change in the current program data is detected, determining a program comparison mode; wherein the program comparison mode includes an online comparison mode or an offline comparison mode;

[0019] The current program data and the backup program data in the preset program library are compared in an online comparison mode or an offline comparison mode to obtain a program data comparison result.

[0020] Optionally, the comparing the current program data with the backup program data in the preset program library in an online comparison mode or an offline comparison mode to obtain a program data comparison result includes:

[0021] Sending an online comparison request to the programmable logic controller, and uploading the changed current program data to the program management system;

[0022] Acquire the backup program data in the preset program library;

[0023] The changed current program data is compared with the backup program data in the preset program library to obtain a program data comparison result.

[0024] Optionally, the comparing the current program data with the backup program data in the preset program library in an online comparison mode or an offline comparison mode to obtain a program data comparison result includes:

[0025] Sending an offline comparison request to a programmable logic controller, and issuing the backup program data in the preset program library;

[0026] The backup program data is compared with the current program data of the programmable logic controller to obtain a program data comparison result.

[0027] Optionally, the monitoring of the current program data of the programmable logic controller, comparing the current program data with the backup program data in the preset program library, and obtaining the program data comparison result further includes:

[0028] The program data comparison result is displayed to the Botu software, and the program data comparison result is used by the user to troubleshoot the programmable logic controller.

[0029] According to a second aspect of the present invention, there is provided a program management device for a programmable logic controller, which is applied to a program management system, wherein the program management system is communicatively connected with the programmable logic controller, and the device comprises:

[0030] A backup request module is used to send a program backup request to the programmable logic controller to be backed up, and determine the current program data of the programmable logic controller;

[0031] A data verification module, used for uploading the current program data to the program management system, and performing a repeatability verification on the current program data and the program data of the preset program library;

[0032] A data backup module, used for backing up the current program data to a preset program library when the repeatability check passes;

[0033] The data comparison module is used to monitor the current program data of the programmable logic controller, compare the current program data with the backup program data in the preset program library, and obtain a program data comparison result.

[0034] According to another aspect of the present invention, there is also provided an electronic device, comprising:

[0035] processor;

[0036] a memory for storing instructions executable by the processor;

[0037] Wherein, the processor is configured to execute the instructions to implement the program management method of the programmable logic controller as described above.

[0038] According to another aspect of the present invention, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the program management method for a programmable logic controller as described above are implemented.

[0039] The program management method of a programmable logic controller provided by an embodiment of the present invention determines the current program data of the programmable logic controller by sending a program backup request to the programmable logic controller to be backed up, uploads the current program data to the program management system, performs a repeatability check on the current program data and the program data of the preset program library, and backs up the current program data to the preset program library when the repeatability check passes, monitors the current program data of the programmable logic controller, compares the current program data with the backup program data in the preset program library, and obtains the program data comparison result. The integrated program management system of the embodiment of the present invention performs online real-time backup of the program data stored in the programmable logic controller, ensures that in unexpected situations such as hardware failure or error, the data is backed up in a timely and effective manner to avoid program data loss or damage, and even if the data is lost or damaged, the PLC function can be quickly restored to ensure the continuity of the production line, and the program data of the PLC is compared and analyzed, and the backup data and the current data are compared to achieve more effective troubleshooting and repair, and the integrity and security of the data are ensured through automatic and efficient management of online real-time backup and comparative analysis of the PLC, and the management effect of the program data of the programmable logic controller is improved.

[0040] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0042] Figure 1 It is a flowchart of a program management method for a programmable logic controller provided by an embodiment of the present invention;

[0043] Figure 2 yes Figure 1 The flowchart of step 101 in the program management method of a programmable logic controller provided by an embodiment of the present invention;

[0044] Figure 3 yes Figure 1 The flowchart of step 102 in the program management method of a programmable logic controller provided by an embodiment of the present invention;

[0045] Figure 4 yes Figure 1 The flowchart of step 104 in the program management method of a programmable logic controller provided by an embodiment of the present invention;

[0046] Figure 5 It is a flowchart of another method for managing a programmable logic controller program provided by an embodiment of the present invention;

[0047] Figure 6 It is a scenario schematic diagram of a program management method for a programmable logic controller provided by an embodiment of the present invention;

[0048] Figure 7 It is a structural schematic diagram of a program management device for a programmable logic controller provided by an embodiment of the present invention;

[0049] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.

[0051] Reference Figure 1 , shows a flowchart of the steps of a program management method for a programmable logic controller provided by an embodiment of the present invention, which is applied to a program management system, wherein the program management system is communicatively connected with a programmable logic controller, and the method may include:

[0052] Step 101: Send a program backup request to a programmable logic controller to be backed up, and determine the current program data of the programmable logic controller.

[0053] In the embodiment of the present application, in order to solve the problem that when the program and related data of the programmable logic controller are accidentally lost or program quality problems occur, on-site staff can only manually perform data transmission and backup through traditional backup methods such as a single laptop, CF card, USB flash drive, etc., and the data backup is not timely and efficient, this embodiment uses an integrated program management system to perform online real-time backup of the program data stored in the programmable logic controller, ensuring that in unexpected situations such as hardware failure or error, the data is backed up in a timely and effective manner to avoid program data loss or damage. Even if the data is lost or damaged, the PLC function can be quickly restored to ensure the continuity of the production line, and the program data of the PLC is compared and analyzed, and the backup data and the current data are compared to achieve more effective troubleshooting and repair. Through the automatic and efficient management of the online real-time backup and comparative analysis of the PLC, the integrity and security of the data are ensured, and the management effect of the program data of the programmable logic controller is improved.

[0054] Reference Figure 6 , showing a scenario diagram of the program management method for a programmable logic controller provided by an embodiment of the invention, the program management system is connected to the programmable logic controller in communication, specifically, the PLC device is connected to the program management system of the server IOT platform through the RJ45 interface and the TCP / IP protocol, the BoTu software and the PLC device are in the same network segment and are connected to the program management system of the IOT platform, the engineer's computer and the server install and register the plug-in, the engineer's computer runs the plug-in, and logs in with the program management system account, the engineer's computer and the server of the program management system establish a communication trust mechanism, the user end can trigger the data backup operation, thereby realizing the integrated program management system to perform online real-time backup of the program data stored in the programmable logic controller, and realizing automatic and efficient management of online real-time backup and comparative analysis of the PLC.

[0055] Specifically, the program management system determines the target programmable logic controller to be backed up through a preset interface. In response to a user-triggered backup operation or a timed-triggered backup operation, the program management system sends a program backup request to the target programmable logic controller and determines the current program data of the target programmable logic controller. In response to a backup operation manually triggered by the user or a timed-triggered backup operation by the system, the program management system sends a program backup request to the target PLC device. The program backup request triggers the PLC device to prepare for a program upload operation and determines the current program data of the PLC device.

[0056] It should be noted that, in this embodiment, the preset interface can be a Botu software interface, which is used for the program management system to interact with the Botu software. The Botu software interface is the application programming interface of the Botu software, allowing developers to interact with the Botu software through programming. The Botu software is an integrated automation engineering software platform. The program management system can determine the target programmable logic controller to be backed up by the program management system through the Botu software interface.

[0057] It should be noted that the current program data of the PLC (Programmable Logic Controller) device includes the currently running program code and related configuration data stored in the PLC device. The program code is the logic program running in the PLC device, and the program code defines how the PLC device responds to input signals, performs logical operations, controls output devices, etc.; the configuration data of the PLC device includes input / output (I / O) mapping, module configuration, communication settings, timer and counter settings, etc. The configuration data defines the hardware configuration and operating parameters of the PLC device, and can also include variables and parameters used in the PLC device, specifically including global variables, local variables, constants, system parameters, etc., which are used to store and transfer data and support the logical operations and control of the program. This embodiment does not specifically limit this.

[0058] Step 102, uploading the current program data to the program management system, and performing a repeatability check on the current program data and the program data in the preset program library.

[0059] In an embodiment of the present application, the current program data is uploaded to the program management system through a preset interface, the current program data is used to traverse the program data of the preset program library, it is determined whether the current program data and the program data of the preset program library are repeated, and a repeatability verification result of the current program data is obtained.

[0060] Specifically, after the Botu software establishes communication with the PLC device, the current program data of the PLC device is uploaded to the program management system through the preset interface of the Botu software to ensure that the program management system can obtain the latest PLC program data. The program management system uses the current program data to traverse the program data in the preset program library, wherein the preset program library (Program Library) is a database system that centrally stores and manages the program data of the PLC device, and is used to store the backup program data of the PLC device to ensure that the program data can be quickly restored when needed to prevent data loss. In this embodiment, it is determined whether the current program data is repeated with the program data in the preset program library, and by comparing the program name, version number and code, it is quickly determined whether the program is repeated, and the repeatability verification result of the current program data is obtained.

[0061] Step 103, when the repeatability check passes, the current program data is backed up to the preset program library.

[0062] Step 104 , monitoring the current program data of the programmable logic controller, comparing the current program data with the backup program data in the preset program library, and obtaining a program data comparison result.

[0063] In an embodiment of the present application, the program management system monitors the current program data of the programmable logic controller in real time to ensure that the program management system can obtain the latest program data of the PLC device in a timely manner. If it is monitored that the current program data of the PLC device has changed, the program management system determines a program comparison mode, and the program comparison mode includes an online comparison mode or an offline comparison mode. The program management system uses the online comparison mode or the offline comparison mode to compare the current program data with the backup program data in the preset program library to obtain a program data comparison result.

[0064] The program management method of a programmable logic controller provided by an embodiment of the present invention determines the current program data of the programmable logic controller by sending a program backup request to the programmable logic controller to be backed up, uploads the current program data to the program management system, performs a repeatability check on the current program data and the program data of the preset program library, and backs up the current program data to the preset program library when the repeatability check passes, monitors the current program data of the programmable logic controller, compares the current program data with the backup program data in the preset program library, and obtains the program data comparison result. The integrated program management system of the embodiment of the present invention performs online real-time backup of the program data stored in the programmable logic controller, ensures that in unexpected situations such as hardware failure or error, the data is backed up in a timely and effective manner to avoid program data loss or damage, and even if the data is lost or damaged, the PLC function can be quickly restored to ensure the continuity of the production line, and the program data of the PLC is compared and analyzed, and the backup data and the current data are compared to achieve more effective troubleshooting and repair, and the integrity and security of the data are ensured through automatic and efficient management of online real-time backup and comparative analysis of the PLC, and the management effect of the program data of the programmable logic controller is improved.

[0065] Further, see Figure 2 , showing Figure 1 A flowchart of step 101 in a program management method for a programmable logic controller is provided. The method is substantially the same as the program management method for a programmable logic controller provided in the first embodiment of the present invention. Step 101 may include:

[0066] Step 201: determine the target programmable logic controller to be backed up by the program management system through a preset interface.

[0067] Step 202: In response to a user-triggered backup operation or a timer-triggered backup operation, a program backup request is sent to a target programmable logic controller to determine current program data of the target programmable logic controller.

[0068] It should be noted that in the above steps, the program management system determines the target programmable logic controller (PLC) to be backed up through a preset interface (such as the Botu software API) to ensure that the program management system can accurately identify the PLC devices that need to be backed up. In order to improve the flexibility of the system, it can support batch selection of multiple PLC devices for backup. In addition, the device management function can also be integrated to monitor the status of the PLC device in real time to ensure the smooth progress of the backup operation.

[0069] Specifically, in response to a backup operation manually triggered by a user or a backup operation timed by the system, the program management system sends a program backup request to the target PLC device. The program backup request triggers the PLC device to prepare for a program upload operation and determines the current program data of the PLC device. In this embodiment, in order to improve the degree of automation of backup, a variety of trigger mechanisms can be set, such as scheduled backup, event-triggered backup (such as device restart, program update, etc.) and user-manually triggered backup. A notification function can also be integrated to send a notification to the user after the backup operation is completed to ensure that the user is aware of the backup status in a timely manner.

[0070] The embodiment of the present application realizes an automated backup process by triggering a backup and sending a program backup request to the target programmable logic controller, thereby reducing manual backup operations, improving backup efficiency, and ensuring timely backup of the program. The automated backup process reduces human intervention, reduces the probability of human errors, and improves the reliability of program data management.

[0071] Further, see Figure 3 , showing Figure 1 A flowchart of step 102 in a program management method for a programmable logic controller is provided. The method is substantially the same as the program management method for a programmable logic controller provided in the first embodiment of the present invention. Step 102 may include:

[0072] Step 301, uploading current program data to the program management system through a preset interface.

[0073] Step 302, using the current program data to traverse the program data of the preset program library, determine whether the current program data and the program data of the preset program library are repeated, and obtain a repeatability verification result of the current program data.

[0074] It should be noted that in the above steps of the embodiment of the present application, after the Botu software establishes communication with the PLC device, the current program data of the PLC device is uploaded to the program management system through the preset interface of the Botu software to ensure that the program management system can obtain the latest PLC program data. In order to improve the efficiency of uploading, incremental upload technology can be used to upload only the changed part of the program to reduce the amount of data transmission. The breakpoint resume function can also be integrated to ensure that the upload operation can be resumed when the network is interrupted to avoid data loss. This embodiment is not specifically limited by comparison.

[0075] Specifically, the current program data is used to traverse the program data in the preset program library to determine whether the current program data and the program data in the preset program library are repeated, and the repeatability verification result of the current program data is obtained. The program management system uses the current program data to traverse the program data in the preset program library to determine whether the current program data and the program data in the preset program library are repeated. By comparing the program name, version number and code, it is quickly determined whether the program is repeated to obtain the repeatability verification result of the current program data. This embodiment can use a variety of verification algorithms for verification, which are not specifically limited here. The version management function can also be integrated to record the version information of each backup for easy traceability and management. If the current program data and the program data in the preset program library are not repeated, the program management system uploads the current program data to the program library for backup to ensure that the latest program data can be backed up in time to prevent data loss. If the current program data and the program data in the preset program library are repeated, the backup operation is ignored to avoid repeated backup and reduce system resource consumption.

[0076] The embodiment of the present application utilizes the current program data to traverse the program data of the preset program library to determine whether the current program data and the program data of the preset program library are duplicated, ensuring that the latest program data can be backed up in time to prevent data loss, and ignoring the backup operation when the current program data and the program data of the preset program library are duplicated to avoid duplicate backup.

[0077] Further, see Figure 4 , showing Figure 1 A flowchart of step 104 in a program management method for a programmable logic controller is provided. The method is substantially the same as the program management method for a programmable logic controller provided in the first embodiment of the present invention. Step 104 may include:

[0078] Step 401, monitoring current program data of the programmable logic controller.

[0079] Step 402: If it is detected that the current program data has changed, determine the program comparison mode; wherein the program comparison mode includes an online comparison mode or an offline comparison mode.

[0080] Step 403 : compare the current program data with the backup program data in the preset program library in an online comparison mode or an offline comparison mode to obtain a program data comparison result.

[0081] In the embodiment of the present application, the program management system monitors the current program data of the programmable logic controller (PLC) in real time to ensure that the program management system can obtain the latest program data of the PLC device in a timely manner. In order to improve the accuracy of monitoring, a variety of monitoring technologies can be used, such as periodic monitoring, event-triggered monitoring, etc., and the device status monitoring function can be integrated to display the status of the PLC device in real time. If the current program data of the PLC device is monitored to change, the program management system determines the program comparison mode, which includes an online comparison mode or an offline comparison mode. The online comparison mode is suitable for situations where the PLC device program needs to be compared in real time, and the offline comparison mode is suitable for situations where different versions of the program need to be compared.

[0082] Specifically, the program management system uses an online comparison mode or an offline comparison mode to compare the current program data with the backup program data in the preset program library to obtain a program data comparison result. According to the determined program comparison mode, the program management system uses an online comparison mode or an offline comparison mode to compare the current program data with the backup program data in the preset program library. By comparing the program name, version number and code, it can accurately determine whether the programs are consistent and obtain a program data comparison result.

[0083] The embodiment of the present application uses an online comparison mode or an offline comparison mode to compare the current program data with the backup program data in the preset program library, which can timely and accurately determine whether the programs are consistent, so as to compare the backup data and the current data to achieve more effective troubleshooting and repair.

[0084] Specifically, in some embodiments, step 403, using an online comparison mode or an offline comparison mode to compare the current program data with the backup program data in the preset program library, and obtaining the program data comparison result may specifically include:

[0085] First, an online comparison request is sent to the programmable logic controller, and the changed current program data is uploaded to the program management system;

[0086] Secondly, obtaining the backup program data in the preset program library;

[0087] Secondly, the changed current program data is compared with the backup program data in the preset program library to obtain a program data comparison result.

[0088] It should be noted that in the above steps, the program management system sends an online comparison request to the programmable logic controller and uploads the changed current program data to the program management system. Specifically, the program management system sends an online comparison request to the programmable logic controller (PLC), triggering the PLC device to upload the changed current program data to the program management system, ensuring that the program management system can obtain the latest PLC program data. At the same time, the program management system obtains backup program data from the preset program library to ensure that the program management system can obtain the backup program data for comparison. The program management system compares the changed current program data with the backup program data in the preset program library to determine whether the programs are consistent and obtain the program data comparison result.

[0089] In some embodiments, an online comparison mode is used to compare the current program data with the backup program data in the preset program library. Specifically, communication is established with the PLC device through the Botu API, and the execution program is uploaded to the engineer's computer so that the engineer can perform comparison operations and obtain the Botu comparison results. If the Botu comparison results cannot be obtained automatically, consider having the engineer input the Botu comparison results and complete it manually. The system obtains the comparison results. The engineer performs program comparison operations in the Botu software and obtains the Botu comparison results. If the Botu software cannot automatically obtain the comparison results, the engineer can manually input the comparison results. The system obtains and records the comparison results. By integrating the automated script of the Botu software, the comparison operation is automatically performed and the comparison results are obtained.

[0090] The embodiment of the present application integrates the automation script of the BoTu software to automatically perform online comparison operations on program data and obtain comparison results. Through automatic and efficient management of PLC online real-time backup and comparative analysis, the integrity and security of the data are ensured, thereby improving the management effect of programmable logic controller program data.

[0091] Specifically, in some embodiments, step 403, using an online comparison mode or an offline comparison mode to compare the current program data with the backup program data in the preset program library, and obtaining the program data comparison result may specifically include:

[0092] First, an offline comparison request is sent to a programmable logic controller, and the backup program data in the preset program library is sent;

[0093] Secondly, the backup program data is compared with the current program data of the programmable logic controller to obtain a program data comparison result.

[0094] It should be noted that in the above steps, the program management system sends an offline comparison request to the programmable logic controller (PLC) and sends the backup program data in the preset program library to ensure that the PLC device can obtain the backup program data for comparison. The PLC device compares the sent backup program data with the current program data to determine whether the programs are consistent and obtain the program data comparison results.

[0095] For example, the backup program data in the preset program library is selected and sent to the engineer's computer, and the Botu software is automatically opened. The engineer selects the backup program data in the preset program library. The program management system sends the program to be compared to the engineer's computer and automatically opens the Botu software to ensure that the engineer can quickly start the program comparison operation. The engineer performs the comparison operation and obtains the Botu comparison result. If the Botu comparison result cannot be obtained automatically, consider having the engineer input the Botu comparison result and complete it manually. The system obtains the comparison result. The engineer performs the program comparison operation in the Botu software and obtains the Botu comparison result. If the Botu software cannot automatically obtain the comparison result, the engineer can manually input the comparison result. The system obtains the comparison result and records it. In order to improve the degree of automation of the comparison, the Botu software's automation script can be integrated to automatically perform the comparison operation and obtain the comparison result.

[0096] The embodiment of the present application integrates the automated script of the BoTu software to automatically perform offline comparison operations on program data and obtain comparison results. By comparing and analyzing PLC backup data, data consistency is ensured and the management effect of programmable logic controller program data is improved.

[0097] Reference Figure 5 , shows a flowchart of the steps of another programmable logic controller program management method provided by an embodiment of the present invention, which method is basically the same as the programmable logic controller program management method provided by the first embodiment of the present invention, except that the method may further include:

[0098] Step 101: Send a program backup request to a programmable logic controller to be backed up, and determine the current program data of the programmable logic controller.

[0099] Step 102, uploading the current program data to the program management system, and performing a repeatability check on the current program data and the program data in the preset program library.

[0100] Step 103, when the repeatability check passes, backing up the current program data to a preset program library.

[0101] Step 104 , monitoring the current program data of the programmable logic controller, comparing the current program data with the backup program data in the preset program library, and obtaining a program data comparison result.

[0102] The above steps 101 to 104 are described in the foregoing description and will not be repeated here.

[0103] Step 105, displaying the program data comparison result to the Botu software, and the program data comparison result is used by the user to troubleshoot the programmable logic controller.

[0104] In an embodiment of the present application, the program data comparison results are displayed to the BoTu software, and the program data comparison results are used by users to troubleshoot programmable logic controllers. The program management system displays the program data comparison results to the BoTu software to ensure that users can intuitively view the comparison results and troubleshoot the programmable logic controller based on the comparison results. In order to improve the user experience, visualization tools can be integrated to display the comparison results in a graphical manner. In addition, an automatic diagnosis function can be integrated to automatically generate troubleshooting suggestions based on the comparison results to help users quickly locate and solve problems.

[0105] Compared with the prior art, the embodiments of the present invention, on the basis of achieving the beneficial effects brought by the first embodiment, reduce manual operations through an automated comparison process, improve comparison efficiency, ensure timely comparison of programs, reduce the probability of human errors, improve system reliability, support a variety of PLC devices and Botu software, improve the compatibility and flexibility of the system, facilitate troubleshooting and system maintenance, and improve the maintainability of the system.

[0106] Reference Figure 7 , shows a schematic diagram of the structure of a program management device for a programmable logic controller provided by an embodiment of the present invention, which is applied to a program management system, wherein the program management system is communicatively connected with a programmable logic controller, and the device comprises:

[0107] The backup request module 501 is used to send a program backup request to the programmable logic controller to be backed up, and determine the current program data of the programmable logic controller;

[0108] A data verification module 502 is used to upload the current program data to the program management system and perform a repeatability check on the current program data and the preset program library program data;

[0109] The data backup module 503 is used to back up the current program data to a preset program library when the repeatability check passes;

[0110] The data comparison module 504 is used to monitor the current program data of the programmable logic controller, compare the current program data with the backup program data in the preset program library, and obtain a program data comparison result.

[0111] Furthermore, the request backup module 501 includes:

[0112] A first determination submodule is used to determine a target programmable logic controller to be backed up by the program management system through a preset interface;

[0113] The request submodule is used to send a program backup request to a target programmable logic controller in response to a user-triggered backup operation or a timed-triggered backup operation, and determine the current program data of the target programmable logic controller.

[0114] Furthermore, the data verification module 502 includes:

[0115] An upload submodule, used for uploading the current program data to the program management system through a preset interface;

[0116] The verification submodule is used to use the current program data to traverse the program data of the preset program library, determine whether the current program data and the program data of the preset program library are repeated, and obtain a repeatability verification result of the current program data.

[0117] Furthermore, the data comparison module 504 includes:

[0118] A monitoring submodule, used to monitor the current program data of the programmable logic controller;

[0119] A second determination submodule is used to determine a program comparison mode if a change in the current program data is detected; wherein the program comparison mode includes an online comparison mode or an offline comparison mode;

[0120] The comparison submodule is used to compare the current program data with the backup program data in the preset program library in an online comparison mode or an offline comparison mode to obtain a program data comparison result.

[0121] Furthermore, the comparison submodule includes:

[0122] A first request unit is used to send an online comparison request to the programmable logic controller to upload the changed current program data to the program management system;

[0123] An acquisition unit, used for acquiring the backup program data in the preset program library;

[0124] The first comparison unit is used to compare the changed current program data with the backup program data in the preset program library to obtain a program data comparison result.

[0125] Furthermore, the comparison submodule includes:

[0126] A second request unit, used to send an offline comparison request to the programmable logic controller, and send the backup program data in the preset program library;

[0127] The second comparison unit is used to compare the backup program data with the current program data of the programmable logic controller to obtain a program data comparison result.

[0128] Furthermore, the device also includes:

[0129] The result display module is used to display the program data comparison result to the BoTu software, and the program data comparison result is used by the user to troubleshoot the programmable logic controller.

[0130] The program management method of a programmable logic controller provided by an embodiment of the present invention determines the current program data of the programmable logic controller by sending a program backup request to the programmable logic controller to be backed up, uploads the current program data to the program management system, performs a repeatability check on the current program data and the program data of the preset program library, and backs up the current program data to the preset program library when the repeatability check passes, monitors the current program data of the programmable logic controller, compares the current program data with the backup program data in the preset program library, and obtains the program data comparison result. The integrated program management system of the embodiment of the present invention performs online real-time backup of the program data stored in the programmable logic controller, ensures that in unexpected situations such as hardware failure or error, the data is backed up in a timely and effective manner to avoid program data loss or damage, and even if the data is lost or damaged, the PLC function can be quickly restored to ensure the continuity of the production line, and the program data of the PLC is compared and analyzed, and the backup data and the current data are compared to achieve more effective troubleshooting and repair, and the integrity and security of the data are ensured through automatic and efficient management of online real-time backup and comparative analysis of the PLC, and the management effect of the program data of the programmable logic controller is improved.

[0131] Reference Figure 8 , an embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0132] A processor 601, a memory 603 for storing processor executable instructions;

[0133] The processor 601 is configured to execute the instructions to implement the program management method of the programmable logic controller as described above:

[0134] Sending a program backup request to a programmable logic controller to be backed up, and determining current program data of the programmable logic controller;

[0135] Uploading the current program data to the program management system, and performing a repeatability check on the current program data and the program data in the preset program library;

[0136] If the repeatability check passes, backing up the current program data to a preset program library;

[0137] The current program data of the programmable logic controller is monitored, and the current program data is compared with the backup program data in the preset program library to obtain a program data comparison result.

[0138] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0139] The communication interface is used for communication between the above terminal and other devices.

[0140] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0141] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0142] In another embodiment provided by the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the program management method for a programmable logic controller described in any of the above embodiments is implemented.

[0143] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0144] It should be noted that, in this article, relational terms such as first and second, etc. 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 terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or 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 device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0145] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0146] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A program management method for a programmable logic controller, characterized in that: Applied to a program management system, the program management system is communicatively connected with a programmable logic controller, the method comprises: Sending a program backup request to a programmable logic controller to be backed up, and determining current program data of the programmable logic controller; Uploading the current program data to the program management system, and performing a repeatability check on the current program data and the program data in the preset program library; If the repeatability check passes, backing up the current program data to a preset program library; The current program data of the programmable logic controller is monitored, and the current program data is compared with the backup program data in the preset program library to obtain a program data comparison result.

2. The method according to claim 1, characterized in that The sending of a program backup request to the programmable logic controller to be backed up and determining current program data of the programmable logic controller includes: Determine the target programmable logic controller to be backed up by the program management system through a preset interface; In response to a user-triggered backup operation or a timer-triggered backup operation, a program backup request is sent to a target programmable logic controller, and current program data of the target programmable logic controller is determined.

3. The method according to claim 1, characterized in that The uploading of the current program data to the program management system and performing a repeatability check on the current program data and the preset program library program data include: Uploading the current program data to the program management system through a preset interface; The current program data is used to traverse the program data of the preset program library to determine whether the current program data and the program data of the preset program library are repeated, and a repeatability verification result of the current program data is obtained.

4. The method according to claim 1, characterized in that: The monitoring of current program data of the programmable logic controller, comparing the current program data with the backup program data in the preset program library, and obtaining a program data comparison result includes: Monitor current program data of programmable logic controller; If a change in the current program data is detected, determining a program comparison mode; wherein the program comparison mode includes an online comparison mode or an offline comparison mode; The current program data and the backup program data in the preset program library are compared in an online comparison mode or an offline comparison mode to obtain a program data comparison result.

5. The method according to claim 4, characterized in that The current program data is compared with the backup program data in the preset program library in an online comparison mode or an offline comparison mode to obtain a program data comparison result, including: Sending an online comparison request to the programmable logic controller, and uploading the changed current program data to the program management system; Acquire the backup program data in the preset program library; The changed current program data is compared with the backup program data in the preset program library to obtain a program data comparison result.

6. The method according to claim 4, characterized in that The current program data is compared with the backup program data in the preset program library in an online comparison mode or an offline comparison mode to obtain a program data comparison result, including: Sending an offline comparison request to a programmable logic controller, and issuing the backup program data in the preset program library; The backup program data is compared with the current program data of the programmable logic controller to obtain a program data comparison result.

7. The method according to claim 1, characterized in that The monitoring of the current program data of the programmable logic controller, comparing the current program data with the backup program data in the preset program library, and obtaining the program data comparison result further includes: The program data comparison result is displayed to the Botu software, and the program data comparison result is used by the user to troubleshoot the programmable logic controller.

8. A program management device for a programmable logic controller, characterized in that: Applied to a program management system, the program management system is communicatively connected with a programmable logic controller, and the device comprises: A backup request module is used to send a program backup request to the programmable logic controller to be backed up, and determine the current program data of the programmable logic controller; A data verification module, used for uploading the current program data to the program management system, and performing a repeatability verification on the current program data and the program data of the preset program library; A data backup module, used for backing up the current program data to a preset program library when the repeatability check passes; The data comparison module is used to monitor the current program data of the programmable logic controller, compare the current program data with the backup program data in the preset program library, and obtain a program data comparison result.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the instructions to implement the program management method of a programmable logic controller as claimed in any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the program management method for a programmable logic controller according to any one of claims 1 to 7 is implemented.