CN112363761B - Algorithm page variable reference method supporting dynamic relocation - Google Patents

Algorithm page variable reference method supporting dynamic relocation Download PDF

Info

Publication number
CN112363761B
CN112363761B CN202011239320.4A CN202011239320A CN112363761B CN 112363761 B CN112363761 B CN 112363761B CN 202011239320 A CN202011239320 A CN 202011239320A CN 112363761 B CN112363761 B CN 112363761B
Authority
CN
China
Prior art keywords
data
judging
source
invalid
analog quantity
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
CN202011239320.4A
Other languages
Chinese (zh)
Other versions
CN112363761A (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.)
NR Engineering Co Ltd
Xian Thermal Power Research Institute Co Ltd
Original Assignee
NR Engineering Co Ltd
Xian Thermal Power Research Institute 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 NR Engineering Co Ltd, Xian Thermal Power Research Institute Co Ltd filed Critical NR Engineering Co Ltd
Priority to CN202011239320.4A priority Critical patent/CN112363761B/en
Publication of CN112363761A publication Critical patent/CN112363761A/en
Application granted granted Critical
Publication of CN112363761B publication Critical patent/CN112363761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields
    • G06F9/30149Instruction analysis, e.g. decoding, instruction word fields of variable length instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/34Addressing 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 be used for classified 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 instance name, the reference cannot be carried out when the instance names are inconsistent, and if the configuration is changed, a traversal search method is adopted, and the reference failure is judged when the search fails. 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

Algorithm page variable reference method supporting dynamic relocation
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 for data of a 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 type): 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 a 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 switching value, the floating point analog quantity and the integer analog quantity, 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 has changed, if not, directly judging the matching of the data of the reference end and the source end, if so, judging the data is invalid and the reference fails, if so, searching whether the source end data meeting the conditions is available for reference by adopting a traversal method, recording the offset of the instruction code, and if so, judging 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 quoted 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 for referencing algorithm page variables supporting dynamic relocation as claimed in claim 1, wherein: 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.
CN202011239320.4A 2020-11-09 2020-11-09 Algorithm page variable reference method supporting dynamic relocation Active CN112363761B (en)

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 CN112363761A (en) 2021-02-12
CN112363761B true 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744495A (en) * 2004-09-01 2006-03-08 英华达(上海)电子有限公司 Method for detecting user condition language address legality
US7523450B2 (en) * 2004-11-15 2009-04-21 International Business Machines Corporation Apparatus, system, and method for identifying fixed memory address errors in source code at build time
KR100678926B1 (en) * 2006-01-05 2007-02-06 삼성전자주식회사 System and method for managing log information
JP2015179326A (en) * 2014-03-18 2015-10-08 株式会社東芝 Data transfer device, data transfer method, and computer program
CN111651640B (en) * 2020-05-29 2022-07-22 南京南瑞继保电气有限公司 Cross indexing method, device, computer storage medium and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN112363761A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
JP5039954B2 (en) System and method for indirectly accessing control device data using tag name recorded in character string tag
CN101763894B (en) Semiconductor storage device and storage controlling method
US5819282A (en) Database generator
CN102541521B (en) Automatic operating instruction generating device based on structured query language and method
CN1656457A (en) System and method for managing native application data
US8495567B2 (en) Transferring annotations across versions of the data
CN111399777A (en) Differentiated key value data storage method based on data value classification
CN1577268A (en) Shared library system and method of building the system
CN1760875A (en) Transparent migration of files among various types of storage volumes based on file access properties
CN101059695A (en) Programmatic access to controller construct and variable names
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
CN1533540A (en) Method and system for reorganizing table wpace in a database
CN113741411B (en) Generation method and system of global variable point product file of distributed control system
CN114896250B (en) Key value separated key value storage engine index optimization method and device
CN100357910C (en) Keyword driving havigation method
CN1280721C (en) Method of identifying big or small memory of imbedded system
JP4327669B2 (en) Cache apparatus and method
Maxwell et al. Comparison of alternatives for the representation of data items values in an information system
CN1010715B (en) In virtual storage system, carry out the apparatus and method of page frame replacement
CN106484630A (en) The Memory Controller of the access method of flash memory and correlation and electronic installation
CN114911876B (en) Distributed computing method for realizing digital energy management system
KR102644229B1 (en) Device and Method for Profiling 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