Variable online value setting method based on memory verification and related device

By performing memory verification on debugging data and local data during the online value setting process of thermal power set, the data consistency is ensured and the value is set, which solves the problems of the intermediate value failure and point misalignment in the existing technology, and improves the value setting security and real-time.

CN119398406AActive Publication Date: 2025-02-07XIAN THERMAL POWER RES INST CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411446777.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-07
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The existing online value setting scheme has problems such as failure or misalignment of value setting during the configuration design, debugging and operation of thermal power units, resulting in safety hazards.

Method used

The online value setting method of variables based on memory verification is used. By comparing the debugging data and local data one by one in the upper computer memory, the data consistency is ensured before the online value setting is performed.

Benefits of technology

It improves the safety, reliability and real-timeness of online value setting, avoids value setting errors caused by inconsistent measurement point models, and reduces the risk of equipment mismoval and casualties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398406A_ABST
    Figure CN119398406A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of automatic control of thermal power generating units, and discloses a variable online value setting method based on memory verification and a related device. The variable online value setting method comprises the following steps: acquiring debugging data and local data of a variable to be subjected to online value setting, and caching the debugging data and the local data in a memory of an upper computer; in a memory of the upper computer, the debugging value data type, the on-line offset and the on-line page number of the variable in the debugging data are compared with the local data type, the local offset and the local page number of the variable in the local data one by one, and when the three are completely consistent, the debugging value data type, the on-line offset and the on-line page number of the variable in the debugging data and the local data type, the local offset and the local page number of the variable in the local data are not consistent; and performing on-line value setting on the variable to be subjected to on-line value setting. According to the technical scheme disclosed by the invention, the problem of value setting failure or value setting point dislocation caused by inconsistent measuring point models of the upper computer and the lower computer can be avoided, and the safety, reliability and real-time performance of online value setting can be improved to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of automatic control of thermal power units, and in particular relates to a variable online value setting method based on memory verification and a related device. Background Art

[0002] The online value setting technology of DCS (distributed control system) variables (for example, such as measuring points or function blocks, etc.) has important engineering application value in the configuration design, commissioning and operation of thermal power units. Specifically, in the configuration design stage of thermal power units, engineers can use the above-mentioned online value setting technology to conduct modular testing and verification of the control configuration according to the subsystem control logic division; in the commissioning stage of thermal power units, engineers can use the above-mentioned online value setting technology to complete the control system parameter setting and process control system coordination optimization given the output and input signals of the field equipment, and improve the power generation efficiency of the generator set; in the operation stage of thermal power units, operation and maintenance personnel can use the above-mentioned online value setting technology to force the input and output measuring points of the core equipment in the faulty subsystem to ensure the safe operation of the field equipment in the event of equipment maintenance or control system failure.

[0003] In the above-mentioned thermal power unit configuration design, thermal power unit commissioning and each stage of thermal power unit operation, the real-time and safety of variable setting are extremely important. The current existing online setting scheme needs to further improve the safety, reliability and real-time performance of online setting. Explanatory example, in the existing technical scheme, all measuring points are sorted according to the measuring point attributes and the POU (program organization unit) index order to which the measuring points belong and abstracted into a debugging data array; when setting the value, the POU index and measuring point offset to which the measuring point belongs are calculated in the host computer, and the POU index, measuring point offset, measuring point type and the value to be set calculated by the host computer are sent to the controller through the network communication package. The controller searches for the corresponding measuring point in the memory according to the received POU index and measuring point offset, and forces the setting; the above-mentioned existing online setting scheme is one-way and lacks completeness. The safety verification mechanism will cause the setting failure or the setting point misalignment problem when the measuring point models of the upper and lower controllers are inconsistent (explanatory point model is a general term, including IO measuring points (input and output measuring points, also known as hard measuring points) and global variable measuring points (also known as soft measuring points); the structures of soft and hard measuring points in the memory are slightly different. Inconsistent measuring point models mean that the measuring point configurations of the upper and lower computers are different, such as the upper computer has 10 measuring points and the lower computer has 8 measuring points; or the types of measuring points of the upper and lower computers are inconsistent), which poses a great safety hazard (such as unit malfunction, etc.). Summary of the invention

[0004] The purpose of the present invention is to provide a method and related device for online variable setting based on memory verification to solve one or more of the above-mentioned technical problems. The technical solution provided by the present invention provides a verification mechanism, which can avoid the setting failure or setting point misalignment caused by inconsistent measurement point models of the upper computer and the lower computer, and can improve the safety, reliability and real-time performance of online setting to a certain extent.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for online variable value setting based on memory verification, comprising the following steps: Obtaining debugging data of the variable to be set online, and caching it in the memory of the host computer; wherein the debugging data comes from the lower computer controller corresponding to the host computer; the debugging data includes the debugging value data type of the variable, the online offset of the variable, and the online page number of the variable; Acquire the local data of the variable to be set online, and cache it in the memory of the host computer; wherein the local data comes from the host computer, and the local data includes the local data type of the variable, the local offset of the variable, and the local page number of the variable; In the memory of the host computer, the debug value data type of the variable in the debug data, the online offset of the variable, and the online page number of the variable are compared one by one with the local data type, the local offset of the variable, and the local page number of the variable in the local data. When the three are completely consistent, the variable to be set online is set online.

[0006] A further improvement of the present invention is that The online offset of the variable is calculated by the lower computer controller according to the memory tight arrangement offset algorithm; wherein, in the memory tight arrangement offset algorithm, the lower computer controller arranges the variable data downloaded from the upper computer in the memory in a byte-aligned manner; the bytes occupied by different types of variables are accumulated in sequence, and when the bytes are accumulated to the variable whose online offset is to be calculated, the number of bytes obtained by the accumulated calculation is the online offset of the variable.

[0007] A further improvement of the present invention is that When the variable to be set online is a function block, the debugging data includes the debugging value data type, online offset and online page number of the logic page where the function block is located; When the variable to be set online is a measuring point, the debugging data includes the debugging value data type, online offset and online page number of the card where the measuring point is located.

[0008] A further improvement of the present invention is that When the variable to be set online is a function block, the local data includes the page number where the function block is located, the instance name of the function block, and the offset value of the function block; When the variable to be set online is a measuring point, the local data includes the type of the measuring point, the page number where the measuring point is located, and the offset value of the measuring point.

[0009] A further improvement of the present invention is that The calculation steps of the local offset of the variable are as follows: traverse all variable nodes according to the arrangement order of the variables in the local configuration of the host computer, and the variable i The local offset of +1 is variable 1 to variable i The cumulative sum of the number of attributes of all variables.

[0010] A further improvement of the present invention is that In the memory of the host computer, the debug value data type of the variable, the online offset of the variable, and the online page number of the variable in the debug data are compared one by one with the local data type, the local offset of the variable, and the local page number of the variable in the local data, and the comparison and verification are performed one by one in byte order.

[0011] A further improvement of the present invention is that When the three are completely consistent, in the process of online setting of the variable to be set online, the step of online setting of the variable to be set online includes: The variable setting data, the data type of the variable setting data, the page number of the variable and the offset information of the variable are packaged into structure data through the configuration software, and output and sent to the lower computer controller.

[0012] A second aspect of the present invention provides a variable online value setting system based on memory verification, comprising: A debugging data acquisition and storage module, used to acquire debugging data of variables to be set online, and cache them in the memory of the host computer; wherein the debugging data comes from the lower computer controller corresponding to the host computer; the debugging data includes the debugging value data type of the variable, the online offset of the variable, and the online page number of the variable; A local data acquisition and storage module, used to acquire the local data of the variable to be set online, and cache it in the memory of the host computer; wherein the local data comes from the host computer, and the local data includes the local data type of the variable, the local offset of the variable, and the local page number of the variable; The comparison and setting module is used to compare the debug value data type, online offset and online page number of the variable in the debug data with the local data type, local offset and local page number of the variable in the local data in the memory of the host computer. When the three are completely consistent, the variable to be set online is set online.

[0013] According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for online variable setting based on memory verification as described in any one of the first aspect of the present invention is implemented.

[0014] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for online variable setting based on memory verification as described in any one of the first aspect of the present invention is implemented.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention specifically discloses a method for online variable setting, which is a method for requesting debugging data from a lower computer controller. Before online setting, the local data information of the variable to be set online (interpretatively, obtained based on the upper computer configuration) is compared one by one with the debugging data information (interpretatively, obtained based on the lower computer controller corresponding to the upper computer). Online setting is performed only when the comparison is consistent; the present invention ensures the accuracy, reliability and real-time performance of online setting through a pre-checking process. In summary, the method provided by the present invention performs online setting only after strict verification, avoiding the occurrence of setting failure or setting point misalignment caused by inconsistent measurement point models of the upper computer and the lower computer controller, avoiding the risk of malfunction of field equipment caused by setting errors and thus causing damage to field equipment or casualties, ensuring the safety of user setting, and having great engineering application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below; obviously, the drawings described below are some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 It is a flowchart of a method for online variable value setting based on memory verification in an embodiment of the present invention.

[0018] Figure 2It is a schematic diagram of the overall flow of a method for online variable setting based on memory verification in a specific embodiment of the present invention.

[0019] Figure 3 It is a schematic diagram of an online variable value setting system based on memory verification in an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] See also Figure 1 In an embodiment of the present invention, a method for setting a variable online based on memory verification is provided, comprising the following steps: Step 1, obtaining the debugging data of the variable to be set online, and caching it in the memory of the upper computer; wherein the debugging data comes from the lower computer corresponding to the upper computer; the debugging data includes the debugging value data type of the variable, the online offset of the variable and the online page number of the variable; in a specific exemplary implementation scheme, the upper computer can request the debugging data from the lower computer according to the variable name; further exemplary, the online offset of the variable is calculated by the lower computer according to the memory close arrangement offset algorithm; Explanatory, there is a one-to-one correspondence between the controller in the upper computer configuration and the lower computer (actual physical controller). For example, if there is a controller 1001 in the configuration, there must be an actual physical controller numbered 1001 so that the control logic of the controller 1001 in the configuration software can be downloaded to the actual physical controller 1001 for operation; Explanatory, the memory close arrangement offset algorithm is that the lower computer controller arranges the variable data downloaded from the upper computer in the memory in a byte-aligned manner, and then accumulates the bytes occupied by different types of variables in sequence. When the number of bytes accumulated to the required variable is the online offset calculated by the controller; Step 2, obtaining the local data of the variable to be set online, and caching it in the memory of the host computer; wherein the local data comes from the host computer, and the local data includes the local data type of the variable, the local offset of the variable, and the local page number of the variable; Step 3, in the memory of the host computer, the debug value data type of the variable in the debug data obtained in step 1, the online offset of the variable, and the online page number of the variable are compared one by one with the local data type, local offset, and local page number of the variable in the local data obtained in step 2. When the three are completely consistent, the variable to be set online is set online.

[0022] In the variable online setting method provided by the embodiment of the present invention, a method of requesting debugging data from the lower computer controller is adopted. Before online setting, the local data information of the variable to be set online is compared with the debugging data information one by one. Only when the comparison is consistent is the online setting performed, and the accuracy, reliability and real-time performance of the online setting are guaranteed through the pre-verification process. Further explanatory, the technical solution of the embodiment of the present invention avoids the occurrence of setting failure or setting point misalignment caused by inconsistent measurement point models of the upper computer and the lower computer, and can avoid the risk of malfunction of field equipment due to setting errors, thereby causing damage to field equipment or casualties.

[0023] In one embodiment of the present invention, in step 1, when the variable to be set online is a function block, the debugging data is the debugging value data type, online offset and online page number of the logical page where the function block is located; when the variable to be set online is a measuring point, the debugging data is the debugging value data type, online offset and online page number of the card where the measuring point is located.

[0024] In one embodiment of the present invention, in step 2, when the variable to be set online is a function block, the local data is the page number where the function block is located, the function block instance name (i.e., a unique name) and the offset value of the function block; when the variable to be set online is a measuring point, the local data is the type of the measuring point, the page number where the measuring point is located and the offset value of the measuring point.

[0025] In one embodiment of the present invention, in step 2, the calculation step of the local offset of the variable is to traverse all nodes according to the arrangement order of the variables in the local configuration, assuming that the variable i The number of attributes I , then the variable i The local offset of +1 is variable 1 to variable i The sum of the number of attributes of all variables; among them, i = I .

[0026] Specifically, for example, the variablei The calculation expression of the local offset of +1 is, ; In the formula, i =1,2,3…, indicating the i variables, t Indicates t variables, 1 ≤ t ≤ i ; Indicates t The number of attributes of a variable.

[0027] In one embodiment of the present invention, in step 3, when comparing in the memory, the comparison and verification are performed one by one in byte order.

[0028] Specifically, in embedded systems or host computer applications, the comparison and verification between debug data and local data can ensure the accuracy and consistency of data; when it comes to the debug value data type of the variable, the online offset (i.e. the location of the variable in the target memory) and the online page number, the steps of comparing and verifying one by one in byte order may include: Step 1) ensures that the data is aligned to the correct byte boundary before comparison; explanatory, different data types (byte, word, double word, etc.) have different alignment requirements.

[0029] Step 2) Compare the data types of variables in the debug data and local data to see if they are the same; interpretatively, the data type determines how the data is interpreted and the byte order. If the data types are different, the comparison result may be meaningless.

[0030] Step 3), for debug data and local data, the absolute memory address of the variable is calculated based on the offset and page number; interpreted, the page number and offset are usually used to determine the location of the variable in physical memory; in a local environment, the page number may not be directly relevant, but the local offset can be used to determine the location of the variable in a data structure or memory block.

[0031] Step 4) Before comparing data, ensure that the data is interpreted in the correct byte order; compare the variable values ​​in the debug data and local data byte by byte according to the data type and byte order. Specifically, for fixed-size data types such as bytes, words, and double words, the comparison can be made directly in byte order. For variable-length data types (such as strings), ensure that the length is also the same, and then compare the contents byte by byte.

[0032] Step 5), for each variable, record the result of the comparison (match or mismatch).

[0033] In one embodiment of the present invention, in step 3, when the three are completely consistent, the step of setting the variable to be set online includes: After the verification is passed, the variable setting data, the data type of the variable setting data, the variable page number and the variable offset information can be packaged into structure data through the configuration software, and output to the lower computer controller; To explain further, after receiving the setting data, the lower controller parses and sets the value.

[0034] The technical solution of the embodiment of the present invention can avoid the occurrence of setting errors caused by inconsistency between local data and debugging data through verification, thereby avoiding controller erroneous output and field equipment malfunction.

[0035] See also Figure 2 In a specific embodiment of the present invention, a method for setting a variable online based on memory verification is provided, comprising the following steps: Request data message from the lower computer controller; if timeout occurs, end the online setting of variables and prompt an error; if timeout does not occur, parse the message data, obtain debugging data, and set the data update flag and data update time; In a specific exemplary solution, the step of requesting a data message from a lower computer controller may specifically include: Step 1.1, when the upper computer is online, it sends a message to the lower computer controller at a time interval of period T to request the test point debugging data; explanatory, debugging data refers to the real-time operation data of the controller; real-time operation data refers to the intermediate data and operation results generated when the controller executes the specific operation logic according to the input; Step 1.2, the host computer receives the reply message and splits and parses the data of the reply message to obtain the debugging data of the measuring point model in the memory of the lower computer controller; wherein, the reply message is the measuring point model data reply message sent by the lower computer controller according to the message of step 1, and the message data is split and parsed according to the private protocol predefined by the host computer and the lower computer to obtain the debugging data, which is temporarily stored in the memory of the host computer, and the periodic timer in step 1.1 is stopped; Step 1.3: within each time interval, if the reply message in step 1.2 is parsed successfully, the data update flag d_flag and the data update time d_time are updated.

[0036] Obtain the setting point information, verify the data update flag and data update time, and perform online setting based on the verification results; if any verification fails, the variable online setting is terminated and an error is prompted; if all verifications are successful, a setting message is sent; In a specific exemplary solution, the step of obtaining the setting point information, verifying the data update flag, the data update time and the IEC data, and performing online setting based on the verification result may specifically include: Step 2.1, obtaining information of the variable to be set, including: the online offset and local offset value of the variable; Step 2.2, first determine the data update flag d_flag, if the flag is in the reset state, then end the online variable setting and prompt an error; if the data update flag d_flag meets the requirements (explanatory, if the data parsing is successful, d_flag is updated to true, if the data parsing fails, d_flag is updated to false, and only when d_flag is true can the requirements be met), then further determine the data update time, if the difference between the current update time of the debugging data and the last update time exceeds two data update cycles, then the current debugging data is considered to be too old and not real-time. At this time, the flag bit of the number of times the upper and lower data are inconsistent is increased by 1, and the same judgment is made in the next cycle. If the number of inconsistent flag bits is greater than or equal to 3, then the test considers that the upper and lower data are inconsistent for a long time, the test verification fails, and the setting cannot be performed; specifically, exemplarily, when determining the data update time, the upper computer first obtains the current system time cur_time, and then determines the time difference between the lower computer controller updating the debugging data of the measuring point model. If cur_time – d_time ≥ 2*T, it means that the debugging data at this time is not the latest data, and it cannot be guaranteed that the measuring point model in the memory of the lower computer controller is consistent with the measuring point model in the configuration data of the upper computer. The model inconsistency count flag d_mismatch is increased by 1; the counting flag is judged. If d_mismatch<3, the periodic timer is started to re-acquire the debugging data. If d_mismatch≥3, the program directly returns an error message to prompt the user that the measuring point model data update failed. Recheck the connection status of the upper and lower computers. If cur_time-d_time<2*T, it is considered that the current measuring point model data of the upper computer is completely consistent with the measuring point model data in the controller memory and jump to step 2.3.

[0037] Step 2.3, read the number of debugging data of the internal measuring point of the lower computer controller and record it as data_1 (data_1 is the first data number).

[0038] Specifically and exemplarily, the number of attributes of the variables of the global variable measuring point model in the upper computer configuration is calculated, and data_2=0 (data_2 is the second data number) is recorded. The global variables in the measuring point model are traversed to determine the type of the variable. If the measuring point type is a switch quantity, data_2 = data_2 + DIGIT_IECCOUNT (number of switch quantity attributes); if the measuring point type is an analog quantity, data_2 = data_2 + ANALOGY_IECCOUNT (number of analog quantity attributes); if the measuring point type is an integer quantity, data_2 = data_2 + INTEGER_IECCOUNT (number of integer quantity attributes); Calculate the number of attributes of the IO hard test point model in the upper computer configuration, data_3=0 (data_3 is the third data number), traverse the hard test points in the test point model, and determine the type of the test point. If the type of the test point is switch quantity, data_3 =data_3 + DIGIT_IO_IECCOUNT (number of switch quantity attributes); if the type of the test point is analog quantity, data_3=data_3 + ANALOG_IO_IECCOUNT (number of analog quantity attributes); explanatory, data_3 = data_3 + DIGIT_IO_IECCOUNT means adding the number of analog quantity or switch quantity attributes to the number data_3, which is actually the process of accumulating the number of variable attributes according to the variable type; The number of variables of the function block in the logic page in the computer host configuration, record data_4=0 (data_4 is the fourth data number), traverse the function blocks in the logic page, the offset of function block i is equal to the number of variables of the previous i-1 function blocks, plus the number of variables of the current function block, and the final total is saved using variable data_4.

[0039] Determine whether the number of measuring point models of the upper and lower computers is consistent; if data_1 ≠ data_2+data_3+data_4, it means that there is inconsistency in the measuring point model data between the upper and lower computers. At this time, the user's online value setting operation is rejected, and a prompt message is given to prompt the user to synchronize the upper and lower configuration data first to keep the measuring point model consistent. If data_1=data_2+data_3+data_4, it means that the measuring point model data in the upper and lower computers are completely consistent. At this time, it is safe to perform online value setting operations, and users are allowed to perform online value setting operations.

[0040] In the technical solution provided by the embodiment of the present invention, verification is performed before online value setting. The value setting data can be sent to the controller only after the verification is passed, otherwise it will not be sent; this ensures that the value setting data is sent to the controller only when the upper and lower bits are consistent, avoiding the value setting data being forced to be set to the wrong variable and causing erroneous output. In the technical solution of the embodiment of the present invention, the verification ensures that the upper and lower bits are completely consistent, avoiding value setting errors; in addition, by requesting data periodically in real time, the efficiency of the value setting process is guaranteed.

[0041] To explain the term, the configuration tool is a tool provided to users for logic configuration (it can also be called a part of the host computer). The logic diagram is the basic unit for configuration design. A logic diagram (logic page) contains multiple interconnected function blocks. The connection relationship and connection order between the function blocks represent the actual operation order of the logic configuration. Among the function blocks, there is a type of output function block, which is mainly responsible for converting the value passed to it into an actual electrical signal output. In a logic diagram, this type of output function block is generally connected to other operation parts of the configuration, obtains the value of the operation, and converts it into an analog quantity or a switch electrical signal for output.

[0042] The following are device embodiments of the present invention, which can be used to implement the method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.

[0043] See also Figure 3 In an embodiment of the present invention, a variable online value setting system based on memory verification is provided, comprising: A debugging data acquisition and storage module, used to acquire debugging data of variables to be set online, and cache them in the memory of the host computer; wherein the debugging data comes from the lower computer controller corresponding to the host computer; the debugging data includes the debugging value data type of the variable, the online offset of the variable, and the online page number of the variable; A local data acquisition and storage module, used to acquire the local data of the variable to be set online, and cache it in the memory of the host computer; wherein the local data comes from the host computer, and the local data includes the local data type of the variable, the local offset of the variable, and the local page number of the variable; The comparison and setting module is used to compare the debug value data type, online offset and online page number of the variable in the debug data with the local data type, local offset and local page number of the variable in the local data in the memory of the host computer. When the three are completely consistent, the variable to be set online is set online.

[0044] In one embodiment of the present invention, a computer device is provided, the computer device includes a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used to perform the operation of the variable online setting method based on memory verification.

[0045] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the variable online value setting method based on memory verification in the above embodiment.

[0046] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0047] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0048] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0049] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A variable online value setting method based on memory verification, characterized in that: The following steps are involved: Obtaining debugging data of the variable to be set online, and caching it in the memory of the host computer; wherein the debugging data comes from the lower computer controller corresponding to the host computer; the debugging data includes the debugging value data type of the variable, the online offset of the variable, and the online page number of the variable; Acquire the local data of the variable to be set online, and cache it in the memory of the host computer; wherein the local data comes from the host computer, and the local data includes the local data type of the variable, the local offset of the variable, and the local page number of the variable; In the memory of the host computer, the debug value data type of the variable in the debug data, the online offset of the variable, and the online page number of the variable are compared one by one with the local data type, the local offset of the variable, and the local page number of the variable in the local data. When the three are completely consistent, the variable to be set online is set online.

2. According to the method for online variable setting based on memory verification of claim 1, it is characterized in that: The online offset of the variable is calculated by the lower computer controller according to the memory tight arrangement offset algorithm; wherein, in the memory tight arrangement offset algorithm, the lower computer controller arranges the variable data downloaded from the upper computer in the memory in a byte-aligned manner; the bytes occupied by different types of variables are accumulated in sequence, and when the bytes are accumulated to the variable whose online offset is to be calculated, the number of bytes obtained by the accumulated calculation is the online offset of the variable.

3. The method for online variable setting based on memory verification according to claim 1, characterized in that: When the variable to be set online is a function block, the debugging data includes the debugging value data type, online offset and online page number of the logic page where the function block is located; When the variable to be set online is a measuring point, the debugging data includes the debugging value data type, online offset and online page number of the card where the measuring point is located.

4. The method for online variable setting based on memory verification according to claim 1, characterized in that: When the variable to be set online is a function block, the local data includes the page number where the function block is located, the instance name of the function block, and the offset value of the function block; When the variable to be set online is a measuring point, the local data includes the type of the measuring point, the page number where the measuring point is located, and the offset value of the measuring point.

5. The method for online variable setting based on memory verification according to claim 1, characterized in that: The calculation steps of the local offset of the variable are as follows: traverse all variable nodes according to the arrangement order of the variables in the local configuration of the host computer, and the variable i The local offset of +1 is variable 1 to variable i The cumulative sum of the number of attributes of all variables.

6. The method for online variable setting based on memory verification according to claim 1, characterized in that: In the memory of the host computer, the debug value data type of the variable, the online offset of the variable, and the online page number of the variable in the debug data are compared one by one with the local data type, the local offset of the variable, and the local page number of the variable in the local data, and the comparison and verification are performed one by one in byte order.

7. The method for online variable setting based on memory verification according to claim 1, characterized in that: When the three are completely consistent, in the process of online setting of the variable to be set online, the step of online setting of the variable to be set online includes: The variable setting data, the data type of the variable setting data, the page number of the variable and the offset information of the variable are packaged into structure data through the configuration software, and output and sent to the lower computer controller.

8. A variable online value setting system based on memory verification, characterized in that: include: A debugging data acquisition and storage module, used to acquire debugging data of variables to be set online, and cache them in the memory of the host computer; wherein the debugging data comes from the lower computer controller corresponding to the host computer; the debugging data includes the debugging value data type of the variable, the online offset of the variable, and the online page number of the variable; A local data acquisition and storage module, used to acquire the local data of the variable to be set online, and cache it in the memory of the host computer; wherein the local data comes from the host computer, and the local data includes the local data type of the variable, the local offset of the variable, and the local page number of the variable; The comparison and setting module is used to compare the debug value data type, online offset and online page number of the variable in the debug data with the local data type, local offset and local page number of the variable in the local data in the memory of the host computer. When the three are completely consistent, the variable to be set online is set online.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for online variable setting based on memory verification as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for online variable setting based on memory verification as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Variable debugging method of embedded program dynamic storage allocation

    CN103136107A

  • DCS real-time value setting method and system, equipment and storage medium

    CN113671924A

  • Debugging data refreshing method and system for distributed control system

    CN113741410A

  • Automobile MCU program upgrading method and system based on CANFD

    CN117632194A

  • Data Acquisition Method and Apparatus, Calculation Device, and Storage Medium

    US20240273119A1