PLC and PLC systems
The PLC system addresses data corruption issues by parallel execution of control programs across multiple devices with a majority voting mechanism, ensuring continuous operation and real-time error resolution.
Patent Information
- Application Number
- JP2020207478
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-15
- Publication Date
- 2024-08-21
- Estimated Expiration
- 2040-12-15
AI Technical Summary
PLCs in factory environments are susceptible to data corruption from radiated noise, instantaneous power outages, electromagnetic fields, and cosmic rays, leading to memory abnormalities that conventional memory checking methods cannot address in real time, necessitating a solution for continued operation despite abnormalities.
A PLC system with a higher-level control device managing multiple PLCs, executing control programs in parallel across three or more locations, utilizing input and output buffer memories and a majority voting circuit to ensure data integrity and continuous operation.
The system enables continuous operation even if an abnormality occurs, resolving soft errors by rewriting affected memories and selecting majority data, thus maintaining system functionality without delays.
Smart Images

Figure 0007538021000009 
Figure 0007538021000003 
Figure 0007538021000006
Abstract
Description
[Technical field]
[0001] The present invention relates to a PLC and a PLC system. [Background technology]
[0002] A programmable logic controller (PLC) is a control device for machines and equipment installed in a factory. Multiple PLCs are installed in a factory. One or more machines, equipment, and sensors are attached to a PLC. The PLC executes a program and outputs control signals to the machines and equipment to be controlled. Multiple PLCs are connected to a network, allowing them to exchange data with each other.
[0003] Conventionally, as a means for avoiding a system stop caused by a PLC failure, a technique is known in which a control program of a certain PLC is executed in a second PLC, and when an abnormality is detected in one PLC, the output of the normal PLC is output to the controlled object. For example, see Patent Document 1. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 6356736 Summary of the Invention [Problem to be solved by the invention]
[0005] In the factory environment where PLCs are installed, a wide variety of devices such as servo motors, inverters, and high-voltage power devices are connected to the PLC or placed near the PLC. Therefore, data stored in the memory in the CPU module is easily destroyed by radiation noise, momentary power outages, electromagnetic fields, etc. Data destruction in the memory in the CPU module can also be caused by cosmic rays.
[0006] In Patent Document 1, memory abnormalities are checked periodically to detect soft errors. Since checking the entire memory to detect soft errors takes time, there is a possibility that real-time response cannot be made when an abnormality occurs.
[0007] In the field of PLC, there is a demand for technology that allows operations to continue even when an abnormality occurs. [Means for solving the problem]
[0008] A PLC system according to one aspect of the present disclosure is a PLC system including a plurality of PLCs connected to control targets via I / O devices, and a host control device that manages the plurality of PLCs, the host control device comprising: Each PLC For the PLC itself, The control program that controls the controlled object is the self program. Tewari In addition, the entire PLC system is assigned to three or more locations within one execution cycle. Each The PLC system includes a other a PLC system in which a PLC control program is assigned as another program to a higher-level control device and a plurality of PLCs, the PLC comprising a processor, a main memory, and a communication unit, the communication unit comprising a first input buffer memory for storing input data transmitted from its own control target, a first output buffer memory for storing first output data which is a result of execution of its own program on the first input data stored in the first input buffer memory, at least two second output buffer memories for storing as second output data a result of execution of the PLC's control program received from the higher-level control device or the plurality of PLCs, and a majority voting circuit for taking a majority vote between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory, and outputting the majority data to the control target via an I / O device, and when there is data that is the minority as a result of the majority vote, the PLC processor rewrites the data in the higher-level control device or main memory of the PLC that is the majority as a result of the majority vote with the data in the higher-level control device or main memory of the PLC that is the minority as a result of the majority vote. A PLC according to one aspect of the present disclosure is a PLC included in a PLC system including a plurality of PLCs connected to control targets via I / O devices and a host control device that manages the plurality of PLCs, the PLC including a processor, a main memory, and a communication unit, the main memory storing a self program which is a control program by which the PLC controls the control targets, and another program which is a control program for another PLC included in the PLC system; Each The control program is assigned to be executed in parallel at three or more locations within one execution cycle throughout the controller system, and the communication unit includes a first input buffer memory for storing input data transmitted from its own control target, a first output buffer memory for storing first output data which is the result of execution of its own program against the first input data stored in the first input buffer memory, at least two second output buffer memories for storing as second output data the result of execution of the control program of the PLC executed as another program by a higher-level control device or multiple PLCs, and a majority voting circuit for taking a majority vote between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory and outputting the majority data to the control target via the I / O device, and the processor rewrites the data in the main memory of the higher-level control device or PLC which is the majority by majority vote with the data in the main memory of the higher-level control device or PLC which is the minority by majority vote. Effect of the Invention
[0009] According to one aspect of the present invention, operation can be continued even if an abnormality occurs in a PLC system. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is a schematic diagram of a PLC system. [Diagram 2] FIG. 1 is a schematic diagram of a PC. [Diagram 3] FIG. 1 is a schematic diagram of a PLC. [Figure 4] FIG. 11 is a diagram illustrating an example of allocation of control programs to a PLC system. [Diagram 5]FIG. 1 is a diagram illustrating operations in each execution cycle in a PC and a PLC. [Figure 6] FIG. 1 is a diagram illustrating a hardware configuration of a PLC. [Figure 7] FIG. 1 is a diagram illustrating an update process of input / output data in a PLC system. [Figure 8] 1 is a flowchart illustrating an operation of the PLC system. [Figure 9] 11 is a flowchart illustrating a process when a minority party occurs in a majority vote. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] [First Disclosure] FIG. 1 is a schematic diagram of a PLC (Programmable Logic Controller) system 100 according to the present disclosure. The PLC system 100 includes a PC 12, which is a host control device, and a plurality of (five in the present disclosure) PLCs 14 (PLCs 14) connected to the PC 12 in a daisy chain. 1 ~14 5 ), and I / O devices 16 connected to each of the multiple PLCs 14. Furthermore, a control target 18 of each PLC 14 is connected to the I / O devices 16. The control target 18 is a machine in a factory, such as a machine tool, a conveyor, or a robot.
[0012] The PC 12 and the PLC 14 are connected by, for example, an EtherCAT (registered trademark) system. The communication method is not limited to EtherCAT, and may be serial communication, a data link between PLCs, etc. Also, the connection method does not have to be a daisy chain. In Ethernet communications including EtherCAT, frames are sent and received. The beginning of a frame contains address information of the destination. When PLC 14 receives a frame, it inputs the frame with its own address and transfers frames with addresses other than its own address to the PLC 14 in the subsequent stage. When PLC 14 transmits data to PC 12, PLC 14 transmits the frame addressed to PC 12 sent from the subsequent stage to PC 12 or PLC 14 connected in the previous stage.
[0013] Fig. 2 is a schematic configuration diagram of the PC 12, and Fig. 3 is a schematic configuration diagram of the PLC 14. The PC 12 shown in Fig. 2 includes a processor 20 such as a CPU, a main memory (storage unit) 22, and a communication unit 24. The PLC 14 shown in Fig. 3 includes a processor 30 such as a CPU, a main memory (storage unit) 32, and a communication unit 34. The communication unit 34 of the PLC 14 is connected to the communication units 34 and 24 of the other PLCs 14 and the PC 12 in a daisy chain (see FIG. 1). The main memory 32 of the PLC 14 stores a plurality of programs n (programs 1 to 5) that are executed (processed) by each of the plurality of PLCs 14. The program n is n The subscripts represent the correspondence between the PLC 14 and the program. For example, PLC 14 1 The control program is Program 1, and the PLC14 2 The control program is control program 2, and the PLC14 3 This control program is program 3. Hereinafter, a program for the PLC 14 to control its own control target 18 will be referred to as its own program. Also, a control program of another PLC 14 assigned to itself will be referred to as an other program.
[0014] Five programs 1 to 5 are distributed and assigned to the PC 12 and the PLC 14 as shown in Fig. 4. At this time, the programs are assigned so that one program is always executed by three information processing devices (PC 12 or PLC 14). The number of programs assigned may be three or more. Here, an example will be described in which control programs are assigned to three information processing devices (PC 12 or PLC 14).
[0015] In Figure 4, PC12 has "Program 1" and "Program 3", and PLC14 has 1 "Program 1" and "Program 3", PLC14 2 "Program 2", "Program 4" and "Program 5" in PLC14 3 "Program 3" and "Program 1", PLC14 4"Program 4", "Program 2" and "Program 5" in PLC14 5 "Program 5", "Program 2" and "Program 4" are assigned to.
[0016] PLC14 1 Program 1, which is a self-program of PLC14 1 " and "PLC14 2 " and "PLC14 3 " are assigned to three information processing devices. PLC14 2 Program 2, which is a self-program of PLC14 2 " and "PLC14 4 " and "PLC14 5 " is assigned to PLC14. 3 Program 3, which is a self-program, is connected to "PC12" and "PLC14 1 " and "PLC14 3 " is assigned to PLC14. 4 Program 4, which is a self-program of PLC14 2 " and "PLC14 4 " and "PLC14 5 " is assigned to PLC14. 5 Program 5, which is a self-program of PLC14 2 " and "PLC14 4 " and "PLC14 5 In this manner, each control program is assigned to one of the three information processing devices (PC 12 or PLC 14).
[0017] The control programs are assigned as follows. In allocating the control programs, first, the own program is loaded into each PLC 14. Then, the program is executed in each PLC 14, and load information of the control program is calculated. The PLC 14 outputs the load information to the PC 12. The PC 12 acquires all the load information from the PLC 14. The PC 12 allocates the control program so that the maximum load Lpmax of the processor of the PC 12 in one execution cycle and the maximum load Lmax of the PLC 14 in one execution cycle are not exceeded, and the load rate does not exceed, for example, 90%. The load rate is the value obtained by dividing the load on the PLC 14 by the maximum load Lmax. For example, if the load of program 1 is L1, the load rate of the load caused by the execution of program 1 is L1 / Lmax.
[0018] The PC 12 and the PLC 14 execute the assigned control programs in parallel at the same time for each execution cycle. One execution cycle is a period from when the execution of a control program starts until the next execution starts. The PC 12 and the PLC 14 repeatedly execute the assigned control programs for each execution cycle. In this disclosure, as shown in FIG. 1 Repeats "Program 1" and "Program 3". PLC14 2 Repeats "Program 2", "Program 4" and "Program 5". PLC14 3 Repeats "Program 3" and "Program 1". PLC14 4 PLC14 executes "Program 4", "Program 2" and "Program 5" repeatedly. 5 PC 11 repeatedly executes "Program 5", "Program 2", and "Program 4". PC 12 repeatedly executes "Program 1" and "Program 3". During the period between the end of one execution cycle and the start of the next execution cycle, input / output data is updated. The update of input / output data will be explained later with reference to FIG. 7.
[0019] Next, the hardware configuration of the PLC 14 will be described with reference to Fig. 6. The communication unit 34 of the PLC 14 includes a system bus I / F 40 for communicating with the processor 30, a first input buffer memory 42, a second input buffer memory 44, a first output buffer memory 46, a second output buffer memory 48, a third output buffer memory 50, a MAC 52 for communicating with the I / O device 16 connected to the PLC, a MAC 54 for communicating with the PC 12 and other PLCs 14 other than the PLC 14 itself, and a majority circuit 56.
[0020] The PC 12 emulates the functions of the PLC 14 described below. The main memory 22 of the PC 12 stores other programs of the PLC 14. The PC 12 receives second input data from the PLC 14 and stores it in the main memory 22. The PC 12 executes the other programs in accordance with the execution cycle of the PLC 14 and creates third output data. The PC 12 outputs the third output data to the corresponding PLC 14. The PLC 14 stores the third output data in the second output buffer memory 48. That is, the PC 12 executes the other programs and updates the data of the other PLCs 14. The PC 12 does not have functions corresponding to the first input buffer memory 42, the first output buffer memory 46, and the majority circuit 56.
[0021] The system bus I / F 40 of the communication unit 34 and the processor 30 are connected by a system bus 60. The MAC 52 is connected to a PHY chip 64 via, for example, an MII (Media Independent Interface) 62. The PHY chip 64 is connected to a control target via an I / O device 16. The MAC 54 is connected to PHY chips 68, 70 via the MII 66. The PHY chip 68 is connected to the PLC 14 or PC 12 in the previous stage. The PHY chip 70 is connected to the PLC 14 in the subsequent stage. A frame received from the PLC 14 or PC 12 in the previous stage is input to the MAC 54. The MAC 54 determines whether the input frame is addressed to itself or not, and if it is not, it transfers it to the PLC 14 in the subsequent stage. If it is, the input data included in the frame is read out. Further, the MAC 54 outputs the execution results of the other programs stored in the third output buffer memory 50 to the corresponding other PLC 14. The other PLC 14 stores the received third output data in the second output buffer memory 48 as second output data. The MAC 54 outputs the input data from the control target stored in the first input buffer memory 42 to the corresponding other PLC 14. The other PLC 14 executes the control program of the PLC 14 as another program using the received input data.
[0022] The MACs 52 and 54 perform communication processing at the data link layer. The PHY chips 64, 68 and 70 perform communication processing at the physical layer. The PLC 14 communicates with the control target via the PHY chip 64, the MAC 52 and the I / O device 16. The PLC 14 communicates with the previous PLC 14 or the PC 12 via the MAC 54 and the PHY chip 68. The PLC 14 communicates with the next PLC 14 via the MAC 54 and the PHY chip 70.
[0023] The first input buffer memory 42 stores data from the control target of the PLC 14. The first input data stored in the first input buffer memory 42 is stored in the main memory 32 via the system bus I / F 40.
[0024] The second input buffer memory 44 stores the second input data received from the other PLC 14. The number of the second input buffer memories 44 is equal to or greater than the number of other programs assigned to each PLC 14. In the example of FIG. 1 Since there is only one other program (program 3) assigned to PLC 14, the number of second input buffer memories 44 is one. 2 Since there are two other programs (program 4 and program 5) assigned to the PLC 14, the number of second input buffer memories 44 is two. 3 Since the number of other programs (program 1) assigned to the PLC 14 is one, the number of second input buffer memories 44 is one. 4Since the number of other programs (program 2 and program 5) assigned to the PLC 14 is two, the number of second input buffer memories 44 is two. 5 Since there are two other programs (program 2 and program 4) assigned to the first input buffer memory 44, the number of second input buffer memories 44 is two. However, one memory device may serve as a plurality of buffer memories. The second input data stored in the second input buffer memory 44 is stored in the main memory 32 via the system bus I / F 40.
[0025] The processor 30 executes its own program and other programs stored in the main memory 32. As described above, the own program is a control program for the PLC 14 to control its own control target. When executing the own program, the processor 30 reads first input data from the main memory 32 and executes the own program. The execution result of the first input data is stored in the first output buffer memory 46 via the system bus I / F 40. As described above, the other programs are control programs of other PLCs 14 that are assigned to the PLC 14. In the example of FIG. 1 Other programs include PLC14 3 This is the self-program (Program 3). The PLC 14 updates the second input data from the other PLC 14 before starting the execution cycle. 3 The second input data acquired from the second input data acquisition section 32 is read from the main memory 32 and another program is executed.
[0026] The processor 30 stores the third output data, which is the execution result of the other program, in the third output buffer memory 50. The number of third output buffer memories 50 is equal to the number of other programs executed by the PLC 14. The third output data stored in the third output buffer memory 50 is framed by the MAC 54 and output to the other PLC 14.
[0027] The third output data output from the other PLC 14 or the PC 12 is stored in a second output buffer memory 48. The second output buffer memories 48 are provided in the same number as the information processing devices (PC 12 or other PLCs 14) that execute the control program of the PLC 14 as another program. In the example of FIG. 4, two information processing devices (PC 12 and PLC 14) are provided. 3 ) is PLC14 1 Since the control program (Program 1) is executed, PLC14 1 Includes PC12 and PLC14 3 Two second output buffer memories 48 are provided for the two information processing devices (PLC 14). 4 and PLC14 5 ) is PLC14 2 Since the control program (Program 2) is executed, PLC14 2 PLC14 4 For and PLC14 5 For two PLC14 2 A second output buffer memory 48 is provided.
[0028] The input / output data is updated between the completion of one execution cycle and the start of the next execution cycle by updating the input / output data in the first input buffer memory 42, the second input buffer memory 44, the first output buffer memory 46, the second output buffer memory 48, and the third output buffer memory 50.
[0029] 7 shows the update process of input / output data between the PLC 14 and the PC 12, and between the PLC 14 and the other PLC 14. Data is updated between the completion of one execution cycle and the start of the next execution cycle. When one execution cycle is completed, first output data which is the execution result of the own program and third output data which is the execution result of the other program are generated and stored in the main memory 32. The PLC 14 performs an internal process to update the first output buffer memory 46 with the first output data. The PC 12 performs an internal process to update the third output buffer memory 50 with the third output data. At time T1, the PLC 14 communicates with the I / O device 16 and acquires input data from the control target 18. At time T2, the PLC 14 updates the first input buffer memory 42 with the first input data. The value of the first input data is stored in the main memory 32 via the system bus I / F 40. At time T3, the PLC 14 communicates with the other PLCs 14 and the PC 12. In this communication, the PLC 14 outputs to the other PLCs 14 and the PC 12 the execution results of the other programs stored in the third output buffer memory 50 and the input data from the control target 18 stored in the first input buffer memory 42. At the same time, the PLC 14 inputs the input data from the control target 18 of the other PLCs 14 and the third output data of the PC 12 and the other PLCs 14. At time T 4 , the PLC 14 updates the second input buffer memory 44 with input data from the control target of the other PLC 14 , and updates the second output buffer memory 48 with third output data from the other PLC 14 and the PC 12 .
[0030] After updating the input / output data in this manner, the PLC 14 enters the next execution cycle, and the processor 30 executes its own program and other programs.
[0031] The PLC system 100 of the present disclosure uses a lock-step system in which the PC 12 and multiple PLCs 14 simultaneously execute the same control program in parallel. The PLC 14 stores input data for the next execution cycle and the execution results of the control program in the previous execution cycle. One control program is executed in three locations: the PLC 14 and another PLC 14 or the PC 12. The execution results of the control program are stored in a first output buffer memory 46 and a second output buffer memory 48.
[0032] The majority circuit 56 takes a majority vote of the execution results stored in the first output buffer memory 46 and the second output buffer memory 48. The majority circuit 56 inputs multiple pieces of data and outputs the most prevalent data (majority data) among the input data. If all data are the same, it outputs that data. The majority circuit 56 is a known logic circuit, so a technical explanation will be omitted.
[0033] The output of the majority circuit 56 is output to the control target 18 via the MAC 52, the PHY chip 64, and the I / O device 16. The control target 18 operates according to the contents of the majority circuit 56. When the majority circuit 56 detects the minority, the processor 30 starts the program at the time of the abnormality occurrence and identifies the buffer memory (the first output buffer memory 46 or the second output buffer memory 48) that outputs the execution result of the minority. The processor 30 identifies the PC 12 or the PLC 14 corresponding to the buffer memory (the first output buffer memory 46 or the second output buffer memory 48). When the first output buffer memory 46 is in the minority, the processor 30 receives the contents of the main memory used in its own PLC 14 (input information, intermediate processing information, control programs) from other PLCs 14 or the PC 12. The PLC 14 rewrites the received contents of the main memory. Also, when the execution result of PC 12 is in the minority, the contents of the main memory used by PC 12 (input information, intermediate processing information, control program) are read from main memory 32 of PLC 14 and transferred to PC 12. PC 12 rewrites the received contents of the main memory. If the execution results of the other PLC 14 are in the minority, the contents of the main memory used by the corresponding PLC 14 (input information, intermediate processing information, control program) are transferred to the corresponding PLC 14. The corresponding PLC 14 rewrites the received contents of the main memory. If the abnormality is due to a soft error, the abnormality can be resolved by rewriting the memory. Because the rewriting is performed separately from the control of the PLC 14, the soft error can be resolved without delaying the control of the PLC 14.
[0034] The processor 30 then counts the number of times the abnormality has occurred. Because soft errors do not involve physical damage to the hardware, rewriting the memory and performing the same operation again will resolve the soft error and allow normal operation. Because soft errors are often not reproducible and are not continuous, if the same output buffer memory (first output buffer memory 46 or second output buffer memory 48) becomes the minority several times in succession, it is assumed that an abnormality other than a soft error has occurred and a warning is output to the operator. Abnormalities other than soft errors include hardware failures such as failures of chips such as the processor 30 and the MACs 52 and 54, and failures of communication paths. In the PLC system disclosed herein, even if the presence or absence of an abnormality other than a soft error is detected, it is not possible to eliminate the abnormality or identify the cause of the abnormality.
[0035] In the PLC system 100 of the present disclosure, even if a soft error occurs in any of the three buffer memories, as long as there are no problems with the remaining two buffer memories, that data can be used to continue processing.
[0036] Next, the operation of the PLC system 100 of the present disclosure will be described with reference to FIG. 8. As preprocessing, the PLC system 100 allocates control programs. The calculation of the allocation of the control programs is performed by the PC 12, but may be performed by another information processing device. The PLC 14 executes each control program. Then, the load of the control program is calculated (step S1). The PC 12 allocates the control programs to the PC 12 and the PLC 14 so that the load rate is not exceeded within a range in which the control programs do not exceed the maximum loads Lmax and Lpmax of the PLC 14 and the PC 12. At this time, each control program is allocated to three information processing devices (PC 12 and PLC 14) (step S2).
[0037] The PLC system 100 updates the input / output data of the PC 12 and the PLC 14. In the first update, since no program is being executed, the first input buffer memory 42 is updated with input data from the control target of the PC 12 and the second input buffer memory 44 is updated with input data from the control target of the other PLC 14. In the second and subsequent updates, the execution result of the control program is also updated. The processor 30 stores the first input data and the second input data in the main memory 32, and executes its own program and the other program. Then, it updates the first output buffer memory 46 with the execution result of its own program, and updates the third output buffer memory 50 with the execution result of the other program. Thereafter, the third output data is output to the other PLC 14, and the third output data is received from the PC 12 and the other PLC 14, and the second output buffer memory 48 is updated (step S3).
[0038] At this time, the majority circuit 56 makes a majority decision between the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 (step S4). The majority circuit 56 outputs the majority data to the control target 18 (step S5). The control target 18 operates according to the majority data. After updating the input / output data, the processor 30 executes its own program and other programs in one execution cycle (step S6).
[0039] The execution of the control program in step S4 is a process performed by the processor 30 of the PLC 14, and the output of the majority data is a process performed by the majority circuit 56 of the communication unit 34, so that these can be performed in parallel.
[0040] If operation can be continued without problems by outputting the majority data (step S7; Yes), the process proceeds to step S2 and the input / output data is updated. If operation is stopped at the instruction of the operator, a problem other than a soft error occurs, or the work is completed (step S7; No), the operation of the PLC system 100 is terminated.
[0041] The process when a minority occurs will be described with reference to Fig. 9. If a minority exists as a result of the majority decision in step S4, the processor 30 starts a program for when an abnormality occurs. In the process when an abnormality occurs, the processor 30 identifies the PC 12 or PLC 14 suspected of having an abnormality based on the buffer memory that stores the minority (step S11). Since the minority PC 12 or PLC 14 is suspected of having a soft error, the processor 30 reads the memory contents (input information, intermediate processing information, control programs, etc.) from the majority PC 12 or PLC 14 and copies them to the memory of the minority PC 12 or PLC 14 (step S12). The processor 30 also counts the results of the majority vote, and if the same buffer memory is in the minority consecutively (step S13; Yes), an abnormality other than a soft error may have occurred, so it issues a warning to the operator (step S14).If a buffer memory different from the previous time becomes the minority (step S13; No), it is considered that the soft error has been resolved.
[0042] The processing in the case where a minority occurs as shown in Fig. 9 may be performed using different tasks or cores from the processing for executing the control program as shown in Fig. 8. By configuring in this way, the two processes can be executed in parallel, and no delay occurs in the execution of the control program.
[0043] As described above, the PLC system 100 of the present disclosure includes a plurality of PLCs 14, and distributes the control program of each PLC 14 to three or more information processing devices (PC 12 or PLC 14). Then, in accordance with one execution cycle of the PLC 14, the execution results of the control programs in the three or more information processing devices (PC 12 or PLC 14) are stored in buffer memories (the first output buffer memory 46 and the second output buffer memory 48), and a majority vote of the execution results is taken using the majority circuit 56. At this time, by outputting the majority value to the controlled object, even if a soft error occurs in any of the three or more information processing devices (PC 12 or PLC 14), it is possible to select an execution result that is not affected by the soft error. The soft error is eliminated by rewriting the memory. If the same buffer memory (first output buffer memory 46 or second output buffer memory 48) becomes the minority multiple times in succession, it is determined that an abnormality other than a soft error has occurred.
[0044] Since the PLC system 100 repeatedly executes the same control program at the same execution cycle, a multiplexed system that operates synchronously can be constructed simply by multiplexing and assigning the control program to multiple information processing devices (PC 12 or PLC 14). By multiplexing and executing the control program, the system can continue to operate even if an abnormality occurs in one information processing device (PC 12 or PLC 14).
[0045] In the present disclosure, the control program is assigned to three information processing devices (PC 12 or PLC 14), but the control program may be assigned to four or more information processing devices. When the control program is assigned to four or more information processing devices, a majority vote can be taken even if one information processing device is stopped due to memory rewriting. In other words, when the control program is assigned to four or more information processing devices, three or more continue to operate even if one information processing device is in an abnormal state, so a majority vote can be taken. Also, when there are two operating information processing devices and a majority vote cannot be obtained, an abnormality detection technique such as ECC may be used to select a normal memory. At this time, an operator may be notified that the abnormality detection method has been changed from the majority vote to ECC or the like. The operator may refer to the notification to determine whether or not to continue operating the PLC system 100. [Explanation of symbols]
[0046] 100 PLC Systems 12 PC 14 PLC 16 I / O equipment 18 Control Objects 20 processors 22 Main memory 24 Communications Department 30 processors 32 Main memory 34 Communications Department 42 Buffer memory for first input 44 Buffer memory for second input 46 Buffer memory for 1st output 48 Buffer memory for second output 50 Buffer memory for third output 56 Majority Circuit
Claims
1. A PLC system including a plurality of PLCs connected to control targets via I / O devices, and a host control device that manages the plurality of PLCs, The upper control device includes: a control program for controlling the control target connected to each of the PLCs is assigned as a self program to each of the PLCs, and control programs of other PLCs included in the PLC system are assigned as other programs to the upper control device and the plurality of PLCs so that each of the control programs is executed in parallel at three or more locations in the PLC system within one execution period; The PLC comprises: A processor; A main memory; A communication unit, The communication unit is a first input buffer memory for storing input data transmitted from a control target of the first input buffer memory; a first output buffer memory for storing first output data which is a result of executing the self program on first input data stored in the first input buffer memory; at least two second output buffer memories for storing execution results of the control programs of the PLCs received from the higher-level control device or the plurality of PLCs as second output data; a majority circuit that takes a majority vote between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory, and outputs the majority data to the control target via the I / O device; Equipped with The processor of the PLC When there is data that becomes the minority due to the majority vote, the PLC system rewrites the data in the main memory of the higher-level control device or the PLC that becomes the majority due to the majority vote into the main memory of the higher-level control device or the PLC that becomes the minority due to the majority vote.
2. The communication unit is a second input buffer memory for storing second input data which is input data from a control target of another program stored in the main memory; a third output data storage unit configured to store third output data that is an execution result of executing the other program using the second input data; Equipped with 2. The PLC system according to claim 1, wherein the third output data stored in the third output data storage section is output to a corresponding PLC.
3. The processor of the PLC 2. The PLC system according to claim 1, wherein the number of times the same upper level control device or PLC becomes the minority by the majority vote is counted, and if the same upper level control device or PLC becomes the minority consecutively, an operator of the PLC is warned of an abnormality.
4. While rewriting the main memory of the PLC that is in the minority by the majority vote, The processor of the PLC detects the presence or absence of an abnormality in the main memory, 2. The PLC system according to claim 1, wherein the communication unit outputs normal data to the PLC in which an abnormality has been detected if the main memory of the PLC itself is normal.
5. A PLC included in a PLC system including a plurality of PLCs connected to control targets via I / O devices and a host control device that manages the plurality of PLCs, A processor; A main memory; A communication unit, the main memory stores a self program, which is a control program by which the PLC controls the control target, and other programs, which are control programs of other PLCs included in the PLC system, and each control program is assigned to be executed in parallel at three or more locations of the PLC system within one execution period; The communication unit is a first input buffer memory for storing input data transmitted from a control target of the first input buffer memory; a first output buffer memory for storing first output data which is a result of executing the self program on first input data stored in the first input buffer memory; at least two second output buffer memories for storing, as second output data, execution results of the control programs of the PLCs executed by the higher-level control device or the plurality of PLCs as other programs; a majority circuit that takes a majority vote between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory, and outputs the majority data to the control target via the I / O device; Equipped with The processor rewrites data in the main memory of the higher-level control device or the PLC that has become the majority by the majority vote to the main memory of the higher-level control device or the PLC that has become the minority by the majority vote.
6. The communication unit is a second input buffer memory for storing second input data which is input data from a control target of another program stored in the main memory; a third output data storage unit configured to store third output data that is an execution result of executing the other program using the second input data; Equipped with 6. The PLC according to claim 5, wherein the third output data stored in the third output data storage section is output to a corresponding PLC.
7. 6. The PLC according to claim 5, wherein the processor of the PLC counts the number of times the same control device or PLC becomes the minority by the majority vote, and warns an operator of the PLC of an abnormality if the same upper level control device or PLC becomes the minority consecutively.
8. While rewriting the main memory of the PLC that is in the minority by the majority vote, The processor of the PLC detects the presence or absence of an abnormality in the main memory, 6. The PLC according to claim 5, wherein the communication unit outputs normal data to the PLC in which an abnormality has been detected if the main memory of the PLC itself is normal.
Citation Information
Patent Citations
Coupling system between input device and program by multitask os
JP1988056736A
Duplex system for programmable logic controller
JP1997114507A
