PLC expansion module updating method and terminal

By using the upgrade mechanism in the PLC system, the high -version firmware data is copied and the low version of the PLC extension module is updated to solve the problem of complexity and failure maintenance in existing technologies, and the simplified upgrade process and autonomous maintenance capabilities are realized.

CN119336349APending Publication Date: 2025-01-21FUZHOU WECON ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411323994.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing PLC expansion module update method is complex and requires the assistance of professionals. It is impossible to achieve independent upgrades for customers, and failures may require factory repair.

Method used

By identifying at least two expansion modules of the same type, using the upgrade mechanism to connect and copy the firmware data of the higher version modules respectively, and using the upgrade mechanism to upgrade the lower version modules, basic update and forced update modes are supported.

Benefits of technology

It simplifies the upgrade process of PLC expansion modules, reduces the update complexity, allows customers to upgrade independently, and repairs it through the forced update mode when the expansion module fails, without returning to the factory for repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336349A_ABST
    Figure CN119336349A_ABST
Patent Text Reader

Abstract

The invention discloses a PLC extension module updating method and a terminal. At least two extension modules of the same type are determined, an upgrading mechanism is used for being connected with the at least two extension modules, firmware data of a first extension module is copied to the upgrading mechanism, and the upgrading mechanism is used for upgrading a second extension module through the firmware data. Therefore, the other extension module is upgraded by utilizing the same type of extension module through the upgrading mechanism on the production line, the upgrading process of the extension module is simplified, and the complexity of updating the extension module is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of PLC technology, and in particular to a PLC expansion module updating method and terminal. Background Art

[0002] The existing PLC (Programmable Logic Controller) expansion module update method basically requires a PC (Personal Computer) to connect to the expansion module, and then use the development tool to burn the firmware into the memory of the expansion module. However, such an upgrade operation is highly professional and requires the assistance of developers. Customers cannot upgrade on their own, and if a problem occurs (such as a freeze), the device may need to be returned to the factory for repair. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a PLC expansion module updating method and terminal, which can reduce the complexity of the expansion module updating.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0005] A PLC expansion module updating method comprises the steps of:

[0006] Determine at least two extension modules of the same type, wherein a version of a first extension module of the at least two extension modules is higher than a version of a second extension module of the at least two extension modules;

[0007] Using an upgrade mechanism to connect to the at least two expansion modules respectively;

[0008] Copying the firmware data of the first extension module to the upgrade mechanism;

[0009] The second expansion module is upgraded using the firmware data using the upgrade mechanism.

[0010] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0011] A PLC expansion module update terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0012] Determine at least two extension modules of the same type, wherein a version of a first extension module of the at least two extension modules is higher than a version of a second extension module of the at least two extension modules;

[0013] Using an upgrade mechanism to connect to the at least two expansion modules respectively;

[0014] Copying the firmware data of the first extension module to the upgrade mechanism;

[0015] The second expansion module is upgraded using the firmware data using the upgrade mechanism.

[0016] The beneficial effects of the present invention are as follows: at least two expansion modules of the same type are determined, an upgrade mechanism is used to connect to the at least two expansion modules respectively, firmware data of the first expansion module is copied to the upgrade mechanism, and the upgrade mechanism is used to upgrade the second expansion module using the firmware data, so that another expansion module of the same type is upgraded on the production line through the upgrade mechanism, which simplifies the upgrade process of the expansion module and reduces the complexity of updating the expansion module. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart of a method for updating a PLC expansion module according to an embodiment of the present invention;

[0018] Figure 2 The present invention is a schematic diagram of the structure of a PLC expansion module update terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0020] Please refer to Figure 1 , a PLC expansion module updating method, comprising the steps of:

[0021] Determine at least two extension modules of the same type, wherein a version of a first extension module of the at least two extension modules is higher than a version of a second extension module of the at least two extension modules;

[0022] Using an upgrade mechanism to connect to the at least two expansion modules respectively;

[0023] Copying the firmware data of the first extension module to the upgrade mechanism;

[0024] The second expansion module is upgraded using the firmware data using the upgrade mechanism.

[0025] From the above description, it can be seen that the beneficial effects of the present invention are: determining at least two expansion modules of the same type, using an upgrade mechanism to connect to the at least two expansion modules respectively, copying the firmware data of the first expansion module to the upgrade mechanism, and using the upgrade mechanism to upgrade the second expansion module using the firmware data, so that another expansion module is upgraded on the production line using the same type of expansion module through the upgrade mechanism, which simplifies the upgrade process of the expansion module and reduces the complexity of updating the expansion module.

[0026] Further, the using the upgrade mechanism to upgrade the second expansion module using the firmware data includes:

[0027] Acquiring an upgrade mode selected by a user through the upgrade mechanism, wherein the upgrade mode includes a basic update mode or a forced update mode;

[0028] If the upgrade mode is the basic update mode, using the upgrade mechanism to update the second expansion module according to the firmware data;

[0029] If the upgrade model is the forced update mode, the upgrade mechanism is used to send a minimum communication model to the second extension module, and the minimum communication model is forcibly written into the memory of the second extension module;

[0030] The second expansion module is updated according to the firmware data using the upgrade mechanism based on the minimum communication model.

[0031] It can be seen from the above description that if the upgrade mode is the basic update mode, the upgrade mechanism is used to update the second extension module according to the firmware data. If the upgrade mode is the forced update mode, the upgrade mechanism is used to send the minimum communication model to the second extension module, and the minimum communication model is forcibly written into the memory of the second extension module. The upgrade mechanism is used to update the second extension module according to the firmware data based on the minimum communication model. In this way, even if the extension module fails (such as a systemic freeze), the faulty extension module can be directly forced to be updated based on the minimum communication model through other extension modules, without returning to the factory for repair, thereby improving the convenience of updating and maintaining the extension module.

[0032] Further, the using the upgrade mechanism to update the second expansion module according to the firmware data includes:

[0033] Using the upgrade mechanism to send an update request to the second expansion module;

[0034] receiving version number information corresponding to the update request returned by the second extension module;

[0035] The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

[0036] From the above description, it can be seen that when using the basic update mode to update, the upgrade mechanism uses the version number information to determine whether the second extension module supports the firmware data. If so, the firmware data is used to update the second extension module, thereby ensuring the reliability and validity of the firmware data and ensuring that the upgrade is completed smoothly.

[0037] Further, the updating of the second expansion module according to the firmware data using the upgrade mechanism based on the minimum communication model includes:

[0038] After forcing the second expansion module to trigger power-off enumeration by using the upgrade mechanism, controlling the second expansion module to start the minimum communication model;

[0039] After startup, using the upgrade mechanism to send an update request to the second expansion module;

[0040] receiving version number information corresponding to the update request returned by the second extension module;

[0041] The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

[0042] From the above description, it can be seen that after the upgrade mechanism is used to force the second expansion module to trigger power-off enumeration, the second expansion module is controlled to start the minimum communication model. After startup, it is updated according to the update process of the basic update mode, so as to more effectively repair the faulty expansion module.

[0043] Furthermore, before using the upgrade mechanism to send the minimum communication model to the second expansion module, the method further includes:

[0044] Using the upgrade mechanism to communicate with the second expansion module;

[0045] Determine whether the communication is successful. If the communication is successful, execute the step of using the upgrade mechanism to update the second extension module according to the firmware data. If the communication fails, return to execute the step of using the upgrade mechanism to communicate with the second extension module until the number of communication failures reaches a preset number, and then execute the step of using the upgrade mechanism to send the minimum communication model to the second extension module.

[0046] From the above description, it can be seen that before performing a forced update, the upgrade mechanism is first used to attempt to communicate with the second expansion module. If the communication is successful, it means that there is no fault in the expansion module, and a basic update can be used. If the number of failed communication attempts reaches a preset number of times, it means that the expansion module is indeed faulty and a forced update is required to avoid misoperation.

[0047] Please refer to Figure 2 , a PLC expansion module update terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0048] Determine at least two extension modules of the same type, wherein a version of a first extension module of the at least two extension modules is higher than a version of a second extension module of the at least two extension modules;

[0049] Using an upgrade mechanism to connect to the at least two expansion modules respectively;

[0050] Copying the firmware data of the first extension module to the upgrade mechanism;

[0051] The second expansion module is upgraded using the firmware data using the upgrade mechanism.

[0052] From the above description, it can be seen that the beneficial effects of the present invention are: determining at least two expansion modules of the same type, using an upgrade mechanism to connect to the at least two expansion modules respectively, copying the firmware data of the first expansion module to the upgrade mechanism, and using the upgrade mechanism to upgrade the second expansion module using the firmware data, so that another expansion module is upgraded on the production line using the same type of expansion module through the upgrade mechanism, which simplifies the upgrade process of the expansion module and reduces the complexity of updating the expansion module.

[0053] Further, the using the upgrade mechanism to upgrade the second expansion module using the firmware data includes:

[0054] Acquiring an upgrade mode selected by a user through the upgrade mechanism, wherein the upgrade mode includes a basic update mode or a forced update mode;

[0055] If the upgrade mode is the basic update mode, using the upgrade mechanism to update the second expansion module according to the firmware data;

[0056] If the upgrade model is the forced update mode, the upgrade mechanism is used to send a minimum communication model to the second extension module, and the minimum communication model is forcibly written into the memory of the second extension module;

[0057] The second expansion module is updated according to the firmware data using the upgrade mechanism based on the minimum communication model.

[0058] It can be seen from the above description that if the upgrade mode is the basic update mode, the upgrade mechanism is used to update the second extension module according to the firmware data. If the upgrade mode is the forced update mode, the upgrade mechanism is used to send the minimum communication model to the second extension module, and the minimum communication model is forcibly written into the memory of the second extension module. The upgrade mechanism is used to update the second extension module according to the firmware data based on the minimum communication model. In this way, even if the extension module fails (such as a systemic freeze), the faulty extension module can be directly forced to be updated based on the minimum communication model through other extension modules, without returning to the factory for repair, thereby improving the convenience of updating and maintaining the extension module.

[0059] Further, the using the upgrade mechanism to update the second expansion module according to the firmware data includes:

[0060] Using the upgrade mechanism to send an update request to the second expansion module;

[0061] receiving version number information corresponding to the update request returned by the second extension module;

[0062] The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

[0063] From the above description, it can be seen that when using the basic update mode to update, the upgrade mechanism uses the version number information to determine whether the second extension module supports the firmware data. If so, the firmware data is used to update the second extension module, thereby ensuring the reliability and validity of the firmware data and ensuring that the upgrade is completed smoothly.

[0064] Further, the updating of the second expansion module according to the firmware data using the upgrade mechanism based on the minimum communication model includes:

[0065] After forcing the second expansion module to trigger power-off enumeration by using the upgrade mechanism, controlling the second expansion module to start the minimum communication model;

[0066] After startup, using the upgrade mechanism to send an update request to the second expansion module;

[0067] receiving version number information corresponding to the update request returned by the second extension module;

[0068] The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

[0069] From the above description, it can be seen that after the upgrade mechanism is used to force the second expansion module to trigger power-off enumeration, the second expansion module is controlled to start the minimum communication model. After startup, it is updated according to the update process of the basic update mode, so as to more effectively repair the faulty expansion module.

[0070] Furthermore, before using the upgrade mechanism to send the minimum communication model to the second expansion module, the method further includes:

[0071] Using the upgrade mechanism to communicate with the second expansion module;

[0072] Determine whether the communication is successful. If the communication is successful, execute the step of using the upgrade mechanism to update the second extension module according to the firmware data. If the communication fails, return to execute the step of using the upgrade mechanism to communicate with the second extension module until the number of communication failures reaches a preset number, and then execute the step of using the upgrade mechanism to send the minimum communication model to the second extension module.

[0073] From the above description, it can be seen that before performing a forced update, the upgrade mechanism is first used to attempt to communicate with the second expansion module. If the communication is successful, it means that there is no fault in the expansion module, and a basic update can be used. If the number of failed communication attempts reaches a preset number of times, it means that the expansion module is indeed faulty and a forced update is required to avoid misoperation.

[0074] The above-mentioned PLC expansion module update method and terminal of the present invention can be applied to the PLC expansion module update scenario, which is described below through specific implementation methods:

[0075] Please refer to Figure 1 , Embodiment 1 of the present invention is:

[0076] A PLC expansion module updating method comprises the steps of:

[0077] S1. Determine at least two extension modules of the same type, wherein a version of a first extension module among the at least two extension modules is higher than a version of a second extension module among the at least two extension modules.

[0078] The at least two expansion modules of the same type are at least two expansion modules with the same model data.

[0079] S2. Use the upgrading mechanism to connect to the at least two expansion modules respectively.

[0080] S3. Copy the firmware data of the first expansion module to the upgrade mechanism.

[0081] In an optional implementation, after copying, the method further includes: performing an integrity check on the firmware data by the upgrade mechanism; if the integrity check passes, the output check passes; if the integrity check fails, the output check fails.

[0082] S4, using the upgrade mechanism to upgrade the second expansion module using the firmware data, specifically including S41-S43:

[0083] S41. Obtaining an upgrade mode selected by a user through the upgrade mechanism, where the upgrade mode includes a basic update mode or a forced update mode.

[0084] S42: If the upgrade mode is the basic update mode, use the upgrade mechanism to update the second expansion module according to the firmware data, which specifically includes S421-S423:

[0085] S421: Use the upgrade mechanism to send an update request to the second extension module.

[0086] S422: Receive version number information corresponding to the update request returned by the second extension module.

[0087] S423: Use the upgrade mechanism to determine whether the second extension module supports the firmware data according to the version number information; if so, use the firmware data to update the second extension module.

[0088] In an optional implementation, the method further includes: if the second expansion module does not support the firmware data, obtaining new firmware data supported by the second expansion module, and writing the new firmware data into the upgrade mechanism.

[0089] S43. If the upgrade model is the forced update mode, the upgrade mechanism is used to send the minimum communication model to the second extension module, and the minimum communication model is forcibly written into the memory of the second extension module; the upgrade mechanism is used to update the second extension module according to the firmware data based on the minimum communication model.

[0090] Wherein, using the upgrade mechanism to update the second expansion module according to the firmware data based on the minimum communication model includes:

[0091] After using the upgrade mechanism to force the second expansion module to trigger power-off enumeration, control the second expansion module to start the minimum communication model; after starting, use the upgrade mechanism to send an update request to the second expansion module; receive the version number information corresponding to the update request returned by the second expansion module; use the upgrade mechanism to determine whether the second expansion module supports the firmware data according to the version number information, and if so, use the firmware data to update the second expansion module. The minimum communication model is the smallest communication system, which is used to provide a communication channel.

[0092] In an optional implementation, before using the upgrade mechanism to send the minimum communication model to the second expansion module, the method further includes:

[0093] Using the upgrade mechanism to communicate with the second expansion module;

[0094] Determine whether the communication is successful. If the communication is successful, execute the step of using the upgrade mechanism to update the second expansion module according to the firmware data. If the communication fails, return to execute the step of using the upgrade mechanism to communicate with the second expansion module until the number of communication failures reaches a preset number, and then execute the step of using the upgrade mechanism to send the minimum communication model to the second expansion module. This avoids misoperation.

[0095] In an optional implementation, it also includes:

[0096] After the update is completed, a restart signal is sent to the second expansion module, so that the second expansion module reloads the firmware data and provides the version number information of the firmware data for verification, so as to ensure that the upgrade has been completed.

[0097] Please refer to Figure 2 , Embodiment 2 of the present invention is:

[0098] A PLC expansion module update terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step of the PLC expansion module update method in the first embodiment is implemented.

[0099] In summary, the present invention provides a PLC expansion module update method and terminal, which determine at least two expansion modules of the same type, use an upgrade mechanism to connect to the at least two expansion modules respectively, copy the firmware data of the first expansion module to the upgrade mechanism, and use the upgrade mechanism to upgrade the second expansion module using the firmware data, so that the same type of expansion module is used to upgrade another expansion module on the production line through the upgrade mechanism, which simplifies the upgrade process of the expansion module and reduces the complexity of the expansion module update; in addition, if the upgrade mode is the basic update mode, the upgrade mechanism is used to update the second expansion module according to the firmware data, and if the upgrade model is the forced update mode, the upgrade mechanism is used to send the minimum communication model to the second expansion module, and The minimum communication model is forcibly written into the memory of the second expansion module, and the upgrade mechanism is used to update the second expansion module according to the firmware data based on the minimum communication model. In this way, even if the expansion module fails (such as a system crash), the failed expansion module can be directly forced to update based on the minimum communication model through other expansion modules without returning to the factory for repair, thereby improving the convenience of updating and maintaining the expansion module; and before the forced update, the upgrade mechanism is used to try to communicate with the second expansion module. If the communication is successful, it means that the expansion module is not faulty, and a basic update can be used. If the number of failed communication attempts reaches a preset number, it means that the expansion module is indeed faulty and a forced update is required to avoid misoperation.

[0100] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A PLC expansion module update method, characterized in that: Includes steps: Determine at least two extension modules of the same type, wherein a version of a first extension module of the at least two extension modules is higher than a version of a second extension module of the at least two extension modules; Using an upgrade mechanism to connect to the at least two expansion modules respectively; Copying the firmware data of the first extension module to the upgrade mechanism; The second expansion module is upgraded using the firmware data using the upgrade mechanism.

2. A PLC expansion module updating method according to claim 1, characterized in that: The using the upgrade mechanism to upgrade the second expansion module using the firmware data includes: Acquiring an upgrade mode selected by a user through the upgrade mechanism, wherein the upgrade mode includes a basic update mode or a forced update mode; If the upgrade mode is the basic update mode, using the upgrade mechanism to update the second expansion module according to the firmware data; If the upgrade model is the forced update mode, the upgrade mechanism is used to send a minimum communication model to the second extension module, and the minimum communication model is forcibly written into the memory of the second extension module; The second expansion module is updated according to the firmware data using the upgrade mechanism based on the minimum communication model.

3. A PLC expansion module updating method according to claim 2, characterized in that: The updating of the second expansion module according to the firmware data by using the upgrade mechanism includes: Using the upgrade mechanism to send an update request to the second expansion module; receiving version number information corresponding to the update request returned by the second extension module; The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

4. A PLC expansion module updating method according to claim 2, characterized in that: The updating of the second expansion module according to the firmware data using the upgrade mechanism based on the minimum communication model includes: After forcing the second expansion module to trigger power-off enumeration by using the upgrade mechanism, controlling the second expansion module to start the minimum communication model; After startup, using the upgrade mechanism to send an update request to the second expansion module; receiving version number information corresponding to the update request returned by the second extension module; The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

5. A PLC expansion module updating method according to claim 2, characterized in that: Before using the upgrade mechanism to send the minimum communication model to the second expansion module, the method further includes: Using the upgrade mechanism to communicate with the second expansion module; Determine whether the communication is successful. If the communication is successful, execute the step of using the upgrade mechanism to update the second extension module according to the firmware data. If the communication fails, return to execute the step of using the upgrade mechanism to communicate with the second extension module until the number of communication failures reaches a preset number, and then execute the step of using the upgrade mechanism to send the minimum communication model to the second extension module.

6. A PLC expansion module update terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: Determine at least two extension modules of the same type, wherein a version of a first extension module of the at least two extension modules is higher than a version of a second extension module of the at least two extension modules; Using an upgrade mechanism to connect to the at least two expansion modules respectively; Copying the firmware data of the first extension module to the upgrade mechanism; The second expansion module is upgraded using the firmware data using the upgrade mechanism.

7. A PLC expansion module update terminal according to claim 6, characterized in that: The using the upgrade mechanism to upgrade the second expansion module using the firmware data includes: Acquiring an upgrade mode selected by a user through the upgrade mechanism, wherein the upgrade mode includes a basic update mode or a forced update mode; If the upgrade mode is the basic update mode, using the upgrade mechanism to update the second expansion module according to the firmware data; If the upgrade model is the forced update mode, the upgrade mechanism is used to send a minimum communication model to the second extension module, and the minimum communication model is forcibly written into the memory of the second extension module; The second expansion module is updated according to the firmware data using the upgrade mechanism based on the minimum communication model.

8. A PLC expansion module update terminal according to claim 7, characterized in that: The updating of the second expansion module according to the firmware data by using the upgrade mechanism includes: Using the upgrade mechanism to send an update request to the second expansion module; receiving version number information corresponding to the update request returned by the second extension module; The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

9. A PLC expansion module update terminal according to claim 7, characterized in that: The updating of the second expansion module according to the firmware data using the upgrade mechanism based on the minimum communication model includes: After forcing the second expansion module to trigger power-off enumeration by using the upgrade mechanism, controlling the second expansion module to start the minimum communication model; After startup, using the upgrade mechanism to send an update request to the second expansion module; receiving version number information corresponding to the update request returned by the second extension module; The upgrade mechanism is used to determine whether the second extension module supports the firmware data according to the version number information, and if so, the firmware data is used to update the second extension module.

10. A PLC expansion module update terminal according to claim 7, characterized in that: Before using the upgrade mechanism to send the minimum communication model to the second expansion module, the method further includes: Using the upgrade mechanism to communicate with the second expansion module; Determine whether the communication is successful. If the communication is successful, execute the step of using the upgrade mechanism to update the second extension module according to the firmware data. If the communication fails, return to execute the step of using the upgrade mechanism to communicate with the second extension module until the number of communication failures reaches a preset number, and then execute the step of using the upgrade mechanism to send the minimum communication model to the second extension module.