A PLC engineering logic debugging method, system, terminal equipment and storage medium

By dynamically opening or allocating debugging resources, the target project is processed to generate operating service information, which solves the problem of low debugging efficiency of PLC projects and achieves efficient utilization of resources and improvement of debugging efficiency.

CN115903644BActive Publication Date: 2024-09-10SHANGHAI FLEXEM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211581884.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2024-09-10
Estimated Expiration
2042-12-09

AI Technical Summary

Technical Problem

During the debugging phase of the PLC project, due to the limited resources of the debugging service platform, the debugging efficiency is low, and the lack of reasonable resource allocation affects the debugging efficiency.

Method used

By obtaining the debugging project information of the target project, determine whether there are preset debugging resources. If they do not exist, dynamically open the resources and obtain the target debugging resources; if they exist, directly allocate the preset debugging resources and further process the target project to generate running service information. Finally, the data drawing results are processed according to the operation rules to improve debugging efficiency.

Benefits of technology

Through dynamic resource allocation and processing, the debugging efficiency of PLC projects is improved, ensuring the efficiency of the debugging process and the rational utilization of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115903644B
    Figure CN115903644B
Patent Text Reader

Abstract

The present application relates to the field of logic control technology, and in particular to a PLC engineering logic debugging method, system, terminal device and storage medium, wherein the method comprises: obtaining a target project; obtaining corresponding debugging project information according to the target project; judging whether there are preset debugging resources in the debugging project information; if there are no preset debugging resources in the debugging project information, obtaining the corresponding target debugging resources according to preset adjustment rules; if there are preset debugging resources in the debugging project information, obtaining the corresponding target debugging resources according to the preset debugging resources; processing the target project according to the target debugging resources to generate operation service information; reading the operation service information to generate corresponding operation information; processing the operation information according to preset operation rules to generate data drawing results. The present application provides a PLC engineering logic debugging method, system, terminal device and storage medium, which can improve the debugging efficiency of PLC engineering logic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of logic control technology, and in particular to a PLC engineering logic debugging method, system, terminal device and storage medium. Background Art

[0002] Programmable Logic Controller, abbreviated as PLC, is a digital electronic device with a microprocessor. It is a digital logic controller used for automated control and can load control instructions into the memory for storage and operation at any time.

[0003] The programmable controller is modularly composed of an internal CPU, instruction and data storage, input and output units, power modules, digital simulation and other units. The PLC can receive input and send output various types of electrical or electronic signals, and use them to control or supervise almost all types of mechanical and electrical systems.

[0004] Since the PLC program is executed cyclically, during the debugging process, the corresponding debugging service platform resources are limited, and the debugging resources are not reasonably allocated according to the PLC project, resulting in reduced efficiency of the PLC project during the debugging stage. Summary of the invention

[0005] In order to improve the debugging efficiency of PLC projects, the present application provides a PLC project logic debugging method, system, terminal device and storage medium.

[0006] In a first aspect, the present application provides a PLC engineering logic debugging method, comprising the following steps:

[0007] Get the target project;

[0008] According to the target project, obtaining corresponding debugging project information;

[0009] Determine whether there is a preset debugging resource in the debugging project information;

[0010] If the preset debugging resource does not exist in the debugging project information, obtaining the corresponding target debugging resource according to the preset adjustment rule;

[0011] If the preset debugging resource exists in the debugging project information, acquiring the corresponding target debugging resource according to the preset debugging resource;

[0012] Processing the target project according to the target debugging resource to generate operation service information;

[0013] Read the operation service information and generate corresponding operation information;

[0014] The operation information is processed according to preset operation rules to generate data drawing results.

[0015] By adopting the above technical scheme, the target project is debugged as needed to obtain the corresponding debugging project information, and then it is determined whether there is a corresponding preset debugging resource in the debugging project information. If not, the corresponding debugging resource is dynamically opened according to the preset adjustment rule to obtain the corresponding target debugging resource. If it exists, the corresponding target debugging resource is directly allocated according to the preset debugging resource, and the target project is further processed according to the obtained target debugging resource to generate the corresponding operation service information, so that the user can debug the target project according to the corresponding operation service information and generate the corresponding operation information. Finally, the generated operation information is processed according to the preset operation rule to generate the data drawing result finally displayed to the user. In the process of debugging the target project, the target project is classified and integrated according to its actual situation, thereby improving the debugging efficiency of the PLC project.

[0016] Optionally, if there is no preset debugging resource in the debugging project information, obtaining the corresponding target debugging resource according to the preset adjustment rule includes the following steps:

[0017] If there is no preset debugging resource in the debugging project information, obtaining traffic dynamic information;

[0018] Process the traffic dynamic information according to the preset adjustment rules to generate an opening resource;

[0019] According to the enabled resource, the target debugging resource is acquired.

[0020] By adopting the above technical solution, when there is no corresponding preset debugging resource in the debugging project information, the corresponding traffic dynamic information is processed according to the preset adjustment rules, and then the matching start resources are generated, thereby improving the efficiency of PLC project debugging.

[0021] Optionally, the processing of the traffic dynamic information according to the preset adjustment rule to generate an enabled resource comprises the following steps:

[0022] According to the traffic dynamic information, obtain the corresponding loading progress;

[0023] Determining whether the loading progress complies with the preset adjustment rule;

[0024] If the loading progress meets the preset adjustment rule, obtaining corresponding historical loading information;

[0025] Determining whether there is a loading record of the target project in the historical record information;

[0026] If the historical record information contains a loading record of the target project, the debugging resource with the largest number of loading times in the loading record is obtained, and the corresponding opening resource is generated.

[0027] By adopting the above technical solution, the debugging resource that meets the preset adjustment rules and has the largest number of loading times is selected from the loading records of the historical loading information to generate the corresponding start-up resource, thereby improving the debugging efficiency of the debugging resource for the target project.

[0028] Optionally, the reading of the operation service information and generating corresponding operation information comprises the following steps:

[0029] Acquire a temporary operation service according to the operation service information;

[0030] Read the temporary operation service and generate an operation result;

[0031] Determining whether the operation result meets the preset operation standard;

[0032] If the operation result does not meet the preset operation standard, the abnormal operation item in the temporary operation service is obtained and marked, and the corresponding abnormal prompt information is generated;

[0033] If the operation result meets the preset operation standard, the operation result is processed according to a preset processing rule to generate a target debugging item as the operation information.

[0034] By adopting the above technical solution, the corresponding temporary operation service is obtained and read according to the actual situation of the target project, and by further judging whether the generated operation result meets the corresponding preset operation standard, the abnormal operation items that do not meet the preset operation standard can be tracked, and the corresponding target debugging items can be generated for the operation results that meet the preset operation standard, thereby improving the debugging efficiency of the target project during the debugging process.

[0035] Optionally, the processing of the operation information according to a preset operation rule to generate a data drawing result includes the following results:

[0036] According to the computing information, obtaining corresponding monitoring information;

[0037] Analyze the monitoring information and generate a corresponding monitoring range;

[0038] Determining whether the monitoring range meets the preset monitoring standard;

[0039] If the monitoring range meets the preset monitoring standard, the monitoring range is calculated to form a corresponding monitoring point;

[0040] Registering the monitoring point and generating a corresponding registration result;

[0041] Determine whether the monitoring point changes;

[0042] If the monitoring point changes, re-register the monitoring point and generate the corresponding registration result;

[0043] Calculate the registration results according to the preset calculation rules to generate batch return values;

[0044] The batch return values ​​are plotted to generate corresponding data plotting results.

[0045] By adopting the above technical solution, reasonable registration is performed in combination with the actual situation of each monitoring point within the monitoring range, and then the corresponding registration results are generated, thereby improving the debugging efficiency of the target project.

[0046] Optionally, reading the registration results according to the preset operation rules to generate batch return values ​​includes the following steps:

[0047] According to the registration result, obtaining corresponding monitoring data;

[0048] Determining whether the monitoring data complies with a preset reading rule;

[0049] If the monitoring data meets the preset reading rule, obtaining the target reading mode corresponding to the monitoring data;

[0050] Determining whether the target reading method meets the preset cycle standard;

[0051] If the target reading method meets the preset period standard, the monitoring data is read according to the target reading method to generate the batch return value.

[0052] By adopting the above technical solution, the target reading method corresponding to the monitoring data is reasonably selected according to the preset reading rules, and the monitoring data is read through the corresponding target reading method according to the preset period standard, thereby improving the reading efficiency of the monitoring data.

[0053] Optionally, after processing the operation information according to the preset operation rules to generate the data drawing result, the following steps are also included:

[0054] According to the data drawing result, obtain the end debugging instruction;

[0055] According to the end debugging instruction, the target debugging resource is recovered.

[0056] By adopting the above technical solution, it is convenient to recycle target debugging resources and reduce resource waste.

[0057] In a second aspect, the present application also provides a PLC engineering logic debugging system, comprising:

[0058] A first acquisition module is used to acquire a target project;

[0059] A second acquisition module is used to acquire corresponding debugging project information according to the target project;

[0060] A judging module, used for judging whether there are preset debugging resources in the debugging project information;

[0061] a third acquisition module, for acquiring corresponding target debugging resources according to preset adjustment rules if the preset debugging resources do not exist in the debugging project information;

[0062] a fourth acquisition module, wherein if the preset debugging resource exists in the debugging project information, the fourth acquisition module is used to acquire the corresponding target debugging resource according to the preset debugging resource;

[0063] A processing module, used for processing the target project according to the target debugging resource to generate operation service information;

[0064] A reading module, used for reading the operation service information and generating corresponding operation information;

[0065] The generating module is used to process the computing information according to preset computing rules to generate data drawing results.

[0066] By adopting the above technical solution, the target project that needs to be debugged is acquired according to the first acquisition module, so that the debugging project information corresponding to the target project can be acquired through the second acquisition module, and then the judgment module is used to judge whether there are corresponding preset debugging resources in the debugging project information. If not, the corresponding debugging resources are dynamically opened according to the preset adjustment rules, and the corresponding target debugging resources are acquired through the third acquisition module. If they exist, the corresponding target debugging resources are directly allocated according to the preset debugging resources through the fourth acquisition module. The target project is further processed according to the acquired target debugging resources through the processing module to generate corresponding operation service information, so that the user can debug the target project according to the corresponding operation service information through the reading module and generate corresponding operation information. Finally, the generated operation information is processed by the generation module according to the preset operation rules to generate the data drawing results finally displayed to the user. Since in the process of debugging the target project, the target project is classified and integrated according to its actual situation, the debugging efficiency of the PLC project is improved.

[0067] In a third aspect, the present application provides a terminal device, which adopts the following technical solution:

[0068] A terminal device includes a memory and a processor, wherein the memory stores computer instructions that can be run on the processor, and when the processor loads and executes the computer instructions, the above-mentioned PLC engineering logic debugging method is adopted.

[0069] By adopting the above technical solution, the above-mentioned PLC engineering logic debugging method is generated into computer instructions, and stored in the memory so as to be loaded and executed by the processor, so that a terminal device is manufactured according to the memory and the processor for easy use.

[0070] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0071] A computer-readable storage medium stores computer instructions, and when the computer instructions are loaded and executed by a processor, any of the above-mentioned PLC engineering logic debugging methods is adopted.

[0072] By adopting the above technical solution, the above-mentioned PLC engineering logic debugging method is used to generate computer instructions, and the computer instructions are stored in a computer-readable storage medium so as to be loaded and executed by a processor. The computer-readable storage medium facilitates the reading and storage of computer instructions.

[0073] In summary, the present application includes the following beneficial technical effects: debugging the target project as needed to obtain the corresponding debugging project information, and then judging whether there are corresponding preset debugging resources in the debugging project information; if not, dynamically opening the corresponding debugging resources according to the preset adjustment rules, and obtaining the corresponding target debugging resources; if so, directly allocating the corresponding target debugging resources according to the preset debugging resources, and further processing the target project according to the obtained target debugging resources to generate corresponding operation service information, so that the user can debug the target project according to the corresponding operation service information and generate corresponding operation information; finally, processing the generated operation information according to the preset operation rules to generate the data drawing results finally displayed to the user; because in the process of debugging the target project, the target project is classified and integrated according to its actual situation, the debugging efficiency of the PLC project is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 It is a flowchart of steps S101 to S108 in a PLC engineering logic debugging method of the present application.

[0075] Figure 2 It is a flowchart of steps S201 to S203 in a PLC engineering logic debugging method of the present application.

[0076] Figure 3It is a flowchart of steps S301 to S305 in a PLC engineering logic debugging method of the present application.

[0077] Figure 4 It is a flowchart of steps S401 to S405 in a PLC engineering logic debugging method of the present application.

[0078] Figure 5 It is a flowchart of steps S501 to S509 in a PLC engineering logic debugging method of the present application.

[0079] Figure 6 It is a flowchart of steps S601 to S609 in a PLC engineering logic debugging method of the present application.

[0080] Figure 7 It is a flowchart of step S701 to step S702 in a PLC engineering logic debugging method of the present application.

[0081] Figure 8 This is a module schematic diagram of a PLC engineering logic debugging system of the present application.

[0082] Description of reference numerals:

[0083] 1. First acquisition module; 2. Second acquisition module; 3. Judgment module; 4. Third acquisition module; 5. Fourth acquisition module; 6. Processing module; 7. Reading module; 8. Generation module. DETAILED DESCRIPTION

[0084] The following is combined with Figure 1-8 This application is described in further detail.

[0085] In order to explain this solution, we take PLC system debugging as an example. The system debugging can be divided into four steps:

[0086] 1. Check the hardware. Each sensor, switch, and button is connected to a specific input, and each actuator is connected to an output. During the engineering process, the addresses and wires must not be confused. In addition, the placement of sensors and actuators should be checked (must be located in the automation system); during the inspection, the output is set to test mode, and then the actuator must meet the specified requirements (functions). If modifications are made, the documents (assignment lists, drawings, etc.) must also be updated to respond to the actual situation.

[0087] 1.1. Test inputs and outputs. Input devices, such as switches, can be manipulated to give open and closed contact conditions, and observe the corresponding LED on the input module, which should light up when the input is closed and not light up when it is open; LED failure to light up may be because the input device is not operated correctly, the wiring connection of the input module is wrong, the input device is not powered correctly, or the LED input module is defective. For devices that can be safely started, a button may be installed so that each output can be tested.

[0088] 2. Software and transfer and testing, before debugging, all available offline and virtual PLC program testing tools should be used intensively to find program faults. For example, such a testing tool is available in STEP7 as a subprogram S7-PLCSIM, which simulates the work of PLC (virtual PLC) and allows user-written PLC programs to be tested.

[0089] After this, the program is transferred to the central processor unit in the virtual PLC and the entire program is executed without using a real PLC. The user must simulate input signal changes and verify the output's reaction to them. Some PLCs offer simulation in a real PLC: the entire program is executed in the PLC without connecting the real inputs and outputs. Therefore, the processing of the PLC outputs occurs only in the PLC image table, and the physical PLC / O is not updated to the PLC / O image, thus eliminating the risk of damaging the machine or system components.

[0090] After this, the individual user program components and system functions are tested: manual operation, settings, individual monitoring programs, etc., and finally the interaction of the program components with the help of the main program. The system can and should be debugged step by step. An important factor for debugging and fault detection is the testing functions of the programming system, such as the single-step mode or the setting of stop points. Especially the single-step mode is important, in which the program in the PLC memory is executed line by line or step by step, so that any program faults that may occur in the program can be immediately located.

[0091] 3. Optimize the software. User programs can almost always be improved after the first test run. It is important to make any corrections or modifications not only in the PLC user program, but also to take these corrections or modifications into account in the documentation.

[0092] 4. Debugging of the entire system. This part has already taken place during the testing and optimization phase. Once the final state and documentation of the PLC user program has been established, all controller functions need to be executed step by step (according to the automation task). If the entire system is debugged without any faults, the system is handed over to the customer.

[0093] The present application embodiment discloses a PLC engineering logic debugging method, such as Figure 1 As shown, the following steps are included:

[0094] S101, obtaining a target project;

[0095] S102, according to the target project, obtaining corresponding debugging project information;

[0096] S103, determining whether there is a preset debugging resource in the debugging project information;

[0097] S104: If there is no preset debugging resource in the debugging project information, obtain the corresponding target debugging resource according to the preset adjustment rule;

[0098] S105: If there are preset debugging resources in the debugging project information, obtain corresponding target debugging resources according to the preset debugging resources;

[0099] S106, processing the target project according to the target debugging resources to generate operation service information;

[0100] S107, reading the operation service information and generating corresponding operation information;

[0101] S108: Process the operation information according to preset operation rules to generate data drawing results.

[0102] The target project in step S101 to step S102 refers to the PLC project logic that needs to be debugged; the debugging project information refers to the debugging project information corresponding to the target project in the debugging service platform.

[0103] In actual use, the user logs in to the cloud server through the browser using the account and password, selects the project and displays the project in the browser. The user can modify, compile and save the opened project.

[0104] For example, an electrical engineer first opens the automation project in a browser, and then the cloud server applies for services from the cloud debugging service platform, requests to open the project, and then reads the project data from the cloud database.

[0105] The preset debugging resources in step S103 to step S105 refer to the idle debugging resources in the debugging service platform, the preset adjustment rules refer to the selection rules for dynamically enabling debugging resources, and the target debugging resources refer to the debugging resources corresponding to the target project.

[0106] For example, a user requests a cloud debugging project, and the cloud server applies for services from the cloud debugging service platform. If the preset debugging resources corresponding to the target project do not exist in the current debugging service platform, a method for selecting dynamically enabled debugging resources is obtained to select the target debugging resources. If the preset debugging resources corresponding to the target project exist in the current debugging service platform, the target debugging resources corresponding to the target project are directly allocated according to the preset debugging resources.

[0107] The running service information in step S106 refers to the service information generated when the cloud debugging service loads the target project into the target debugging resource.

[0108] In actual use, after the user applies for the cloud debugging resources of the target project, he chooses to start debugging in the browser. The remote server will compile the user's current target project and load it into the cloud debugging service platform. The cloud debugging service will load the target project into the previously applied debugging resources and generate the corresponding running service information.

[0109] The calculation information in step S107 to step S108 refers to the relevant data about the debugging of the target project in the running service information; the preset calculation rules refer to the rules for performing relevant calculations on the debugging data in the calculation information; the data drawing results refer to the relevant data in the user project drawn by the browser after receiving the calculation results of the calculation information.

[0110] For example, users can choose a monitoring method for program logic based on the running service information. Next, the variables to be monitored will be collected according to the current user project interface, and the corresponding monitoring range will be generated and submitted to the cloud server. After receiving the request, the cloud server will calculate the corresponding operation information. After the browser receives the operation information from the cloud debugging service platform, it will automatically initiate a request to read the operation information. The cloud server will forward the request to the cloud debugging service platform. The cloud debugging will calculate the operation information according to the preset operation rules, and then draw the obtained operation data into the user project to display it to the user.

[0111] The PLC project logic debugging method provided in this embodiment includes the following beneficial technical effects: debugging the target project as needed to obtain the corresponding debugging project information, and then judging whether there is a corresponding preset debugging resource in the debugging project information; if not, dynamically opening the corresponding debugging resource according to the preset adjustment rule, and obtaining the corresponding target debugging resource; if so, directly allocating the corresponding target debugging resource according to the preset debugging resource; further processing the target project according to the obtained target debugging resource, generating the corresponding operation service information, so that the user can debug the target project according to the corresponding operation service information, and generate the corresponding operation information; finally, processing the generated operation information according to the preset operation rule, and generating the data drawing result finally displayed to the user; because in the process of debugging the target project, the target project is classified and integrated according to its actual situation, the debugging efficiency of the PLC project is improved.

[0112] In one implementation of this embodiment, Figure 2 As shown, step S104, that is, if there is no preset debugging resource in the debugging project information, obtaining the corresponding target debugging resource according to the preset adjustment rule includes the following steps:

[0113] S201. If there is no preset debugging resource in the debugging project information, obtain traffic dynamic information;

[0114] S202, processing traffic dynamic information according to preset adjustment rules and generating opening resources;

[0115] S203: Acquire target debugging resources according to the enabled resources.

[0116] In actual application, traffic dynamic information refers to the traffic dynamic information about the debugging resources corresponding to the target project; preset adjustment rules refer to the rules for dynamic adjustment selection based on the actual situation of the traffic dynamic information; and enabled resources refer to the debugging resources in the traffic dynamic information that meet the preset adjustment rules.

[0117] The user requests a cloud debugging project, and the cloud server applies for services from the cloud debugging service platform. If the debugging service platform does not have corresponding idle debugging resources, the cloud debugging platform will make adjustments based on the preset adjustment rules and the actual situation of traffic dynamic information, generate corresponding enabled resources, and further obtain corresponding target debugging resources based on the enabled resources.

[0118] For example, if the debugging service platform does not have corresponding idle debugging resources, it can be obtained according to the preset adjustment rules, and debugging resources that have a high match with the target project and are about to be debugged are preferentially selected. Then, the acquired traffic dynamic information is selected according to the above rules to generate corresponding open resources, and further the corresponding target debugging resources are selected according to the attribute information of the target project.

[0119] The PLC project logic debugging method provided in this embodiment processes the corresponding traffic dynamic information according to the preset adjustment rules when there are no corresponding preset debugging resources in the debugging project information, and then generates matching start-up resources, thereby improving the efficiency of PLC project debugging.

[0120] In one implementation of this embodiment, Figure 3 As shown, step S202 processes the traffic dynamic information according to the preset adjustment rules, and generates the enabled resources, including the following steps:

[0121] S301, obtaining corresponding loading progress according to traffic dynamic information;

[0122] S302, determining whether the loading progress complies with a preset adjustment rule;

[0123] S303: If the loading progress meets the preset adjustment rule, obtain the corresponding historical loading information;

[0124] S304, determining whether there is a loading record of the target project in the historical record information;

[0125] S305: If there is a loading record of the target project in the historical record information, obtain the debugging resource with the largest number of loading times in the loading record, and generate a corresponding start resource.

[0126] In actual application, loading progress refers to the debugging loading progress of debugging resources that are currently in a non-idle state; historical loading information refers to the historical records of debugging of PLC projects by debugging resources in traffic dynamic information; loading records refer to the debugging loading records of target projects recorded in historical loading information.

[0127] For example, the target project is a ventilation control system with four motors driving four fans. To ensure the safety of the staff, at least three motors must be running at the same time. The system can use red, yellow and green indicator lights to monitor and indicate the operating status of the motors.

[0128] The loading progress of the ventilation control system debugging resources in the flow dynamic information in the debugging platform is obtained. According to the preset adjustment rules, the loading progress of the debugging resources is above 80%. After relevant tests, the loading progress of the debugging resources is 85%, which can be determined to meet the corresponding preset adjustment rules.

[0129] It is further determined that there is a loading record of ventilation control logic in the historical record information of the debugging resource, then the debugging resource with the most loading and debugging times for the engineering logic of 4 motors driving 4 fans is obtained from its loading record, and the corresponding start resource is generated.

[0130] For another example, if the loading progress of the debugging resource is 75% after relevant detection, it can be determined that it does not meet the corresponding preset adjustment rules, and the debugging resource waiting phase is directly entered.

[0131] The PLC project logic debugging method provided in this embodiment selects the debugging resource that meets the preset adjustment rules and has the largest number of loading times from the loading records of historical loading information to generate the corresponding start-up resource, thereby improving the debugging efficiency of the debugging resource for the target project.

[0132] In one implementation of this embodiment, Figure 4 As shown, step S107 is to read the running service information, and generating corresponding operation information includes the following steps:

[0133] S401, obtaining a temporary operation service according to the operation service information;

[0134] S402, read the temporary operation service and generate the operation result;

[0135] S403, judging whether the operation result meets the preset operation standard;

[0136] S404: If the operation result does not meet the preset operation standard, obtain and mark the abnormal operation items in the temporary operation service, and generate corresponding abnormal prompt information;

[0137] S405: If the operation result meets the preset operation standard, the operation result is processed according to the preset processing rule to generate a target debugging item as operation information.

[0138] In actual application, operation service information refers to the operation information matched by the cloud service platform according to the logical relationship of the target project; temporary operation service refers to the service information of the operation of a single logical function of the target project; preset operation standard refers to the operation standard that should be met according to the logic of the target project; abnormal operation item refers to the item in which a single logical function of the target project in the temporary operation service has an abnormality; preset processing rules refer to the processing rules for the operation data in the operation results.

[0139] For example, A, B, C, and D represent the operating status of the four fans respectively, 0 represents the fan stopping and the indicator light is off, 1 represents the fan running and the indicator light is on, and L1, L2, and L3 represent the red light, yellow light, and green light respectively.

[0140] According to the preset operating standards corresponding to the fan system logic, at least three motors must be running at the same time. The states of the three indicator lights correspond to the three working states in the control requirements. The logical expression of the corresponding target project is: when less than two motors are running, the red light is on and flashes, issuing a warning, indicating poor ventilation; when two motors are running at the same time, the yellow light is on, indicating poor ventilation and the need for improvement; when three or more motors are running at the same time, the green light is on, indicating good ventilation.

[0141] Once the temporary operation service is generated, it will directly use the simulated PLC lower computer logic resources to run, and return the basic I / O point operation results to the browser according to the user project settings. After the browser receives these basic I / O point operation results, it will display them to the user in the form of graphics in the form of status lights.

[0142] For another example, at this time, two of the four fans are running, and the operation result generated by the corresponding temporary operation service is read as L1. It can be determined that the operation result does not meet the preset operation standard corresponding to the fan system logic. Then, the abnormal operation item in which the red light (L1) is on when the two motors are running at the same time is obtained and calibrated, and the yellow light is on when the two motors are running at the same time, indicating poor ventilation, and the operation logic that needs to be improved generates the corresponding abnormal prompt information.

[0143] For another example, at this time, 2 of the 4 wind turbines are running, and the operation result generated by reading the corresponding temporary operation service is L2. It can be determined that the operation result meets the preset operation standard corresponding to the fan system logic. The operation result is then processed according to the preset processing rules to generate the corresponding target debugging item.

[0144] The PLC project logic debugging method provided in this embodiment obtains and reads the corresponding temporary operation service according to the actual situation of the target project, and further tracks the abnormal operation items that do not meet the preset operation standards by judging whether the generated operation results meet the corresponding preset operation standards, and generates corresponding target debugging items for the operation results that meet the preset operation standards, thereby improving the debugging efficiency of the target project during the debugging process.

[0145] In one implementation of this embodiment, Figure 5 As shown, step S108 processes the operation information according to the preset operation rules to generate data drawing results including the following results:

[0146] S501, obtaining corresponding monitoring information according to the calculation information;

[0147] S502, analyzing monitoring information and generating a corresponding monitoring range;

[0148] S503, determining whether the monitoring range meets the preset monitoring standard;

[0149] S504, if the monitoring range meets the preset monitoring standard, the monitoring range is calculated to form corresponding monitoring points;

[0150] S505, register the monitoring point and generate the corresponding registration result;

[0151] S506, determining whether the monitoring point has changed;

[0152] S507: If the monitoring point changes, re-register the monitoring point and generate a corresponding registration result;

[0153] S508, calculating the registration results according to the preset calculation rules to generate batch return values;

[0154] S509: Draw batch return values ​​and generate corresponding data drawing results.

[0155] In actual application, monitoring information refers to the relevant information for monitoring the operating data in the operation information; the monitoring scope refers to the monitoring scope of the monitored data in the monitoring information; the preset monitoring standard refers to the relevant monitoring standard in the debugging process of the target project; the monitoring point refers to the monitoring node set according to the operating node of the operating data in the monitoring scope; the registration result refers to the generation of the corresponding registration result according to the formed monitoring point; the preset operation rule refers to the logical operation rule of the relevant PLC operation in the registration result; the batch return value refers to the batch return of the monitoring point value according to the logical result of the PLC operation; the data drawing result refers to the debugging result of the relevant operating function in the target project.

[0156] It should be noted that the user chooses to modify the program logic or continue debugging through variable monitoring according to the display of the status light. If monitoring is chosen, the browser will collect the variables to be monitored according to the current user engineering interface, generate a monitoring range and submit it to the cloud server. After receiving the request, the cloud server will calculate the corresponding monitoring point, register the monitoring point to the cloud debugging service platform, and return the registration result in the original way.

[0157] After the browser receives the result of successful registration on the cloud debugging service platform, it will automatically initiate a request to read the monitoring point data. The cloud server will forward the request to the cloud debugging service platform. Cloud debugging will apply the user to the resource operation service and return the values ​​of the monitoring points in batches according to the logical results of the PLC operation. After receiving the results of the monitoring points, the browser will draw the data into the user project and display it to the user.

[0158] For example, in the fan system logic, the corresponding monitoring information obtained is the fan operating status and the corresponding display signal. The preset monitoring standard is that the number of fans is 4, and the display colors of the status lights corresponding to the different numbers of fans are red, yellow, and green; the monitoring points are the number of running fans and the display colors of the corresponding status lights.

[0159] Among them, it is known that when less than two motors are running, the red light will light up and flash, issuing a warning, indicating poor ventilation; when two motors are running at the same time, the yellow light will light up, indicating poor ventilation and need to be improved; when three or more motors are running at the same time, the green light will light up, indicating good ventilation. The fan operation nodes actually monitored by the monitoring point are further registered to generate corresponding registration results.

[0160] By parsing the monitoring information, the corresponding monitoring range is obtained, the number of fans is 4, and the display colors of the status lights in the fans when different numbers of fans are running are red, yellow and green respectively. It can be determined that the monitoring range meets the corresponding preset monitoring standards, and the monitoring range is further calculated to obtain the monitoring points with 2 running fans and the corresponding status light color of yellow. Then, the corresponding poor ventilation registration results are generated according to the poor ventilation monitoring points with the yellow light on when the number of fans running is 2, and the poor ventilation registration results are calculated according to the preset calculation rules.

[0161] At this time, it is determined that the corresponding monitoring point has changed. If the number of fans in operation is 3 and the corresponding status light is green, the monitoring point is re-registered to generate

[0162] The corresponding registration results of good ventilation are calculated according to the preset calculation rules, and the corresponding batch return values ​​are further generated, and the batch return values ​​are plotted to generate corresponding data plotting results.

[0163] For another example, by parsing the monitoring information, the corresponding monitoring range is obtained, the number of fans is 3, and the display colors of the status lights in the fans when different numbers of fans are running are red and yellow respectively. It can be determined that the monitoring range does not meet the corresponding preset monitoring standards, and the corresponding abnormal feedback information is further output according to the monitoring range.

[0164] The PLC engineering logic debugging method provided in this embodiment performs reasonable registration based on the actual situation of each monitoring point within the monitoring range, and then generates corresponding registration results, thereby improving the debugging efficiency of the target project.

[0165] In one implementation of this embodiment, Figure 6 As shown, step S505 is to calculate the registration result according to the preset calculation rules, and generate batch return values, including the following steps:

[0166] S601. Obtain corresponding monitoring data according to the registration result;

[0167] S602, determining whether the monitoring data complies with a preset reading rule;

[0168] S603: If the monitoring data meets the preset reading rule, obtain the target reading method corresponding to the monitoring data;

[0169] S604, determining whether the target reading method meets the preset cycle standard;

[0170] S605: If the target reading method meets the preset period standard, the monitoring data is read according to the target reading method to generate batch return values.

[0171] In actual application, monitoring data refers to the operating data about the target project in the registration results; preset reading rules refer to the relevant reading rules corresponding to the attributes of the monitoring data; target reading method refers to the reading method corresponding to the attributes of the monitoring data; preset cycle standard refers to the pre-set cycle for reading monitoring; batch return value refers to the display data generated by reading the monitoring data.

[0172] For example, based on the registration result of poor ventilation, the monitoring data of the yellow light on when the number of running fans is 2 is obtained. According to the preset reading rules, when the reading value of the number of running fans is 2, the corresponding status light is further read as yellow, then it can be determined that the monitoring data meets the corresponding preset reading rules, and then the reading method of the corresponding number of running fans is 2 is obtained. According to the preset cycle standard, when the user's stop monitoring instruction is received, the corresponding cycle is ended, and the reading of the monitoring data is completed according to the user's stop monitoring instruction, and the corresponding batch return value is obtained.

[0173] For another example, based on the good ventilation registration result, the monitoring data of the green light on when the corresponding number of running fans is 3 is obtained. According to the preset reading rules, when the number of running fans is read as 2, the corresponding status light is further read as yellow, then it can be determined that the monitoring data does not comply with the corresponding preset reading rules. Then, according to the preset reading rules, the monitoring data of the green light on when the number of running fans is 2 is further read, and a prompt message of abnormal monitoring data is output.

[0174] The PLC engineering logic debugging method provided in this embodiment reasonably selects the target reading method corresponding to the monitoring data according to the preset reading rules, and reads the monitoring data through the corresponding target reading method according to the preset period standard, thereby improving the reading efficiency of the monitoring data.

[0175] In one implementation of this embodiment, Figure 7 As shown, in step S108, that is, processing the operation information according to the preset operation rules to generate the data drawing result, the following steps are also included:

[0176] S701, obtaining an end debugging instruction according to the data drawing result;

[0177] S702: Reclaim target debugging resources according to the debugging end instruction.

[0178] In actual use, when the user's project logic debugging is completed, the server will recycle the debugging resources according to the corresponding end debugging instructions and save the target project to the cloud service database.

[0179] For example, after the data drawing results are output, the entire debugging operation is completed, and the corresponding end debugging instruction is obtained. According to the end debugging instruction, the debugging resources are recycled, and the target project is saved in the cloud service database. If the cloud debugging platform does not receive any task debugging request from the user within half an hour, the server will also be recycled for reuse to reduce resource waste.

[0180] The PLC engineering logic debugging method provided in this embodiment facilitates the recovery of target debugging resources and reduces resource waste.

[0181] This embodiment also discloses a PLC engineering logic debugging system, such as Figure 8 As shown, including:

[0182] The first acquisition module 1 is used to acquire the target project;

[0183] The second acquisition module 2 is used to acquire corresponding debugging project information according to the target project;

[0184] A judgment module 3 is used to judge whether there is a preset debugging resource in the debugging project information;

[0185] The third acquisition module 4 is used to acquire the corresponding target debugging resource according to the preset adjustment rule if there is no preset debugging resource in the debugging project information;

[0186] A fourth acquisition module 5, if there is a preset debugging resource in the debugging project information, the fourth acquisition module 5 is used to acquire the corresponding target debugging resource according to the preset debugging resource;

[0187] Processing module 6, used to process the target project according to the target debugging resources and generate operation service information;

[0188] The reading module 7 is used to read the operation service information and generate corresponding operation information;

[0189] The generating module 8 is used to process the operation information according to the preset operation rules and generate the data drawing result.

[0190] The PLC engineering logic debugging system provided in the present embodiment acquires the target engineering to be debugged according to the first acquisition module 1, so as to acquire the debugging engineering information corresponding to the target engineering through the second acquisition module 2, and then determines whether there is a corresponding preset debugging resource in the debugging engineering information through the judgment module 3. If not, the corresponding debugging resource is dynamically opened according to the preset adjustment rule, and the corresponding target debugging resource is acquired through the third acquisition module 4. If it exists, the corresponding target debugging resource is directly allocated according to the preset debugging resource through the fourth acquisition module 5, and the target engineering is further processed according to the acquired target debugging resource through the processing module 6 to generate the corresponding operation service information, so that the user can debug the target engineering according to the corresponding operation service information through the reading module 7 and generate the corresponding operation information, and finally the generated operation information is processed by the generation module 8 according to the preset operation rule to generate the data drawing result finally displayed to the user. Since in the process of debugging the target engineering, the target engineering is classified and integrated according to the actual situation of the target engineering, the debugging efficiency of the PLC engineering is improved.

[0191] It should be noted that a PLC engineering logic debugging system provided in an embodiment of the present application also includes modules and / or corresponding sub-modules corresponding to the logic functions or logic steps of any of the above-mentioned PLC engineering logic debugging methods, to achieve the same effects as the various logic functions or logic steps, which will not be described in detail here.

[0192] An embodiment of the present application also discloses a terminal device, including a memory, a processor, and computer instructions stored in the memory and capable of running on the processor, wherein when the processor executes the computer instructions, any one of the PLC engineering logic debugging methods in the above embodiments is adopted.

[0193] The terminal device may be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device may also include input and output devices, a network access device and a bus.

[0194] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.

[0195] Among them, the memory can be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device, or it can be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the terminal device, etc., and the memory can also be a combination of an internal storage unit and an external storage device of the terminal device. The memory is used to store computer instructions and other instructions and data required by the terminal device. The memory can also be used to temporarily store data that has been output or is to be output, and this application does not impose any restrictions on this.

[0196] Among them, through this terminal device, any one of the PLC engineering logic debugging methods in the above embodiments is stored in the memory of the terminal device, and is loaded and executed on the processor of the terminal device for easy use.

[0197] The embodiment of the present application further discloses a computer-readable storage medium, and the computer-readable storage medium stores computer instructions, wherein when the computer instructions are executed by a processor, any one of the PLC engineering logic debugging methods in the above embodiments is adopted.

[0198] Among them, computer instructions can be stored in computer-readable media, computer instructions include computer instruction codes, computer instruction codes can be in source code form, object code form, executable files or certain middleware forms, etc. Computer-readable media include any entity or device that can carry computer instruction codes, recording media, USB flash drives, mobile hard drives, magnetic disks, optical disks, computer memories, read-only memories (ROMs), random access memories (RAMs), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that computer-readable media include but are not limited to the above-mentioned components.

[0199] Among them, through this computer-readable storage medium, any one of the PLC engineering logic debugging methods in the above embodiments is stored in a computer-readable storage medium, and is loaded and executed on a processor to facilitate the storage and application of the above method.

[0200] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A PLC engineering logic debugging method, characterized in that: The following steps are involved: Get the target project; According to the target project, obtaining corresponding debugging project information; Determine whether there is a preset debugging resource in the debugging project information; If the preset debugging resource does not exist in the debugging project information, obtaining the corresponding target debugging resource according to the preset adjustment rule; If the preset debugging resource exists in the debugging project information, acquiring the corresponding target debugging resource according to the preset debugging resource; Processing the target project according to the target debugging resource to generate operation service information; Read the operation service information and generate corresponding operation information; Process the operation information according to preset operation rules to generate data drawing results; If there is no preset debugging resource in the debugging project information, obtaining the corresponding target debugging resource according to the preset adjustment rule includes the following steps: if there is no preset debugging resource in the debugging project information, obtaining traffic dynamic information; processing the traffic dynamic information according to the preset adjustment rule to generate an opening resource; obtaining the target debugging resource according to the opening resource; Processing the traffic dynamic information according to the preset adjustment rule to generate an opening resource includes the following steps: According to the traffic dynamic information, the corresponding loading progress is obtained; whether the loading progress complies with the preset adjustment rules is determined; if the loading progress complies with the preset adjustment rules, the corresponding historical loading information is obtained; whether there is a loading record of the target project in the historical loading information is determined; if there is a loading record of the target project in the historical loading information, the debugging resource with the largest number of loading times in the loading record is obtained, and the corresponding enabling resource is generated.

2. A PLC engineering logic debugging method according to claim 1, characterized in that: Reading the operation service information and generating corresponding operation information includes the following steps: Acquire a temporary operation service according to the operation service information; Read the temporary operation service and generate an operation result; Determining whether the operation result meets the preset operation standard; If the operation result does not meet the preset operation standard, the abnormal operation item in the temporary operation service is obtained and marked, and the corresponding abnormal prompt information is generated; If the operation result meets the preset operation standard, the operation result is processed according to a preset processing rule to generate a target debugging item as the operation information.

3. A PLC engineering logic debugging method according to claim 1, characterized in that: The operation information is processed according to the preset operation rules to generate data drawing results including the following results: According to the computing information, obtaining corresponding monitoring information; Analyze the monitoring information and generate a corresponding monitoring range; Determining whether the monitoring range meets the preset monitoring standard; If the monitoring range meets the preset monitoring standard, the monitoring range is calculated to form a corresponding monitoring point; Registering the monitoring point and generating a corresponding registration result; Determine whether the monitoring point changes; If the monitoring point changes, re-register the monitoring point and generate the corresponding registration result; Read the registration results according to the preset operation rules and generate batch return values; The batch return values ​​are plotted to generate corresponding data plotting results.

4. A PLC engineering logic debugging method according to claim 3, characterized in that: Reading the registration results according to the preset operation rules and generating batch return values ​​comprises the following steps: According to the registration result, obtaining corresponding monitoring data; Determining whether the monitoring data complies with a preset reading rule; If the monitoring data meets the preset reading rule, obtaining the target reading mode corresponding to the monitoring data; Determining whether the target reading method meets the preset cycle standard; If the target reading method meets the preset period standard, the monitoring data is read according to the target reading method to generate the batch return value.

5. A PLC engineering logic debugging method according to claim 1, characterized in that: After the operation information is processed according to the preset operation rules to generate the data drawing result, the following steps are also included: According to the data drawing result, obtain the end debugging instruction; According to the end debugging instruction, the target debugging resource is recovered.

6. A PLC engineering logic debugging system, characterized in that: include: A first acquisition module (1) is used to acquire a target project; A second acquisition module (2) is used to acquire corresponding debugging project information according to the target project; A judgment module (3) is used to judge whether there are preset debugging resources in the debugging project information; A third acquisition module (4), if the preset debugging resource does not exist in the debugging project information, the third acquisition module (4) is used to acquire the corresponding target debugging resource according to a preset adjustment rule; A fourth acquisition module (5), if the preset debugging resource exists in the debugging project information, the fourth acquisition module (5) is used to acquire the corresponding target debugging resource according to the preset debugging resource; A processing module (6) is used to process the target project according to the target debugging resource to generate operation service information; A reading module (7), used for reading the operation service information and generating corresponding operation information; A generating module (8), used for processing the operation information according to a preset operation rule to generate a data drawing result; If there is no preset debugging resource in the debugging project information, obtaining the corresponding target debugging resource according to the preset adjustment rule includes the following steps: if there is no preset debugging resource in the debugging project information, obtaining traffic dynamic information; processing the traffic dynamic information according to the preset adjustment rule to generate an opening resource; obtaining the target debugging resource according to the opening resource; Processing the traffic dynamic information according to the preset adjustment rule to generate an opening resource includes the following steps: According to the traffic dynamic information, the corresponding loading progress is obtained; whether the loading progress complies with the preset adjustment rules is determined; if the loading progress complies with the preset adjustment rules, the corresponding historical loading information is obtained; whether there is a loading record of the target project in the historical loading information is determined; if there is a loading record of the target project in the historical loading information, the debugging resource with the largest number of loading times in the loading record is obtained, and the corresponding enabling resource is generated.

7. A terminal device, comprising a memory and a processor, characterized in that: The memory stores computer instructions that can be run on the processor. When the processor loads and executes the computer instructions, the PLC engineering logic debugging method described in any one of claims 1 to 5 is adopted.

8. A computer-readable storage medium, wherein computer instructions are stored in the computer-readable storage medium, characterized in that: When the computer instructions are loaded and executed by the processor, the PLC engineering logic debugging method according to any one of claims 1 to 5 is adopted.