CN1287287C - Method for realizing on-line renewing data based on control system - Google Patents

Method for realizing on-line renewing data based on control system Download PDF

Info

Publication number
CN1287287C
CN1287287C CN 200410074140 CN200410074140A CN1287287C CN 1287287 C CN1287287 C CN 1287287C CN 200410074140 CN200410074140 CN 200410074140 CN 200410074140 A CN200410074140 A CN 200410074140A CN 1287287 C CN1287287 C CN 1287287C
Authority
CN
China
Prior art keywords
data
download
algorithm routine
hardware configuration
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 200410074140
Other languages
Chinese (zh)
Other versions
CN1588324A (en
Inventor
李华军
裘坤
吴欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN 200410074140 priority Critical patent/CN1287287C/en
Publication of CN1588324A publication Critical patent/CN1588324A/en
Application granted granted Critical
Publication of CN1287287C publication Critical patent/CN1287287C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention discloses a method for realizing on-line updating data based on a control system, which is used for downloading data from a man-machine interface and updating the data to a controller which comprises a microprocessor and a storing device, wherein the storing device comprises a data downloading buffering zone and a data storage zone. The method comprises the following steps that: in the arrangement step, each datum is stored by a fixed storage address; in a downloading step, control point data to be updated is downloaded to the data downloading buffering zone; in an updating step, after the operation of the algorithm program of a present control system is completed, the microprocessor prevents the algorithm program from operating and updates data downloaded to the data downloading buffering zone to the data storage area of a corresponding storage address; in a recovery step, after the microprocessor completes the updating step, the microprocessor continues operating the next algorithm program before prevention and relieves all algorithm programs. The method can be suitable for a plurality of control systems including a multitask control system. Simultaneously, when the method is used for downloading data, the data of the integral system needs to be downloaded, and data to be updated are only downloaded; thus, the method has the advantages of reducing downloading time and improving downloading safety.

Description

Realize the method for online updating data based on control system
Technical field
The present invention relates to a kind of method of online updating data, relate in particular to the method that realizes the online updating data in the control field.
Background technology
For all kinds of control system that are used for Industry Control, all need various field process data of rapid and reliable processing and operational administrative data as Distributed Control System (DCS) (DCS), Programmable Logic Controller (PLC), field bus control system (FCS) etc., to satisfy the real-time requirement of commercial production occasion, therefore, increasing control system has adopted the real time operating system of a multitask.In Industry Control, especially in the process control field, require that control system can not interrupted continuously, safety, stable, operation reliably, even in the upgrading of control system and transforming, also can not influence the existing manufacturing technique process, to keep the continuity and the stability of production run.Like this, realize control system online updating data, especially realize online updating data based on multiple task real-time operation system, become the control system upgrading and transform in need a problem solving.
Application number is 98125648.1, denomination of invention is the Chinese invention patent of " can not interrupt the method that online treatment is upgraded operation file ", a kind of method that is applied to the online updating of single task control system is disclosed, this scheme is utilized two groups of processors and storer, carry out present procedure by storage stack and processor, another group storer and processor receive refresh routine, realize after renewal is finished switching and substituting.There is following defective in such scheme:
First: the data of The whole control system are normally downloaded and upgraded to the online updating described in the said method, can not upgrade at the data at some reference mark wherein, like this, even the reference mark that does not need to upgrade also will be carried out the write operation of a secondary data again, this has not only increased and has upgraded the required time, repeat unnecessary operation, and influenced the security of renewal process;
Second: said method is only applicable to the single task control system, but for the control system that adopts embedded real-time multi-task operating system, above-mentioned method and the shortcoming that itself exists are not suitable for the online download and the renewal of multiple task operating system;
The 3rd: the renewal that this scheme can online complete operation file, but upgrade finish after, need carry out the initialization operation of refresh routine; And when alternative program, also need the status data of first memory is copied to second memory, have certain security and reliability problems thus, simultaneously, the application of two groups of processors and storer not only makes the cost increase also make circuit structure become complicated.
Summary of the invention
The object of the invention is to provide a kind of method that can be applicable to the single-point online updating data of multitask control system, can not to upgrade the The whole control system data at an one point data when solving in the prior art more new data, cause long technical matters update time.
For addressing the above problem, the invention discloses a kind of method that realizes the online updating data based on control system, be used for data are downloaded to controller from man-machine interface, described controller comprises microprocessor and storer, described storer comprises data download buffer and data storage area, may further comprise the steps: step is set: the fixing memory address of The data is stored; Download step: the reference mark data that will need to upgrade are downloaded to described data download buffer; Step of updating: behind the algorithm routine end of run of current control system, described microprocessor is forbidden program run, and the data that will be downloaded to described data download buffer are write in the data storage area of corresponding stored address; Recovering step: described microprocessor continues the next algorithm routine before operation is forbidden, and lifts a ban all algorithm routines of described system.
Described control system comprises multitask control system.
Described data comprise hardware configuration data and algorithm routine data, and;
Described data download buffer further comprises: the hardware configuration download buffer is used for the zone that hardware configuration data downloading process is temporarily deposited; The algorithm routine download buffer is used for the zone that algorithm routine data downloading process is temporarily deposited.
Described data storage area further comprises: the hardware configuration data field is used for the storage area of storage hardware configuration info; The algorithm routine district is used for the storage area of control algorithm storage program.
Step is set comprises that further the hardware configuration data are provided with substep and the algorithm routine data are provided with substep, wherein: the hardware configuration data are provided with substep and comprise:
(11) the data based hardware physical address of all hardware configurations is arranged according to the order of sequence;
(12) described hardware configuration memory block is divided into the storage unit of corresponding number according to the number of described hardware physical address, sets up the corresponding relation that physical address and described storage unit exist;
The algorithm routine data are provided with substep and comprise:
(21) algorithm routine with each unit is provided with unique numbering;
(22) allow maximum numbering to be divided into the storage unit of corresponding number according to described system in described algorithm routine district, set up the corresponding relation of storage unit and described numbering.
Download step further comprises:
(31) the reference mark data of downloading as required, the hardware configuration data that identify with a hardware address are that the unit is downloaded to corresponding hardware configuration download buffer or/and the algorithm routine that identifies with a sequence number is that the unit is downloaded to corresponding algorithm program download buffer;
(32) data downloaded is carried out correctness and detect,, download the data that verification makes mistakes again otherwise return step (31) if detect by then carrying out step (33);
(33) action type of data download is judged,
Action type is when increasing type, with this data download corresponding memory block of writing direct,
Action type is when revising type, to judge whether downloading task is finished, if finish this download, if not, returns (31), continues the data of next unit and downloads;
When action type was the deletion type, operation task was to the visit of this memory block after the memory block of correspondence is provided with deleted marker, forbids.
Described step of updating is to finish in each task run cycle aperture time of multitask system or finish behind the delay one-period.
In described download and the step of updating, be to include only the hardware configuration data, include only the algorithm routine data, comprise one of them in hardware configuration number and the algorithm routine data.
Wherein, also comprise: after the data download is finished, be provided with and download the complement mark position; When step of updating, download the operation that all algorithm routines are forbidden in the complement mark position, carry out Data Update by detecting.
After algorithm routine is downloaded a unit, upgrade the algorithm routine of this unit, or downloaded and to have upgraded its algorithm routine after the total data of renewal at algorithm routine.
Compared with prior art, the present invention has the following advantages:
(1) said method is owing to adopt each data stationary to be stored in the corresponding memory address, therefore when data download, can download and need data updated, and do not need to download all system datas, improve the speed of upgrading, and also improved the safety when upgrading;
(2) said method not only is suitable for the single task control system, and the Data Update in the topmost suitable multitask control system has reached the requirement of online updating data in the multitask control system;
(3) controller of said method employing can comprise a microprocessor and a storer, does not need the extra new hardware device that increases, and has reduced the cost that upgrades, and has also reduced the complexity of circuit structure;
(4) in whole download and renewal process, do not need to restart or data are carried out operations such as initialization, guaranteed in online download and the renewal process continuity of control and stability to the full extent.
Description of drawings
Fig. 1 is the process flow diagram that the present invention realizes online data download;
Fig. 2 is the controller memory block distribution synoptic diagram that the present invention realizes online download;
Fig. 3 is the storage mode synoptic diagram in hardware configuration of the present invention data field and algorithm routine district;
Fig. 4 is the overview flow chart of online download of the present invention and renewal;
Fig. 5 is the process flow diagram of the online download of single-point of the present invention;
Fig. 6 is the sequential chart of online updating in the multitask system of the present invention;
Fig. 7 is the online download of another embodiment of the present invention and the overview flow chart of renewal;
Fig. 8 is that the algorithm routine of another embodiment of the present invention is downloaded and the process flow diagram that upgrades.
Embodiment
Below in conjunction with accompanying drawing, specify the present invention.
At present, in industrial control field, increasing control system adopts embedded real-time multi-task operating system (being RTOS), and it is a kind of operating system that is applied in the embedded product commonly used, finishes the functions such as establishment, scheduling, management of multitask.Usually, there are a plurality of flow object in the control system, different flow object has different control cycle requirements, the real-time that part object may be had relatively high expectations, another part object is then less demanding to real-time, this just need consider to adopt two or more control cycles to control respectively, to satisfy the requirement of real-time in the design of control system; Simultaneously, reduce resource requirement again as much as possible, thereby reduce the cost of control system, therefore, adopt embedded real-time multi-task operating system to become a kind of conventional means that realizes many control cycles the control system master controller.
In control system, data downloaded mainly is divided into two classes: hardware control system configuration data (being called for short " hardware configuration ") and control algolithm data (being called for short " algorithm routine ").Hardware configuration is the hardware configuration information of control system; And algorithm routine is the algorithm that controlling object is controlled, and finishes control function, generally uses personnel or user's setting by engineering according to different controlling schemes, is in core status.In online download and renewal process, one piece of data may be downloaded updating task and the algorithm routine operation task is quoted simultaneously, usually on the shared resource collision problem that solves this type of, RTOS provides some solutions, as adopt Semaphore Mechanism (so-called Semaphore Mechanism be between the realization task that provides of kernel resource share and mutual exclusion and task between synchronous mechanism), yet, because algorithm routine uses personnel by engineering or the user writes, can't require them to adopt Semaphore Mechanism to come to the object control that conducts interviews.Therefore, in design, must solve in data download and renewal process, guarantee that the down loading updating task has unique access control power to these data, promptly guarantees quoting this data without any associated algorithm routine, in order to avoid cause the disturbance of control procedure.
See also Fig. 1, it is a kind of process flow diagram of realizing the online updating data based on control system.This method is used for described data are downloaded to controller from man-machine interface, and controller comprises microprocessor and storer, and storer comprises data download buffer and data storage area, may further comprise the steps:
Step is set: the fixing memory address of described each The data is stored (step 510);
Download step: the reference mark data that will need to upgrade are downloaded to described data download buffer (step 520);
Step of updating: after the program run of current control system finished, described microprocessor was forbidden all algorithm routines operations, and the Data Update that will be downloaded to described data download buffer (step 530) in the data storage area of corresponding stored address;
Recovering step: described microprocessor continues the next algorithm routine before operation is forbidden, and lifts a ban all algorithm routines (step 540) of described system.
Because each data storage in fixing storage unit, therefore when the change data, need not to upgrade all system datas, only needing to upgrade needs data updated to get final product, and has reduced the data updated amount, thereby has improved data updated, simultaneously, also improved the security of upgrading.
Above-mentioned method both can be applicable to the control system of single task, also was applicable to the control system of multitask, below be example with the control system that is useful in multitask, illustrated how to realize online download.
Realize the method for online updating data in the realization multitask system of the present invention, finish earlier data from PC or other man-machine interface to the corresponding online download apparatus---the downloading process of controller, however just carry out Data Update.
Controller comprises a microprocessor and a storer at least.Microprocessor is used to control whole data updating process, and storer is mainly used in the data after storage is downloaded.This storer is divided into data buffer and data storage area.Please refer to Fig. 2, realize memory allocation synoptic diagram in the controller of online download for the present invention.Wherein, data-carrier store is divided into system program district 1, algorithm routine district 2, hardware data configuration data district 3 at least; Data buffer area is divided into hardware configuration download buffer 4 and algorithm routine download buffer 5 at least.System program district 1 is used for the system program of storage control system, comprises RTOS etc.; Hardware configuration data field 3 is the storage area of information such as storage hardware configuration configuration parameter, is visited by corresponding task in control procedure; Algorithm routine district 2 is the storage area of control algorithm storage program, is visited by corresponding task in control procedure; Hardware configuration download buffer 4 and algorithm routine download buffer 5 are zones of temporary transient storage in the corresponding data downloading process.
Based on the ingredient of above-mentioned controller, in multitask control system, mainly finish Data Update (seeing also Fig. 4) by following steps.
S110: step is set, sets up the corresponding relation of storage unit and algorithm routine data and hardware configuration data, promptly in the fixing fixing data of memory location storage;
Please refer to Fig. 3, is the storage mode synoptic diagram of a kind of embodiment in hardware configuration of the present invention data field and algorithm routine district.Fig. 3 (1) is the memory block example of hardware configuration data field.The hardware configuration data field has comprised all hardware configuration data, at first the data based hardware physical address of hardware configuration is arranged according to the order of sequence; Then, the hardware configuration data field is divided into the storage unit of corresponding number according to the number of hardware physical address, sets up physical address and states the corresponding relation that storage unit exists.
For example, suppose physical address since 0 to 255, the hardware configuration data separation is slit into 256 so, and the hardware configuration data of a corresponding physical address are deposited in every data field; If whole hardware configuration data field is the 256K byte altogether, so every data area stores space is the 1K byte, and promptly each hardware configuration data field is the 1K byte.Have three hardware in the existing supposing the system, its physical address is respectively 10,127,200, and the offset address of these three hardware storage hardware configuration data in the hardware configuration data field is respectively 2800H, 1FC00H, 32000H so.
See also Fig. 3 (2), example is divided in the memory block in algorithm routine district.Shown algorithm routine district has comprised all algorithm routines, at first, the algorithm routine of each unit all is provided with a unique numbering;
Then, allow maximum numbering to be divided into the storage unit of corresponding number according to system in the algorithm routine district, set up the corresponding relation of storage unit and described numbering.
Suppose, the maximum algorithm routine that allows sequence number since 0 to 255 in the controller, the algorithm routine district will be divided into 256 so, and an algorithm routine of corresponding sequence number is deposited in every program area; If the algorithm routine district is the 512K byte altogether, each sheet program area is the 2K byte so, and promptly each algorithm routine takies the 2K byte space.Have three algorithm routines in the existing supposing the system, its sequence number is respectively 0,25,121, and the offset address of these three algorithm routines in the algorithm routine district is respectively so: 0000H, C800H, 3C800H.
Also can adopt and similar memory block, hardware configuration data field allocation of space mode for hardware configuration download buffer and program configuration download buffer, the hardware configuration or the algorithm routine that make each require to download have unique memory location in buffer zone, repeat no more here.
The online data downloaded amount that requires according to possible is provided with suitable hardware configuration download buffer and algorithm routine download buffer capacity.Suppose that current requirement supports online data downloaded capacity to be: maximum 32 hardware configuration data, 32 algorithm routine data, take 1K byte, each algorithm according to each hardware so and take the 2K bytes of storage space and calculate, the hardware configuration download buffer will need 32K byte, algorithm routine download buffer to need the 64K byte so.Since the hardware configuration data of each unit or algorithm routine data all have unique one ID number, therefore can be according to this ID number, the hardware configuration data or the algorithm routine district of the Data Update in the download buffer to the relevant position.
S120: after beginning to enter downloading task, download the hardware configuration data to the hardware configuration download buffer, the download algorithm program is to the algorithm routine download buffer.In the downloading process of this step, all algorithm routines normally move, and downloading process does not have any impact to control procedure.
S130: judge whether this downloading task is finished, finish, then carry out step S140 if all download; If not, repeating step S120 then;
S140: zone bit set is set after download is finished, shows that download finishes;
S150: system detects and downloads the complement mark position and be set, moved the current algorithm routine that is moving after, forbid the operation of all algorithm routines;
S160: the more new data of hardware configuration download buffer is write the hardware configuration data field, the more new data of algorithm routine download buffer is write the algorithm routine district, carry out the renewal of corresponding data;
S170: judge whether all renewals are finished, if then enter step S180; If not, then proceed step S160;
S180: allow the operation of all algorithm routines, and continue the next algorithm routine before operation is forbidden.
The renewal process that above step has been finished data comprises that the data of hardware configuration and algorithm routine download and renewal process, it is to be noted:
(1) among the step S120, also comprise steps such as data check, the judgement of data manipulation type, and carry out the realization that single-point is downloaded in the downloading process, this is further elaborated in the following description;
(2) in actual applications, download can include only hardware configuration or include only algorithm routine with renewal process;
(3) among step S150 and the step S160, forbid the operation of all algorithm routines, carry out the renewal of corresponding data, the needed time of this step is very little with respect to the cycle of operation in the algorithm routine, can in each task run cycle aperture time of multitask system, finish, when even if this aperture time begins just next task just preparing operation, all tasks also just postpone and continue original control procedure after one very little period so.
Below introduce S120 in detail, illustrate how to finish download step.
Please refer to Fig. 5, realize the process flow diagram of the online download of single-point for the present invention.Be to download the hardware configuration data among the above-mentioned steps S120 to the hardware configuration download buffer, the download algorithm program is to the process of algorithm routine download buffer.Concrete steps are as follows:
Step S210: according to downloading task, the hardware configuration data of downloading a unit to hardware configuration download buffer or the algorithm routine of downloading a unit to the algorithm routine download buffer; Wherein, the least unit of download can be one " single-point ", and described " single-point " downloaded for the hardware configuration data, is meant an item of hardware with unique hardware address sign, as a hardware input/output end port; Download for algorithm routine, be meant a complete relatively algorithm routine with unique serial number sign.Certainly, " unit " also can be an I/O fastener (comprising a plurality of input/output end ports) for the hardware configuration data are downloaded, perhaps polylith fastener, requirement on the actual download task is decided, equally, for downloading, algorithm routine also can be several (or title " a few width of cloth ") algorithm routine.
Step S220: the data download to this unit is tested, the purpose of check be for guarantee data correct download to download buffer, cause that to avoid wrong data to be updated to hardware configuration data field or algorithm routine district control makes mistakes.The method of data check is a lot, and as adopting CRC check, exclusive or check, displacement and verification or the like, disclosed all kinds of methods of calibration all can be applicable among the present invention in this area.
Step S230: whether by data check, if, then enter step S240, otherwise, return step S210 and download the packet that verification makes mistakes again;
Step S240: the action type to the data download of this unit is judged, belongs to " increase type ", " deletion type " or " modification type ", if " increase type " then enters step S250; If " deletion type " then enters step S260; If " modification type " then enters step S270;
Step S250: the data download of this unit is directly write corresponding memory block, if i.e. hardware configuration data then are updated to the hardware configuration data field from its download buffer; If algorithm routine then is updated to the algorithm routine district from its download buffer.This new increasing process does not influence the control procedure of current operation.
Step S260: in corresponding memory block, promptly the appropriate address memory block in hardware configuration data field or algorithm routine district is provided with deleted marker, represents that the memory block of this unit is deleted, and operation task is to the visit of this memory block after forbidding.
Step S270: judge whether downloading task is finished, if then finish this downloading task; If not, then return step S210, continue the data of next unit and download.
Please refer to Fig. 6, be the time series analysis figure of online updating in the multitask system of the present invention, promptly corresponding to above-mentioned steps S150 and step S160.Suppose to have three algorithm routine operation tasks in the multitask system, the cycle of operation is respectively 50ms, 200ms and 500ms.The cycle of operation is the task of 50ms, moves the algorithm routine in a width of cloth 20ms cycle; The cycle of operation is the task of 200ms, moves the algorithm routine in a width of cloth 50ms cycle; The cycle of operation is the task of 500ms, moves the algorithm routine in a width of cloth 90ms cycle.Like this, the cycle of operation is that the task of 50ms has taken 40% cpu resource; The cycle of operation is that the task of 200ms has taken 25% cpu resource; The cycle of operation is that the task of 500ms has taken 18% cpu resource; Remaining 17% cpu resource can use for aperiodicity tasks such as Data Update.
As shown in Figure 6, in the multitask system of 50ms timeticks, suppose t0 constantly, 50ms level task, 200ms level task and 500ms task enter ready state simultaneously, prepare the operation of beginning one-period, multitask kernel at first moves the task of 50ms level by scheduling so; Arrive t1 after the 20ms constantly, the operation of 50ms level task finishes, the 200ms level that brings into operation task is located constantly at 50ms, and 50ms level task requires operation once more, therefore this task interrupts the 200ms task, and operation 20ms, continue operation 200ms level task afterwards, arrive t2 constantly, 200ms level task has been moved China, the 500ms level that brings into operation task.So repeat, move in one-period up to 500ms level task and finish, be i.e. the t3 moment.Therefore, forbid that the process of all algorithm routines operation will finish in the most macrocyclic algorithm routine operation task (being 500ms level task), above-mentioned employing is taken the lead the RTOS of formula dispatching method when guaranteeing that usually this 500ms level task is obtained operation power, other algorithm routine operation task than the fast period is all out of service, like this, when system detects download complement mark (also promptly asking updating mark), renewal process is after current all algorithm routine operation task one-periods finish, be the t3 moment, the beginning renewal process.If the renewal process time, so whole renewal process can not impact algorithm routine less than T1; If the renewal process time is big than the T1 time, for example shown in the T2 time, the T2 time, itself was shorter, probably less than the required time of renewal process, or, consider under certain situation, when all algorithm routines are under an embargo moment (similar above-mentioned T1 or T2 the zero hour) of operation, the task of a 50ms enters the preparation running status, so, renewal process will influence a 50ms level task cycle, and the algorithm routine of this 50ms level task will be after renewal process be finished, again after allowing the operation algorithm routine, obtain operation.
Here, need explanation a bit, the required time of renewal process is with the employed microprocessor dominant frequency of controller, more the size of new data is relevant.From present general situation, adopting dominant frequency is the ARM7 processor of 66MHz, the more new data of 256K byte-sized, and required time of renewal process is less than 20ms so.Like this, even there is algorithm routine just in time during this period of time to require operation, it is postponed at most to bring into operation behind the 20ms so, therefore, generally speaking, has influenced the working time of a minimum period at most.And in the process of forbidding all algorithm routine operations, do not restart controller, or initialization is soft, hardware resource, but simply keeps original state, so this of short duration stopped process can't have influence on the continuity and the stability of whole control process.
Introduce another embodiment below.Please refer to Fig. 7, be the online download of another embodiment of the present invention and the overview flow chart of renewal.Download with the less situation of data updated under, promptly download and upgrade requiredly when being generally less than the time of minimum period in all algorithms T.T., can select this embodiment for use.Among this embodiment, key is that " download of algorithm routine and renewal " (step S320) is different with first embodiment.Its step comprises:
Step S310:, the hardware configuration data are downloaded to the hardware configuration download buffer according to downloading task;
Step S320: the download algorithm routine data also upgrades, and does not temporarily allow the operation of this algorithm routine simultaneously;
Step S330: forbid moving all algorithm routines;
Step S340: upgrade the hardware configuration data and be updated to the hardware configuration data field from download buffer;
Step S350: allow all algorithm routines of operation, comprise the algorithm routine of current download, finish and download and renewal.
Wherein, step S320 further may further comprise the steps, and please refer to Fig. 7:
Supposing needs to download n width of cloth algorithm routine, and the least unit of every width of cloth algorithm routine can be 1 complete relatively algorithm routine.
Step S410: the algorithm routine of downloading a unit is to the algorithm routine download buffer;
Step S420: the data in the algorithm routine download buffer are carried out data check;
Step S430: if, then carry out step S440 by data check; Otherwise, show that data make mistakes, return step S410, retransmit the packet of makeing mistakes;
Step S440: after this cycle algorithm routine end of run, before next periodic duty begins, the algorithm routine of this unit (i.e. a width of cloth) is updated to the algorithm routine district from download buffer;
Step S450: after the algorithm routine of this unit upgrades since exist may with the inconsistent problem of relevant hardware configuration, therefore temporarily do not allow operation;
Step S460: whether the evaluation algorithm program has all been downloaded, if do not downloaded, then repeating step S410~step S450 all is updated to the algorithm routine district up to n width of cloth algorithm routine.
Above-mentioned steps is finished the download and the renewal of algorithm routine, and different herein is algorithm routine upgrades this unit immediately after downloading a unit algorithm routine.In addition, if do not need to carry out the renewal of hardware configuration, above-mentioned steps S460 finishes after the download and renewal of all algorithm routines so, allows the operation of the algorithm routine of current download in the step as shown in Figure 7.Second embodiment does appropriate change on the performing step of first embodiment, also can realize online download of single-point and renewal in the multitask system.In addition, single task system can be considered a special case of multitask system, and therefore, method of the present invention can be applied in the single task system equally.Anyly all be considered as protection scope of the present invention with different online download that form was realized and method for updating according to method proposed by the invention.

Claims (7)

1, a kind of method that realizes the online updating data based on control system, be used for data are downloaded to controller from man-machine interface, described controller comprises microprocessor and storer, and described storer comprises data download buffer and data storage area, it is characterized in that
Described data comprise hardware configuration data and algorithm routine data;
Described data download buffer further comprises:
The hardware configuration download buffer is used for the zone that hardware configuration data downloading process is temporarily deposited;
The algorithm routine download buffer is used for the zone that algorithm routine data downloading process is temporarily deposited.Described data storage area further comprises:
The hardware configuration data field is used for the storage area of storage hardware configuration info;
The algorithm routine district is used for the storage area of control algorithm storage program;
May further comprise the steps:
Step is set: the fixing memory address of The data that is downloaded in the controller is stored, step is set comprises that further the hardware configuration data are provided with substep and the algorithm routine data are provided with substep, wherein:
The hardware configuration data are provided with substep and comprise:
(11) the data based hardware physical address of all hardware configurations is arranged according to the order of sequence;
(12) described hardware configuration data field is divided into the storage unit of corresponding number according to the number of described hardware physical address, sets up the corresponding relation that physical address and described storage unit exist;
The algorithm routine data are provided with substep and comprise:
(21) algorithm routine with each unit is provided with unique numbering;
(22) allow maximum numbering to be divided into the storage unit of corresponding number according to described system in described algorithm routine district, set up the corresponding relation of storage unit and described numbering;
Download step: the reference mark data that will need to upgrade are downloaded to described data download buffer;
Step of updating: behind the algorithm routine end of run of current control system, described microprocessor is forbidden program run, and the data that will be downloaded to described data download buffer are write in the data storage area of corresponding stored address;
Recovering step: described microprocessor continues the next algorithm routine before operation is forbidden, and lifts a ban all algorithm routines of described system.
2, the method based on control system realization online updating data as claimed in claim 1 is characterized in that described control system comprises multitask control system.
3, the method based on control system realization online updating data as claimed in claim 2 is characterized in that download step further comprises:
(31) the reference mark data of downloading as required, the hardware configuration data that identify with a hardware address are that the unit is downloaded to corresponding hardware configuration download buffer or/and the algorithm routine that identifies with a sequence number is that the unit is downloaded to corresponding algorithm program download buffer;
(32) data downloaded is carried out correctness and detect,, download the data that verification makes mistakes again otherwise return step (31) if detect by then carrying out step (33);
(33) action type of data download is judged,
Action type is when increasing type, with this data download corresponding memory block of writing direct,
Action type is when revising type, to judge whether downloading task is finished, if finish this download, if not, returns (31), continues the data of next unit and downloads;
When action type was the deletion type, operation task was to the visit of this memory block after the memory block of correspondence is provided with deleted marker, forbids.
4, the method based on control system realization online updating data as claimed in claim 2 is characterized in that, described step of updating is to finish in each task run cycle aperture time of multitask system or finish behind the delay one-period.
5, the method that realizes the online updating data based on control system as claimed in claim 2, it is characterized in that the data in described download and the step of updating are one of following situation: include only the hardware configuration data, include only the algorithm routine data, comprise hardware configuration data and algorithm routine data.
6, the method based on control system realization online updating data as claimed in claim 1 is characterized in that, also comprises:
After the data download is finished, be provided with and download the complement mark position;
When step of updating, download the operation that all algorithm routines are forbidden in the complement mark position, carry out Data Update by detecting.
7, the method that realizes the online updating data based on control system as claimed in claim 2, it is characterized in that, after algorithm routine is downloaded a unit, upgrade the algorithm routine of this unit, or downloaded and to have upgraded its algorithm routine after the total data of renewal at algorithm routine.
CN 200410074140 2004-08-31 2004-08-31 Method for realizing on-line renewing data based on control system Active CN1287287C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200410074140 CN1287287C (en) 2004-08-31 2004-08-31 Method for realizing on-line renewing data based on control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200410074140 CN1287287C (en) 2004-08-31 2004-08-31 Method for realizing on-line renewing data based on control system

Publications (2)

Publication Number Publication Date
CN1588324A CN1588324A (en) 2005-03-02
CN1287287C true CN1287287C (en) 2006-11-29

Family

ID=34604800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200410074140 Active CN1287287C (en) 2004-08-31 2004-08-31 Method for realizing on-line renewing data based on control system

Country Status (1)

Country Link
CN (1) CN1287287C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100401256C (en) * 2006-09-07 2008-07-09 中控科技集团有限公司 Method for modifying single data through online
CN102354165B (en) * 2011-05-30 2013-07-10 浙江中控技术股份有限公司 Method for updating data online and device therefor
CN103529743B (en) * 2013-10-15 2017-01-04 北京四方继保自动化股份有限公司 A kind of method for online modification control system logical algorithm program
JP2015125749A (en) * 2013-12-27 2015-07-06 アズビル株式会社 Facility management system, controller, download method and software change method
CN104363128B (en) * 2014-12-05 2018-04-06 上海斐讯数据通信技术有限公司 A kind of ONU configuration files upgrade method and system
CN106484647A (en) * 2015-08-26 2017-03-08 上海汽车集团股份有限公司 Electronic apparatus system and its method for data renewal
CN110609698B (en) * 2019-08-08 2023-03-24 浙江中控技术股份有限公司 Online upgrading method and device for control algorithm unit

Also Published As

Publication number Publication date
CN1588324A (en) 2005-03-02

Similar Documents

Publication Publication Date Title
CN1270239C (en) Processing system or tast control method on computer system and and computer program
CN1251074C (en) Restarting method for computer
CN1316074A (en) Interrupt/software-controlled thread processing
CN1308826C (en) System and method for CPI scheduling in SMT processor
CN102576331B (en) System and method for synchronizing transient resource usage between virtual machines in a hypervisor environment
CN1556474A (en) On line upgrading method of software and its device
CN1081006A (en) The system for dynamic run-time binding of software module in the computer system
CN101566839B (en) Realizing method of trapezoidal pattern embedded configuration algorithm
CN1804799A (en) SCM online loading and updating method and system
CN1287287C (en) Method for realizing on-line renewing data based on control system
CN1200342C (en) Command converting device and method
JPWO2019097800A1 (en) Control device
CN1225689C (en) Robot controller with opening structure
US8966212B2 (en) Memory management method, computer system and computer readable medium
CN100346290C (en) Programmable controller, programmable controller system, CPU unit and method of starting duplexed operation
CN104865904A (en) Undisturbed configuration method facing multi-cycle operation task
CN1801092A (en) Embedded chip and its program space extension method
CN1501621A (en) A safe system starting method
CN1220119C (en) Programmable controller
CN104391754A (en) Method and device for processing task exception
CN100351797C (en) On-line updating method and apparatus of single-chip apparatus
CN1694069A (en) System and method for configuring a computer system
US20130117757A1 (en) Method and apparatus for scheduling application programs
CN1148656C (en) Thread-oriented debugging
CN102053842A (en) Method and device for improving BOOT compatibility

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: Central control science and Technology Park (hi tech Zone), No. six, No. 309, Binjiang District Road, Zhejiang, Hangzhou

Patentee after: Zhongkong Technology Co., Ltd., Zhejiang

Address before: No. six, No. 309, Binjiang District Road, Hangzhou, Zhejiang

Patentee before: Zhejiang Supcon Technology Co., Ltd.