Programmable logic controller, control method and program
The PLC uses dual memories to load and switch program execution seamlessly, addressing the downtime issue in existing PLCs by allowing simultaneous execution of old and new programs, thereby enhancing operational efficiency and reducing errors in factory automation.
Patent Information
- Application Number
- DE112023004535
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2025-08-28
AI Technical Summary
Existing programmable logic controllers (PLCs) require significant downtime for program rewriting, as the execution of the program is stopped during the transition from an old program to a new updated program, which can lead to inefficiencies and potential errors in factory automation systems.
The PLC incorporates dual program and management information memories, allowing the updated program to be loaded into a secondary memory without stopping the current program execution, and then switches execution to the secondary memory after loading is complete, reducing downtime by enabling simultaneous execution of both old and new programs.
This approach minimizes the interruption of PLC operations during program updates, reducing the likelihood of errors and improving the reliability of factory automation systems by swiftly transitioning to the updated program without extended downtime.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical area
[0001] The present disclosure relates to a programmable logic controller, a control method and a program. background
[0002] Program development is usually accompanied by debugging to detect and correct errors or anomalies in generated programs. To develop a program for a programmable logic controller (hereinafter also referred to as a PLC), the programmer verifies the PLC's operation while the PLC is actually running with a generated program. If an error is detected during operation, the programmer corrects the program and writes the corrected program into the PLC. The programmer repeatedly verifies the operation, corrects the program, and writes the corrected program until the PLC operates normally. When developing a PLC program, debugging can take a long time if the PLC is stopped each time and a corrected program is written.Accordingly, a technique for writing a corrected program while minimizing the interruption of the PLC operation is desired.
[0003] Patent Literature 1 describes a PLC device that allows a program stored in the device to be rewritten during operation. The PLC device described in Patent Literature 1 includes a first memory, which is a non-volatile flash memory for storing a program, a second memory, which is a non-volatile flash memory for backing up the first memory, and a third memory, which is a volatile random access memory (RAM) usable for executing the program. In Patent Literature 1, the PLC device writes the rewritten program to the second memory during operation. When the program is successfully written, the PLC device copies the written program to the first memory and further loads the program to the third memory to boot the program. Citation listPatent literature
[0004] Patent Literature 1: Disclosure of Unexamined Japanese Patent Application No. 2004 - 272629 Overview of the inventionTechnical problem
[0005] In the PLC device described in Patent Literature 1, a program loaded into the third memory and rewritten during execution is overwritten with the rewritten program and then booted. Thus, program execution is stopped for a period of time from the start of loading the rewritten program until the start of booting the rewritten program.
[0006] Under such circumstances, it is an object of the present disclosure to shorten the time for which program execution is stopped when rewriting the program. Solution to the problem
[0007] To achieve the above object, a programmable logic controller according to one aspect of the present disclosure includes a program memory for storing a program, a program execution memory usable for executing the program, a program load controller for performing control for loading the program stored in the program memory into the program execution memory, a program execution unit for executing the program loaded into the program execution memory, and a program write controller for performing write control for storing an updated program into the program memory. The updated program is the program that is updated during execution. The program memory includes a first program memory and a second program memory different from the first program memory.The program execution memory includes a first program execution memory and a second program execution memory different from the first program execution memory. The program write controller stores the updated program in the second program memory if the program memory used to load the executed program is the first program memory. The program load controller loads the updated program from the second program memory into the second program execution memory if the program execution memory into which the executed program is loaded is the first program execution memory and the second program memory successfully stores the updated program.The programmable logic controller further comprises an updated program switching control for performing a switching control when the program loaded into the first program execution memory is executed by the program execution unit to cause the program execution unit to execute the updated program loaded into the second program execution memory. Advantageous effects of the invention
[0008] The programmable logic controller according to the above aspect of the present disclosure loads an updated program into the second program execution memory that is not used for program execution. The programmable logic controller according to the above aspect of the present disclosure can therefore start loading the updated program without stopping the execution of the program before it is rewritten. In the above aspect of the present disclosure, the programmable logic controller switches the program execution memory used for program execution from the first program execution memory to the second program execution memory after the loading of the updated program is completed.Therefore, the programmable logic controller according to the above aspect of the present disclosure can switch from executing the program before rewriting to executing the updated program after rewriting more quickly than a programmable logic controller that does not switch the program execution memory from the first program execution memory to the second program execution memory. The programmable logic controller according to the above aspect of the present disclosure can therefore shorten the time for which program execution is stopped for rewriting the program. Short description of the drawings Fig. 1 is a block diagram of a program development support system according to Embodiment 1; Fig. Figure 2 is a block diagram of the program development support system showing the functional configuration; Fig. 3 is a block diagram of a PLC and an engineering tool, showing the hardware configuration; Fig. 4 is a diagram describing an example process from receiving a program to saving a management table; Fig. 5 is a diagram describing an example process from receiving an updated program to saving the updated program; Fig. 6 is a diagram describing an example process from loading the updated program to saving a management table; Fig. 7 is a flowchart of an updated program switching control process; Fig. Figure 8 is a diagram describing an example process from synchronizing program execution memories to loading a second updated program; and Fig. Figure 9 is a diagram describing an example process from loading the second updated program without synchronization of the program execution memories to loading non-updated programs. Description of embodiments
[0009] A programmable logic controller, a control method, and a program according to one or more embodiments of the present disclosure are described below with reference to the drawings. Like reference numerals denote like or corresponding components throughout the drawings. The programmable logic controller is hereinafter referred to as a PLC. Program Development Support System 1
[0010] A program development support system 1 according to an embodiment of the present disclosure supports program development by performing debugging. As shown in the Fig. As shown in Figure 1, the program development support system 1 includes a PLC 100 that executes a program and an engineering tool 200 that generates and updates a program. The PLC 100 and the engineering tool 200 are connected via a network and can send and receive information.
[0011] In the program development support system 1, the engineering tool 200 sends a program created by a user (programmer) to the PLC 100. The PLC 100 saves, loads, and executes the received program. The user checks the operation of the PLC 100 executing the program and corrects and updates the program if an error is detected in the operation. The engineering tool 200 sends the updated program to the PLC 100. The PLC 100 saves, loads, and executes the received updated program. The program development support system 1 repeats the user's operation check, correction, and update, the engineering tool 200 sends the updated program, and the PLC 100 receives, saves, loads, and executes the updated program until the PLC 100 operates normally.In this way, the program development support system 1 can support the debugging of programs and the development of programs. PLC 100
[0012] As in Fig. As shown in Figure 2, the PLC 100 includes a program receiver 110 that receives a program. The PLC 100 also includes a program memory 120 that stores a program, a program execution memory 130 that is usable for executing a program, and a management information memory 140 that stores management information for managing the execution of a program. The program memory 120 includes a first program memory 121 and a second program memory 122. The program execution memory 130 includes a first program execution memory 131 and a second program execution memory 132. The management information memory 140 includes a first management information memory 141 and a second management information memory 142.
[0013] The PLC 100 further includes a program memory manager 151 that manages the program memory 120, a program execution manager 152 that manages the program execution memory 130, and a management information memory manager 153 that manages the management information memory 140. The PLC 100 further includes a program write controller 154 that performs write control for writing a program, a program load controller 155 that performs control for loading a program, and a management information generator 156 that generates management information. The PLC 100 further includes a program execution unit 157 that executes a program, and an updated program switching controller 158 that performs switching control for switching to an updated program, which is the program that has been updated. Engineering Tool 200
[0014] As in the Fig. As shown in Figure 2, the engineering tool 200 includes a program generator 210 that generates a program, a program memory 220 that stores a program, and a program transmitter 230 that transmits a program. The program generator 210 includes a compiler 211 that compiles a program. Hardware configuration of the PLC 100
[0015] As in the Fig. 3, the PLC 100 includes a controller 51 that performs processing based on a control program 59. The controller 51 includes a central processing unit (CPU). Based on the control program 59, the controller 51 functions as the program memory manager 151, the program execution manager 152, the management information memory manager 153, the program write controller 154, the program load controller 155, the management information generator 156, the program execution unit 157, and the updated program switching controller 158, which are shown in the Fig. 2 are shown.
[0016] Returning to Fig. 3, the PLC 100 includes a main memory 52 into which the control program 59 is loaded. The main memory 52 is used as a work area for the controller 51. The main memory 52 includes a volatile memory, such as a random access memory (RAM). The main memory 52 functions as the program execution memory 130, the first program execution memory 131, the second program execution memory 132, the management information memory 140, the first management information memory 141, and the second management information memory 142, which are Fig. 2 are shown.
[0017] Returning to Fig. 3, the PLC 100 includes an external memory 53 that stores the control program 59 in advance. The external memory 53 provides information stored in the program to the controller 51 as instructed by the controller 51 and stores data provided by the controller 51. The external memory 53 includes a non-volatile memory, such as a flash memory, a hard disk (HDD), or a solid-state drive (SSD). The external memory 53 functions as the program memory 120, the first program memory 121, and the second program memory 122, which are in the Fig. 2 are shown.
[0018] Returning to Fig. 3, the PLC 100 includes an operating device 54 operable by the user. Information input via the operating device 54 is provided to the controller 51. The operating device 54 includes information input components, such as a keyboard, a mouse, or a touchscreen.
[0019] The PLC 100 also includes a display 55 that displays information input via the operating device 54 and information output from the controller 51. The display 55 includes a display device such as a liquid crystal display (LCD) or an organic electroluminescent (EL) display.
[0020] The PLC 100 also includes a transceiver 56 that transmits and receives information. The transceiver 56 includes information communication components, such as a communication network termination or a wireless communication device connected to the network. The transceiver 56 functions as the program receiver 110, which in the Fig. 2 is shown.
[0021] Returning to Fig. 3, it should be noted that the main memory 52, the external memory 53, the operating device 54, the display 55 and the transceiver 56 are connected to the controller 51 via an internal bus 50 in the PLC 100.
[0022] The PLC 100 implements the functions of components 110, 120 to 122, 130 to 132, 140 to 142 and 151 to 158, which are Fig. 2, with the controller 51 using the main memory 52, the external memory 53, the operating device 54, the display 55, and the transceiver 56 as resources. For example, the PLC 100 executes a program memory management step as an example of a program reception step performed by the program receiver 110 and a program memory determination step performed by the program memory manager 151.
[0023] The PLC 100 also performs, for example, a program execution management step as an example of a program execution determination step performed by the program execution manager 152, and a management information storage management step as an example of a management information storage determination step performed by the management information storage manager 153. The PLC 100 also performs, for example, a program write control step performed by the program write controller 154, a program load control step performed by the program load controller 155, and a management information generation step performed by the management information generator 156.The PLC 100 also performs, for example, a program execution step performed by the program execution unit 157 and an updated program switching control step performed by the updated program switching controller 158.
[0024] Hardware configuration of the engineering tool 200 As described in the Fig. 3, the engineering tool 200 includes a controller 51, a main memory 52, an external memory 53, an operating device 54, a display 55 and a transceiver 56, similar to the PLC 100. The controller 51 functions as the program generator 210 and the compiler 211, which are in the Fig. 2, the external memory 53 functions as the program memory 220 and the transceiver 56 functions as the program transmitter 230 based on the control program 59. Returning to Fig. 3 is to say that the engineering tool 200 implements the functions of the components 210, 211, 220 and 230, which are described in the Fig. 2, with the controller 51 using the main memory 52, the external memory 53, the operating device 54, the display 55, and the transceiver 56 as resources. For example, the engineering tool 200 performs a program generation step performed by the program generator 210, a compilation step performed by the compiler 211, and a program transmission step performed by the program transmitter 230.
[0025] Details of the functional configuration of the engineering tool 200 Returning to Fig. 2, the program generator 210 writes the program when a user operation is received at the operating device 54 to write a program. The program can be written in a text data format or a graphic data format. For example, the program can be written as source code in a structured text (ST) language or as a ladder diagram in a ladder language. When a user operation is received at the user device 54 to compile a program, the program generator 210 causes the compiler 211 to compile the program. The program generator 210 stores the source file for the generated program and the executable file for the compiled program in the program memory 220.
[0026] The program sender 230 sends the executable file for the program stored in the program memory 220 to the PLC 100. While the PLC 100 is executing the executable file for the program received from the engineering tool 200, the user can detect an error in the operation of the PLC 100 and correct and update the program. In this case, the program generator 210 generates the source file and the executable file for the updated program and stores these files in the program memory 220. The program sender 230 sends the executable file for the updated program stored in the program memory 220 to the PLC 100.
[0027] Details of the functional configuration of the PLC 100: The program receiver 110 receives the executable file for a program from the engineering tool 200. When the user corrects and updates the program during execution, the program receiver 110 receives the executable file for the updated program from the engineering tool 200. The executable file for a program is hereinafter referred to simply as a program. The executable file for an updated program is hereinafter referred to simply as an updated program.
[0028] In the present embodiment, the first program execution memory 131 is a first volatile memory. The second program execution memory 132 is a second volatile memory separate from the first volatile memory. The first program memory 121 is a first non-volatile memory. The second program memory 122 is a second non-volatile memory separate from the first non-volatile memory. The first management information memory 141 is a specific area in a first volatile memory into which no program is loaded. The second management information memory 142 is a specific area in the second volatile memory.
[0029] The program write controller 154 performs write control to store the executable file for a program received from the program receiver 110 into the program memory 120. When no program is being executed, the program write controller 154 synchronizes the program information stored in the first program memory 121 with the program information stored in the second program memory 122. The program write controller 154 then stores the received program in the first program memory 121.
[0030] For example, as in the Fig. 4, a first program PRG1, a second program PRG2 and a third program PRG3 are received from the engineering tool 200. If no program information is stored in the first program memory 121 or the second program memory 122, these memories are used as shown in the Fig. 4. In this case, the program write controller 154 stores the received programs PRG1 to PRG3 in a free space in the first program memory 121.
[0031] Returning to Fig. 2, the program load controller 155 performs the control to load the program stored in the program memory 120 into the program execution memory 130 when the program memory 120 successfully stores a program. If no program is being executed, the program load controller 155 loads a program stored in the first program memory 121 into the first program execution memory 131.
[0032] For example, the program load control 155 loads, as shown in the Fig. 4, after successfully storing the programs PRG1 to PRG3 in the first program memory 121, the first program PRG1 stored in the first program memory 121 is first loaded into the first program execution memory 131 at a first address 0000H to a second address 0100H. The program load controller 155 also loads the second program PRG2 stored in the first program memory 121 into the first program execution memory 131 at the second address 0100H to a third address 0200H. The program load controller 155 also loads the third program PRG3 stored in the first program memory 121 into the first program execution memory 131 at the third address 0200H to a fourth address 0300H.In other words, the program load controller 155 loads the programs PRG1 to PRG3 into the first program execution memory 131 at the first address 0000H to the fourth address 0300H so that they follow one another.
[0033] Returning to Fig. 2, the management information generator 156 generates a management table as an example of management information before executing a program and stores the generated management table in the management information memory 140. The management table indicates the location addresses of the programs loaded into the program execution memory 130. When no program is being executed, the management information generator 156 generates a management table indicating the location address of a program loaded into the first program execution memory 131 and stores the generated management table in the first management information memory 141.
[0034] For example, the management information generator 156, as shown in the Fig. 4, after loading the programs PRG1 to PRG3 into the first program execution memory 131, a management table is created indicating the first program PRG1, in which the starting location address is the first address 0000H, the second program PRG2, in which the starting location address is the second address 0100H, and the third program PRG3, in which the starting location address is the third address 0200H. The management information generator 156 then stores the generated management table in the first management information memory 141.
[0035] Returning to Fig. 2, the program execution unit 157 executes a program loaded into the program execution memory 130 using the management table stored in the management information memory 140. When no program is being executed, the program execution unit 157 executes a program loaded into the first program execution memory 131 using the management table stored in the first management information memory 141.
[0036] For example, the program execution unit 157 identifies, as in the Fig. 4, the programs PRG1, PRG2, and PRG3 with the starting location addresses 0000H, 0100H, and 0200H, respectively, are executed based on the management table stored in the first management information memory 141. The program execution unit 157 executes the programs PRG1 to PRG3 at the identified locations in the first program execution memory 131.
[0037] Returning to Fig. 2, in a case where the program receiver 110 receives an updated program during program execution, the program memory manager 151, which is an example of a program memory determiner, determines whether the program memory 120 used to load the executed program is the first program memory 121 or the second program memory 122. For example, if a program memory flag (not shown) indicates the value 1, the program memory manager 151 determines that the program memory 120 used to load the executed program is the first program memory 121. If the program memory flag indicates the value 2, the program memory manager 151 determines that the program memory 120 used to load the executed program is the second program memory 122.
[0038] When the updated program is received and the determination result from the program memory manager 151 is the first program memory 121, the program write controller 154 synchronizes the information stored in the second program memory 122 with the information stored in the first program memory 121. The program write controller 154 then stores the received updated program in the second program memory 122. When the determination result from the program memory manager 151 is the second program memory 122, the program write controller 154 synchronizes the information stored in the first program memory 121 with the information stored in the second program memory 122. The program write controller 154 then stores the received updated program in the first program memory 121.
[0039] For example, as in the Fig. 5, a first updated program PRG11, which is the first program PRG1 to be updated, and a third updated program PRG13, which is the third program PRG3 to be updated, are received from the engineering tool 200 during the execution of the programs PRG1 to PRG3. In this case, the program memory manager 151 determines that the program memory 120 storing the executed programs is the first program memory 121. The program write controller 154 then stores the programs PRG1 to PRG3 stored in the first program memory 121 into the second program memory 122 to synchronize the information of the programs PRG1 to PRG3. The program write controller 154 stores the received updated programs PRG11 and PRG13 in a free space in the second program memory 122.
[0040] Returning to Fig. 2, in a case where the program writing controller 154 successfully writes an updated program during program execution, the program execution manager 152, which is an example of a program execution determiner, determines whether the program execution memory 130 into which the executed program is loaded is the first program execution memory 131 or the second program execution memory 132. For example, if a program execution memory flag (not shown) indicates the value 1, the program execution manager 152 determines that the program execution memory 130 into which the executed program is loaded is the first program execution memory 131. If the program execution memory flag indicates the value 2, the program execution manager 152 determines that the program execution memory 130 into which the executed program is loaded is the second program execution memory 132.
[0041] If the updated program has been successfully saved and the determination result from the program execution manager 152 is the first program execution memory 131, the program load controller 155 loads the updated program stored in the second program memory 122 into the second program execution memory 132. The program load controller 155 then loads a non-updated program that has been loaded and executed in the first program execution memory 131 into the second program execution memory 132. If the determination result from the program execution manager 152 is the second program execution memory 132, the program load controller 155 loads the updated program stored in the first program memory 121 into the first program execution memory 131.The program load controller 155 then loads an unupdated program that was loaded into and executed in the second program execution memory 132 into the first program execution memory 131.
[0042] For example, the program load control 155 loads, as shown in the Fig. As shown in Figure 6, after the second program memory 122 successfully stores the updated programs PRG11 and PRG13, the first updated program PRG11 stored in the second program memory 122 is loaded into the second program execution memory 132 at the first address 0000H to the second address 0110H, which are examples of a first memory area. The program load controller 155 also loads the third updated program PRG13 stored in the second program memory 122 into the second program execution memory 132 at the second address 0110H to the third address 0220H, which are examples of the first memory area. The program load controller 155 also loads the second program PRG2 stored in the first program execution memory 131 into the second program execution memory 132 at the third address 0220H to the fourth address 0320H, which are examples of a second memory area.In other words, the program load controller 155 loads the programs PRG11, PRG13, and PRG2 into the second program execution memory 132 at the first address 0000H to the fourth address 0320H so that they follow one another.
[0043] Returning to Fig. 2, in a case where the program loading controller 155 performs control for loading an updated program during program execution, the management information storage manager 153, which is an example of a management information storage determiner, determines whether the management information storage 140 storing the management table used for the executed program is the first management information storage 141 or the second management information storage 142. For example, if a management information storage flag (not shown) indicates the value 1, the management information storage manager 153 determines that the management information storage 140 storing the management table used for the executed program is the first management information storage 141.When the management information storage flag indicates the value 2, the program storage manager 151 determines that the management information storage 140 storing the management table used for the executed program is the second management information storage 142.
[0044] If the determination result from the management information storage manager 153 is the first management information storage 141, the management information generator 156 generates a management table indicating the location address of the updated program loaded into the second program execution memory 132. The management information generator 156 then stores the generated management table in the second management information storage 142. If the determination result from the management information storage manager 153 is the second management information storage 142, the management information generator 156 generates a management table indicating the location address of the updated program loaded into the first program execution memory 131. The management information generator 156 then stores the generated management table in the first management information storage 141.
[0045] In particular, the management information generator 156, as shown in the Fig. 6, a management table indicating the first updated program PRG11 in which the starting location address is the first address 0000H, the second program PRG2 in which the starting location address is the second address 0220H, and the third updated program PRG13 in which the starting location address is the third address 0110H. The management information generator 156 then stores the generated management table in the second management information storage 142.
[0046] Returning to Fig. 2, in a case where the program execution unit 157 executes a program loaded into the first program execution memory 131 using the management table stored in the first management information memory 141, the updated program switching controller 158 causes the program execution unit 157 to execute an updated program loaded into the second program execution memory 132 using the management table stored in the second management information memory 142.When the program execution unit 157 executes a program loaded into the second program execution memory 132 using the management table stored in the second management information memory 142, the updated program switching controller 158 causes the program execution unit 157 to execute an updated program loaded into the first program execution memory 131 using the management table stored in the first management information memory 141.
[0047] For example, as in the Fig. 6, both the program execution memory 130 and the management information memory 140 to which the program execution unit 157 refers are switched. Specifically, the updated program switching controller 158 switches the volatile memory used by the program execution unit 157 from the first volatile memory to the second volatile memory. Thus, the program execution unit 157 identifies the programs PRG11, PRG2, and PRG13 with the start location addresses 0000H, 0220H, and 0110H, respectively, based on the management table stored in the second management information memory 142. The program execution unit 157 stops the execution of the programs PRG1 to PRG3 and executes the programs PRG11, PRG2, and PRG13 at the identified locations in the second program execution memory 132.After the programs PRG11, PRG2, and PRG13 are executed, the updated program switching controller 158 updates the value indicated by each of the program storage flag, the program execution storage flag, and the management information storage flag from 1 to 2.
[0048] Flowchart of the Updated Program Switching Control Process The control performed by the program development support system 1 for supporting program development will now be described with reference to the flowchart. The process of creating or updating a program and sending the program to the PLC 100 performed in the engineering tool 200 simply includes creating or updating a program based on a user operation and saving the program to the program memory 220 with the program generator 210, and sending the created or updated program to the PLC 100 with the program transmitter 230.
[0049] The process of executing a program performed in the PLC 100 simply includes receiving the executable file for a program from the engineering tool 200 with the program receiver 110, storing the program into the first program memory 121 with the program write controller 154, loading the program into the first program execution memory 131 with the program load controller 155, creating a management table and storing the management table in the first management information memory 141 with the management information generator 156, and executing the program using the management table with the program execution unit 157.
[0050] To reduce redundancy, the processes described above are not shown or described in detail. The following describes the control performed by the PLC 100 to switch a running program to an updated program. The PLC 100 starts a Fig. 7 when the program execution unit 157 starts executing a program.
[0051] The program receiver 110 first receives an updated program (step S101). For example, if the user detects an error in the operation of the PLC 100 and corrects and updates the programs PRG1 and PRG3 during the execution of the programs PRG1 to PRG3, the program receiver 110 receives the first updated program PRG11 and the third updated program PRG13 from the engineering tool 200.
[0052] The program memory manager 151 then determines whether the program memory 120 used to load the executed program is the first program memory 121 or the second program memory 122 (step S102). For example, if the program memory flag indicates the value 1, the program memory manager 151 determines that the first program memory 121 is used to load the executed programs PRG1 to PRG3.
[0053] The program write controller 154 then synchronizes the information stored in the program memory 120 based on the determination result from the program memory manager 151 (step S103). For example, the program write controller 154 also stores the programs PRG1 to PRG3 stored in the first program memory 121 in the second program memory 122.
[0054] The program write controller 154 then stores the updated program in the program memory 120 based on the determination result from the program memory manager 151 (step S104). For example, the program write controller 154 stores the updated programs PRG11 and PRG13 in the second program memory 122.
[0055] The program execution manager 152 then determines whether the program execution memory 130 into which the executed program is loaded is the first program execution memory 131 or the second program execution memory 132 (step S105). For example, if the program execution memory flag indicates the value 1, the program execution manager 152 determines that the executed programs PRG1 to PRG3 are loaded into the first program execution memory 131.
[0056] The program load controller 155 then loads the updated program stored in the program memory 120 into the program execution memory 130 based on the determination result from the program execution manager 152 (step S106). For example, the program load controller 155 loads the updated programs PRG11 and PRG13 from the second program memory 122 into the second program execution memory 132 at the first address 0000H to the third address 0220H, so that they are consecutive to one another.
[0057] The program load controller 155 then loads a program that has been loaded and not updated into the program execution memory 130 based on the determination result from the program execution manager 152 (step S107). For example, the program load controller 155 loads the second program PRG2 from the first program execution memory 131 into the second program execution memory 132 at the third address 0220H to the fourth address 0320H, so that the second program PRG2 follows the updated programs PRG11 and PRG13.
[0058] The management information storage manager 153 then stores whether the management information storage 140 storing the management table used for the executed program is the first management information storage 141 or the second management information storage 142 (step S108). For example, if the management information storage flag indicates the value 1, the management information storage manager 153 determines that the first management information storage 141 stores the management table used for the executed program.
[0059] Then, the management information generator 156 creates a management table indicating the location address of the updated program loaded into the program execution memory 130 based on the determination result from the management information memory manager 153. The management information generator 156 then stores the management table in the management information memory 140 (step S109). For example, the management information generator 156 creates a management table indicating the first updated program PRG11, whose starting location address is the first address 0000H, the second program PRG2, whose starting location address is the second address 0220H, and the third updated program PRG13, whose starting location address is the third address 0110H. The management information generator 156 then stores the management table in the second management information memory 142.
[0060] The updated program switching controller 158 then switches both the program execution memory 130 and the management information memory 140 used by the program execution unit 157 (step S110). For example, the updated program switching controller 158 switches the volatile memory used by the program execution unit 157 from the first volatile memory to the second volatile memory.
[0061] The program execution unit 157 executes the updated program and the non-updated program (step S111). For example, the program execution unit 157 identifies the programs PRG11, PRG2, and PRG13 with the starting location addresses 0000H, 0220H, and 0110H, respectively, based on the management table stored in the second management information memory 142. The program execution unit 157 stops the execution of the programs PRG1 to PRG3 and executes the programs PRG11, PRG2, and PRG13 at the identified locations in the second program execution memory 142.
[0062] The updated program switching controller 158 then updates the value indicated by each of the program storage flag, the program execution storage flag, and the management information storage flag (step S112) and returns to step S101. For example, the updated program switching controller 158 updates the value indicated by each of the program storage flag, the program execution storage flag, and the management information storage flag from 1 to 2.
[0063] As described above, in the program development support system 1 according to the present embodiment, the program load controller 155 in the PLC 100 performs control for loading a program stored in the program memory 120 into the program execution memory 130. The program execution unit 157 executes the program loaded into the program execution memory 130. The program write controller 154 performs write control to store an updated program into the program memory 120 during program execution.
[0064] The program memory 120 is a non-volatile memory and includes the first program memory 121, which is a first non-volatile memory, and the second program memory 122, which is a second non-volatile memory. The program execution memory 130 is a volatile memory and includes the first program execution memory 131, which is a first volatile memory, and the second program execution memory 132, which is a second volatile memory.
[0065] If the program memory 120 used to load the executed program is the first program memory 121, the program write controller 154 stores the updated program in the second program memory 122. If the program execution memory 130 into which the executed program is loaded is the first program execution memory 131 and the second program memory 122 successfully stores the updated program, the program load controller 155 loads the updated program from the second program memory 122 into the second program execution memory 132.
[0066] In this way, the PLC 100 according to the present embodiment stores the received updated program in the program memory 120, which is a non-volatile memory. The received updated program can therefore remain stored in the program memory 120 even if a power failure occurs. Therefore, in the PLC 100 according to the present embodiment, any components in the program execution memory 130, which is a volatile memory, that serve to store information long-term are eliminated to prepare for a power failure.
[0067] In the program development support system 1 according to the present embodiment, when the program execution unit 157 executes a program loaded into the first program execution memory 131, the updated program switching controller 158 performs switching control to cause the program execution unit 157 to execute an updated program loaded into the second program execution memory 132.
[0068] In the PLC device of Patent Literature 1 described above, after the update, execution of a program loaded into the third memory and updated during execution begins. In this device, program execution is stopped when the update starts. Accordingly, the PLC device described in Patent Literature 1 stops program execution for a period of time from the start of the program update until the start of execution of the updated program.
[0069] Specifically, the PLC device of Patent Literature 1 loads the updated program from the first memory, which is a non-volatile flash memory, to the third memory, which is a volatile RAM. This structure may lengthen the time for which program execution is stopped. With an extended time for which program execution is stopped, the PLC device described in Patent Literature 1 is more likely to cause inaccurate control timing for a factory automation device (FA device). This may cause the FA device to generate a warning sound or exhibit an error.
[0070] In contrast, the PLC 100 according to the present embodiment loads an updated program into the second program execution memory 132, which is not used for program execution. In this way, the PLC 100 according to the present embodiment can start loading the updated program without stopping the execution of the program before rewriting. The PLC 100 according to the present embodiment switches the program execution memory 130 used for program execution from the first program execution memory 131 to the second program execution memory 132 after the updated program is loaded and the management table is created and saved. This greatly reduces the processing time for the switching control.In this way, the PLC 100 according to the present embodiment can switch from executing the program before rewriting to executing the updated program after rewriting more quickly than a PLC that does not switch the program execution memory from the first program execution memory to the second program execution memory.
[0071] The PLC 100 according to the present embodiment can therefore shorten the time for which program execution is stopped to rewrite the program. Therefore, the PLC 100 according to the present embodiment is less likely to cause inappropriate control timing for the FA device controlled based on the updated program. This reduces warning sounds generated by the FA device or errors occurring in the FA device.
[0072] The PLC device described in Patent Literature 1 stores a received updated program in the second memory, which is a non-volatile flash memory. The PLC device then copies the updated program stored in the second memory to the first memory, which is a non-volatile flash memory, and then loads the copied updated program from the first memory to the third memory. The PLC device described in Patent Literature 1 can therefore extend the time period between receiving the updated program and loading the updated program into the third memory.
[0073] In contrast, the PLC 100 according to the present embodiment stores a received updated program in the second program memory 122, which is not used for program execution, and then loads the updated program into the second program execution memory 132. In this way, the PLC 100 according to the present embodiment can shorten the time period between receiving an updated program and loading the updated program into the program execution memory, compared to a PLC that copies the updated program to the non-volatile memory after the received updated program is stored in the program memory and before the updated program is loaded into the program execution memory.
[0074] Recently, structured programming has become common in PLC programming. Structured programming involves using variables, such as global variables or local variables, within programs instead of using traditional methods. To correct and update global variables common to multiple programs, the programmer must specifically correct and update all programs that use the global variables. Modern PLC programming therefore tends to involve correcting and updating multiple programs at once.
[0075] When multiple programs need to be corrected and updated at once, the PLC device described in Patent Literature 1 may extend the time period for which program execution is stopped or the time period from receiving an updated program to loading the updated program into the program execution memory. When multiple programs need to be updated, the PLC 100 according to the present disclosure can shorten such time periods compared to the PLC device described in Patent Literature 1.
[0076] In the program development support system 1 according to the present embodiment, the management information generator 156 generates a management table that is the information for managing the execution of a program, and the management information generator 156 stores the management table in the management information storage 140. The program execution unit 157 executes a program loaded into the program execution storage 130 using the management table stored in the management information storage 140. The management information generator 156 also generates a management table for managing the execution of an updated program.When the management information storage 140 storing the management table used for the executed program is the first management information storage 141, the management information generator 156 stores the generated management table in the second management information storage 142. When the program execution unit 157 executes a program loaded into the first program execution storage 131 using the management table stored in the first management information storage 141, the updated program switching controller 158 performs switching control to cause the program execution unit 157 to execute an updated program loaded into the second program execution storage 132 using the management table stored in the second management information storage 142.
[0077] In this way, the PLC 100 according to the present embodiment stores the newly created management table in the second management information memory 142, which is not used for program execution. With this structure, the creation of the management table can be started without stopping the program execution before rewriting. The PLC 100 according to the present embodiment switches the management information memory 140 used for program execution from the first management information memory 141 to the second management information memory 142 after the management table is created and saved. This greatly reduces the processing time for the switching control.In this way, the PLC 100 according to the present embodiment can shorten the time required to create and store the management table compared to a PLC that does not switch the management information storage from the first management information storage to the second management information storage. The PLC 100 can also shorten the time required to switch from the execution of the program before rewriting to the execution of the updated program after rewriting.
[0078] In the program development support system 1 according to the present embodiment, the program includes the first program PRG1 and the third program PRG3. The updated program includes the first updated program PRG11, which is the first program PRG1 that has been updated, and the third updated program PRG13, which is the third program PRG3 that has been updated. When the first program memory 121 is used to load the executed programs PRG1 to PRG3, the program write controller 154 stores the first updated program PRG11 and the third updated program PRG13 in the second program memory 122.
[0079] When the executed programs PRG1 to PRG3 are loaded into the first program execution memory 131 and the second program memory 122 successfully stores the first updated program PRG11 and the third updated program PRG13, the program load controller 155 loads the first updated program PRG11 and the third updated program PRG13 from the second program memory 122 into the second program execution memory 132. The management information generator 156 generates a management table for managing the execution of the first updated program PRG11 and the third updated program PRG13. When the first management information memory 141 stores the management table used for the executed programs PRG1 to PRG3, the management information generator 156 stores the generated management table in the second management information memory 142.
[0080] When the program execution unit 157 executes the first program PRG1 and the third program PRG3 loaded into the first program execution memory 131 using the management table stored in the first management information memory 141, the updated program switching controller 158 causes the program execution unit 157 to execute the first updated program PRG11 and the third updated program PRG13 loaded into the second program execution memory 132 using the management table stored in the second management information memory 142.
[0081] In this way, the PLC 100 according to the present embodiment can perform a single switching control process for switching from the execution of the program before rewriting to the execution of the updated program after rewriting for a plurality of received updated programs. Therefore, the PLC 100 according to the present embodiment can shorten the time for which program execution is stopped for program rewriting compared to a PLC that performs more than a single switching control process for switching from the execution of the program before rewriting to the execution of the updated program after rewriting for a plurality of received updated programs. When a plurality of programs are to be updated, the PLC 100 can further shorten the time for which program execution is stopped.
[0082] In the program development support system 1 according to the present embodiment, the program further includes the second program PRG2. When the first program memory 121 is used to load the executed programs PRG1 to PRG3, the program write controller 154 stores the updated programs PRG11 and PRG13 in the second program memory 122.
[0083] When the executed programs PRG1 to PRG3 are loaded into the first program execution memory 131 and the second program memory 122 successfully stores the updated programs PRG11 and PRG13, the program load controller 155 loads the updated programs PRG11 and PRG13 from the second program memory 122 into the second program execution memory 132 and loads the second program PRG2 from the first program execution memory 131 into the second program execution memory 132.
[0084] The management information generator 156 generates a management table for managing the execution of the updated programs PRG11 and PRG13 and the second program PRG2. When the first management information storage 141 stores the management table used for the executed programs PRG1 to PRG3, the management information generator 156 stores the generated management table in the second management information storage 142.When the program execution unit 157 executes the programs PRG1 to PRG3 loaded into the first program execution memory 131 using the management table stored in the first management information memory 141, the updated program switching controller 158 causes the program execution unit 157 to execute the updated programs PRG11 and PRG13 and the second program PRG2 loaded into the second program execution memory 132 using the management table stored in the second management information memory 142.
[0085] In this way, in a case where updated programs have not been received for all the executed programs, the PLC 100 according to the present embodiment can load the unupdated second program PRG2 from the first program execution memory 131, which is used to execute the second program PRG2, into the second program execution memory 132, which is not used to execute the second program PRG2. Therefore, the PLC 100 according to the present embodiment can reduce the time required to load an unupdated program compared to a PLC that loads the unupdated program from the first program memory or the second program memory, which are non-volatile memories, into the second program execution memory.
[0086] Specifically, in the program development support system 1 according to the present embodiment, the program load controller 155 loads the updated programs PRG11 and PRG13 into the second program execution memory 132 at the first address 0000H to the third address 0220H, which are the first memory area, so that they follow one another. The program load controller 155 loads the second program PRG2 into the second program execution memory 132 at the third address 0220H to the address 0320H, which are the second memory area, following and continuing the first memory area.
[0087] In this way, the PLC 100 according to the present embodiment can load the updated programs PRG11 and PRG13 and the non-updated second program PRG2 into the first memory area up to the second memory area so that they follow one another. The PLC 100 according to the present embodiment can therefore prevent fragmentation of the program execution memory 130 upon repeated receipt of updated programs.
[0088] In an example described below, a PLC synchronizes the memories in the program memory 120 before writing a program and also synchronizes the memories in the program execution memory 130 before performing the program loading control. Specifically, the PLC receives the second updated program PRG12, which is the second program PRG2 that has been updated, during the execution of the programs PRG1 to PRG3. The second updated program PRG12 has a larger file size than the second program PRG2. In such a PLC, after the second updated program PRG12 has been loaded into the second program execution memory 132, the memory area in the second program execution memory 132 that stores the second program PRG2 becomes a free space, as shown in the Fig. 8. Although the second updated program PRG12 is loaded to follow the third program PRG3, the PLC may have memory fragmentation, with the memory area where the second program PRG2 was stored being a free space.
[0089] In contrast, the PLC 100 according to the present embodiment does not synchronize the memories in the program execution memory 130 before performing the program loading control. Therefore, the PLC 100 according to the present embodiment, as shown in the Fig.9, load the non-updated programs PRG1 and PRG3 after loading the second updated program PRG12 so that they follow the second updated program PRG12. This can prevent memory fragmentation. Therefore, the PLC 100 according to the present embodiment is less likely to experience memory fragmentation and a shortage of available memory space compared to a PLC that synchronizes the memories in the program execution memory 130 before performing program loading control.
[0090] In the program development support system 1 according to the present embodiment, the program memory manager 151 determines whether the program memory 120 used to load the executed program is the first program memory 121 or the second program memory 122. The program execution manager 152 determines whether the program execution memory 130 into which the executed program is loaded is the first program execution memory 131 or the second program execution memory 132. The management information memory manager 153 determines whether the management information memory 140 storing the management table used for the executed program is the first management information memory 141 or the second management information memory 142.
[0091] In this way, during the execution of a program, the PLC 100 according to the present embodiment can manage the active program memory 120, the active program execution memory 130, and the active management information memory 140 used to execute the program separately from the non-active program memory 120, the non-active program execution memory 130, and the non-active management information memory 140 not used to execute the program. Modifications
[0092] In the above embodiment, the program writing controller 154 synchronizes the program information stored in the first program memory 121 with the program information stored in the second program memory 122 after the program receiver 110 receives an updated program. However, the program information may be synchronized at any other arbitrary time. For example, the program writing controller 154 may synchronize the program information stored in the first program memory 121 with the program information stored in the second program memory 122 after the program execution unit 157 executes a program and an updated program.
[0093] As in the above embodiment, the program load controller 155 may load updated programs if all updated programs have been successfully saved by the program write controller 154. However, this is not limiting. For example, the program load controller 155 may load at least one of the received updated programs that has been successfully saved by the program write controller 154.
[0094] As in the above embodiment, the program load controller 155 may load the non-updated second program PRG2 from the first program execution memory 131, which is a volatile memory, into the second program execution memory 132. However, this is not limiting. For example, the program load controller 155 may load the non-updated second program PRG2 from the first program memory 121 or the second program memory 122, which are non-volatile memories, into the second program execution memory 132.
[0095] In the above embodiment, the updated program switching controller 158 updates the value indicated by each of the program storage flag, the program execution storage flag, and the management information storage flag from 1 to 2. However, any number of flags may be used. For example, the updated program switching controller 158 may use a volatile memory flag that combines the program execution storage flag and the management information storage flag, with the program execution memory 130 and the management information memory 140 included in the same volatile memory. The updated program switching controller 158 may update the value indicated by the volatile memory flag to 1 or 2.In this case, the program execution manager 152 and the management information storage manager 153 manage the program execution memory 130 and the management information storage 140 based on the value specified by the volatile memory flag updated by the updated program switching controller 158. In another example, the updated program switching controller 158 may use a switching flag that combines all of the program memory flag, the program execution memory flag, and the management information memory flag. The updated program switching controller 158 may update the value specified by the switching flag to 1 or 2.In this case, the program memory manager 151, the program execution manager 152, and the management information memory manager 153 manage the program memory 120, the program execution memory 130, and the management information memory 140 based on the value indicated by the switching flag updated by the updated program switching controller 158.
[0096] In the above embodiment, the updated program switching controller 158 updates the program storage flag, the program execution storage flag, and the management information storage flag. However, each of these flags may be updated by a component other than the updated program switching controller 158. For example, the program write controller 154 or the program memory manager 151 may update the program storage flag after the program write controller 154 performs the write control to write to the program memory 120. For example, the program load controller 155 or the program execution manager 152 may update the program execution storage flag after the program load controller 155 performs the control to load an updated program into the program execution memory 130.For example, the management information generator 156 or the management information storage manager 153 may update the management information storage flag after the management information generator 156 has generated a management table and stored the management table in the management information storage 140.
[0097] In the above embodiment, the program receiver 110 receives, as the updated programs, the first updated program PRG11, which is the first program PRG1 that has been updated, and the third updated program PRG13, which is the third program PRG3 that has been updated. However, the updated programs are not limited to these. For example, the program receiver 110 may receive, as an updated program, the second updated program PRG12, which is the second program PRG2 that has been updated. When the program receiver 110 receives the first updated program PRG11 and the second updated program PRG12 as updated programs, the PLC 100 can perform control similar to the control described above with the third updated program PRG13 replaced with the second updated program PRG12.To reduce redundancy, the example in which the program receiver 110 receives the first updated program PRG11 and the second updated program PRG12 as the updated programs is not shown or described in detail.
[0098] In the above embodiment, the program memory 120 includes two memories, or more specifically, the first program memory 121 and the second program memory 122. In some embodiments, the program memory 120 may include three or more memories. In this case, the program memory manager 151 manages the three or more memories in the program memory 120. The program write controller 154 performs write control for writing to the three or more memories in the program memory 120. The updated program switching controller 158 controls switching between the three or more memories in the program memory 120.
[0099] In the above embodiment, the program execution memory 130 includes two memories, or more specifically, the first program execution memory 131 and the second program execution memory 132. In some embodiments, the program execution memory 130 may include three or more memories. In this case, the program execution manager 152 manages the three or more memories in the program execution memory 130. The program load controller 155 performs control for loading into the three or more memories in the program execution memory 130. The updated program switching controller 158 controls switching between the three or more memories in the program execution memory 130.
[0100] In the above embodiment, the management information storage 140 includes two memories, or more specifically, the first management information storage 141 and the second management information storage 142. In some embodiments, the management information storage 140 may include three or more memories. In this case, the management information storage manager 153 manages the three or more memories in the management information storage 140. The management information generator 156 stores generated management tables in the three or more memories in the management information storage 140. The updated program switching controller 158 controls switching between the three or more memories in the management information storage 140.
[0101] In the above embodiment, the first management information memory 141 is a specific area in the first volatile memory, which is the first program execution memory 131, and the second management information memory 142 is a specific area in the second volatile memory, which is the second program execution memory 132. However, the management information memories 141 and 142 may have any other structures. For example, the first management information memory 141 and the second management information memory 142 may be a first specific area and a second specific area in a third volatile memory.
[0102] The main body of the PLC 100, which includes the controller 51, the main memory 52, the external memory 53, the operating device 54, the transceiver 56, and the internal bus 50, can enable the PLC 100 to perform the processes, for example, by installing a program for the above operations, which is stored and distributed in a non-volatile storage medium readable by the PLC 100, such as a flash memory. The program can be stored in a storage device included in a server device in a communication network, such as a local area network (LAN) or the Internet, and can be downloaded from the PLC 100 to provide a computer.
[0103] When the functions of the PLC 100 are implemented in a shared manner by the operating system (OS) and an application program, or by cooperation between the OS and the application program, portions executable by the application program may be stored in a non-volatile storage medium or storage device.
[0104] The program can also be superimposed onto a carrier wave to be provided by a communications network. For example, the program can be posted on a bulletin board system (BBS) in the communications network to be provided through a network. The above processes can be performed by booting the program and executing the program under the control of the operating system, similar to other application programs.
[0105] The foregoing describes some exemplary embodiments for illustrative purposes. Although the foregoing discussion has presented specific embodiments, those skilled in the art will recognize that changes may be made in form and detail without departing from the broader spirit and scope of the invention. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. This detailed description is accordingly not to be taken in a limiting sense, and the scope of the invention is defined only by the appended claims, along with the full range of equivalents encompassed by such claims. List of reference symbols 1 Program development support system 50 internal bus 51 Control 52 main memory 53 external storage 54 Operating device 55 Advertisement 56 transceivers 59 Control program 100 PLC 110 program receivers 120 program memories 121 first program memory 122 second program memory 130 program execution memory 131 first program execution memory 132 second program execution memory 140 Administrative Information Store 141 first administrative information store 142 second management information store 151 Program memory manager 152 Program Execution Managers 153 Administrative Information Store Manager 154 Program write control 155 Program loading control 156 administrative information producers 157 Program execution unit 158 Updated Program Switching Control 200 engineering tools 210 program producers 211 Compilers 220 program memories 230 channels QUOTES CONTAINED IN THE DESCRIPTION
[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited patent literature
[0000] JP 2004 - 272 629
[0004]
Claims
[1] Programmable logic controller, comprising: a program memory for storing a program; a program execution memory usable for executing the program; a program loading controller for performing control for loading the program stored in the program memory into the program execution memory; a program execution unit for executing the program loaded into the program execution memory; and a program write controller for performing a write control to store an updated program into the program memory, wherein the updated program is the program that is updated during execution, wherein the program memory comprises a first program memory and a second program memory different from the first program memory, wherein the program execution memory comprises a first program execution memory and a second program execution memory different from the first program execution memory, wherein the program write controller stores the updated program in the second program memory if the program memory used to load the executed program is the first program memory, wherein the program loading controller loads the updated program from the second program memory into the second program execution memory if the program execution memory into which the executed program is loaded is the first program execution memory and the second program memory successfully stores the updated program, and wherein the programmable logic controller further comprises an updated program switching control for performing, upon execution of the program loaded into the first program execution memory by the program execution unit, a switching control to cause the program execution unit to execute the updated program loaded into the second program execution memory. [2] A programmable logic controller according to claim 1, further comprising: a management information generator for generating management information for managing execution of the program; and a management information storage for storing the management information, wherein the program execution unit executes the program loaded into the program execution memory using the management information stored in the management information memory, wherein the management information memory comprises a first management information memory and a second management information memory different from the first management information memory, wherein the management information generator generates the management information for managing the execution of the updated program and stores the generated management information for managing the execution of the updated program in the second management information storage when the management information storage that stores the management information used for the executed program is the first management information storage, and wherein, when the program execution unit executes the program loaded into the first program execution memory using the management information stored in the first management information memory, the updated program switching control performs the switching control to cause the program execution unit to execute the updated program loaded into the second program execution memory using the management information stored in the second management information memory. [3] A programmable logic controller according to claim 1, further comprising: a program memory determiner for determining whether the program memory used to load the executed program is the first program memory or the second program memory; and a program execution determiner for determining whether the program execution memory into which the executed program is loaded is the first program execution memory or the second program execution memory. [4] Programmable logic controller according to claim 1, wherein the program comprises a first program and a second program different from the first program, wherein the updated program comprises a first updated program, which is the first program that has been updated, and a second updated program, which is the second program that has been updated, wherein the program writing controller stores the first updated program and the second updated program in the second program memory when the program memory used to load the first program and the second program to be executed is the first program memory, wherein the program loading controller loads the first updated program and the second updated program from the second program memory into the second program execution memory when the program execution memory into which the first program and the second program being executed are loaded is the first program execution memory and the second program memory successfully stores the first updated program and the second updated program, and wherein, when the program execution unit executes the first program and the second program loaded in the first program execution memory, the updated program switching control causes the program execution unit to execute the first updated program and the second updated program loaded in the second program execution memory. [5] Programmable logic controller according to claim 1, wherein the program comprises a first program and a second program different from the first program, where the updated program is a first updated program, which is the first program that has been updated, wherein the program writing controller stores the first updated program in the second program memory when the program memory used to load the first program and the second program being executed is the first program memory, wherein the program loading controller loads the first updated program from the second program memory into the second program execution memory and loads the second program from the first program execution memory into the second program execution memory when the program execution memory into which the first program and the second program are loaded to be executed is the first program execution memory and the second program memory successfully stores the first updated program, and wherein, when the program execution unit executes the first program and the second program loaded in the first program execution memory, the updated program switching control causes the program execution unit to execute the first updated program and the second program loaded in the second program execution memory. [6] The programmable logic controller of claim 5, wherein the program load controller loads the first updated program into a first memory area in the second program execution memory and then loads the second program into a second memory area in the second program execution memory, and wherein the second memory area follows and continues the first memory area. [7] A control method for a programmable logic controller, the method comprising: Performing control for loading a program stored in a program memory into a program execution memory usable for executing the program with the programmable logic controller; Executing the program loaded into the program execution memory with the programmable logic controller; and Performing a write control with the programmable logic controller to store an updated program into the program memory, wherein the updated program is the program that is updated during execution, wherein the program memory comprises a first program memory and a second program memory different from the first program memory, wherein the program execution memory comprises a first program execution memory and a second program execution memory different from the first program execution memory, wherein performing the write control comprises storing the updated program in the second program memory if the program memory used to load the executed program is the first program memory, wherein performing the control for loading the program comprises loading the updated program from the second program memory into the second program execution memory if the program execution memory into which the executed program is loaded is the first program execution memory, and wherein the method further comprises performing a switching control with the programmable logic controller to execute the updated program loaded into the second program execution memory upon execution of the program loaded into the first program execution memory. [8] Program for causing a programmable logic controller to act as: a program loading controller for performing control for loading a program stored in a program memory into a program execution memory usable for executing the program; a program execution unit for executing the program loaded into the program execution memory; and a program write controller for performing a write control to store an updated program into the program memory, wherein the updated program is the program that is updated during execution, wherein the program memory comprises a first program memory and a second program memory different from the first program memory, wherein the program execution memory comprises a first program execution memory and a second program execution memory different from the first program execution memory, wherein the program write controller stores the updated program in the second program memory if the program memory used to load the executed program is the first program memory, wherein the program loading controller loads the updated program from the second program memory into the second program execution memory if the program execution memory into which the executed program is loaded is the first program execution memory and the second program memory successfully stores the updated program, and wherein the program further causes the programmable logic controller to function as an updated program switching controller to perform, upon execution of the program loaded into the first program execution memory by the program execution unit, a switching control to cause the program execution unit to execute the updated program loaded into the second program execution memory.
Citation Information
Patent Citations
CN000001556474A
information processing device, elevator device and program update method
DE112015007183T5