Method and device for quickly updating controller bus and storage medium

By establishing mutually switchable running directory and backup directory in the controller and switching memory areas according to changes in the bus configuration, the problem of long bus operation interruption time in the traditional bus update method is solved, and the rapid update of the controller bus and the stability of the control system are achieved.

CN120144500AActive Publication Date: 2025-06-13NR ELECTRIC CO LTD +2
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510199689.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-06-13
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

Traditional controller bus update methods will cause long-term bus operation interruption when configuring updates, which increases the security risks of controller logic errors and affects the stability of the control system.

Method used

By establishing a switching operation directory and backup directory, when the configuration is updated, the configuration products are stored in the backup directory, and the bus configuration is determined whether there is any change. If there is any change, create a backup memory area and switch to the bus running memory area. If there is no change, only switch the directory and do not release the memory area, and continue to schedule the cycle.

Benefits of technology

The rapid update of the controller bus is realized, reducing the time-consuming operation and switching of buses, especially when there is no update of the bus configuration, further reducing the time-consuming switching and improving the stability of the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144500A_ABST
    Figure CN120144500A_ABST
Patent Text Reader

Abstract

The invention discloses a controller bus rapid updating method and device and a storage medium. The method comprises the following steps: establishing a running catalog and a backup catalog which can be mutually switched, and when configuration is updated, storing an issued configuration product into the backup catalog; judging whether the bus configuration is changed or not, if the bus configuration is not changed, stopping the bus operation, not releasing the operation memory area, only switching the backup catalog into the operation catalog, and continuously periodically scheduling the bus operation in the operation memory area; if yes, loading bus configuration of the backup directory to create a backup memory area, stopping bus operation, releasing an operation memory area, and periodically scheduling bus operation after the backup memory area is directly switched into the operation memory area. According to the method, rapid updating is carried out, operation switching of the bus is achieved only by establishing the catalog and the memory area which are mutually backed up, and compared with operation switching of the bus through a single memory area, switching time consumption can be effectively reduced, especially bus configuration is not updated during configuration updating, and switching time consumption can be further reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of industrial automation control, and particularly relates to the logic configuration and debugging process in an industrial process control system. Background Art

[0002] In the field of industrial process control, in order to enhance functional diversity and improve the applicability of occasions, the controller is compatible with multiple buses such as Modbus TCP, Modbus RTU, IEC61850, private buses, etc. protocols to achieve data exchange and communication with third-party devices. During the controller logic configuration production and debugging process, configuration updates are involved, which also include bus updates. The traditional controller bus update method is that the controller receives the configuration product sent by the configuration tool and stores it in the configuration product directory. After waiting for the end of the current cycle scheduling of the bus operating memory area, the cycle scheduling operation of the bus operating memory area is stopped, the bus operating memory area is released, and the bus configuration in the new configuration product is loaded from the only configuration product directory to create an operating memory area and then the cycle scheduling operation is carried out again, as Figure 1 shown.

[0003] In some application scenarios, such as when it is found that the user configuration has defects during the controller operation mode and immediate configuration update is required. If the traditional controller bus update method is adopted, it will cause a long interruption in the bus operation, increasing the safety hazard of logical errors during the operation of the controller and greatly affecting the stability of the control system operation. Therefore, a new controller bus update method is needed to solve the problem of long bus operation interruption time during configuration update in the traditional method. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to overcome the problems and defects of long bus operation interruption time existing during the traditional controller bus update, which affects the operation stability of the control system, and provide a controller bus fast update method, device and storage medium.

[0005] The first aspect of the present invention provides a controller bus fast update method, including the following steps:

[0006] Establish a run directory and a backup directory that can be switched with each other;

[0007] When the configuration is updated, if the preset condition is met, the configuration product sent by the configuration tool is stored in the backup directory;

[0008] Judge whether there is a change in the bus configuration in the backup directory. If there is a change, it is necessary to load the configuration product in the backup directory to create a bus configuration backup memory area;

[0009] Judge whether a backup memory area has been created in the previous step. If a backup memory area has been created, switch the backup memory area to the bus operating memory area;

[0010] Switch the operating directory and the backup directory, start cyclic scheduling and running using the bus operating memory area, synchronize the configuration products in the operating directory to the backup directory, and wait for the next configuration update.

[0011] Preferably, the preset conditions include: determining whether it is the first time for the configuration tool to issue configuration products. If it is the first time for the configuration tool to issue configuration products, store the configuration products issued by the configuration tool in the operating directory; if it is not the first time for the configuration tool to issue configuration products, store the configuration products issued by the configuration tool in the backup directory.

[0012] Preferably, determining whether it is the first time for the configuration tool to issue configuration products includes: the controller loads the configuration products from the operating directory during the power-on initialization process. If there are no configuration products in the operating directory, set the first received configuration flag to 1; if there are configuration products in the operating directory, set the first received configuration flag to 0.

[0013] When the first received configuration flag is 1 and the controller receives the configuration products issued by the configuration tool, it is the first issuance. The configuration products issued for the first time are stored in the current operating directory, and then the first received configuration flag is set to 0.

[0014] When the first received configuration flag is 0 and the controller receives the configuration products issued by the configuration tool, it is not the first issuance. The configuration products that are not the first issuance are stored in the current backup directory.

[0015] Preferably, if it is the first time for the configuration tool to issue configuration products, no longer determine whether there are changes in the bus configuration. After creating the bus operating memory area by loading the bus configuration products in the configuration products of the operating directory, start cyclic scheduling of the bus operation, do not create a bus configuration backup memory area, and finally synchronize the configuration products in the operating directory to the backup directory, and wait for the next configuration update.

[0016] Preferably, determining whether there are changes in the bus configuration in the backup directory and determining whether to create a backup memory area according to the judgment result include:

[0017] If there are no changes in the bus configuration in the backup directory, there is no need to load the configuration products in the backup directory to create a bus configuration backup memory area;

[0018] If there are changes in the bus configuration in the backup directory, it is necessary to load the configuration products in the backup directory to create a bus configuration backup memory area.

[0019] Preferably, determining whether a backup memory area has been created in the previous step and switching the backup memory area to the bus operating memory area if a backup memory area has been created includes:

[0020] If a backup memory area has been created, it is necessary to release the bus operating memory area;

[0021] If no backup memory area is created, there is no need to release the bus operating memory area.

[0022] Preferably, after determining whether a backup memory area has been created in the previous step, wait for the end of the current cycle scheduling of the bus operating memory area and stop the cycle scheduling operation of the bus operating memory area.

[0023] If the bus operating memory area is released, the created backup memory area needs to be directly switched to the bus operating memory area.

[0024] If the bus operating memory area is not released, continue to use this bus operating memory area.

[0025] Preferably, the operating directory and the backup directory are two folders that switch to store the configuration products as backups of each other. The operating directory stores the configuration products corresponding to the bus configuration of the operating memory area. The backup directory will be synchronized during operation and stores the same configuration products as the operating directory. When a new configuration product is issued by the configuration tool, the backup directory will store this new configuration product. When the backup directory is switched to the operating directory, the previous operating directory will correspondingly be switched to the backup directory.

[0026] The second aspect of the present invention provides an electronic device, including: a processor and a memory storing computer instructions. When the computer instructions are executed by the processor, the processor is caused to execute the controller bus fast update method described above.

[0027] The third aspect of the present invention provides a non-transitory computer storage medium storing a computer program. When the computer program is executed by multiple processors, the processors are caused to execute the controller bus fast update method described above.

[0028] Compared with the prior art, the beneficial effects of the present invention at least include: only need to establish two directories that switch to store new configuration products as backups of each other and correspondingly establish two memory areas that back up each other to achieve the operation switching of the bus. Compared with the operation switching of the bus achieved by a single memory area, it can effectively reduce the switching time. Especially when there is no update of the bus configuration during configuration update, it can further reduce the switching time. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a schematic diagram of the bus configuration loading process of a single memory area in the prior art;

[0030] Figure 2 is a schematic diagram of the process of the method of the present invention;

[0031] Figure 3 is a schematic diagram of the implementation process of the method of the present invention;

[0032] Figure 4It is a schematic diagram of the bus operation in the cycle scheduling operation memory area of the present invention;

[0033] Figure 5 It is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed implementation manners

[0034] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0035] Embodiment 1 of the present invention provides a method for quickly updating a controller bus, and the method includes:

[0036] Establish a running directory and a backup directory that can be switched with each other. When the configuration is updated, store the configuration products sent by the configuration tool in the backup directory, determine whether there is a change in the bus configuration therein, and start different bus configuration loading processes; if there is no change, stop the bus operation, do not release the bus operation memory area, and only switch the backup directory to the running directory and then continue to cycle-schedule the bus operation in the bus operation memory area; if there is a change, load the bus configuration of the backup directory to create a backup memory area, stop the bus operation, release the bus operation memory area, and directly switch the backup memory area to the bus operation memory area and then cycle-schedule the bus operation.

[0037] The prominent substantive features of the present invention and the significant progress brought to the prior art at least include: adopting this method to quickly update the controller bus, only need to establish 2 mutually backup directories and memory areas to realize the operation switching of the bus. Compared with the operation switching of the bus realized by a single memory area, it can effectively reduce the switching time. Especially when there is no update in the bus configuration during the configuration update, it can further reduce the switching time.

[0038] Embodiment 2 of the present invention provides a method for quickly updating a controller bus, and the method includes:

[0039] Establish two mutually backup directories, directory A and directory B. The two directories are used as the running directory and the backup directory respectively, and the running directory and the backup directory can be switched with each other. When directory A is used as the running directory, directory B is the backup directory. When directory A is switched from the running directory to the backup directory, directory B is switched from the backup directory to the running directory. Thus, directory A and directory B are mutually backup. For example but not limited to, initially specify directory A as the running directory and directory B as the backup directory.

[0040] Store the configuration products sent by the configuration tool for the first time in directory A initially specified as the running directory, load the bus configuration products in the configuration products of directory A to create a bus operation memory area and then start to cycle-schedule the bus operation. Finally, synchronize the configuration products of directory A currently used as the running directory to directory B used as the backup directory and wait for the next configuration update.

[0041] When the configuration is updated, the new configuration product sent by the configuration tool is stored in directory B which is currently used as the backup directory. Before loading the bus configuration in the configuration product of directory B, first determine whether there is any change in the bus configuration of directory B compared to the bus configuration in the bus operation memory area.

[0042] If there is no change, wait until the end of this cycle scheduling to stop the cycle scheduling operation of the bus operation memory area, without releasing the bus operation memory area. Only switch the running directory from directory A to directory B and then continue the cycle scheduling operation in this bus operation memory area. At the same time, synchronize the configuration product of the running directory to the backup directory;

[0043] If there is a change, load the bus configuration of the backup directory B to create a backup memory area, then wait until the end of this cycle scheduling to stop the cycle scheduling operation of the bus operation memory area, release the bus operation memory area, directly switch the backup memory area to the operation memory area, switch the backup directory to the running directory, start the cycle scheduling of the bus operation, and at the same time synchronize the configuration product of directory B to directory A.

[0044] It can be understood that when the configuration is updated again, the operation switch of the bus is still carried out according to the above method, and the running directory will be switched from directory B to directory A again. At this time, directory B becomes the backup directory again, so directory A and directory B are backup to each other.

[0045] As Figure 2 shown, Embodiment 3 of the present invention provides a method for quickly updating the controller bus. The method includes:

[0046] Step 1: Establish two directories that are backup to each other, respectively as the running directory and the backup directory, and the running directory and the backup directory can be switched with each other.

[0047] Specifically, establish two directories that are backup to each other, directory A and directory B. The two directories are respectively used as the running directory and the backup directory, and the running directory and the backup directory can be switched with each other. When directory A is used as the running directory, directory B is the backup directory. When directory A is switched to the backup directory, directory B is switched to the running directory. Thus, directory A and directory B are backup to each other.

[0048] Initially specify any one of directory A or directory B as the running directory, and the other as the backup directory. For the purpose of clearly introducing the technical solution, for example but not limited to, initially specify directory A as the running directory and directory B as the backup directory.

[0049] Step 2: When the configuration is updated, the controller receives the configuration product sent by the configuration tool and stores it in the backup directory.

[0050] For the configuration products sent by the receiving configuration tool, it is necessary to determine whether it is the first time the configuration tool sends them. If it is the first time, the configuration products are stored in the running directory; if not, the configuration products are stored in the backup directory. Specifically, it includes:

[0051] a) During the power-on initialization process of the controller, it will load the configuration products from the running directory. If there are no configuration products in the running directory, the first-received configuration flag is set to 1. It can be understood that in step 1, the initial specified directory A is the running directory. Then, during the power-on initialization process of the controller, it will load the configuration products from directory A. If there are no configuration products in directory A, the first-received configuration flag is set to 1; if there are configuration products in directory A, the first-received configuration flag is set to 0;

[0052] b) When the first-received configuration flag is 1 and the controller receives the configuration products sent by the configuration tool, it is the first time to send. The configuration products sent for the first time are stored in directory A which is currently the running directory, and then the first-received configuration flag is set to 0;

[0053] c) When the first-received configuration flag is 0 and the controller receives the configuration products sent by the configuration tool, it is not the first time to send. The configuration products that are not sent for the first time are stored in directory B which is currently the backup directory.

[0054] Step 3: Determine whether the bus configuration has changed and determine whether to create a backup memory area.

[0055] If the configuration tool sends the configuration products for the first time, the configuration products are stored in directory A which is currently the running directory at this time. It is no longer necessary to determine whether the bus configuration has changed. After loading the bus configuration products in the configuration products of directory A to create the bus operation memory area, the periodic scheduling of the bus operation starts, and the bus configuration backup memory area is not created temporarily. Finally, it jumps to step 5 to synchronize the configuration products of directory A to directory B which is the backup directory.

[0056] If the configuration tool is not sending for the first time, continue to determine whether the bus configuration has changed:

[0057] a) If there is no change, there is no need to load the configuration products in directory B which is currently the backup directory to create the bus configuration backup memory area;

[0058] b) If there is a change, it is necessary to load the configuration products in directory B which is currently the backup directory to create the bus configuration backup memory area.

[0059] Step 4: Determine whether the backup memory area has been created, determine to release the bus operation memory area, and then start different bus configuration loading processes.

[0060] Step 4.1: Determine whether a backup memory area has been created as described in Step 4 above. Determining whether a backup memory area has been created and determining the bus operation memory area to be released includes:

[0061] a) If a backup memory area has been created, the bus operation memory area needs to be released;

[0062] b) If a backup memory area has not been created, the bus operation memory area does not need to be released.

[0063] Step 4.2: Start different bus configuration loading processes as described in Step 4 above. It is necessary to determine whether the bus operation memory area has been released:

[0064] a) If the bus operation memory area has been released, the created backup memory area needs to be directly switched to the bus operation memory area;

[0065] b) If the bus operation memory area has not been released, continue to use this bus operation memory area.

[0066] Step 4.3: Start different bus configuration loading processes as described in Step 4 above, including switching the current directory B used as the backup directory to the running directory, and switching the current directory A used as the running directory to the backup directory.

[0067] Step 5: Synchronize the configuration products in the running directory to the backup directory.

[0068] As described in Step 5 above, the running directory and the backup directory are two mutually backup folders that switch to store configuration products. The running directory stores the configuration products corresponding to the bus configuration in the operation memory area. The backup directory will be synchronized during operation and stores the same configuration products as the running directory. The backup directory will store the new configuration products when the configuration tool issues new configuration products. When the backup directory is switched to the running directory, the previous running directory will also be switched to the backup directory accordingly.

[0069] It can be understood that in Embodiment 3, the initial specified directory A is used as the running directory and directory B is used as the backup directory as an example for introduction. However, it is only an example but not a restrictive implementation method. If the initial specified directory B is used as the running directory and directory A is used as the backup directory, it is the same as the above description in Embodiment 3, and only directory A and directory B need to be interchanged in the subsequent steps of this embodiment.

[0070] As Figure 3 shown, Embodiment 4 of the present invention provides a method for quickly updating a controller bus. The method includes:

[0071] Step S101: Create directory A and directory B in the manner disclosed in Embodiment 3. Determine whether the configuration tool issues the configuration product for the first time. If it is the first time, jump to Step S102; if not, jump to Step S103.

[0072] Step S102: Store the configuration product in directory A which is currently the running directory. After loading the bus configuration product in the configuration product of directory A to create a bus operation memory area, jump to Step S111 to start the periodic scheduling of the bus operation.

[0073] Step S103: Store the configuration product in directory B which is currently the backup directory.

[0074] It can be understood that Steps S101 to S103 are exemplarily introduced with directory A as the current running directory and directory B as the backup directory; if the current running directory is B, then the backup directory is A, and just swap the letters A and B.

[0075] Step S104: Determine whether there is a change in the bus configuration in the configuration product issued by the configuration tool. If there is a change, jump to Step S105; if there is no change, there is no need to create a backup memory area, and jump to Step S106.

[0076] Step S105: Load the bus configuration to create a backup memory area.

[0077] Step S106: Wait for the end of the current cycle scheduling of the bus operation memory area.

[0078] Step S107: Stop the periodic scheduling operation of the bus operation memory area. If a backup memory area is created by loading the bus configuration in Step S105, continue to execute Step S108; otherwise, jump to Step S110.

[0079] Step S108: Release the bus operation memory area.

[0080] Step S109: Directly switch the created backup memory area to the operation memory area.

[0081] Step S110: Switch directory B which is currently the backup directory to the running directory, and switch directory A which is currently the running directory to the backup directory.

[0082] Step S111: Start a new round of periodic scheduling operation in the bus operation memory area. The bus operation process of the periodic scheduling operation memory area is as Figure 4 shown, including: after the periodic scheduling starts, read all bus inputs, calculate the user configuration program, write all bus outputs, and the periodic scheduling ends.

[0083] Step S112: Synchronize the configuration product in the running directory to the backup directory.

[0084] Figure 5 The structural diagram of an electronic device provided by Embodiment 5 of the present invention is shown. The electronic device includes a processor and a memory. The memory stores computer instructions. When the computer instructions are executed by the processor, the processor executes the computer instructions to implement the controller bus rapid update method and refinement scheme as shown in Figure 2 and exchanges data between devices through a communication module.

[0085] Embodiment 6 of the present application further provides a non-transitory computer storage medium storing a computer program. When the computer program is executed by multiple processors, the processors execute the controller bus rapid update method and refinement scheme as shown in Figure 2 the figure.

[0086] It should be emphasized that the examples described in the present invention are illustrative rather than restrictive. Therefore, the present invention is not limited to the examples described in the specific embodiments. Any other embodiments obtained by those skilled in the art based on the technical solutions of the present invention, whether modified or replaced, as long as they do not depart from the spirit and scope of the present invention, also belong to the protection scope of the present invention.

Claims

1. A controller bus fast update method, characterized in that: The following steps are involved: Establish mutually switchable running directories and backup directories; When the configuration is updated, if the preset conditions are met, the configuration products issued by the configuration tool are stored in the backup directory; Determine whether the bus configuration in the backup directory has changed. If so, load the configuration product in the backup directory to create a bus configuration backup memory area. Determine whether a backup memory area is created in the previous step, and if the backup memory area is created, switch the backup memory area to the bus operation memory area; Switch the running directory and the backup directory, use the bus running memory area to start periodic scheduling, synchronize the configuration products of the running directory to the backup directory, and wait for the configuration to be updated again.

2. A controller bus fast update method as claimed in claim 1, characterized in that: The preset conditions include: determining whether it is the first time that the configuration tool sends the configuration product. If so, the configuration product sent by the configuration tool is stored in the running directory; if it is not the first time that the configuration tool sends the configuration product, the configuration product sent by the configuration tool is stored in the backup directory.

3. A controller bus fast update method as claimed in claim 2, characterized in that: The determining whether it is the first time that the configuration tool sends the configuration product includes: the controller loads the configuration product from the running directory during the power-on initialization process, and if there is no configuration product in the running directory, the first time receiving configuration flag is set to 1; if there is a configuration product in the running directory, the first time receiving configuration flag is set to 0; When the first received configuration flag is 1, the controller receives the configuration product sent by the configuration tool, which is the first time to be sent. The configuration product sent for the first time is stored in the current running directory, and then the first received configuration flag is set to 0; When the first received configuration flag is 0, the controller receives the configuration product sent by the configuration tool, which is not the first time it is sent. The configuration product that is not sent for the first time is stored in the current backup directory.

4. A controller bus fast update method as claimed in claim 2 or 3, characterized in that: If the configuration tool sends the configuration product for the first time, it will no longer determine whether the bus configuration has changed. The bus configuration product in the configuration product of the running directory is loaded to create a bus running memory area and then start periodic scheduling of the bus operation. The bus configuration backup memory area is not created. Finally, the configuration product of the running directory is synchronized to the backup directory, waiting for another configuration update.

5. A controller bus fast update method according to any one of claims 1 to 3, characterized in that: The step of determining whether the bus configuration in the backup directory has changed and determining whether to create a backup memory area according to the determination result includes: If the bus configuration in the backup directory has not changed, there is no need to load the configuration product of the backup directory to create the bus configuration backup memory area; If the bus configuration in the backup directory is changed, you need to load the configuration product of the backup directory to create a bus configuration backup memory area.

6. A controller bus fast update method as claimed in claim 1 or 5, characterized in that: The determining whether a backup memory area is created in the previous step, and if the backup memory area is created, switching the backup memory area to the bus operation memory area, comprises: If a backup memory area is created, the bus operation memory area needs to be released; If the backup memory area is not created, there is no need to release the bus operation memory area.

7. A controller bus fast update method as claimed in claim 6, characterized in that: After determining whether the backup memory area is created in the previous step, waiting for the current cycle scheduling of the bus operation memory area to end, and stopping the cycle scheduling operation of the bus operation memory area; If the bus operation memory area is released, the created backup memory area needs to be directly switched to the bus operation memory area; If the bus operation memory area is not released, the bus operation memory area continues to be used.

8. A controller bus fast update method as claimed in claim 1, characterized in that: The running directory and the backup directory are two folders that switch to store configuration products and back up each other. The running directory stores the configuration products corresponding to the bus configuration of the running memory area. The backup directory will be synchronized during the running process to store the same configuration products as the running directory. When the configuration tool sends a new configuration product, the backup directory will store the new configuration product. When the backup directory is switched to the running directory, the last running directory is also switched to the backup directory accordingly.

9. An electronic device, characterized in that: include: The processor and the memory store computer instructions, and when the computer instructions are executed by the processor, the processor executes the controller bus fast update method according to any one of claims 1 to 7.

10. A non-transitory computer storage medium storing a computer program, which, when executed by a plurality of processors, enables the processors to execute the controller bus fast updating method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • General series bus interface mobile memory method and its device

    CN101059778A

  • System updating method, device and computer readable memory medium

    CN107273139A

  • Configuration management method of mimicry industrial controller

    CN112486737A

  • Software upgrading method and device for remote equipment in indoor distribution system

    CN114185574A

  • Firmware updating method and device, electronic equipment and storage medium

    CN119493586A