Rapid troubleshooting method for fault program segment of programmable controller of machinery equipment

By adding marker numbers and mechanical action displays to the PLC program, the problem of difficulty in quickly finding PLC program segments is solved, fast and accurate troubleshooting is achieved, and the self-inspection and troubleshooting efficiency of mechanical equipment is improved.

CN120630848APending Publication Date: 2025-09-12LIUZHOU HONGDE LASER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510575437.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

It is difficult to quickly locate faulty program segments in the programmable controller (PLC) programs of existing machine equipment, resulting in abnormal equipment operation and affecting machining efficiency.

Method used

When writing a PLC program, each program segment corresponds to a mechanical action, and a marker number is added after each segment. The mechanical action and marker number named by the register are displayed on the human-machine interface. The display status of the marker number is used to determine whether the program segment is completed and quickly locate the faulty program segment.

Benefits of technology

It enables the rapid and accurate identification of faulty program segments among tens of thousands of programs, thus improving the self-checking efficiency and troubleshooting speed of mechanical equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120630848A_ABST
    Figure CN120630848A_ABST
Patent Text Reader

Abstract

The invention discloses a quick troubleshooting method for fault program segments of a programmable controller of machinery equipment, which comprises the following steps of: when a program of a programmable control programmer is written, enabling each program segment to correspond to a mechanical action, adding a mark number behind each program segment, writing the character and the mark number of each mechanical action named by the register on a display screen of a human-computer interface, so that the character and the mark number of each mechanical action are displayed on the display screen of the human-computer interface when each program segment is operated; when a certain mechanical action and a mark number are displayed on a display screen of the human-computer interface all the time and a next mechanical action and a next mark number are not displayed any more, it is indicated that the mechanical action is not completed smoothly, and the section of program code of the mark number has a problem and is a fault program section. According to the invention, the problem that the fault program segment of the existing programmable controller is difficult to find can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic control technology, in particular to a method for self-checking a program in a programmable controller of a machine device and for quickly judging and troubleshooting a faulty program segment. Background Art

[0002] Program errors are the most common problem with programmable logic controllers (PLCs) in current machine equipment. These errors typically manifest as logic errors, programming syntax errors, or improper exception handling, all of which can cause PLCs to operate erratically. Because PLCs control multiple motions in a machine, the program code is relatively large. Errors within these programs can affect the normal operation of the machine. However, locating the error-prone section within this vast code is a complex task. Testing each section from beginning to end is labor-intensive and time-consuming, impacting machining efficiency. Therefore, a method is needed to quickly and easily perform self-checking, diagnosis, and troubleshooting of program code to overcome this technical bottleneck. Summary of the Invention

[0003] The problem to be solved by the present invention is to provide a method for quickly troubleshooting faulty program segments of a programmable controller of a machine device, so as to solve the problem that faulty program segments of existing programmable controllers are difficult to find.

[0004] In order to solve the above problems, the technical solution of the present invention is: the method for quickly troubleshooting faulty program segments of the programmable controller of the machine equipment includes the following steps: when writing the programmable controller program, each program segment corresponds to a mechanical action, and a label number is added after each degree segment, and then the words of each mechanical action named by the register and each label number are written on the human-machine interface display screen, so that when running to each program segment, the words of each mechanical action and each label number are displayed on the human-machine interface display screen; when a certain mechanical action and label number are displayed on the human-machine interface display screen for a long time, and the next mechanical action and the next label number are no longer displayed, it means that the mechanical action has not been completed smoothly, and the program code of the label number has a problem and is a faulty program segment.

[0005] In the above technical solution, a more specific solution may be: all marking numbers contain ordered numbers.

[0006] Further: All marking numbers contain sequential numbers and letters.

[0007] Further: when writing a programmable controller program, name the register as the first mechanical action, and at the beginning of the program, pass the first label number into the corresponding register for storage. When the instruction determines that the number stored in the register is equal to the first label number, the program starts running, and the second mechanical action is added to this program segment. When the action condition of the second mechanical action is met, the MOV instruction is judged and output, and the second label number is passed into the register for storage. At this time, it indicates that the second mechanical action program is completed; when the instruction determines that the number stored in the register is equal to the second label number, the program starts running, and the third mechanical action is added to this program segment. When the action condition of the third mechanical action is met, the MOV instruction is judged and output, and the third label number is passed into the register for storage. At this time, it indicates that the third mechanical action program is completed; when the instruction determines that the number stored in the register is equal to the third label number, the program starts running, and the fourth mechanical action is added to this program segment, and so on, until the program of all actions of the entire operation process of the mechanical equipment is completed.

[0008] Furthermore: the following steps are also included: the words and each label number of each mechanical action named by the register are written on the human-machine interface display screen, so that the words and each label number of each mechanical action are displayed on the human-machine interface display screen when running to each program segment; when the instruction judges that the label number stored in the register is equal to the nth label number, the program segment starts to run, and the corresponding nth mechanical action is added to this program segment. When the conditions of the mechanical action are met, the output MOV instruction is judged to pass the n+1th label number into the register for storage. At this time, it means that the program of this mechanical action is completed, and the n+1th label number is seen on the human-machine interface display screen, indicating that the program of the nth mechanical action is completed without any problem. If the nth label number is always seen on the human-machine interface display screen and the n+1th label number is no longer displayed, it means that the nth mechanical action of the mechanical equipment has not been completed normally, that is, the program segment with the nth label number has a problem and is a faulty program segment.

[0009] Due to the adoption of the above technical solution, the present invention has the following beneficial effects compared with the prior art: The method for quickly troubleshooting faulty program segments of the programmable controller of this machine equipment adopts the following method: when writing the programmable controller program, each program segment corresponds to a mechanical action, and a label number is added after each level segment. Then, the words of each mechanical action named by the register and each label number are written on the human-machine interface display screen, so that when running to each program segment, the words of each mechanical action and each label number are displayed on the human-machine interface display screen. When a certain mechanical action and label number are always displayed on the human-machine interface display screen, and the next mechanical action and the next label number are no longer displayed, it means that the mechanical action has not been completed smoothly. The program code of the label number has a problem and is a faulty program segment. In this way, the user or debugger of the equipment can find the problematic program segment of the equipment more clearly and quickly among thousands of programmable controller programs. The method is simple and the judgment is accurate. Self-checking can be performed every time the equipment is run to quickly troubleshoot the faulty program segment. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is a partial operation diagram of a programmable controller for programming a machine device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0011] The embodiments of the present invention are further described below in conjunction with the accompanying drawings: Taking the program in the PLC of a certain unit's automatic loading and unloading equipment for aluminum substrates as an example, the method for quickly troubleshooting the faulty program segment of the programmable controller of this machine equipment includes the following steps.

[0012] like Figure 1As shown in the red box, when writing the programmable controller program, the D20 register is named the loading step. At the beginning of the program, the K30 byte is transferred to D20 for storage. When the = instruction (red box 1) determines that D20=K30, the program starts running. The next mechanical action (such as cylinder pressing) is added to this D20K30 program. When the conditions for the cylinder pressing action are met, the output MOV instruction (red box 2) is judged to transfer K40 to D20 for storage. At this time, it means that the cylinder pressing program is completed. When the = instruction (red box 3) determines that D20= When K40 is pressed, the program starts running. The next mechanical action (such as cylinder rising) is added to this D20K40 program. When the conditions for the cylinder rising action are met, the output MOV instruction (red box 4) is judged to pass K50 to D20 for storage. This means that the cylinder rising program has completed running. When the = instruction (red box 5) judges that D20=K50, the program starts running. The next mechanical action is added to this D20K40 program. By analogy, the program for the entire running process of the machine equipment can be completed. Then write the "D20 loading step" byte display window on the human-machine interface display. When there are tens of thousands of programmable controller programs written, if there is a problem with the debugging device or the device during automatic operation, you only need to look at the number in the "D20 loading step" byte display window on the human-machine interface display to identify which line has the problem among the tens of thousands of programmable controller programs. For example: Figure 1 When the = instruction (red box 3) determines that D20=K40, the program starts to run. The cylinder rising action is added to this D20K40 program. When the cylinder rising action is satisfied, the output MOV instruction (red box 4) is judged to pass K50 to D20 for storage. At this time, it means that the cylinder rising program is completed. If K50 is seen in the "D20 loading step" byte display window on the human-machine interface display, it means that the program is completed without any problems. If K40 is displayed all the time and K50 is no longer displayed, it means that the fourth mechanical action of the mechanical equipment (such as cylinder rising) has not been completed normally, that is, the program segment with the mark number K40 has a problem and is a faulty program segment.

[0013] The method for quickly troubleshooting faulty program segments of the programmable controller of this machine equipment adopts the following method: when writing the programmable controller program, each program segment corresponds to a mechanical action, and a label number is added after each level segment. Then, the words of each mechanical action named by the register and each label number are written on the human-machine interface display screen, so that when running to each program segment, the words of each mechanical action and each label number are displayed on the human-machine interface display screen. When a certain mechanical action and label number are always displayed on the human-machine interface display screen, and the next mechanical action and the next label number are no longer displayed, it means that the mechanical action has not been completed smoothly. The program code of the label number has a problem and is a faulty program segment. In this way, the user or debugger of the equipment can find the problematic program segment of the equipment more clearly and quickly among thousands of programmable controller programs. The method is simple and the judgment is accurate. Self-checking can be performed every time the equipment is run to quickly troubleshoot the faulty program segment.

Claims

1. A method for quickly troubleshooting faulty program segments of a programmable controller of a machine device, characterized in that The following steps are involved: When writing a programmable controller program, each program segment corresponds to a mechanical action. A label number is added after each program segment, and the words of each mechanical action named by the register and each label number are written on the human-machine interface display screen, so that when running to each program segment, the words of each mechanical action and each label number are displayed on the human-machine interface display screen; when a certain mechanical action and label number are displayed on the human-machine interface display screen for a long time, and the next mechanical action and the next label number are no longer displayed, it means that the mechanical action has not been completed smoothly, and the program code of the label number has a problem and is a faulty program segment.

2. The method for quickly troubleshooting a faulty program segment of a programmable controller of a machine device according to claim 1 is characterized in that: All tags contain sequential numbers.

3. The method for quickly troubleshooting a faulty program segment of a programmable controller of a machine device according to claim 2, characterized in that: All markings contain sequential numbers and letters.

4. The method for quickly troubleshooting a faulty program segment of a programmable controller of a machine device according to claim 3 is characterized in that: When writing a programmable controller program, name the register as the first mechanical action. At the beginning of the program, pass the first label number to the corresponding register for storage. When the instruction determines that the number stored in the register is equal to the first label number, the program starts running. Add the second mechanical action to this program segment. When the action condition of the second mechanical action is met, judge and output the MOV instruction, and pass the second label number to the register for storage. This indicates that the second mechanical action program is completed. When the instruction determines that the number stored in the register is equal to the second label number, the program starts running. Add the third mechanical action to this program segment. When the action condition of the third mechanical action is met, judge and output the MOV instruction, and pass the third label number to the register for storage. This indicates that the third mechanical action program is completed. When the instruction determines that the number stored in the register is equal to the third label number, the program starts running. Add the fourth mechanical action to this program segment, and so on. Complete the program writing of all actions of the entire operation process of the mechanical equipment.

5. The method for quickly troubleshooting a faulty program segment of a programmable controller of a machine device according to claim 4 is characterized in that The following steps are also included: Then write the words and each label number of each mechanical action named by the register on the human-machine interface display screen, so that the words and each label number of each mechanical action will be displayed on the human-machine interface display screen when running to each program segment; when the instruction judges that the label number stored in the register is equal to the nth label number, the program segment starts to run, and the corresponding nth mechanical action is added to this program segment. When the condition of the mechanical action is met, the output MOV instruction is judged to pass the n+1th label number into the register for storage. At this time, it means that the program of this mechanical action is completed, and the n+1th label number is seen on the human-machine interface display screen, indicating that the program of the nth mechanical action is completed without any problem. If the nth label number is always seen on the human-machine interface display screen and the n+1th label number is no longer displayed, it means that the nth mechanical action of the mechanical equipment has not been completed normally, that is, the program segment with the nth label number has a problem and is a faulty program segment.