A method and device for version management of a PLC system
By separately managing the version information of the upper, lower and PLC projects in the PLC system, the problem of difficult to guarantee version compatibility and consistency is solved, the management cost is reduced, and the system stability is improved.
Patent Information
- Application Number
- CN202310115835.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2043-02-15
AI Technical Summary
The version compatibility and consistency between the upper and lower computers in the PLC system is difficult to guarantee, resulting in poor system stability and high development and maintenance costs.
By separately managing the version information of the upper computer, lower computer and PLC project, and marking the differences between each version, we can judge whether the upper computer and lower computer support the current PLC project version, and carry out corresponding version upgrades and issuances to ensure version compatibility and consistency.
It reduces the cost of PLC system version management, reduces the dependence between the upper and lower computers, improves the working stability of the system, and solves the problems of upper computer functions and lower computer firmware release.
Smart Images

Figure CN116088411B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PLC engineering, and particularly relates to a method and device for version management of a PLC system. Background Art
[0002] PLC programmable logic controllers are widely used in the automation field. Due to the continuous iteration and update of the development environment, the host computer software needs to update the development environment in a timely manner. After software upgrade, problems such as incompatibility between new and old versions may occur. Moreover, one host computer controls multiple slave computers, and the optimization and upgrade of functional logic are becoming more and more frequent. In order to achieve better operation effects, the slave computer program also needs to be upgraded.
[0003] Most of the PLC host computers are dedicated to specific devices. Some manufacturers strongly bind the PLC host computer and the slave computer, and release separate software for different versions of the slave computer, which will increase the development and maintenance costs. Moreover, the functions between different versions are not coherent, and version upgrade is difficult. Users need to ensure that the PLC host computer, the slave computer firmware, and the PLC project are of the same version in order to make the system work properly. Some manufacturers unbind the PLC host computer and the slave computer and conduct independent development and management respectively, but in actual applications, the functions of the PLC host computer and the slave computer may be inconsistent.
[0004] Therefore, a version management method for a PLC system is needed, which can ensure the compatibility and consistency of versions among the PLC project, the host computer, and the slave computer, and improve the working stability of the PLC system. Summary of the Invention
[0005] In view of the above problems, the present solution proposes a version management method for a PLC system. By separately managing the version information of the host computer, the slave computer, and the PLC project, and marking the differences between each version, it can reduce the dependence between the host computer and the slave computer and improve the working stability of the PLC system.
[0006] According to the first aspect of the present invention, there is provided a version management method for a PLC system, including: First, obtain the current PLC project version, and determine whether the host computer supports the current PLC project version. If it does not support, upgrade the host computer version; if it supports, load and compile the PLC project. Second, after the host computer is connected to the slave computer, determine whether the slave computer firmware version supports the PLC project version. If it supports, send the PLC project to the slave computer firmware; if it does not support, upgrade the slave computer firmware version or update the PLC project version and then send it to the slave computer again.
[0007] Finally, determine whether the lower computer firmware version is within the range of the maximum version and the minimum version of the firmware versions supported by the currently issued PLC project. If it is within the range of the maximum version and the minimum version, the current PLC project is successfully issued. If the lower computer firmware version is less than the minimum version, upgrade the lower computer firmware version. If the lower computer firmware version is greater than the maximum version, upgrade the PLC project version.
[0008] Through the above technical solution, during the process of creating or loading a PLC project, determine whether the upper computer supports the current version of the PLC project. If it supports, complete the loading and compilation of the PLC project. If it does not support, upgrade the upper computer version so that the upgraded upper computer can support the current PLC project to complete the loading and compilation of the PLC project.
[0009] During the process of issuing the PLC project to the lower computer, determine whether the lower computer firmware is within the version range supported by the current version of the PLC project. If it is within the supported version range, complete the issuance of the PLC project. If it does not support, upgrade the lower computer firmware or upgrade the PLC project version and then recompile to complete the issuance of the PLC project.
[0010] Therefore, this solution can reduce the cost of PLC system version management, manage the versions of the upper computer and the lower computer separately, reduce the dependence between the upper computer and the lower computer, and solve the problems of the upper computer function and the lower computer firmware release at the same time.
[0011] Optionally, in the above method, a relational database is used to store the version information of the upper computer and the version information of the lower computer. The version information of the upper computer includes the upper computer version number, the PLC project version number supported by the upper computer version number, and the lower computer firmware version number; the version information of the lower computer includes the lower computer firmware version number, the maximum version number and the minimum version number of the lower computer firmware versions supported by the PLC project version number.
[0012] By separately storing and managing the version information of the upper computer and the lower computer and marking the differences, the dependence of version release between the lower computer and the lower computer can be reduced.
[0013] Optionally, in the above method, the upper computer includes a version configuration document, which contains the maximum version and the minimum version of the lower computer supported by the PLC project version, an instruction protocol configuration document, a hardware configuration document, a driver configuration document, a peripheral configuration document, and a template configuration document.
[0014] Optionally, in the above method, the instruction protocol configuration document includes system-built instructions, the hardware configuration document includes the CPU main body, digital quantity expansion module, analog quantity expansion module, Internet of Things expansion module, and expansion board, the driver configuration document includes driver configuration information, the peripheral configuration document includes peripheral configuration information, and the template configuration document includes compilation-related information.
[0015] Optionally, in the above method, based on the PLC project version, load the instructions, hardware, drivers, and peripherals supported by the PLC project version from the version configuration document to complete the loading of the PLC project; obtain the template configuration from the template configuration document and compile the PLC project based on the corresponding compiler to generate the PLC project distribution file.
[0016] Optionally, in the above method, a PLC project can be created and modified based on the version configuration document in the upper computer.
[0017] Through the version configuration document provided by the upper computer, the user can create a new PLC project or modify the PLC project according to their project requirements to complete the function update of the lower computer.
[0018] Optionally, in the above method, update the version number of the upper computer after completing the upper computer version upgrade, update the firmware version number after completing the lower computer firmware version upgrade, and update the PLC project version number after completing the PLC project version upgrade; and mark the differences between each version of the upper computer, lower computer, and PLC project.
[0019] According to another aspect of the present invention, there is provided a version management device for a PLC system, where the PLC system includes an upper computer and a lower computer, and the device includes: a first judgment module, a second judgment module, and a third judgment module.
[0020] Among them, the first judgment module is used to judge whether the upper computer supports the current PLC project version after obtaining the current PLC project version. If it does not support, upgrade the upper computer version. If it supports, send the PLC project to the lower computer.
[0021] The second judgment module is used to judge whether the lower computer firmware version supports the current PLC project version after establishing a connection between the upper computer and the lower computer. If it supports, send the PLC project to the lower computer firmware. If it does not support, upgrade the lower computer firmware version or update the PLC project version and then send it to the lower computer again.
[0022] A third judgment module, configured to judge whether the firmware version of the slave computer is within the range of the maximum version and the minimum version of the firmware versions supported by the currently distributed PLC project. If it is within the range of the maximum version and the minimum version, the current PLC project is successfully distributed. If the firmware version of the slave computer is less than the minimum version, the firmware version of the slave computer is upgraded. If the firmware version of the slave computer is greater than the maximum version, the PLC project version is upgraded.
[0023] Optionally, the above device further includes a storage module, which is used to store the version information of the master computer and the version information of the slave computer by using a relational database. The version information of the master computer includes the master computer version number, the PLC project version number supported by the master computer version number, and the firmware version number of the slave computer; the version information of the slave computer includes the firmware version number of the slave computer, the maximum version number of the firmware versions supported by the PLC project version, and the minimum version number.
[0024] Optionally, the above device further includes an update module, which is used to update the version number of the master computer after the master computer version upgrade is completed, update the firmware version number after the firmware version upgrade of the slave computer is completed, update the PLC project version number after the PLC project version upgrade is completed, and mark the differences between different version numbers.
[0025] According to the solution of the present invention, during the process of creating or loading a PLC project, it is judged whether the master computer supports the current version of the PLC project. If it supports, the loading and compilation of the PLC project are completed. If it does not support, the master computer version is upgraded so that the upgraded master computer can support the current PLC project to complete the loading and compilation of the PLC project.
[0026] During the process of distributing the PLC project to the slave computer, it is judged whether the firmware of the slave computer is within the version range supported by the current version of the PLC project. If it is within the supported version range, the distribution of the PLC project is completed. If it does not support, the firmware of the slave computer is upgraded or the PLC project version is upgraded and then recompiled to complete the distribution of the PLC project.
[0027] Therefore, this solution can reduce the cost of PLC system version management, manage the versions of the master computer and the slave computer separately, reduce the dependencies between the master computer and the slave computer, and solve the problems of the functions of the master computer and the release of the firmware of the slave computer at the same time.
[0028] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention are given below. Brief Description of the Drawings
[0029] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become apparent to those of ordinary skill in the art. The drawings are only for the purpose of illustrating the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0030] Figure 1 FIG. shows a schematic flowchart of a version management method 100 for a PLC system according to an embodiment of the present invention;
[0031] Figure 2 FIG. shows a schematic flowchart of a host computer creating or loading a PLC project according to an embodiment of the present invention;
[0032] Figure 3 FIG. shows a schematic flowchart of a host computer distributing a PLC project to a slave computer according to an embodiment of the present invention;
[0033] Figure 4 FIG. shows a schematic structural diagram of a version management device 400 for a PLC system according to an embodiment of the present invention. Detailed Embodiments
[0034] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0035] In a PLC system, the host computer is a computer monitoring system, and the slave computer is a field execution controller. Both the host computer and the slave computer need to be programmed and have dedicated development systems. The firmware versions of the host computer and the slave computer need to be consistent or the functions need to be the same to ensure the normal operation of the PLC system.
[0036] In order to reduce the development cost of the PLC system, reduce the dependence between the host computer and the slave computer, and improve the stability of the PLC project, the present solution provides a version management method for a PLC system, which can manage the firmware of the host computer, the slave computer, and the PLC project separately, and mark the differences between each version, can reduce the dependence between the host computer and the slave computer, complete the version update of the PLC project, the host computer, and the slave computer firmware, and ensure the stability and security of the PLC system.
[0037] Figure 1 FIG. shows a schematic flowchart of a version management method 100 for a PLC system according to an embodiment of the present invention. As Figure 1As shown, the method 100 starts with step S110, obtaining the current PLC project version, determining whether the host computer supports the current PLC project version. If it does not support, the host computer version is upgraded. If it supports, the PLC project is loaded and compiled.
[0038] According to an embodiment of the present invention, all PLC project versions and slave computer versions supported by the host computer version are defined in the host computer version, as well as the maximum version (latest version) and minimum version of the slave computer firmware version supported by each PLC project version. The host computer can create a PLC project corresponding to the version according to the definition, and can open and edit the PLC project corresponding to the supported PLC project version.
[0039] The relational database can be used to store the version information of the host computer and the version information of the slave computer. The version information of the host computer includes the host computer version number, the PLC project version number supported by the host computer version number, and the slave computer firmware version number; the version information of the slave computer includes the slave computer firmware version number, the maximum version number and the minimum version number of the slave computer firmware version supported by the PLC project version number.
[0040] When loading the PLC project, in order to ensure the consistency between the PLC project and the host computer version, the host computer first determines whether it supports the current PLC project version to be loaded. If it supports, the PLC project is directly opened, and the instructions, hardware, drivers, peripherals, etc. stored in the version configuration document in the host computer for creating or loading the PLC project are loaded. The user can select the instructions, hardware, drivers, and peripherals corresponding to the version to complete the creation or loading of the PLC project corresponding to the version.
[0041] Figure 2 The flowchart showing the process of the host computer creating or loading a PLC project according to an embodiment of the present invention is shown. As Figure 2 shown, the host computer can create or load a PLC project. When creating a PLC project, the PLC project version to be created can be selected, and then based on the corresponding PLC project version, the instructions, hardware, drivers, peripherals, etc. for creating the PLC project are loaded. Add the PLC hardware modules, instructions, and function modules supported by the corresponding version.
[0042] Among them, the host computer contains a version configuration document. According to this version configuration document, the PLC project version that the host computer of this version allows to create or open can be determined. The version configuration document in the host computer also contains the version range of the slave computer firmware supported by each PLC project version, that is, the maximum version and the minimum version of the slave computer firmware.
[0043] Specifically, the version configuration file includes the instruction protocol configuration document, hardware configuration document, driver configuration document, peripheral configuration document, and template configuration document supported by the PLC project version.
[0044] Among them, the instruction protocol configuration document details all the system-built-in instructions supported by this version, such as bit logic instructions, comparison instructions, conversion instructions, counter instructions, data block instructions, logic control instructions, etc. The hardware configuration document details the PLC hardware supported by this version, including hardware information such as the CPU main body, digital quantity expansion module, analog quantity expansion module, Internet of Things expansion module, expansion board, etc. The driver configuration document details the driver program configuration information supported by this version. The peripheral configuration document details the peripheral configuration information supported by this version, such as input / output devices, storage devices, monitoring devices, programming devices, etc. The template configuration document details the compilation-related information used in this version for users to compile the PLC project of the corresponding version.
[0045] When loading an existing PLC project, the host computer first checks whether it supports opening the PLC project of this version. If it supports opening, it normally loads the PLC project and loads the instructions, hardware, drivers, and peripherals supported by the corresponding version based on the PLC project version, allowing users to modify the PLC project. If it does not support opening, it prompts the user to upgrade the current host computer version to open the PLC project of the current version.
[0046] When compiling a PLC project, the template configuration document can be obtained based on the PLC project version, and the PLC project is compiled using the corresponding compiler to generate a PLC project download file, so that based on the PLC project download file, the compiled PLC project can be downloaded to the lower computer.
[0047] Subsequently, step S120 is executed. After the host computer and the lower computer are connected, it is judged whether the firmware version of the lower computer supports the PLC project version. If it supports, the PLC project is downloaded to the lower computer. If it does not support, the firmware version of the lower computer is upgraded or the PLC project version is updated and then downloaded to the lower computer again.
[0048] After the host computer completes the loading and compilation of the PLC project, it needs to connect to the lower computer to complete the download of the PLC project. Figure 3 It shows a schematic flow diagram of the host computer downloading a PLC project to the lower computer according to an embodiment of the present invention. As Figure 3 shown, after the host computer is connected to the lower computer, the firmware version of the lower computer and the PLC project version currently running can be obtained through the open interface of the lower computer. The lower computer will automatically detect and judge whether the firmware version supports the currently downloaded PLC project version. If it does not support, an exception warning will be issued, prompting the user to upgrade the firmware version or update the PLC project version and then download the PLC project again.
[0049] The lower computer judgment logic can effectively eliminate the problem of version mismatch caused by the user's self-switching of the lower computer firmware version or the PLC project version.
[0050] Finally, execute step S130 to determine whether the lower computer firmware version is within the range of the maximum version and the minimum version of the firmware versions supported by the currently issued PLC project. If it is within the range of the maximum version and the minimum version, the current PLC project is successfully issued. If the lower computer firmware version is less than the minimum version, upgrade the lower computer firmware version. If the lower computer firmware version is greater than the maximum version, upgrade the PLC project version.
[0051] When the upper computer issues the PLC project to the lower computer, it can obtain the maximum version and the minimum version of the lower computer firmware versions supported by the current PLC project version. Then, determine whether the lower computer firmware version is within the range of the maximum version and the minimum version of the lower computer firmware versions supported by the PLC project. If it is within the range of the lower computer firmware versions supported by the PLC project, the PLC project is successfully issued. If it is not within the range of the lower computer firmware versions supported by the PLC project, continue to determine whether the lower computer firmware version is less than the minimum firmware version allowed by the PLC project.
[0052] If the lower computer firmware is less than the minimum firmware version allowed by the PLC project, it is prompted that it is not supported and the lower computer firmware needs to be upgraded. If the lower computer firmware version is higher than the maximum firmware version allowed by the PLC project, it is prompted that it is not supported. At this time, the PLC project version needs to be upgraded, and the updated PLC project after compilation is issued to the lower computer again.
[0053] After completing the upgrade of the upper computer version, update the version number of the upper computer. After completing the upgrade of the lower computer firmware version, update the firmware version number. After completing the upgrade of the PLC project version, update the PLC project version number. Mark the differences between each version of the upper computer, the lower computer, and the PLC project in the relational database.
[0054] According to the technical solution provided by the present invention, during the process of creating or loading a PLC project, determine whether the upper computer supports the current version of the PLC project. If it supports, complete the loading and compilation of the PLC project. If it does not support, upgrade the upper computer version so that the upgraded upper computer can support the current PLC project to complete the loading and compilation of the PLC project.
[0055] During the process of downloading the PLC project to the lower computer, it is judged whether the firmware of the lower computer is within the version range supported by the current version of the PLC project. If it is within the supported version range, the download of the PLC project is completed. If it is not supported, the firmware of the lower computer is upgraded or the version of the PLC project is upgraded and then recompiled to complete the download of the PLC project. Therefore, this solution can reduce the cost of PLC system version management, manage the versions of the upper computer and the lower computer separately, reduce the dependence between the upper computer and the lower computer, and solve the problems of the functions of the upper computer and the release of the firmware of the lower computer.
[0056] Figure 4 FIG. shows a schematic structural diagram of a version management device 400 of a PLC system according to an embodiment of the present invention, as Figure 4 shown, the version management device 400 includes a first judgment module 410, a second judgment module 420, and a third judgment module 430.
[0057] Among them, after obtaining the current PLC project version, the first judgment module 410 can judge whether the upper computer supports the current PLC project version. If it does not support, the version of the upper computer is upgraded. If it supports, the PLC project is loaded and compiled.
[0058] According to an embodiment of the present invention, the device 400 further includes a storage module. The storage module can store the version information of the upper computer and the version information of the lower computer by using a relational database. The version information of the upper computer includes the upper computer version number, the PLC project version supported by the version number, and the firmware version of the lower computer. The version information of the lower computer includes the firmware version number, the maximum version number and the minimum version number of the firmware version of the lower computer supported by the PLC project version. And the device 400 further includes an update module, which is used to update the version number in the relational database and mark the differences between different versions after the version upgrade of the upper computer or the firmware of the lower computer or the PLC project is completed.
[0059] The first judgment module 410 can judge whether the upper computer supports the current PLC project version according to the version information of the upper computer stored in the storage module. If it does not support, obtain the software upgrade package of the upper computer from the server, write the data of the software upgrade package into the upper computer, and update the version number of the upper computer.
[0060] After the upper computer and the lower computer are connected, for example, the upper computer can be connected to the lower computer through the RS485 bus or the RS232 bus, the second judgment module 420 can judge whether the firmware version of the lower computer supports the current PLC project version. If it supports, the PLC project is sent to the firmware of the lower computer. If it does not support, the firmware version of the lower computer is upgraded or the current PLC project version is updated and then sent to the lower computer again.
[0061] The third judgment module 430 can obtain the minimum version and the maximum version range of the slave machine firmware supported by the currently issued PLC project version, and determine whether the slave machine firmware version is between the minimum version and the maximum version range. If it is between the minimum version and the maximum version, the PLC project is issued to the slave machine. If the slave machine firmware version is less than the minimum firmware version supported by the PLC project, the slave machine firmware version is upgraded. If the slave machine firmware version is greater than the maximum firmware version supported by the PLC project, the PLC project version is upgraded.
[0062] Through the version management method and device of the PLC system provided by the present invention, according to the differences between different versions of the master machine, the slave machine and the PLC project, when loading and issuing the PLC project, the versions of the master machine, the slave machine firmware and the PLC project are adjusted and upgraded in real time to ensure the consistency and stability of the PLC system functions.
[0063] By judging whether the master machine supports the current version of the PLC project during the process of creating or loading the PLC project, if it supports, the loading and compilation of the PLC project are completed. If it does not support, the master machine version is upgraded so that the upgraded master machine can support the current PLC project to complete the loading and compilation of the PLC project.
[0064] During the process of issuing the PLC project to the slave machine, it is judged whether the slave machine firmware is within the version range supported by the current version of the PLC project. If it is within the supported version range, the issuance of the PLC project is completed. If it does not support, the slave machine firmware is upgraded or the PLC project version is upgraded and then recompiled to complete the issuance of the PLC project.
[0065] Therefore, this solution can reduce the cost of PLC system version management, manage the versions of the master machine and the slave machine separately, reduce the dependence between the master machine and the slave machine, and solve the problems of the master machine function and the release of the slave machine firmware at the same time.
[0066] In the specification provided here, a large number of specific details are described. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and technologies are not shown in detail so as not to obscure the understanding of this specification.
[0067] Similarly, it should be understood that, in order to streamline the present disclosure and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the single foregoing embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present invention.
[0068] Those skilled in the art should understand that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices as described in the embodiments, or alternatively may be located in one or more devices different from those in the examples. The modules in the foregoing examples may be combined into one module or further divided into multiple sub-modules.
[0069] Those skilled in the art can understand that the modules in the devices of the embodiments can be adaptively changed and arranged in one or more devices different from those of the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and furthermore can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.
[0070] In addition, those skilled in the art can understand that, although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present invention and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
[0071] In addition, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices performing functions. Thus, a processor having the necessary instructions for implementing the method or method elements forms an apparatus for implementing the method or method elements. In addition, the elements described herein of the apparatus embodiments are examples of apparatuses for performing the functions performed by the elements for the purpose of implementing the invention.
[0072] As used herein, unless otherwise specified, the use of ordinal numbers "first", "second", "third", etc. to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects so described must have a given order in time, space, ranking, or in any other manner.
[0073] Although the present invention has been described in terms of a limited number of embodiments, those skilled in the art of the present technology will appreciate, in light of the above description, that other embodiments can be contemplated within the scope of the invention thus described. In addition, it should be noted that the language used in this specification has been principally selected for readability and instructional purposes and not for the purpose of explaining or limiting the subject matter of the invention. Thus, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. For the scope of the present invention, the disclosure of the present invention is illustrative and not restrictive, and the scope of the present invention is defined by the appended claims.
Claims
1. A version management method for a PLC system, the PLC system including a host computer and a slave computer, characterized in that, it includes: Obtain the current PLC project version, and determine whether the host computer supports the PLC project version. If not, upgrade the host computer version. If supported, load and compile the PLC project; After the host computer is connected to the slave computer, determine whether the slave computer firmware version supports the PLC project version. If supported, send the compiled PLC project to the slave computer firmware. If not, upgrade the slave computer firmware version or update the PLC project version and then resend it to the slave computer firmware; Determine whether the slave computer firmware version is within the range of the maximum version and the minimum version of the firmware version supported by the currently sent PLC project. If it is within the range of the maximum version and the minimum version, the current PLC project is successfully sent. If the slave computer firmware version is less than the minimum version, upgrade the slave computer firmware version. If the slave computer firmware version is greater than the maximum version, upgrade the PLC project version.
2. The version management method according to claim 1, characterized in that, the method includes: Use a relational database to store the version information of the host computer and the version information of the slave computer. The version information of the host computer includes the host computer version number, the PLC project version number supported by the host computer version number, and the slave computer firmware version number; the version information of the slave computer includes the slave computer firmware version number, the maximum version number and the minimum version number of the slave computer firmware version supported by the PLC project version number.
3. The version management method according to claim 1, characterized in that, the host computer includes a version configuration document, and the version configuration document includes the maximum version and the minimum version of the slave computer supported by the PLC project version, an instruction protocol configuration document, a hardware configuration document, a driver configuration document, a peripheral configuration document, and a template configuration document.
4. The version management method according to claim 3, characterized in that, the instruction protocol configuration document includes system built-in instructions, the hardware configuration document includes the configuration information of the CPU main body, digital quantity expansion modules, analog quantity expansion modules, Internet of Things expansion modules, and expansion boards, the driver configuration document includes hardware driver configuration information, the peripheral configuration document includes peripheral configuration information, and the template configuration document includes information related to the compilation of the PLC project.
5. The version management method according to claim 4, characterized in that, the steps of loading and compiling the PLC project include: Based on the PLC project version, load the instructions, hardware, drivers, and peripherals supported by the PLC project version from the version configuration document to complete the loading of the PLC project; Obtain the template configuration from the template configuration document, and compile the PLC project based on the corresponding compiler to generate a PLC project distribution file.
6. The version management method according to claim 5, characterized in that, the method includes: Update the version number of the host computer after completing the host computer version upgrade, update the firmware version number after completing the slave computer firmware version upgrade, and update the PLC project version number after completing the PLC project version upgrade; and Mark the differences between each version of the host computer, the slave computer, and the PLC project.
7. The version management method according to claim 5, characterized in that the method includes: Create and modify the PLC project based on the version configuration document.
8. A version management device for a PLC system, the PLC system including a host computer and a slave computer, characterized in that it includes: A first judgment module, which is used to judge whether the host computer supports the current PLC project version after obtaining the current PLC project version. If it does not support, upgrade the host computer version. If it supports, load and compile the PLC project; A second judgment module, which is used to judge whether the slave computer firmware version supports the current PLC project version after establishing a connection between the host computer and the slave computer. If it supports, send the compiled PLC project to the slave computer firmware. If it does not support, upgrade the slave computer firmware version or update the PLC project version and then send it to the slave computer firmware again; A third judgment module, which is used to judge whether the slave computer firmware version is within the maximum version and the minimum version range of the firmware versions supported by the currently sent PLC project. If it is within the maximum version and the minimum version range, the current PLC project is successfully sent. If the slave computer firmware version is less than the minimum version, upgrade the slave computer firmware version. If the slave computer firmware version is greater than the maximum version, upgrade the PLC project version.
9. The version management device according to claim 8, characterized in that the device further includes a storage module, which is used to store the version information of the host computer and the version information of the slave computer by using a relational database. The version information of the host computer includes the host computer version number, the PLC project version number supported by the host computer version number, and the slave computer firmware version number; the version information of the slave computer includes the slave computer firmware version number, the maximum version number and the minimum version number of the slave computer firmware version supported by the PLC project version number.
10. The version management device according to claim 8, characterized in that the device further includes: An update module, which is used to update the version number of the host computer after completing the host computer version upgrade, update the firmware version number after completing the slave computer firmware version upgrade, update the PLC project version number after completing the PLC project version upgrade, and mark the differences between different version numbers.
Citation Information
Patent Citations
Programming and firmware updating method for programmable logic controller
CN103593203A
Program management system, programming assistance device, program management method, and programming assistance program
CN112204479A