CN112363761A - Algorithm page variable reference method supporting dynamic relocation - Google Patents
Algorithm page variable reference method supporting dynamic relocation Download PDFInfo
- Publication number
- CN112363761A CN112363761A CN202011239320.4A CN202011239320A CN112363761A CN 112363761 A CN112363761 A CN 112363761A CN 202011239320 A CN202011239320 A CN 202011239320A CN 112363761 A CN112363761 A CN 112363761A
- Authority
- CN
- China
- Prior art keywords
- data
- judging
- source end
- invalid
- source
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30145—Instruction analysis, e.g. decoding, instruction word fields
- G06F9/30149—Instruction analysis, e.g. decoding, instruction word fields of variable length instructions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/34—Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides an algorithm page variable quoting method supporting dynamic relocation, which can realize automatic positioning and quoting of floating point number analog quantity, integer digital analog quantity and switching quantity between pages and controllers. If the data of the quoted object at the source end is not reasonable and the quoted end is not consistent with the data type of the source end, the method directly judges the quote failure and exits the operation. The method can classify and query according to different data types, if the configuration is not changed, the reference is directly carried out according to the corresponding data type and the corresponding instance name, the instance name cannot be referenced when the instance name is inconsistent, if the configuration is changed, a traversal search method is adopted, and the reference is judged to be failed when the search is failed. By adopting the method to automatically position and quote the algorithm page variables, the calculated amount can be greatly reduced, the normal operation of the engineering configuration is facilitated, engineering personnel are not needed to position the quoted amount, and the workload is reduced.
Description
Technical Field
The invention belongs to the field of industrial automation control, and particularly relates to an algorithm page variable quoting method supporting dynamic relocation.
Background
In the field of industrial process control, a large number of analog quantity signals and switching value signals are collected through an IO module, and reference of variables between algorithm pages and between controllers is involved in a logic configuration manufacturing process. In the traditional variable reference method, reference relations among variables are compiled and downloaded to a controller through configuration software, but if one page of the variables is modified, other positions for referencing the variables need to be modified, the workload is complex, and the maintenance pressure is high.
Disclosure of Invention
In order to overcome the problems in the prior art, the invention aims to provide an algorithm page variable quoting method supporting dynamic relocation, which can realize quoting of switching quantity, floating point number analog quantity and integer digital analog quantity in different algorithm pages of a controller and among different controllers, when a certain variable is changed, the controller can carry out dynamic relocation according to the offset of the variable, and the method has high calculation efficiency and reduces the pressure of manual maintenance by classifying the variable and adopting different strategies according to whether the configuration environment changes.
In order to achieve the purpose, the invention adopts the following technical scheme:
a variable reference method of an algorithm page supporting dynamic relocation specifically comprises the following steps:
a) judging whether the data of the information of the attracted objects at the record source end exist or not, if not, judging that the data is invalid and the reference fails, and quitting the calculation; if yes, recording the data and address offset of the source-end attracted object, and carrying out the next step;
b) judging whether the data of the attracted object at the source end has rationality or not, wherein the rationality of the algorithm page number of the source end and the instance name of the attracted object is judged, if not, the data is judged to be invalid, the reference fails and the calculation is quitted, and if the data is reasonable, the data and the address offset are recorded, and the next step is carried out;
c) determining the data type of the reference end object, classifying according to the switching value, the floating point analog quantity and the integer analog quantity, if the data type does not belong to one of the types, judging that the data is invalid, failing to reference, and exiting the calculation, and if the data type is reasonable, limiting the range according to the data type, and carrying out the next step;
d) judging whether the address offset of the source-end attracted object exceeds the limit, if the address offset exceeds the limit, judging that the data is invalid and the reference fails, and quitting the calculation, if the address offset does not exceed the limit, storing the data and the address offset of the source-end attracted object to the local, and carrying out the next step;
e) judging whether the logic configuration is changed, if not, directly judging the matching of the data of the reference end and the source end, if the logic configuration is matched, judging that the data is invalid and the reference fails, if the logic configuration is changed, searching whether the source end data meeting the conditions exist by adopting a traversal method for reference, recording the offset of the instruction codes, and if the search fails, judging that the data is invalid and the reference fails.
In the step b), whether the source end page number is not 0 and is within the maximum allowable range, whether the length of the character string of the example name of the introduced object meets the requirement and whether the sum of the length and the storage offset is within the total length of the character string cache region, and otherwise, whether the data is invalid and the reference fails is judged.
The data and address of the source-end attracted object are stored in the step d) and are shifted to the local, so that the source-end data is prevented from being modified by high-priority tasks.
4. The content of judging the data matching between the reference end and the source end in the step e) includes that the data type of the object to be referenced at the source end is consistent with the reference end, i.e. the data type of the object to be referenced at the source end must be one of the switching value, the floating point analog value and the integer analog value, and the instance names of the objects must be consistent.
Compared with the prior art, the method has the beneficial effects that: the situation that the engineering personnel track the position of the variable and then modify the content related to the variable in the configuration, but the program dynamically relocates the position of the variable is avoided, and the burden of the engineering personnel is reduced; before searching, the reasonability analysis is carried out on the data of the attracted objects at the source end, the indexing objects are classified, the attracted objects are searched according to the classes, the condition that the object data types and the instance names do not correspond to each other is eliminated, different strategies are adopted according to whether the configuration changes or not, the program calculation amount is greatly reduced, and the configuration operation efficiency is improved.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flow chart of the rationality determination of the data of the referenced object;
FIG. 3 is a flow diagram of a referrer object data type determination.
Detailed Description
In order to make the aforementioned, characteristic and advantages of the present invention more comprehensible, a detailed description of the steps of the present invention is provided below with reference to the accompanying drawings.
As shown in fig. 1, a method for quoting a variable of an algorithm page supporting dynamic relocation includes the following specific steps:
step 1, judging whether data of the information of the attracted objects at the record source end exist, and if not, judging that the data are invalid and the reference fails; if yes, recording the data and address offset of the source end attracted object.
And 2, judging whether the data of the attracted object at the source end has rationality. The following conditions must be satisfied, namely the judgment is reasonable:
1) the source page number is not 0;
2) the source end page number is less than 1000 of the maximum algorithm page number allowed by the logic configuration;
3) the length of the character string of the example name of the introduced object is not 0;
4) the sum of the character string length of the example name of the guided object and the relative displacement stored by the upper computer is less than the total length 2560 of the maximum allowed character string of the algorithm page;
5) the length of the character string of the example number of the introduced object is less than or equal to the specified maximum allowable length 12.
And when the conditions are met, acquiring the initial addresses of the source-end algorithm page and the reference-end algorithm page. Otherwise, judging that the data is invalid, failing to quote and quitting the calculation. Step 2 the development flow is shown in fig. 2.
And 3, judging whether the type of the data to be quoted by the quote end object is one of a switching value (Boolean type), a floating point number analog quantity and an integer digital analog quantity, otherwise, judging that the data is invalid, the quote fails and quitting the calculation, and limiting the search range as follows according to the quote data type:
1) switching amount (boolean): sharing switching value among pages, inputting switching value, outputting switching value and quoting switching value among controllers;
2) floating-point number analog: sharing floating point number analog quantity between pages, inputting floating point number analog quantity, outputting floating point number analog quantity and quoting analog quantity between controllers;
3) integer digital-analog: the method comprises the steps of inter-page integer analog-to-analog quantity sharing, integer analog-to-analog quantity input, integer analog-to-analog quantity output and inter-controller analog quantity reference.
Step 3 the development flow is shown in fig. 3.
Step 4, judging whether the source end offset is in an allowable range, if so, storing the data to the local to prevent the source end data from being modified by the task with higher priority; if not, the data is judged to be invalid and the reference fails.
Step 5, judging whether the logic configuration is changed or not, if not, judging whether the data type of the attracted object at the source end is consistent with the data type to be quoted by the quote end or not, and whether the instance name of the attracted object at the source end is consistent with the instance name of the quote end, if so, assigning the data stored to the local to the quote end object, and if so, judging that the data is invalid and the quote fails; if the configuration changes, traversing the algorithm page object information in the source offset allowable range, relocating the guided object, judging whether the data type and the instance name of the guided object are consistent with the reference end object, if so, assigning the object information to the reference end object, and simultaneously recording the instruction code offset. If the valid object is not found, the data is judged to be invalid and the reference fails.
Claims (4)
1. A variable reference method of an algorithm page supporting dynamic relocation is characterized by comprising the following steps:
a) judging whether the data of the information of the attracted objects at the record source end exist or not, if not, judging that the data is invalid and the reference fails, and quitting the calculation; if yes, recording the data and address offset of the source-end attracted object, and carrying out the next step;
b) judging whether the data of the attracted object at the source end has rationality or not, wherein the rationality of the algorithm page number of the source end and the instance name of the attracted object is judged, if not, the data is judged to be invalid, the reference fails and the calculation is quitted, and if the data is reasonable, the data and the address offset are recorded, and the next step is carried out;
c) determining the data type of the reference end object, classifying according to the switching value, the floating point analog quantity and the integer analog quantity, if the data type does not belong to one of the types, judging that the data is invalid, failing to reference, and exiting the calculation, and if the data type is reasonable, limiting the range according to the data type, and carrying out the next step;
d) judging whether the address offset of the source-end attracted object exceeds the limit, if the address offset exceeds the limit, judging that the data is invalid and the reference fails, and quitting the calculation, if the address offset does not exceed the limit, storing the data and the address offset of the source-end attracted object to the local, and carrying out the next step;
e) judging whether the logic configuration is changed, if not, directly judging the matching of the data of the reference end and the source end, if the logic configuration is matched, judging that the data is invalid and the reference fails, if the logic configuration is changed, searching whether the source end data meeting the conditions exist by adopting a traversal method for reference, recording the offset of the instruction codes, and if the search fails, judging that the data is invalid and the reference fails.
2. The method of claim 1 for algorithmic page variable referencing supporting dynamic relocation, further comprising: and b), judging whether the page number of the source end is not 0 and is within the maximum allowable range, judging whether the length of the character string of the example name of the introduced object meets the requirement and the sum of the length and the storage offset is within the total length of the character string cache region, and otherwise, judging that the data is invalid and the reference fails.
3. The method of claim 1 for algorithmic page variable referencing supporting dynamic relocation, further comprising: and d), storing the data and address offset of the source end attracted object to the local in the step d), and preventing the source end data from being modified by the high-priority task.
4. The method of claim 1 for algorithmic page variable referencing supporting dynamic relocation, further comprising: the content for judging the data matching between the reference end and the source end in the step e) comprises that the data type of the object to be quoted at the source end is consistent with the reference end, namely, the data type of the object to be quoted at the source end is required to be one of a switching value, a floating point analog quantity and an integer analog quantity, and the instance names of the objects are required to be consistent.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011239320.4A CN112363761B (en) | 2020-11-09 | 2020-11-09 | Algorithm page variable reference method supporting dynamic relocation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011239320.4A CN112363761B (en) | 2020-11-09 | 2020-11-09 | Algorithm page variable reference method supporting dynamic relocation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112363761A true CN112363761A (en) | 2021-02-12 |
CN112363761B CN112363761B (en) | 2022-08-02 |
Family
ID=74508714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011239320.4A Active CN112363761B (en) | 2020-11-09 | 2020-11-09 | Algorithm page variable reference method supporting dynamic relocation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112363761B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744495A (en) * | 2004-09-01 | 2006-03-08 | 英华达(上海)电子有限公司 | Method for detecting user condition language address legality |
CN1776620A (en) * | 2004-11-15 | 2006-05-24 | 国际商业机器公司 | Apparatus,system and method for identifying fixed memory address errors in source code |
US20070156782A1 (en) * | 2006-01-05 | 2007-07-05 | Samsung Electronics Co., Ltd. | System and method for managing log information |
US20150269046A1 (en) * | 2014-03-18 | 2015-09-24 | Kabushiki Kaisha Toshiba | Data transfer device, data transfer method, and non-transitory computer readable medium |
CN107844093A (en) * | 2016-09-18 | 2018-03-27 | 南京南瑞继保电气有限公司 | A kind of custom feature block and configuration method for packing based on component models |
CN108959058A (en) * | 2017-05-18 | 2018-12-07 | 南京南瑞继保电气有限公司 | A kind of configuration and debugging device implementation method of Virtual Controller |
CN111651640A (en) * | 2020-05-29 | 2020-09-11 | 南京南瑞继保电气有限公司 | Cross indexing method, device, computer storage medium and equipment |
-
2020
- 2020-11-09 CN CN202011239320.4A patent/CN112363761B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744495A (en) * | 2004-09-01 | 2006-03-08 | 英华达(上海)电子有限公司 | Method for detecting user condition language address legality |
CN1776620A (en) * | 2004-11-15 | 2006-05-24 | 国际商业机器公司 | Apparatus,system and method for identifying fixed memory address errors in source code |
US20070156782A1 (en) * | 2006-01-05 | 2007-07-05 | Samsung Electronics Co., Ltd. | System and method for managing log information |
US20150269046A1 (en) * | 2014-03-18 | 2015-09-24 | Kabushiki Kaisha Toshiba | Data transfer device, data transfer method, and non-transitory computer readable medium |
CN107844093A (en) * | 2016-09-18 | 2018-03-27 | 南京南瑞继保电气有限公司 | A kind of custom feature block and configuration method for packing based on component models |
CN108959058A (en) * | 2017-05-18 | 2018-12-07 | 南京南瑞继保电气有限公司 | A kind of configuration and debugging device implementation method of Virtual Controller |
CN111651640A (en) * | 2020-05-29 | 2020-09-11 | 南京南瑞继保电气有限公司 | Cross indexing method, device, computer storage medium and equipment |
Non-Patent Citations (3)
Title |
---|
IEEE: "IEEE Standard for Terminology and Test Methods for Analog-to-Digital Converters", 《IEEE STD 1241-2000》 * |
李明等: "实例化过程模型的时间自动机描述方法研究", 《计算机应用与软件》 * |
魏少涵: "面向对象软件测试方法分析与研究", 《中国优秀硕士学位论文全文数据库》 * |
Also Published As
Publication number | Publication date |
---|---|
CN112363761B (en) | 2022-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102591947B (en) | For the index that the quick of data deduplication and low RAM take | |
CN1656457A (en) | System and method for managing native application data | |
JP5039954B2 (en) | System and method for indirectly accessing control device data using tag name recorded in character string tag | |
CN102541521B (en) | Automatic operating instruction generating device based on structured query language and method | |
CN111399777A (en) | Differentiated key value data storage method based on data value classification | |
US8495567B2 (en) | Transferring annotations across versions of the data | |
US20090089231A1 (en) | Adaptive industrial systems via embedded historian data | |
CN101763894A (en) | Semiconductor storage device and storage controlling method | |
CN1760875A (en) | Transparent migration of files among various types of storage volumes based on file access properties | |
CN1877543A (en) | Data-driven automatic testing system and method | |
CN101059695A (en) | Programmatic access to controller construct and variable names | |
EP4075213B1 (en) | Method and system for generating engineering programs for an industrial domain | |
US7711891B1 (en) | Method, system, and computer-readable medium for updating memory devices in a computer system | |
CN113064703B (en) | Batch downloading configuration method oriented to multiple operation cycles | |
CN101419838B (en) | Method for prolonging using life of flash | |
CN112363761B (en) | Algorithm page variable reference method supporting dynamic relocation | |
CN112596918B (en) | Method and memory device for sharing variable among programs in system | |
CN117667932A (en) | Method and system for customizing and converting storage format of vector database | |
CN114625713A (en) | Metadata management method and device in storage system and storage system | |
CN102789483A (en) | Data verification method, device and system | |
CN101986311B (en) | Method for buffering node elements when rapidly processing large-scale XML file | |
CN114896250B (en) | Key value separated key value storage engine index optimization method and device | |
CN115509446A (en) | Metadata garbage identification method, device and equipment | |
CN100357910C (en) | Keyword driving havigation method | |
CN101206617B (en) | Data storage method of flash memory |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |