Configuration data downloading method, device, equipment and medium of distributed control system
By dividing the memory space in the distributed control system into reserved and non-reserved areas, and processing incremental and non-incremental changes of configuration data respectively, the efficient downloading of configuration data is achieved and the download problems in the existing technology are solved. It solves the problem of long installation time, improves system performance and maintains data continuity.
Patent Information
- Application Number
- CN202011488100.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-16
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-12-16
AI Technical Summary
In distributed control systems, the downloading process of configuration data takes a long time, resulting in extended project running time. The existing technology requires all data to be re-assigned storage space addresses for overwrite and refresh downloading, which is inefficient.
Divide the memory space into reserved space and non-reserved space, configure the storage addresses of incremental data and non-incremental data respectively according to the change type of the target file, and download only the changed data to a single point to avoid all data Download again.
It shortens the data download time, improves the operating performance and efficiency of the distributed control system, and retains the continuity of historical operating data.
Smart Images

Figure CN112506547B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed control systems, and in particular to a method, device, equipment and computer-readable storage medium for downloading configuration data of a distributed control system. Background Art
[0002] In the process of large-scale operation of modern industry, field control is indispensable. DCS is a multi-level computer system that can meet the requirements of large-scale industrial production and increasingly complex process control. From the perspective of comprehensive automation, it is designed according to the principle of decentralized functions and centralized management, and adopts a multi-level hierarchical, cooperative and autonomous structure.
[0003] In industrial distributed control systems, the configuration controller is the core functional component that is responsible for executing the configuration business logic and data on the PC side. Therefore, before the configuration controller executes the configuration business logic and data, the configuration business logic and data need to be downloaded from the PC side to the corresponding internal memory of the configuration controller.
[0004] When the configuration controller implements the configuration business logic and data, the programmer can use modern compilation methods or tools on the PC side to compile the configuration logic instructions and reorganize the data, thereby generating new binary instructions and data that can be directly called and run by the controller platform. Each time the configuration logic instructions are compiled and the data is reorganized on the PC side, the configuration business logic and data in the internal memory need to be downloaded and refreshed. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, equipment and computer-readable storage medium for downloading configuration data of a distributed control system, which can shorten the time consumed for downloading configuration data to a certain extent and improve the working performance of the distributed control system.
[0006] In order to solve the above technical problems, the present invention provides a method for downloading configuration data of a distributed control system, comprising:
[0007] Divide the memory space into reserved space and non-reserved space in advance;
[0008] Get the target file compiled from the source file;
[0009] When the file change in the target file includes a change in incremental data, a space address in the reserved space is configured for the incremental data that has changed in the target file, and the incremental data that has changed is downloaded and updated to the reserved space;
[0010] When the file change in the target file includes a change in non-incremental data, the linker uniformly allocates the spatial address of the non-reserved space to all the non-incremental data in the target file, and overwrites and refreshes the non-incremental data in the target file and downloads it to the non-reserved space.
[0011] Optionally, configuring a space address in the reserved space for the incremental data that has changed in the target file includes:
[0012] When the change of the incremental data in the target file includes newly added data, the remaining space address in the reserved space is configured for the newly added data;
[0013] When the change of the incremental data in the target file includes the change of the original data, the space address of the original data corresponding to the changed data in the reserved space is allocated to the changed data;
[0014] When the change of the incremental data in the target file includes deleting the original data, the space address of the original data to be cleared is recorded.
[0015] Optionally, it also includes:
[0016] Divide the reserved space into a plurality of storage blocks according to a predetermined space size, and generate a clear mark when the storage block is in a clear state;
[0017] Accordingly, configuring the remaining space address in the reserved space for the newly added data includes:
[0018] The reserved space is searched for a storage block with a clear mark, and the space address of the storage block is configured for the newly added data.
[0019] Optionally, after dividing the reserved space into a plurality of storage blocks according to a predetermined space size, the method further includes:
[0020] When the total amount of data stored in two storage blocks is the same as the storage space size of one of the two storage blocks, the data stored in the two storage blocks are merged and stored in one storage block.
[0021] The present application also provides a configuration data downloading device for a distributed control system, comprising:
[0022] A space division module, used for pre-dividing the memory space into reserved space and non-reserved space;
[0023] A file acquisition module is used to acquire a target file compiled from a source file;
[0024] A first download module is used for, when the file change in the target file includes the change of the incremental data, configuring the space address in the reserved space for the incremental data that has changed in the target file, and downloading and updating the incremental data that has changed to the reserved space;
[0025] The second download module is used to uniformly allocate the space address of the non-reserved space for the non-incremental data in the target file through the linker when the file change in the target file includes the change of non-incremental data, and overwrite and refresh the non-incremental data in the target file and download it to the non-reserved space.
[0026] Optionally, the first download module includes:
[0027] A new adding unit, configured to configure a remaining space address in the reserved space for the newly added data when the change of the incremental data in the target file includes the newly added data;
[0028] a change unit, configured to allocate, for the updated data, a space address of the original data corresponding to the updated data in the reserved space when the change of the incremental data in the target file includes a change of the original data;
[0029] The deletion unit records the space address of the original data to be cleared when the change of the incremental data in the target file includes deleting the original data.
[0030] Optionally, the space division module is further used to divide the reserved space into a plurality of storage blocks according to a predetermined space size, and when the storage block is in an empty state, an empty mark may be generated;
[0031] Correspondingly, the newly added unit is used to search for a storage block with a clear mark in the reserved space, and configure the space address of the storage block to the newly added data.
[0032] Optionally, it also includes a data merging module, which is used to merge the data stored in the two storage blocks into one storage block when the total data size of the data stored in the two storage blocks is the same as the storage space size of one of the two storage blocks.
[0033] The present application also provides a configuration data downloading device for a distributed control system, comprising:
[0034] Memory for storing computer programs;
[0035] A processor is used to implement the steps of the method for downloading configuration data of a distributed control system as described in any one of the above items when executing the computer program.
[0036] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for downloading configuration data of a distributed control system as described in any one of the above items are implemented.
[0037] The configuration data downloading method of the distributed control system provided by the present invention comprises pre-dividing the memory space into reserved space and non-reserved space; obtaining the target file formed by compiling the source file; when the file change in the target file includes the change of incremental data, configuring the space address in the reserved space for the incremental data that has changed in the target file, and downloading and updating the incremental data that has changed to the reserved space; when the file change in the target file includes the change of non-incremental data, uniformly allocating the space address of the non-reserved space for the non-incremental data in the target file through the linker, and overwriting and refreshing the non-incremental data in the target file and downloading it to the non-reserved space.
[0038] In this application, after the configuration business logic is compiled and the data is reorganized on the PC side, the formed configuration business logic is compiled and the data source file is downloaded. After the source file is compiled into a target file, it is downloaded independently in different regions according to the data type of the file that has changed in the target file. Then in actual application, if only one of the two types of data, incremental data and non-incremental data, has changed, only the changed data can be downloaded in a single point without refreshing all the data; compared with the prior art, as long as the source file changes, all the data will be re-allocated to the storage space address for overwriting and refreshing downloading, which greatly shortens the time spent on data downloading and improves the operating performance of the distributed control system.
[0039] The present application also provides a configuration data downloading device, equipment and computer-readable storage medium for a distributed control system, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic diagram of a flow chart of a method for downloading configuration data of a distributed control system provided in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of a memory space provided in an embodiment of the present application;
[0043] Figure 3 A structural block diagram of a configuration data downloading device for a distributed control system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In industrial field applications, with the increase of process flow and control points or IO modules, the upper-level programs implemented by the configuration logic will increase by a certain order of magnitude. Then the configuration business logic and data compiled manually on the PC side will also increase in order of magnitude accordingly. After the configuration business logic and data are manually coded, even if there are only slight changes, during the download process, the source files corresponding to the manually coded configuration business logic and data are compiled into target files, and the linker will re-uniformly allocate space addresses for the target files. During the data download process, because the space addresses of all data are reallocated, all data need to be downloaded and stored in the internal memory in an overwrite and refresh manner. When the amount of downloaded data files is too large, it may take a long time to download, resulting in the disadvantage of extended project running time.
[0045] To this end, the present application provides a technical solution that can improve the efficiency of file data downloading in a distributed control system.
[0046] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] like Figure 1 As shown, Figure 1 A flow chart of a method for downloading configuration data of a distributed control system provided in an embodiment of the present application, the method for downloading configuration data may include:
[0048] S11: Divide the memory space into reserved space and non-reserved space in advance.
[0049] S12: Obtain a target file compiled from the source file.
[0050] S13: When the file change in the target file includes a change in the incremental data, a space address in the reserved space is configured for the incremental data that has changed in the target file, and the incremental data that has changed is downloaded and updated to the reserved space.
[0051] S14: When the file change in the target file includes the change of non-incremental data, the linker uniformly allocates space addresses of non-reserved space for the non-incremental data in the target file, and overwrites and refreshes the non-incremental data in the target file and downloads it to the non-reserved space.
[0052] like Figure 2 As shown, Figure 2 A schematic diagram of the memory space provided in an embodiment of the present application, in which the storage space 0xA000 9000 ~ 0xA000 9FFF is used as a non-reserved space used by the linker, and the storage space 0xA000 A000 ~ 0xA00F FFFF is used as a reserved space.
[0053] When the project is compiled in the prior art, multiple different source files will be compiled into a target file, and then the linker will uniformly allocate the address space, and finally generate an executable file. If there are changes in variables or instructions in the source file, the linker can uniformly encode the addresses of all data in the target file according to the global symbols of all data in the target file identified. Accordingly, when downloading the data of the target file, it is also necessary to re-download it according to the newly encoded spatial address. It can be seen that because the linker cannot download the files corresponding to the changed parts of the target file separately, it takes a long time to download the data. The linker program used in the distributed controller is generally a general linker. Due to the complexity of its program and the development cycle and cost of the directional implementation of small incremental compilation functions, its function cannot be changed, and it is also impossible to change the problem that only small compilation changes in the source file need to be re-downloaded for all source files.
[0054] The present application takes into account that the incremental data is the one that is frequently compiled and changed in the target file. The incremental data generally belongs to the data managed by the engineering maintenance table, mainly including the parameter data of the operation of certain instruction functions. These incremental data mainly refer to the size of the parameters that will increase or decrease with the change of the operation process during the operation of the engineering logic instructions implemented by the controller. The non-incremental data includes engineering logic instructions, logic functions, etc., which are data that do not change frequently when the controller implements the engineering operation. Generally, the amount of incremental data is much smaller than the non-incremental data. For this reason, in this embodiment, different storage spaces are allocated to the incremental data that changes frequently and the non-incremental data that changes infrequently, and when the incremental data and the non-incremental data are downloaded, independent files are used for unified downloading, and the controller end implements the parsing application of different files to realize the separate processing of the above data.
[0055] When manually compiling the source file on the PC, if the compiled data contains incremental data, the incremental data that has changed will no longer be allocated to a unified address space through the linker. Instead, the storage space address of the incremental data that has changed will be directly configured through the PC engineering software. Obviously, the space address of the incremental data configured in this process is the address in the reserved space of the internal memory. After the space address of the incremental data is configured, the incremental data can be downloaded. And for the linker, when it allocates a global unified address to the data in the target file, it mainly completes the space address allocation by identifying the global symbol of the data. After the processor completes the configuration of the reserved space address of the incremental data, the identifier of the incremental data is no longer a global symbol but a space address. Therefore, the linker cannot recognize the incremental data and cannot allocate a space address to the incremental data, thereby realizing independent downloading of the incremental data. If the non-incremental data has not changed at this time, there is no need to re-download the non-incremental data, thereby avoiding the problem that only the incremental data in the source file has slight changes, resulting in the need to re-download all target files, thereby reducing the time spent on data downloading and improving data downloading efficiency.
[0056] When the file data that has been changed in the target file includes non-incremental data, the linker can still be used to uniformly allocate space addresses for all non-incremental data in the target file. It can be understood that the reserved space in the memory space of the internal memory is used to store incremental data, and obviously the non-reserved space is used to store non-incremental data. The space address of the memory space that the linker can recognize also only includes the space address of the non-reserved space. In this way, the independent downloading of non-incremental data can be achieved without changing the operation process of the linker.
[0057] In the present application, when the source file is manually compiled and changed on the PC side, the source file is first compiled to form a target file, and the address space of the incremental data and the non-incremental data in the target file are independently allocated in different ways, thereby realizing independent downloading of the incremental data and the non-incremental data. When only the incremental data is changed, there is no need to download the non-incremental data, thereby avoiding the problem of full downloading of all the incremental data and non-incremental data of the project due to changes in some data or instructions, especially small changes in the incremental data, thereby saving the time spent on configuring business logic and data downloading, and improving system operation performance and efficiency.
[0058] Based on the above embodiment, it is further considered that when incremental data is manually changed on the PC side, there are three different forms of change, namely, addition, deletion and update. To this end, in an optional embodiment of the present application, the process of configuring the space address of the reserved space for the incremental data that has changed in the target file may include:
[0059] When the change of the incremental data in the target file includes newly added data, the remaining space address in the reserved space is configured for the newly added data;
[0060] When the change of the incremental data in the target file includes the change of the original data, the space address of the original data corresponding to the changed data in the reserved space is allocated for the changed data;
[0061] When the change of incremental data in the target file includes deleting the original data, the space address of the original data to be cleared is recorded.
[0062] It should be noted that when the change of the incremental data in the target file includes new data, that is, new incremental data, i.e., new data, is generated relative to the original incremental data, at this time, it is only necessary to allocate the remaining space address in the reserved space to the new data and then download the new data.
[0063] The change of the incremental data in the target file includes the change of the original data, that is to say, the incremental data exists in the original incremental data, and the incremental data is simply manually changed to a new data to replace the original data. Therefore, it is only necessary to assign the manually re-entered change data to the space address of the original data corresponding to the change data, so that the change data can be downloaded and refreshed to the space address where the original data is located.
[0064] The change of the incremental data in the target file includes deleting the original data, that is, deleting one or some of the original data. Accordingly, the storage space after clearing the data obviously becomes available space, so the space address of the original data to be cleared can be stored so that the data can be stored again later.
[0065] In this embodiment, since the address configuration and downloading of the incremental data do not need to be processed by the linker, during the process of address configuration and downloading of the changes in the incremental data, the address configuration and downloading of a single or multiple changed incremental data can be re-performed, while the incremental data that has not changed remains unchanged and does not need to be re-downloaded.
[0066] Obviously, compared with the method in the prior art that all data will be reallocated space addresses and downloaded again as long as there is a change in any data in the incremental data, in this embodiment, only the changed incremental data is downloaded, further shortening the time spent on data downloading.
[0067] And, as mentioned above, for the incremental data of this application, it means that during the operation of the engineering logic, it will be iterated and updated as the operation process proceeds. That is to say, after the engineering logic has been running for a period of time, the incremental data is no longer the initial value manually set in the initial state, but the intermediate value in the operation process. In the prior art, if one or two incremental data are manually modified on the PC side, or a certain incremental data is added, because the linker reconfigures the address of all data and re-downloads them, and the re-downloaded incremental data is downloaded according to the incremental data code originally set by the human in the source file, the intermediate values of the incremental data generated by the operation process of the engineering logic will be refreshed to the initial value, so that the historical operation data of the incremental data that has not been recompiled manually cannot be retained, and when the engineering logic business continues to run later, the continuity and coherence of engineering control cannot be reflected in the business.
[0068] like Figure 2 As shown, Figure 2 4 shows four incrementable intervals storing four incrementable data. If the incrementable interval 2 is manually deleted on the PC side, the content in the incrementable interval 2 is also cleared, but the data stored in the incrementable interval 1 and the incrementable interval 3 are not affected.
[0069] However, if data is stored only in incremental interval one, incremental interval two and incremental interval three before the source file is manually compiled on the PC, then after the source file is compiled on the PC, new data is generated and stored in incremental interval four. Therefore, the data stored in incremental interval one, incremental interval two and incremental interval three will not be affected.
[0070] If the source file is compiled on the PC side and the data in incremental interval three is changed, then only the data in incremental interval three needs to be updated to the changed data, and the data in other incremental intervals will not be affected. It can be seen that the downloading of the target file in this application can well retain the historical data that has not been manually compiled and has not changed.
[0071] In this embodiment, when the incremental data is changed, only the manually recompiled incremental data is re-downloaded, while the incremental data that has not been recompiled can well preserve its historical operation data, which is helpful to ensure the continuity of engineering control when the engineering business continues to run in the future.
[0072] Based on any of the above embodiments, in an optional embodiment of the present application, after the above memory space is divided into reserved space, in order to further speed up the downloading efficiency of incremental data, in an optional embodiment of the present application, it may further include:
[0073] Divide the reserved space into multiple storage blocks according to the predetermined space size, and when the storage block is in an empty state, a clear mark can be generated;
[0074] Accordingly, when configuring the remaining space address in the reserved space for the newly added data, the storage block with the clear mark in the reserved space can be searched, and the space address of the storage block can be configured for the newly added data.
[0075] refer to Figure 2 , when storing data in a storage space, for example, there is data stored in the incremental interval 3, when storing data in the incremental interval 4, you first need to query the last space address of the incremental interval 3. If the incremental interval 2 is also empty at this time, you need to first query whether the space size of the storable interval 2 is sufficient to store the data to be stored. If the space of the storable space is insufficient, continue to search for the next storable space.
[0076] In this embodiment, the reserved space is divided into several storage blocks. For example, 0xA000 A000~0xA000 A010 can be used as a storage block, 0xA000 A020~0xA000 A030 can be used as a storage block, and so on. Divide the subsequent storage blocks in the reserved space. When storing incremental data, it is only necessary to determine how many storage blocks the incremental data needs to occupy. For example, if two storage blocks are needed, then it is only necessary to find adjacent storage blocks with clear marks to allocate to the incremental data, and search for the space addresses of the remaining space in the reserved space one by one, which saves the time of configuring the space address for the incremental data to a certain extent, and further improves the efficiency of downloading the incremental data.
[0077] Furthermore, considering that in actual applications, there may be a certain incremental data stored in two adjacent storage blocks, but during the download process, part of the incremental data is deleted, so that the size of the incremental data stored in the two storage blocks is smaller than the amount of data that can be stored in one storage block. Therefore, the incremental data can be merged into the same storage block and another storage block can be released, thereby improving the utilization of the storage block.
[0078] The above discussion only uses the example that the storage space size of each storage block is the same. In actual applications, storage blocks of various specifications can be used to adapt to the storage of incremental data of different data volumes and improve the space utilization of the reserved space.
[0079] The following is an introduction to a configuration data downloading device for a distributed control system provided by an embodiment of the present invention. The configuration data downloading device for a distributed control system described below and the configuration data downloading method for a distributed control system described above can refer to each other.
[0080] Figure 3 The structural block diagram of the configuration data downloading device of the distributed control system provided by the embodiment of the present invention is shown in FIG. Figure 3 The configuration data downloading device of the distributed control system may include:
[0081] The space division module 100 is used to pre-divide the memory space into reserved space and non-reserved space;
[0082] The file acquisition module 200 is used to acquire the target file compiled from the source file;
[0083] A first download module 300, configured to configure a space address in the reserved space for the incremental data that has changed in the target file when the file change in the target file includes a change in incremental data, and to download and update the incremental data that has changed to the reserved space;
[0084] The second download module 400 is used to uniformly allocate the space address of the non-reserved space for the non-incremental data in the target file through the linker when the file change in the target file includes the change of non-incremental data, and overwrite and refresh the non-incremental data in the target file and download it to the non-reserved space.
[0085] In an optional embodiment of the present application, the first download module 300 includes:
[0086] A new adding unit, configured to configure a remaining space address in the reserved space for the newly added data when the change of the incremental data in the target file includes the newly added data;
[0087] a change unit, configured to allocate, for the updated data, a space address of the original data corresponding to the updated data in the reserved space when the change of the incremental data in the target file includes a change of the original data;
[0088] The deletion unit records the space address of the original data to be cleared when the change of the incremental data in the target file includes deleting the original data.
[0089] In an optional embodiment of the present application, the space division module is further used to divide the reserved space into multiple storage blocks according to a predetermined space size, and when the storage block is in an empty state, an empty mark can be generated;
[0090] Correspondingly, the newly added unit is used to search for a storage block with a clear mark in the reserved space, and configure the space address of the storage block to the newly added data.
[0091] In an optional embodiment of the present application, it also includes a data merging module, which is used to merge the data stored in the two storage blocks into one storage block when the total data size of the data stored in the two storage blocks is the same as the storage space size of one of the two storage blocks.
[0092] The configuration data downloading device of the distributed control system of this embodiment is used to implement the aforementioned configuration data downloading method of the distributed control system. Therefore, the specific implementation method of the configuration data downloading device of the distributed control system can be seen in the implementation example part of the configuration data downloading method of the distributed control system in the previous text, and will not be repeated here.
[0093] The present application also provides an embodiment of a configuration data downloading device for a distributed control system, which may include:
[0094] Memory for storing computer programs;
[0095] A processor is used to implement the steps of the method for downloading configuration data of a distributed control system as described in any one of the above items when executing the computer program.
[0096] The configuration data downloading method of the distributed control system implemented by the processor may include: pre-dividing the memory space into reserved space and non-reserved space; obtaining a target file compiled by a source file; when a file change in the target file includes a change in incremental data, configuring a space address in the reserved space for the incremental data that has changed in the target file, and downloading and updating the incremental data that has changed to the reserved space; when a file change in the target file includes a change in non-incremental data, uniformly allocating the space address of the non-reserved space to all non-incremental data in the target file through a linker, and overwriting and refreshing the non-incremental data in the target file and downloading it to the non-reserved space.
[0097] The configuration data downloading device of the distributed control system provided in this embodiment divides different storage spaces for incremental data and non-incremental data, and downloads the two types of data independently, thereby avoiding the problem that slight changes in incremental data require all data to be re-downloaded, which results in a long download time, and improves the system working performance to a certain extent.
[0098] The present application also provides an embodiment of a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for downloading configuration data of a distributed control system as described in any one of the above items are implemented.
[0099] The computer-readable storage medium may be a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0100] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "includes", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment comprising a series of elements are inherent to the elements. In the absence of more restrictions, the elements limited by the sentence "comprising one..." do not exclude the presence of other identical elements in the process, method, article or equipment comprising the elements. In addition, the above-mentioned technical solution provided in the embodiment of the present application is consistent with the corresponding technical solution in the prior art in principle, and the part is not described in detail, so as to avoid too much redundancy.
[0101] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the core idea of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for downloading configuration data of a distributed control system, characterized in that: include: Divide the memory space into reserved space and non-reserved space in advance; Get the target file compiled from the source file; When the file change in the target file includes a change in incremental data, a space address in the reserved space is configured for the incremental data that has changed in the target file, and the incremental data that has changed is downloaded and updated to the reserved space; When the file change in the target file includes a change in non-incremental data, the linker uniformly allocates space addresses in the non-reserved space to all non-incremental data in the target file, and overwrites and refreshes the non-incremental data in the target file and downloads it to the non-reserved space; Configuring a space address in the reserved space for the incremental data that has changed in the target file includes: When the change of the incremental data in the target file includes newly added data, the remaining space address in the reserved space is configured for the newly added data; When the change of the incremental data in the target file includes the change of the original data, the space address of the original data corresponding to the changed data in the reserved space is allocated to the changed data; When the change of the incremental data in the target file includes deleting the original data, the space address of the original data to be cleared is recorded; Also includes: Divide the reserved space into a plurality of storage blocks according to a predetermined space size, and generate a clear mark when the storage block is in a clear state; Accordingly, configuring the remaining space address in the reserved space for the newly added data includes: Searching for a storage block with a clear mark in the reserved space, and configuring the space address of the storage block to the newly added data; After dividing the reserved space into a plurality of storage blocks according to a predetermined space size, the method further includes: When the total amount of data stored in two storage blocks is the same as the storage space size of one of the two storage blocks, the data stored in the two storage blocks are merged and stored in one storage block.
2. A configuration data downloading device for a distributed control system, characterized in that: include: A space division module, used for pre-dividing the memory space into reserved space and non-reserved space; A file acquisition module is used to acquire a target file compiled from a source file; A first download module is used for, when the file change in the target file includes a change in incremental data, configuring a space address in the reserved space for the incremental data that has changed in the target file, and downloading and updating the incremental data that has changed to the reserved space; A second download module is used for uniformly allocating the space address of the non-reserved space to the non-incremental data in the target file through a linker when the file change in the target file includes the change of non-incremental data, and overwriting and refreshing the non-incremental data in the target file and downloading it to the non-reserved space; The first download module comprises: A new adding unit, configured to configure a remaining space address in the reserved space for the newly added data when the change of the incremental data in the target file includes the newly added data; a change unit, configured to allocate, for the updated data, a space address of the original data corresponding to the updated data in the reserved space when the change of the incremental data in the target file includes a change of the original data; A deletion unit, which records the space address of the original data to be cleared when the change of the incremental data in the target file includes deleting the original data; The space division module is also used to divide the reserved space into multiple storage blocks according to a predetermined space size, and when the storage block is in an empty state, an empty mark can be generated; Correspondingly, the newly added unit is used to search for a storage block with a clear mark in the reserved space, and configure the space address of the storage block to the newly added data; It also includes a data merging module, which is used to merge the data stored in the two storage blocks into one storage block when the total data size of the data stored in the two storage blocks is the same as the storage space size of one of the two storage blocks.
3. A configuration data downloading device for a distributed control system, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for downloading configuration data of a distributed control system as claimed in claim 1 when executing the computer program.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for downloading configuration data of a distributed control system as claimed in claim 1 are implemented.
Citation Information
Patent Citations
Control system configuration increment type on-line downloading method
CN101216696A
Management method for industrial control system data memory
CN104391496A
Compiling Method of Configuration Software
CN109460235A
Undisturbed downloading method of controller and related device
CN109933345A
Storage method and device of distributed file system, electronic equipment and storage medium
CN110019083A
