CN115903644A - PLC engineering logic debugging method, system, terminal device and storage medium - Google Patents

PLC engineering logic debugging method, system, terminal device and storage medium Download PDF

Info

Publication number
CN115903644A
CN115903644A CN202211581884.5A CN202211581884A CN115903644A CN 115903644 A CN115903644 A CN 115903644A CN 202211581884 A CN202211581884 A CN 202211581884A CN 115903644 A CN115903644 A CN 115903644A
Authority
CN
China
Prior art keywords
debugging
preset
information
target
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211581884.5A
Other languages
Chinese (zh)
Inventor
孙安宝
凌舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Flexem Technology Co ltd
Original Assignee
Shanghai Flexem Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Flexem Technology Co ltd filed Critical Shanghai Flexem Technology Co ltd
Priority to CN202211581884.5A priority Critical patent/CN115903644A/en
Publication of CN115903644A publication Critical patent/CN115903644A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Programmable Controllers (AREA)

Abstract

The application relates to the technical field of logic control, in particular to a PLC engineering logic debugging method, a system, terminal equipment and a storage medium, wherein the method comprises the following steps: acquiring a target project; acquiring corresponding debugging project information according to the target project; judging whether preset debugging resources exist in the debugging engineering information or not; if the preset debugging resources do not exist in the debugging engineering information, acquiring corresponding target debugging resources according to a preset adjusting rule; if the preset debugging resources exist in the debugging engineering information, acquiring corresponding target debugging resources according to the preset debugging resources; processing the target project according to the target debugging resources to generate running service information; reading the running service information and generating corresponding operation information; and processing the operation information according to a preset operation rule to generate a data drawing result. The PLC engineering logic debugging method, the PLC engineering logic debugging system, the terminal device and the storage medium can improve the debugging efficiency of the PLC engineering logic.

Description

PLC engineering logic debugging method, system, terminal device and storage medium
Technical Field
The present application relates to the field of logic control technologies, and in particular, to a PLC engineering logic debugging method, system, terminal device, and storage medium.
Background
The Programmable Logic Controller (PLC) is a digital electronic device with a microprocessor, is used for automatically controlling and can load control instructions into a memory at any time for storage and operation.
The programmable controller is formed by modularly combining an internal CPU, an instruction and data memory, an input/output unit, a power supply module, a digital analog unit and the like, and the PLC can receive, input, send and output various types of electric or electronic signals and use the electric or electronic signals to control or supervise almost all types of mechanical and electrical systems.
Because the PLC program is periodically executed, the corresponding debugging service platform resources are limited in the process of debugging the PLC program, and the debugging resources are not reasonably distributed according to the PLC project, so that the efficiency of the PLC project is reduced in the debugging stage.
Disclosure of Invention
In order to improve the debugging efficiency of the PLC engineering, the application provides a PLC engineering logic debugging method, a system, terminal equipment and a storage medium.
In a first aspect, the present application provides a PLC engineering logic debugging method, including the following steps:
acquiring a target project;
acquiring corresponding debugging project information according to the target project;
judging whether preset debugging resources exist in the debugging engineering information or not;
if the preset debugging resources do not exist in the debugging engineering information, acquiring corresponding target debugging resources according to a preset adjusting rule;
if the preset debugging resources exist in the debugging engineering information, acquiring the corresponding target debugging resources according to the preset debugging resources;
processing the target project according to the target debugging resources to generate running service information;
reading the running service information and generating corresponding operation information;
and processing the operation information according to a preset operation rule to generate a data drawing result.
By adopting the technical scheme, the target project is debugged as required to obtain corresponding debugging project information, whether corresponding preset debugging resources exist in the debugging project information is immediately judged, if not, the corresponding debugging resources are dynamically started according to preset adjusting rules to obtain the corresponding target debugging resources, if so, the corresponding target debugging resources are directly distributed according to the preset debugging resources, the target project is further processed according to the obtained target debugging resources to generate corresponding running service information, so that a user debugs the target project according to the corresponding running service information to generate corresponding operation information, and finally, the generated operation information is processed according to the preset operation rules to generate a data drawing result finally displayed to the user.
Optionally, if there is no preset debugging resource in the debugging engineering information, acquiring a corresponding target debugging resource according to a preset adjustment rule includes the following steps:
if the preset debugging resources do not exist in the debugging engineering information, acquiring flow dynamic information;
processing the flow dynamic information according to the preset adjustment rule to generate starting resources;
and acquiring the target debugging resource according to the starting resource.
By adopting the technical scheme, when the corresponding preset debugging resources do not exist in the debugging engineering information, the corresponding flow dynamic information is processed according to the preset adjusting rule, and then the matched starting resources are generated, so that the efficiency of PLC engineering debugging is improved.
Optionally, the processing the dynamic flow information according to the preset adjustment rule, and generating an open resource includes the following steps:
acquiring a corresponding loading progress according to the flow dynamic information;
judging whether the loading progress accords with the preset adjustment rule or not;
if the loading progress accords with the preset adjustment rule, acquiring corresponding historical loading information;
judging whether the loading record of the target project exists in the history information or not;
and if the loading record of the target project exists in the history information, acquiring the debugging resource with the largest loading times in the loading record, and generating the corresponding starting resource.
By adopting the technical scheme, the debugging resources which accord with the preset adjustment rule and have the largest loading times are selected from the loading records of the historical loading information to generate the corresponding starting resources, so that the debugging efficiency of the debugging resources on the target project is improved.
Optionally, the reading the running service information and generating corresponding operation information includes the following steps:
acquiring temporary operation service according to the operation service information;
reading the temporary operation service and generating an operation result;
judging whether the operation result meets a preset operation standard or not;
if the operation result does not meet the preset operation standard, acquiring and calibrating an abnormal operation item in the temporary operation service, and generating corresponding abnormal prompt information;
and if the operation result meets the preset operation standard, processing the operation result according to a preset processing rule to generate a target debugging item as the operation information.
By adopting the technical scheme, the corresponding temporary operation service is acquired and read according to the actual condition of the target project, and further, whether the generated operation result meets the corresponding preset operation standard or not is judged, so that the abnormal operation item which does not meet the preset operation standard can be tracked, and the corresponding target debugging item is generated according to the operation result which meets the preset operation standard, thereby improving the debugging efficiency of the target project in the debugging process.
Optionally, the processing the operation information according to a preset operation rule, and generating a data drawing result includes the following results:
acquiring corresponding monitoring information according to the operation information;
analyzing the monitoring information to generate a corresponding monitoring range;
judging whether the monitoring range meets a preset monitoring standard or not;
if the monitoring range meets the preset monitoring standard, calculating the monitoring range to form a corresponding monitoring point;
registering the monitoring points to generate corresponding registration results;
judging whether the monitoring point changes or not;
if the monitoring point changes, the monitoring point is registered again, and a corresponding registration result is generated;
calculating the registration result according to the preset operation rule to generate batch return values;
and drawing the batch return values to generate corresponding data drawing results.
By adopting the technical scheme, reasonable registration is carried out by combining the actual condition of each monitoring point in the monitoring range, and then a corresponding registration result is generated, thereby improving the debugging efficiency of the target project.
Optionally, the reading the registration result according to the preset operation rule and generating a batch return value includes the following steps:
acquiring corresponding monitoring data according to the registration result;
judging whether the monitoring data accords with a preset reading rule or not;
if the monitoring data conforms to the preset reading rule, acquiring a target reading mode corresponding to the monitoring data;
judging whether the target reading mode meets a preset period standard or not;
and if the target reading mode meets the preset cycle standard, reading the monitoring data according to the target reading mode, and generating the batch return value.
By adopting the technical scheme, the target reading mode corresponding to the monitoring data is reasonably selected according to the preset reading rule, and the monitoring data is read through the corresponding target reading mode according to the preset period standard, so that the reading efficiency of the monitoring data is improved.
Optionally, after processing the operation information according to a preset operation rule and generating a data drawing result, the method further includes the following steps:
acquiring a debugging ending instruction according to the data drawing result;
and recovering the target debugging resources according to the debugging finishing instruction.
By adopting the technical scheme, the target debugging resources are convenient to recycle, and the resource waste is reduced.
In a second aspect, the present application further provides a PLC engineering logic debugging system, including:
the first acquisition module is used for acquiring a target project;
the second acquisition module is used for acquiring corresponding debugging project information according to the target project;
the judging module is used for judging whether preset debugging resources exist in the debugging engineering information or not;
a third obtaining module, configured to obtain, if the preset debugging resource does not exist in the debugging engineering information, a corresponding target debugging resource according to a preset adjustment rule;
a fourth obtaining module, configured to, if the preset debugging resource exists in the debugging engineering information, obtain the corresponding target debugging resource according to the preset debugging resource;
the processing module is used for processing the target project according to the target debugging resources and generating running service information;
the reading module is used for reading the running service information and generating corresponding operation information;
and the generating module is used for processing the operation information according to a preset operation rule and generating a data drawing result.
By adopting the technical scheme, the target project to be debugged is acquired according to the first acquisition module, so that debugging project information corresponding to the target project is acquired through the second acquisition module, whether corresponding preset debugging resources exist in the debugging project information is judged through the judgment module, if not, the corresponding debugging resources are dynamically started according to preset adjustment rules, the corresponding target debugging resources are acquired through the third acquisition module, if so, the corresponding target debugging resources are directly distributed according to the preset debugging resources through the fourth acquisition module, the target project is further processed through the processing module according to the acquired target debugging resources, corresponding running service information is generated, so that a user can debug the target project through the reading module according to the corresponding running service information, corresponding operation information is generated, and finally, the generated operation information is processed through the generation module according to the preset operation rules, a data drawing result which is finally displayed to the user is generated.
In a third aspect, the present application provides a terminal device, which adopts the following technical solution:
the terminal equipment comprises a memory and a processor, wherein computer instructions capable of running on the processor are stored in the memory, and the PLC engineering logic debugging method is adopted when the processor loads and executes the computer instructions.
By adopting the technical scheme, the PLC engineering logic debugging method generates the computer instruction, and the computer instruction is stored in the memory to be loaded and executed by the processor, so that the terminal equipment is manufactured according to the memory and the processor, and the use is convenient.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium, wherein the computer readable storage medium stores computer instructions, and when the computer instructions are loaded and executed by a processor, any one of the above PLC engineering logic debugging methods is used.
By adopting the technical scheme, the PLC engineering logic debugging method generates the computer instruction and stores the computer instruction in the computer readable storage medium so as to be loaded and executed by the processor, and the computer instruction can be conveniently read and stored through the computer readable storage medium.
To sum up, the application comprises the following beneficial technical effects: the method comprises the steps of debugging a target project according to needs to obtain corresponding debugging project information, immediately judging whether corresponding preset debugging resources exist in the debugging project information, if not, dynamically starting the corresponding debugging resources according to preset adjusting rules, obtaining the corresponding target debugging resources, if so, directly distributing the corresponding target debugging resources according to the preset debugging resources, further processing the target project according to the obtained target debugging resources to generate corresponding operation service information, so that a user can debug the target project according to the corresponding operation service information to generate corresponding operation information, and finally, processing the generated operation information according to the preset operation rules to generate a data drawing result finally displayed to the user.
Drawings
Fig. 1 is a schematic flowchart of steps S101 to S108 in the PLC engineering logic debugging method according to the present application.
Fig. 2 is a schematic flowchart of steps S201 to S203 in the PLC engineering logic debugging method according to the present application.
Fig. 3 is a schematic flowchart of steps S301 to S305 in a PLC engineering logic debugging method according to the present application.
Fig. 4 is a schematic flowchart of steps S401 to S405 in the PLC engineering logic debugging method according to the present application.
Fig. 5 is a schematic flowchart of steps S501 to S509 in a PLC engineering logic debugging method according to the present application.
Fig. 6 is a schematic flowchart of steps S601 to S609 in the PLC engineering logic debugging method according to the present application.
Fig. 7 is a schematic flowchart of steps S701 to S702 in the PLC engineering logic debugging method according to the present application.
Fig. 8 is a block diagram of a PLC engineering logic debugging system according to the present application.
Description of reference numerals:
1. a first acquisition module; 2. a second acquisition module; 3. a judgment module; 4. a third obtaining module; 5. a fourth obtaining module; 6. a processing module; 7. a reading module; 8. and generating a module.
Detailed Description
The present application is described in further detail below with reference to figures 1-8.
For the convenience of explaining the scheme, the debugging of the PLC system is taken as an example for explanation, and the debugging of the system can be divided into four steps:
1. checking hardware, each sensor, switch and button being connected to a specific input, each actuator being connected to an output, addresses and wires must not be confused during the engineering process, and furthermore, sensor and actuator placement (which must be located in the automation system) should be checked; during the checking, the output is set to the test mode, and then the actuator must satisfy the prescribed requirements (functions), and if modified, the document (distribution list, drawing, etc.) must also be updated in response to the actual situation.
1.1, testing inputs and outputs, input devices, such as switches can be manipulated to give open and closed contact conditions, and observing the corresponding LED on the input module, which should light up when the input is closed and not when open; the LED may not light up because the input device is not operating properly, the wiring of the input module is wrong, the input device is not powered properly or the LED input module is defective, for a device that can be safely started, a button may have been installed so that each output can be tested.
2. Software and transfer and testing, all available offline and virtual PLC program testing tools should be used collectively to find program failures prior to debugging. For example, this test tool is used in STEP7 as a subroutine S7-PLCSIM, which simulates the operation of a PLC (virtual PLC) and allows a user-written PLC program to perform a test.
Thereafter, the program is transferred to the central processor unit in the virtual PLC, and the entire program is executed without using the real PLC. The user must simulate input signal variations and verify the response of the output to them, some PLCs provide simulation in real PLCs: the entire program is executed in the PLC without actual inputs and outputs. Thus, the processing of the PLC output only occurs in the PLC image table, and the physical PLC/O does not update to the PLC/O map, thus eliminating the risk of damaging the machine or system components.
Thereafter, the individual user program components and system functions are tested: manual operation, setting, personal monitoring programs, etc., and finally, interaction of program components is performed with the help of the main program. An important factor that the system can and should be debugged step by step, debug and fault detection is the test function of the programming system, such as the setting of a single step mode or a stop point, especially the single step mode is important, wherein the program in the PLC memory is executed line by line or step by step, so that any program fault that may occur in the program can be located and searched immediately.
3. The optimization software is almost always improved by the user program after the first test run, and it is important that any modifications or amendments are not only made in the PLC user program, but also taken into account in the documentation.
4. The debugging of the whole system, which part already takes place during the testing and optimization phase, requires all the controller functions (according to the automation task) to be performed step by step once the final state and documentation of the PLC user program is established. If the entire system debug does not fail, the system is handed over to the customer.
The embodiment of the application discloses a PLC engineering logic debugging method, as shown in FIG. 1, comprising the following steps:
s101, acquiring a target project;
s102, acquiring corresponding debugging project information according to a target project;
s103, judging whether preset debugging resources exist in the debugging engineering information or not;
s104, if the preset debugging resources do not exist in the debugging engineering information, acquiring corresponding target debugging resources according to a preset adjusting rule;
s105, if the preset debugging resources exist in the debugging engineering information, acquiring corresponding target debugging resources according to the preset debugging resources;
s106, processing the target project according to the target debugging resources to generate running service information;
s107, reading the running service information and generating corresponding operation information;
and S108, processing the operation information according to a preset operation rule to generate a data drawing result.
The target engineering from the step S101 to the step S102 refers to PLC engineering logic needing debugging; the debugging engineering information refers to debugging engineering information corresponding to a target engineering in the debugging service platform.
In actual application, a user logs in the cloud server through an account and a password in a browser, selects a project and displays the project in the browser, and the user can modify, compile and store the opened project.
For example, an electrical engineer first opens an automation project in a browser, and then a cloud server applies for a service from a cloud debugging service platform to request for opening the project, thereby reading project data of a cloud database.
The preset debugging resources in steps S103 to S105 refer to idle debugging resources in the debugging service platform, the preset adjustment rule refers to a selection rule for dynamically starting the debugging resources, and the target debugging resources refer to debugging resources corresponding to the target project.
For example, a user requests a cloud debugging project, a cloud server applies for service to a cloud debugging service platform, if a preset debugging resource corresponding to a target project does not exist in a current debugging service platform, a selection mode for dynamically starting the debugging resource is obtained to select the target debugging resource, and if the preset debugging resource corresponding to the target project exists in the current debugging service platform, the target debugging resource corresponding to the target project is directly allocated according to the preset debugging resource.
The service information executed in step S106 refers to service information generated by the cloud debugging service loading the target project into the target debugging resource.
In actual application, after a user applies for a cloud debugging resource of a target project, the user selects to start debugging in a browser, a remote server compiles the current target project of the user and loads the current target project into a cloud debugging service platform, and the cloud debugging service loads the target project into the debugging resource applied before to generate corresponding running service information.
The operation information from step S107 to step S108 refers to the relevant data about target project debugging in the operation service information; the preset operation rule refers to a rule for performing related calculation on debugging data in the operation information; the data drawing result refers to related data which is drawn into the user engineering after the browser receives the calculation result of the operation information.
For example, a user can select a monitoring mode for program logic according to running service information, then variables to be monitored are collected according to a current user engineering interface, a corresponding monitoring range is generated and submitted to a cloud server, the cloud server calculates corresponding operation information after receiving a request, a browser automatically initiates a request for reading the operation information after receiving the operation information of a cloud debugging service platform, the cloud server forwards the request to the cloud debugging service platform, the cloud debugging operates the operation information according to preset operation rules, and the obtained operation data are drawn to a user engineering and displayed to the user.
The PLC engineering logic debugging method provided in this embodiment includes the following beneficial technical effects: the method comprises the steps of debugging a target project according to needs to obtain corresponding debugging project information, immediately judging whether corresponding preset debugging resources exist in the debugging project information, if not, dynamically starting the corresponding debugging resources according to preset adjusting rules, obtaining the corresponding target debugging resources, if so, directly distributing the corresponding target debugging resources according to the preset debugging resources, further processing the target project according to the obtained target debugging resources to generate corresponding operation service information, so that a user can debug the target project according to the corresponding operation service information to generate corresponding operation information, and finally, processing the generated operation information according to the preset operation rules to generate a data drawing result finally displayed to the user.
In one implementation manner of this embodiment, as shown in fig. 2, if the preset debug resource does not exist in the debug engineering information in step S104, the obtaining the corresponding target debug resource according to the preset adjustment rule includes the following steps:
s201, if the preset debugging resources do not exist in the debugging engineering information, acquiring flow dynamic information;
s202, processing the flow dynamic information according to a preset adjusting rule to generate starting resources;
and S203, acquiring target debugging resources according to the starting resources.
In practical application, the traffic dynamic information refers to traffic dynamic information about debugging resources corresponding to a target project; the preset adjustment rule is a rule for dynamically adjusting and selecting according to the actual condition of the flow dynamic information; the resource starting refers to a debugging resource which accords with a preset regulation rule in the flow dynamic information.
The user requests a cloud debugging project, the cloud server applies for service to the cloud debugging service platform, if the debugging service platform does not have corresponding idle debugging resources, the cloud debugging service platform can adjust according to preset adjusting rules and actual conditions of flow dynamic information, corresponding starting resources are generated, and corresponding target debugging resources are further obtained according to the starting resources.
For example, if the debugging service platform has no corresponding idle debugging resource, the debugging service platform can obtain the debugging resource according to a preset adjusting rule, preferentially selects the debugging resource which is highly matched with the target project and is debugged immediately, selects the acquired flow dynamic information according to the rule to generate a corresponding starting resource, and further selects the corresponding target debugging resource according to the attribute information of the target project.
According to the PLC engineering logic debugging method provided by the embodiment, when corresponding preset debugging resources do not exist in the debugging engineering information, the corresponding flow dynamic information is processed according to the preset adjusting rule, and then the matched starting resources are generated, so that the efficiency of PLC engineering debugging is improved.
In one implementation manner of this embodiment, as shown in fig. 3, the step S202 of processing the dynamic traffic information according to the preset adjustment rule, and generating the open resource includes the following steps:
s301, acquiring a corresponding loading progress according to the flow dynamic information;
s302, judging whether the loading progress accords with a preset adjustment rule or not;
s303, if the loading progress accords with a preset adjustment rule, acquiring corresponding historical loading information;
s304, judging whether a loading record of the target project exists in the history information;
s305, if the loading record of the target project exists in the history information, acquiring the debugging resource with the maximum loading times in the loading record, and generating a corresponding starting resource.
In actual application, the loading progress refers to the debugging loading progress of the debugging resources currently in a non-idle state, and the historical loading information refers to the historical record of debugging resources in the flow dynamic information for debugging the PLC project in the past; the loading record refers to that a debugging loading record for the target project is recorded in the historical loading information.
For example, the target project is a ventilation control system, 4 motors drive 4 fans to work, in order to ensure the safety of workers, at least 3 motors are required to run simultaneously, and the system can monitor and indicate the running state of the motors by using red, yellow and green indicating lamps.
The loading progress of the debugging resources of the ventilation control system in the flow dynamic information in the debugging platform is obtained according to the preset adjusting rule, the loading progress of the debugging resources is over 80%, and the loading progress of the debugging resources is 85% through relevant detection, so that the corresponding preset adjusting rule can be judged to be met.
And further judging that loading records about the ventilation control logic exist in the history information of the debugging resources, acquiring the debugging resources with the largest loading and debugging times of engineering logic of 4 fans driven by 4 motors in the loading records, and generating corresponding starting resources.
For another example, if the loading progress of the debug resource is 75% through relevant detection, it may be determined that the corresponding preset adjustment rule is not met, and then the process directly enters a debug resource waiting link.
According to the PLC engineering logic debugging method provided by the embodiment, the debugging resources which accord with the preset adjustment rule and have the largest loading times are selected from the loading records of the historical loading information to generate the corresponding starting resources, so that the debugging efficiency of the debugging resources on the target engineering is improved.
In one implementation manner of this embodiment, as shown in fig. 4, the step S107 of reading the running service information and generating the corresponding operation information includes the following steps:
s401, acquiring temporary operation service according to the operation service information;
s402, reading the temporary running service and generating a running result;
s403, judging whether the operation result meets a preset operation standard;
s404, if the operation result does not accord with the preset operation standard, acquiring and calibrating an abnormal operation item in the temporary operation service, and generating corresponding abnormal prompt information;
and S405, if the operation result meets the preset operation standard, processing the operation result according to a preset processing rule, and generating a target debugging item as operation information.
In actual application, the running service information refers to running information matched by the cloud service platform according to the logical relationship of the target project; the temporary operation service refers to service information of the operation of a single logic function of the target project; the preset operation standard refers to an operation standard which is required to be met according to the logic of the target project; the abnormal operation item refers to an item with abnormal logic function of a certain single item of the target project in the temporary operation service; the preset processing rule refers to a processing rule for the operation data in the operation result.
For example, the operating states of 4 fans are represented by a, B, C, and D, respectively, the stop of the fans and the turning-off of the indicator light are represented by 0, the operation of the fans and the turning-on of the indicator light are represented by 1, and the red, yellow, and green lights are represented by L1, L2, and L3, respectively.
The method comprises the following steps that according to a preset operation standard corresponding to the logic of a fan system, at least 3 motors are required to operate simultaneously, the states of 3 indicator lamps correspond to 3 working states in control requirements, and the logic expression corresponding to a target project is as follows: when less than 2 motors run, the red light is lighted, flickers and gives out warning to indicate that the ventilation is poor; when 2 motors run simultaneously, the yellow light is on, which indicates that the ventilation is poor and needs to be improved; when 3 motors and 3 or more motors are simultaneously operated, a green light is turned on, indicating that ventilation is good.
Once the temporary operation service is generated, the temporary operation service can be directly operated by using logic resources of the simulated PLC lower computer, the operation result of the basic I/O point is returned to the browser according to the setting of user engineering, and the browser end can be graphically displayed to a user in a state lamp mode after receiving the operation result of the basic I/O point.
For another example, at this time, 2 fans of 4 fans are operated, the operation result generated by reading the corresponding temporary operation service is L1, and it can be determined that the operation result does not meet the preset operation standard corresponding to the fan system logic, then an abnormal operation item in which the red light (L1) is on when the 2 motors are simultaneously operated is obtained and calibrated, and a yellow light is on when the 2 motors are simultaneously operated, which indicates that ventilation is poor and the operation logic which needs to be improved generates corresponding abnormal prompt information.
For another example, 2 fans are operated in 4 fans at this time, the operation result generated by reading the corresponding temporary operation service is L2, and if it can be determined that the operation result meets the preset operation standard corresponding to the fan system logic, the operation result is processed according to the preset processing rule, and the corresponding target debugging item is generated.
According to the PLC engineering logic debugging method provided by the embodiment, the corresponding temporary operation service is obtained and read according to the actual condition of the target engineering, and further, whether the generated operation result meets the corresponding preset operation standard or not is judged, so that abnormal operation items which do not meet the preset operation standard can be tracked, and corresponding target debugging items are generated according to the operation result which meets the preset operation standard, and therefore the debugging efficiency of the target engineering in the debugging process is improved.
In one embodiment of this embodiment, as shown in fig. 5, the step S108 processes the operation information according to the preset operation rule, and the generated data drawing result includes the following results:
s501, acquiring corresponding monitoring information according to the operation information;
s502, analyzing the monitoring information to generate a corresponding monitoring range;
s503, judging whether the monitoring range meets a preset monitoring standard or not;
s504, if the monitoring range meets a preset monitoring standard, calculating the monitoring range to form a corresponding monitoring point;
s505, registering the monitoring points to generate corresponding registration results;
s506, judging whether the monitoring point changes;
s507, if the monitoring point changes, the monitoring point is registered again, and a corresponding registration result is generated;
s508, calculating a registration result according to a preset operation rule to generate a batch return value;
and S509, drawing the batch return values and generating corresponding data drawing results.
In practical application, the monitoring information refers to relevant information for monitoring operation data in the operation information; the monitoring range refers to the monitoring range of the monitored data in the monitoring information; the preset monitoring standard refers to a related monitoring standard in the target engineering debugging process; the monitoring point is a monitoring node set according to the operation node of the operation data in the monitoring range; the registration result refers to a corresponding registration result generated according to the formed monitoring point; the preset operation rule refers to a logic operation rule of relevant PLC operation in the registration result; the batch return value refers to the batch return of the values of the monitoring points according to the logic result of the PLC operation; the data drawing result refers to a debugging result of a related operation function in the target engineering.
It should be noted that, the user selects to modify the program logic or continue debugging in a variable monitoring mode according to the display of the status light, if monitoring is selected, the browser collects variables to be monitored according to the current user engineering interface, generates a monitoring range and submits the monitoring range to the cloud server, the cloud server calculates corresponding monitoring points after receiving the request, registers the monitoring points to the cloud debugging service platform, and returns the registration result in the original way.
The browser automatically initiates a request for reading the data of the monitoring points after receiving the successful registration result of the cloud debugging service platform, the cloud server forwards the request to the cloud debugging service platform, the cloud debugging applies the user to the service of resource operation, the values of the monitoring points are returned in batches according to the logic result of PLC operation, and the browser draws the data to the user engineering and displays the data to the user after receiving the result of the monitoring points.
For example, in the fan system logic, the obtained corresponding monitoring information is the running state of the fans and the corresponding display signals, the preset monitoring standard is that the number of the fans is 4, and the display colors of the corresponding status lights under the running of different fan numbers are red, yellow and green; the monitoring points are the running number of the fans and the display colors of the corresponding status lights.
Wherein, it is known that when less than 2 motors are running, the red light lights up and flashes, giving a warning indicating a poor ventilation; when 2 motors run simultaneously, the yellow light is on, which indicates that the ventilation is poor and needs to be improved; when 3 or more than 3 motors run simultaneously, the green light is on, which indicates that the ventilation is good, and further registers the fan running node actually monitored by the monitoring point to generate a corresponding registration result.
Through analyzing the monitoring information, the number of the fans is 4, the display colors of the status lights in the fans under the operation of different fan numbers are red, yellow and green respectively, then the monitoring range can be judged to accord with the corresponding preset monitoring standard, the monitoring range is further calculated, the number of the fans is 2, the corresponding status light color is yellow monitoring points, then the corresponding poor ventilation registration result is generated according to the poor ventilation monitoring points with the yellow lights on when the fan operation number is 2, and the poor ventilation registration result is calculated according to the preset operation rule.
At the moment, the corresponding monitoring point is judged to be changed, if the changed monitoring point is that the running number of the fans is 3 and the color of the corresponding status light is green, the monitoring point is registered again to generate
And the corresponding registration result with good ventilation is calculated according to a preset operation rule, a corresponding batch return value is further generated, the batch return value is drawn, and a corresponding data drawing result is generated.
For another example, by analyzing the monitoring information, the corresponding monitoring ranges are obtained, the number of the fans is 3, and the display colors of the status lights in the fans under the operation of different fan numbers are red and yellow, respectively, then it can be determined that the monitoring ranges do not meet the corresponding preset monitoring standard, and then the corresponding abnormal feedback information is further output according to the monitoring ranges.
According to the PLC engineering logic debugging method provided by the embodiment, reasonable registration is carried out according to the actual condition of each monitoring point in the monitoring range, and then the corresponding registration result is generated, so that the debugging efficiency of the target engineering is improved.
In one implementation manner of this embodiment, as shown in fig. 6, the step S505 of computing the registration result according to the preset computing rule and generating the batch return value includes the following steps:
s601, acquiring corresponding monitoring data according to a registration result;
s602, judging whether the monitoring data accords with a preset reading rule;
s603, if the monitored data accords with a preset reading rule, acquiring a target reading mode corresponding to the monitored data;
s604, judging whether the target reading mode meets a preset period standard or not;
and S605, if the target reading mode meets the preset period standard, reading the monitoring data according to the target reading mode, and generating a batch return value.
In practical application, the monitoring data refers to operation data about a target project in a registration result; the preset reading rule refers to a related reading rule corresponding to the monitored data attribute; the target reading mode is a reading mode corresponding to the attribute of the monitoring data; the preset period standard refers to a preset reading monitoring period; the batch return value refers to display data generated by reading the monitoring data.
For example, monitoring data with a yellow light on when the corresponding fan running number is 2 is obtained according to a poor ventilation registration result, the monitoring data can be obtained according to a preset reading rule, when the value of the running wind number is 2, the corresponding status light is further read to be yellow, the monitoring data can be judged to accord with the corresponding preset reading rule, a reading mode with the corresponding fan running number of 2 is immediately obtained, the monitoring data can be obtained according to a preset period standard, when a user stop monitoring instruction is received, the corresponding period is ended, the monitoring data is read according to the user stop monitoring instruction, and a corresponding batch return value is obtained.
For another example, the monitoring data that the green light is on when the corresponding fan operation number is 3 is obtained according to the registration result of good ventilation, the monitoring data can be obtained according to a preset reading rule, when the value of the fan operation number is read to be 2, the corresponding status light is further read to be yellow, the monitoring data can be judged to be not in accordance with the corresponding preset reading rule, when the value of the fan operation number is searched according to a preset reading rule, the monitoring data that the corresponding status light is yellow is further read, and the prompt message that the monitoring data is abnormal is output.
According to the PLC engineering logic debugging method provided by the embodiment, the target reading mode corresponding to the monitoring data is reasonably selected according to the preset reading rule, and the monitoring data is read through the corresponding target reading mode according to the preset period standard, so that the reading efficiency of the monitoring data is improved.
In one embodiment of this embodiment, as shown in fig. 7, after processing the operation information according to the preset operation rule and generating the data drawing result in step S108, the method further includes the following steps:
s701, acquiring a debugging ending instruction according to a data drawing result;
s702, recovering the target debugging resources according to the debugging ending instruction.
In actual application, when the user engineering logic is debugged, the server recovers debugging resources according to a corresponding debugging finishing instruction, and stores the target engineering into the cloud service database.
For example, after the data drawing result is output, the whole debugging operation is finished, a corresponding debugging finishing instruction is obtained, the debugging resources are recovered according to the debugging finishing instruction, the target project is stored in the cloud service database, and if the cloud debugging platform does not receive any task debugging request of the user within half an hour, the server can be recovered for reuse, so that the waste of resources is reduced.
The PLC engineering logic debugging method provided by the embodiment is convenient for recovering target debugging resources and reduces resource waste.
The embodiment further discloses a PLC engineering logic debugging system, as shown in fig. 8, including:
the first acquisition module 1 is used for acquiring a target project;
the second acquisition module 2 is used for acquiring corresponding debugging engineering information according to the target engineering;
the judging module 3 is used for judging whether preset debugging resources exist in the debugging engineering information or not;
the third obtaining module 4, if there is no preset debugging resource in the debugging engineering information, the third obtaining module 4 is configured to obtain a corresponding target debugging resource according to a preset adjustment rule;
a fourth obtaining module 5, configured to, if the preset debugging resource exists in the debugging engineering information, obtain the corresponding target debugging resource according to the preset debugging resource by the fourth obtaining module 5;
the processing module 6 is used for processing the target project according to the target debugging resources and generating running service information;
the reading module 7 is used for reading the running service information and generating corresponding operation information;
and the generating module 8 is used for processing the operation information according to the preset operation rule and generating a data drawing result.
The PLC engineering logic debugging system provided in this embodiment acquires a target engineering to be debugged according to a first acquisition module 1, so as to acquire debugging engineering information corresponding to the target engineering through a second acquisition module 2, immediately judge whether a corresponding preset debugging resource exists in the debugging engineering information through a judgment module 3, if not, dynamically turn on a corresponding debugging resource according to a preset adjustment rule, acquire a corresponding target debugging resource through a third acquisition module 4, if so, directly allocate a corresponding target debugging resource according to the preset debugging resource through a fourth acquisition module 5, further process the target engineering according to the acquired target debugging resource through a processing module 6, generate corresponding operation service information, so that a user debugs the target engineering according to the corresponding operation service information through a reading module 7, generate corresponding operation information, and finally process the generated operation information according to the preset operation rule through a generation module 8, generate a data drawing result which is finally displayed to the user.
It should be noted that the PLC engineering logic debugging system provided in the embodiment of the present application further includes each module and/or corresponding sub-module corresponding to a logic function or a logic step of any one of the above PLC engineering logic debugging methods, so as to achieve the same effect as each logic function or logic step, and is not specifically described herein again.
The embodiment of the application further discloses a terminal device, which comprises a memory, a processor and a computer instruction which is stored in the memory and can run on the processor, wherein when the processor executes the computer instruction, any one of the PLC engineering logic debugging methods in the embodiments is adopted.
The terminal device may adopt a computer device such as a desktop computer, a notebook 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 further include an input/output device, a network access device, a bus, and the like.
The processor may be a Central Processing Unit (CPU), and of course, according to an actual use situation, other general processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like may also be used, and the general processor may be a microprocessor or any conventional processor, and the present application does not limit the present invention.
The memory may be an internal storage unit of the terminal device, for example, a hard disk or a memory of the terminal device, or an external storage device of the terminal device, for example, a plug-in hard disk, a smart card memory (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the terminal device, and the memory may also be a combination of the internal storage unit of the terminal device and the external storage device, and the memory is used for storing computer instructions and other instructions and data required by the terminal device, and the memory may also be used for temporarily storing data that has been output or will be output, which is not limited in this application.
The terminal device stores any one of the PLC engineering logic debugging methods in the embodiments in a memory of the terminal device, and the PLC engineering logic debugging method is loaded and executed on a processor of the terminal device, so that the PLC engineering logic debugging method is convenient to use.
The embodiment of the 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 the processor, any one of the PLC engineering logic debugging methods in the embodiments is adopted.
The computer instructions may be stored in a computer-readable medium, where the computer instructions include computer instruction code, and the computer instruction code may be in a source code form, an object code form, an executable file or some intermediate form, and the like, and the computer-readable medium includes any entity or device capable of carrying computer instruction code, a recording medium, a usb disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, and the like.
The computer-readable storage medium stores any one of the PLC engineering logic debugging methods in the above embodiments in the computer-readable storage medium, and is loaded and executed on a processor, so as to facilitate storage and application of the methods.
The above are preferred embodiments of the present application, and the scope of protection of the present application is not limited thereto, so: all equivalent changes made according to the structure, shape and principle of the present application shall be covered by the protection scope of the present application.

Claims (10)

1. A PLC engineering logic debugging method is characterized by comprising the following steps:
acquiring a target project;
acquiring corresponding debugging project information according to the target project;
judging whether preset debugging resources exist in the debugging engineering information or not;
if the preset debugging resources do not exist in the debugging engineering information, acquiring corresponding target debugging resources according to a preset adjusting rule;
if the preset debugging resources exist in the debugging engineering information, acquiring the corresponding target debugging resources according to the preset debugging resources;
processing the target project according to the target debugging resources to generate running service information;
reading the running service information and generating corresponding operation information;
and processing the operation information according to a preset operation rule to generate a data drawing result.
2. The PLC engineering logic debugging method according to claim 1, wherein if there is no preset debugging resource in the debugging engineering information, acquiring a corresponding target debugging resource according to a preset adjustment rule comprises the following steps:
if the preset debugging resources do not exist in the debugging engineering information, acquiring flow dynamic information;
processing the flow dynamic information according to the preset adjustment rule to generate starting resources;
and acquiring the target debugging resource according to the starting resource.
3. The PLC engineering logic debugging method of claim 2, wherein the step of processing the dynamic flow information according to the preset adjustment rule to generate a starting resource comprises the following steps:
acquiring a corresponding loading progress according to the flow dynamic information;
judging whether the loading progress accords with the preset adjustment rule or not;
if the loading progress accords with the preset adjustment rule, acquiring corresponding historical loading information;
judging whether the history information contains a loading record of the target project or not;
and if the loading record of the target project exists in the history information, acquiring the debugging resource with the largest loading times in the loading record, and generating the corresponding starting resource.
4. The PLC engineering logic debugging method of claim 1, wherein the step of reading the operating service information and generating corresponding operation information comprises the steps of:
acquiring temporary operation service according to the operation service information;
reading the temporary operation service and generating an operation result;
judging whether the operation result meets a preset operation standard or not;
if the operation result does not accord with the preset operation standard, acquiring and calibrating an abnormal operation item in the temporary operation service, and generating corresponding abnormal prompt information;
and if the operation result meets the preset operation standard, processing the operation result according to a preset processing rule to generate a target debugging item as the operation information.
5. The PLC engineering logic debugging method of claim 1, wherein the processing the operation information according to a preset operation rule to generate a data drawing result comprises the following results:
acquiring corresponding monitoring information according to the operation information;
analyzing the monitoring information to generate a corresponding monitoring range;
judging whether the monitoring range meets a preset monitoring standard or not;
if the monitoring range meets the preset monitoring standard, calculating the monitoring range to form a corresponding monitoring point;
registering the monitoring points to generate corresponding registration results;
judging whether the monitoring point changes or not;
if the monitoring point changes, the monitoring point is registered again, and a corresponding registration result is generated;
calculating the registration result according to the preset operation rule to generate batch return values;
and drawing the batch return values to generate corresponding data drawing results.
6. The PLC engineering logic debugging method of claim 5, wherein the step of reading the registration result according to the preset operation rule and generating a batch return value comprises the steps of:
acquiring corresponding monitoring data according to the registration result;
judging whether the monitoring data accords with a preset reading rule or not;
if the monitoring data conforms to the preset reading rule, acquiring a target reading mode corresponding to the monitoring data;
judging whether the target reading mode meets a preset period standard or not;
and if the target reading mode meets the preset cycle standard, reading the monitoring data according to the target reading mode, and generating the batch return value.
7. The PLC engineering logic debugging method of claim 1, further comprising the following steps after processing the operation information according to a preset operation rule and generating a data drawing result:
acquiring a debugging ending instruction according to the data drawing result;
and recovering the target debugging resources according to the debugging finishing instruction.
8. A PLC engineering logic debugging system, comprising:
the first acquisition module (1) is used for acquiring a target project;
the second acquisition module (2) is used for acquiring corresponding debugging project information according to the target project;
the judging module (3) is used for judging whether preset debugging resources exist in the debugging engineering information or not;
the third obtaining module (4), if the preset debugging resources do not exist in the debugging engineering information, the third obtaining module (4) is used for obtaining the corresponding target debugging resources according to a preset adjusting rule;
a fourth obtaining module (5), if the preset debugging resource exists in the debugging engineering information, the fourth obtaining module (5) is configured to obtain the corresponding target debugging resource according to the preset debugging resource;
the processing module (6) is used for processing the target project according to the target debugging resources to generate running service information;
the reading module (7) is used for reading the running service information and generating corresponding operation information;
and the generating module (8) is used for processing the operation information according to a preset operation rule to generate a data drawing result.
9. A terminal device, comprising a memory and a processor, wherein the memory stores computer instructions capable of running on the processor, and when the processor loads and executes the computer instructions, the PLC engineering logic debugging method according to any one of claims 1 to 7 is adopted.
10. A computer readable storage medium, wherein computer instructions are stored in the computer readable storage medium, and when the computer instructions are loaded and executed by a processor, the PLC engineering logic debugging method according to any one of claims 1 to 7 is adopted.
CN202211581884.5A 2022-12-09 2022-12-09 PLC engineering logic debugging method, system, terminal device and storage medium Pending CN115903644A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211581884.5A CN115903644A (en) 2022-12-09 2022-12-09 PLC engineering logic debugging method, system, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211581884.5A CN115903644A (en) 2022-12-09 2022-12-09 PLC engineering logic debugging method, system, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN115903644A true CN115903644A (en) 2023-04-04

Family

ID=86491321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211581884.5A Pending CN115903644A (en) 2022-12-09 2022-12-09 PLC engineering logic debugging method, system, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN115903644A (en)

Similar Documents

Publication Publication Date Title
US20190258945A1 (en) Fault diagnosis apparatus and machine learning device
US7321885B2 (en) Product framework for managing test systems, supporting customer relationships management and protecting intellectual knowledge in a manufacturing testing environment
US20030005416A1 (en) Fault search method and apparatus
US20070220330A1 (en) Computer-Supported Diagnostic System, Based on Heuristics and System Topologies
CN116009480A (en) Fault monitoring method, device and equipment of numerical control machine tool and storage medium
CN114076873A (en) Cable fault analysis and prediction method and device
CN112230561A (en) Simulation test method and system for CAN bus controller software
CN115903644A (en) PLC engineering logic debugging method, system, terminal device and storage medium
CN111142469B (en) Debugging method and debugging system for PLC configuration program
CN112269370A (en) Vehicle control unit and motor controller combined test system and method
CN113726543B (en) Operation and maintenance service processing method, device, system, server and storage medium
KR100636404B1 (en) Method and System for Testing by Using Automatic Control Program
CN112580942A (en) Substation operation ticket library configuration method and sequence control operation task generation method
CN112416805A (en) Test management cloud platform and method
JPH08110809A (en) Electric power system simulation device
CN109375576B (en) PLC program signal online analysis and diagnosis method
JPH07129677A (en) Production simulation device
JP2001337824A (en) Nuclear instrumentation design supporting system
JPH10274920A (en) Plant simulator
JP2940586B2 (en) Simulation test method for plant control device and simulator for plant control device
CN117590821B (en) Production line optimization method based on industrial large model
US20230419009A1 (en) Computer-implemented method for simulating an electrical circuit by means of a real-time platform
JP2001243084A (en) Power system monitor controller and storage medium with program for executing the same stored
CN115881291A (en) Operation and maintenance training system and training method for medical equipment
JPH02220145A (en) Program tracing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination