Error state control method of PLC system

By executing error event tasks in the PLC system and selectively processing external module signals, the problem of the PLC system frequently entering error mode is solved, reducing maintenance time and improving system flexibility.

CN114375426BActive Publication Date: 2024-09-03LS ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080063500.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-09-11
Filing Date
2020-03-12
Publication Date
2024-09-03
Estimated Expiration
2040-03-12

AI Technical Summary

Technical Problem

The existing PLC system frequently enters error mode when unexpected errors occur, causing the operation state to stop, requiring the user to manually release it, which increases maintenance time and cost.

Method used

By executing error event tasks in the central processing device of the PLC system, selectively blocking or processing external module signals, reducing the frequency of entering error mode, and setting the execution of error event tasks based on the impact of external modules and the number of error occurrences. Strategy.

Benefits of technology

It reduces the frequency of the PLC system entering error mode, reduces the time required for maintenance and repair, and improves the system's flexibility and management convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114375426B_ABST
    Figure CN114375426B_ABST
Patent Text Reader

Abstract

The present invention relates to an error state control method for a PLC system, which comprises: a) a control program executed in a computer used for setting the PLC system is used to create an error event task that can be executed by a central processing unit of the PLC system and turns on, off or blocks a signal from an external module, and stores the task in a memory of the PLC system; b) a program stored in the memory is executed by the central processing unit of the PLC system in stages; c) a central processing unit confirms whether a signal notifying the occurrence of an error is received from the external module; and d) a process of preventing the central processing unit from operating in an error mode by executing the error event task when a signal notifying the occurrence of an error is received in step c).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an error state control method of a PLC system, and more particularly to an error state control method of a PLC system capable of minimizing debugging processing. Background Art

[0002] Generally, PLC (Programmable Logic Controller) is mainly used in non-contact sequential control circuit systems for factory automation. It is used to construct a control system by connecting elements such as relays, timers, and counters by hardware, or in non-contact timing control that can change programs.

[0003] The advantages of PLC are that it is fast, environmentally resistant, easy to operate, economical, and includes multiple control elements, capable of programmable real-time combined control, rather than a simple sequential controller.

[0004] Typically, a PLC includes: an input circuit connected to a plurality of sensors; an output circuit connected to a control object such as a motor; an internal memory and an external memory storing programs for executing processing based on the input; and a central processing unit for processing so that the signal input through the input circuit can be processed according to the program and output through the output circuit.

[0005] In order to improve the reliability of PLC, the stability of the system itself is an important factor, but when an abnormality occurs due to an undefined error during system operation, whether the abnormality can be effectively handled is also a very important factor.

[0006] The existing PLC system is designed to automatically enter the error mode (Error Mode) when an unexpected error occurs and causes abnormal control action.

[0007] For this purpose, the central processing unit of the PLC has a self-diagnosis function, but there is a problem that an additional safety circuit needs to be implemented for the input and output control parts that cannot be detected by the central processing unit.

[0008] Normally, when operating in error mode, all outputs are turned off and an alarm is sounded. Alternatively, all outputs may be kept in their current state or turned off according to parameter settings, depending on the situation.

[0009] Next, the error state control method of the conventional PLC system as described above will be described with reference to the drawings.

[0010] Figure 1 It is a scanning flow chart of the existing PLC system.

[0011] Reference Figure 1The existing PLC system includes an initialization processing step (S11), an input image area refresh step (S12), a program operation processing step (S13), an output image area refresh step (S14), an end processing step (S15), an error occurrence judgment step (S16), and an error mode entry step (S17) of entering an error mode from a running state when an error occurs.

[0012] In a PLC system, scanning refers to the process of repeatedly calculating and executing a program created as the basic program operation mode of the PLC from the beginning to the end.

[0013] First, step S11 is a step in which the PLC is driven for the first time by turning on the power or resetting the power, and performs data initialization and initialization operations of each module.

[0014] Next, in step S12, the state of the input module is read and stored in the memory. The input module here means various sensors, and the state value of the sensor is read and stored as initial data in the internal memory of the PLC.

[0015] Next, as in step S13, the central processing unit of the PLC executes the program stored in the internal memory or the external memory. At this time, the data stored in the memory is used in the execution of the program.

[0016] The execution of the program is a continuous operation from the beginning to the end of the created program.

[0017] Figure 2 This is an example diagram of a program that is processed by the central processing unit of a PLC.

[0018] like Figure 2 As shown, the program may include a scanning program 100 having a plurality of processing programs and an event task 200 added to the user program.

[0019] Event tasks can be added to perform various executions according to cycle, device conditions, etc.

[0020] Next, as in step S14, when the program operation is completed, the output value as the result of the operation is stored in the output image area, and the stored data is output to the output module. The output module in this case is various external devices, and a motor can be a representative example.

[0021] As described above, in order to return to the beginning again after executing the operation according to the given user program, the end processing is performed as step S15. The end processing at this time is a process based on the self-diagnosis module included in the central processing unit to perform self-diagnosis and confirm whether there is a user event.

[0022] User events can occur in a wide variety of ways and can include changes in the scanning process or physical environment changes such as the separation of specific input modules or output modules, new connections, etc.

[0023] Next, in step S16, it is confirmed whether a fault error occurs in the external devices including the input module and the output module.

[0024] The fault error at this time is determined based on whether there is a fault diagnosis signal sent to the central processing unit of the PLC when the external equipment including the input module such as the sensor and the output module such as the motor fails.

[0025] In the step S16, if it is determined that the fault diagnosis signal is not input from the external device, the step S11 is executed again.

[0026] On the contrary, if it is determined that a fault diagnosis signal is input from an external device, the process enters the error mode of step S17.

[0027] Here, the error mode means that the central processing unit of the PLC is in a stopped state rather than a running state (Run), and the user needs to use PADT (Programmable Debugging Tool) to solve or force the error state to be released and reset, so that the central processing unit of the PLC can operate in a running state.

[0028] At this time, the number of input modules and output modules connected via the PLC varies depending on the system, but when applied to factory automation, it is connected to a very large number of external devices.

[0029] In the past, the central processing unit of the PLC responded to the fault diagnosis signals of all external devices. If a fault diagnosis signal was input, it would enter an error mode. As a result, the operation of the PLC would stop very frequently, and the user would need to manually release the error mode in order to reset it. This resulted in a problem that maintenance took a lot of time and increased costs. Summary of the invention

[0030] Problem that the invention aims to solve

[0031] In view of the above problems, an object of the present invention is to provide an error state control method of a PLC system that can reduce the frequency of entering an error mode.

[0032] In addition, the present invention also aims to provide an error state control method for a PLC system that can improve the flexibility of the PLC system and reduce user intervention.

[0033] Means used to solve problems

[0034] The error state control method of the PLC system of the present invention for achieving the purpose as described above includes: a) step of using a control program executed in a computer used for PLC system setting to create an error event task that can be executed by the central processing unit of the PLC system and turns on, off or blocks the signal of an external module, and storing it in the memory of the PLC system; b) step of the central processing unit of the PLC system executing the program stored in the memory in stages; c) step of the central processing unit confirming whether a signal notifying the occurrence of an error is received from the external module; and d) step of preventing the central processing unit from running in error mode by executing the error event task when a signal notifying the occurrence of an error is received in step c).

[0035] In an embodiment of the present invention, the step d) includes, when receiving the signal notifying the occurrence of an error, confirming whether there is an error event task for the external module, and in the absence of an error event task, the central processing unit can operate in error mode.

[0036] In an embodiment of the present invention, in the step d), when there is an error event task for the external module where an error occurs, the error event task can be executed when the number of executions of the error event task is less than the set number of times, and the central processing unit can operate in error mode when the number of executions of the error event task is greater than the set number of times.

[0037] In an embodiment of the present invention, the set number of times may be set differently according to the external module.

[0038] In an embodiment of the present invention, if the confirmation result of step c) is that no signal notifying the occurrence of an error is received, step b) may be performed again.

[0039] In an embodiment of the present invention, the confirmation of the execution times of the error event task may be performed before or after the execution of the error event task.

[0040] In an embodiment of the present invention, in the step a), the computer may display on a display so that the user can select a task on an event task registration screen and set an error event task by selecting the attribute of the task as when an error occurs.

[0041] In an embodiment of the present invention, if the user selects the attribute of the task as an error occurrence, the computer may display an error list on the display so that the user can select an error.

[0042] Effects of the Invention

[0043] According to the present invention, the control is to selectively perform normal operation or error mode operation when an error occurs, based on the impact of the external device in which an error occurs on the entire PLC system, thereby reducing the frequency of entering the error mode, thereby having the effect of reducing the time required for maintenance and repair and reducing costs.

[0044] In addition, according to the present invention, the user can arbitrarily change the design of the system, for example, confirm whether the error occurrence of a specific external device is periodic or repetitive, and for error occurrences up to a set number, do not enter the error mode and perform normal operation, and for error occurrences exceeding the set number, enter the error mode, etc., which has the effect of improving the control flexibility of the PLC system and facilitating management by reducing user intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a scanning operation flow chart of the existing PLC system.

[0046] Figure 2 This is an example diagram of a program that is processed in a PLC system.

[0047] Figure 3 It is a flow chart of an error state control method of a PLC system according to a preferred embodiment of the present invention.

[0048] Figure 4 This is an example of a screen for registering an error event task.

[0049] Figure 5 This is a sample diagram of a registered event task. DETAILED DESCRIPTION

[0050] In order to fully understand the structure and effect of the present invention, the preferred embodiment of the present invention will be described with reference to the accompanying drawings. However, the present invention is not limited to the embodiments described below, but can be implemented in various forms and can be variously changed. However, the description of this embodiment is intended to provide a complete disclosure of the present invention and fully disclose the scope of the present invention to a person of ordinary skill in the art to which the present invention belongs. In the accompanying drawings, for ease of explanation, the size of the constituent elements is enlarged, and the proportion of each constituent element may be exaggerated or reduced.

[0051] The terms "first", "second", etc. can be used to describe various constituent elements, but these constituent elements should not be limited to the above terms. The above terms can only be used to distinguish one constituent element from another constituent element. For example, without departing from the scope of the present invention, the "first constituent element" can be named as the "second constituent element", and similarly, the "second constituent element" can also be named as the "first constituent element". In addition, unless the context clearly stipulates otherwise, the expression of the singular includes the expression of the plural. Unless otherwise defined, the terms used in the embodiments of the present invention can be interpreted as meanings known to those skilled in the art.

[0052] The present invention relates to a "control method", and the action subject of the control method composed of specific steps is the specific hardware that constitutes the PLC system. In particular, even if there is no special description, the program operation processing and task processing are also performed by the central processing unit of the PLC system.

[0053] Hereinafter, an error state control method of a PLC system according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

[0054] Figure 3 It is a flow chart of an error state control method of a PLC system according to a preferred embodiment of the present invention.

[0055] Reference Figure 3 According to a preferred embodiment of the present invention, the error state control method of the PLC system includes: an initialization processing step (S301); an input image area refresh step (S302); a program operation processing step (S303); an output image area refresh step (S304); an end processing step (S305); an error occurrence judgment step (S306); a step of confirming whether there is an error event task for the external device where an error has occurred (S307); a step of executing the error event task if there is an error event task (S308); an error mode entry confirmation step (S309) of confirming whether the PLC has entered an error mode after executing the error event task; and if the judgment result of the step S307 is that there is no error event task, or the judgment result of the step S309 is that the operating state of the PLC is converted to an error mode entry step (S310) when the error mode operation is required.

[0056] Next, the structure and function of the error state control method of the PLC system according to the preferred embodiment of the present invention constructed as described above will be described in more detail.

[0057] The PLC system includes: a central processing unit; an input circuit that inputs signals from input modules such as sensors to the central processing unit; an output circuit that outputs calculation results to external modules such as motors; and an internal memory or an external memory for storing data.

[0058] It is well known that a central processing unit may be capable of self-diagnosis.

[0059] In the present invention, before scanning of the PLC, an error event task (Error Event Task) is registered by the user.

[0060] At this time, as mentioned above Figure 2 In the program structure, the error event task is registered in the event task area.

[0061] Figure 4 This is an example of the screen for registering an error event task. Figure 5 This is a sample diagram of a registered event task.

[0062] Refer to Figure 4 and Figure 5 The user can register an event task by making settings on the error event task registration screen 40 displayed on the display, and in particular, can specify the type of event by selecting the error occurrence menu 41.

[0063] For the convenience of the user, the error list may be pre-registered in the control program, and the user may select the error list through the error list selection window 42 .

[0064] At this time, the error list may include reception of an external device diagnostic signal (ACK), calculation errors, I / O module errors, floating point errors, and the like.

[0065] Users can use this control program to register error event tasks for external modules.

[0066] The settings of error event tasks can be very diverse and can be changed according to the impact of external modules on the entire system.

[0067] For example, an error event task may not be registered for an external module that has a significant impact on the system, thereby causing it to run in an error mode.

[0068] In addition, considering the impact of errors in specific external modules on the entire system, the number of executions of the error event task can be set. It can be set so that even if an error in an external module that has a very small impact on the entire system continues to repeat, it can be prevented from running in error mode, and according to the importance, it can be set so that it will not run in error mode and continue to run until the number of repeated errors reaches 10 times, 5 times, or 3 times, and if the number of repeated errors reaches more than that, it will execute in error mode.

[0069] The number of error repetitions may be set differently for each external module. In this case, the number of repetitions may be set larger for an external module that has a smaller impact on the entire system.

[0070] After the above settings, Figure 3 As shown, in step S301, the step of driving the PLC for the first time by turning on the power or resetting the power is executed, or as a state where a cycle of program operation is completed, data initialization and external device initialization operations are performed.

[0071] Next, in step S302, the state of the input module is read and stored in the memory. The input module here refers to various sensors, and the state value of the sensor is read and stored as initial data in the internal memory of the PLC.

[0072] Next, as shown in step S303, the central processing unit of the PLC executes the program stored in the internal memory or the external memory. At this time, the data stored in the memory is used in the execution of the program.

[0073] The execution of the program is a continuous operation from the beginning to the end of the created program.

[0074] Next, in step S304, when the program operation is completed, the output value as the result of the operation is stored in the output image area, and the stored data is output to the output module. The output module in this case is various external devices, and a motor can be a representative example.

[0075] As described above, in order to return to the beginning after executing the operation according to the given user program, the end processing is performed as step S305. The end processing at this time is based on the self-diagnosis of the self-diagnosis module included in the central processing unit and the process of confirming whether there is a user event.

[0076] User events can occur in a wide variety of ways and can include changes in the scanning process or physical environment changes such as the separation of specific input modules or output modules, new connections, etc.

[0077] Next, in step S306, it is confirmed whether a fault error occurs in the external modules including the input module and the output module.

[0078] The fault error at this time is determined based on the presence or absence of a fault diagnosis signal (ACK) sent to the central processing unit of the PLC when a fault occurs in an external module itself, including an input module such as a sensor and an output module such as a motor.

[0079] In the step S306, if it is determined that the fault diagnosis signal is not input from the external module, the step S301 is executed again.

[0080] In step S306, if there is a fault diagnosis signal (ACK) input from the external module, then as in step S307, the central processing unit of the PLC confirms whether the error event task of the external module is registered in the program.

[0081] If there is no error event task registered in step S307, the error mode of step S310 is executed. At this time, the error mode is entered as mentioned above. The error mode is that the central processing unit of the PLC is in the stop state instead of the running state (Run). Only when the user uses PADT (Programmable Debugging Tool) to solve or force the error state to be released and reset, the central processing unit of the PLC can become the running state.

[0082] If the confirmation result of step S307 is that there is a registered error event task, the central processing unit of the PLC executes the error event task.

[0083] As mentioned above, the error event task can ignore the error when it occurs and prevent entering the error mode, while maintaining the execution of the scanning process.

[0084] More specifically, it can be set so that if an error signal is input from an external module, the external module signal is turned on, off, or blocked according to the setting of the error event task.

[0085] That is, when an external module fails, the signal of the external module that is actually connected can be turned OFF by the MOVE instruction, so that the module is treated as not being installed in the system, thereby preventing the module from entering the error mode.

[0086] Afterwards, as in step S309, it is confirmed again whether to enter the error mode.

[0087] In step S309, it may be determined whether the number of errors occurring in the same external module reaches a set number. If the number of errors does not reach the set number, entering the error mode is prevented and step S301 is executed.

[0088] When the set number of times is reached, step S310 is executed to enter the error mode.

[0089] The order of step S309 and step S308 may also be changed.

[0090] This can be freely changed by various setting methods such that whether to enter the error mode is determined based on whether the set number of repetitions is exceeded.

[0091] In this way, when an error occurs during PLC operation, the present invention does not adopt the method of stopping the execution of the entire program and entering the error mode, but considers the impact of the external module where the error occurs on the entire system, and prevents the error module from entering the error mode if an error occurs with a small impact. This can improve user freedom by preventing the error mode from being entered too frequently, and can improve the flexibility of the PLC system.

[0092] The above describes the embodiments according to the present invention, but this is only exemplary, and those skilled in the art will understand that various modifications and embodiments within the scope of equivalence can be implemented. Therefore, the true technical protection scope of the present invention should be determined by the attached claims.

[0093] Industrial Applicability

[0094] The present invention relates to a PLC system used for factory automation, etc., and confirms the error state of an external device of the PLC through communication and determines an action mode, thereby having industrial application potential.

Claims

1. A method for controlling an error state of a PLC system, wherein: include: a) step, using a control program executed in a computer used for PLC system settings to create an error event task that can be executed in a central processing unit of the PLC system and turns on, off or blocks a signal of an external module, and stores the error event task in a memory of the PLC system; b) step, the central processing unit of the PLC system executes the program stored in the memory in stages; c) step, the central processing unit confirms whether a signal notifying the occurrence of an error is received from the external module; as well as d) step, in the case where a signal notifying the occurrence of an error is received in step c), preventing the central processing unit from operating in an error mode by executing an error event task; The step d) includes, when the signal notifying the occurrence of an error is received, a step of confirming whether there is an error event task for the external module, and when there is no error event task, the central processing unit operates in an error mode.

2. The error state control method of the PLC system according to claim 1, wherein: In the step d), When there is an error event task for an external module where an error occurred, When the number of executions of the error event task is less than the set number, the error event task is executed. When the number of executions of the error event task is greater than or equal to a set number of times, the central processing unit operates in the error mode.

3. The error state control method of the PLC system according to claim 2, wherein: The set number of times can be set differently according to the external module.

4. The error state control method of the PLC system according to claim 2, wherein: If the confirmation result of step c) is that no signal notifying the occurrence of an error is received, step b) is executed again.

5. The error state control method of the PLC system according to claim 2, wherein: The execution number of the error event task is confirmed to be executed before or after the error event task is executed.

6. The error state control method of the PLC system according to claim 2, wherein: In the step a), the computer displays on the display so that the user can select a task in an event task registration screen and set an error event task by selecting the attribute of the task as when an error occurs.

7. The error state control method of the PLC system according to claim 6, wherein: If the user selects the attribute of the task as an error, the computer displays an error list on the display so that the user can select an error.