A method for online checking of a function block based on a compiled implant signature
By parsing the source code of function blocks to generate model structures and CRC values, and embedding the CRC values for online verification, the problem of inconsistent function block definitions between the host computer and the slave computer is solved, and the verification efficiency and accuracy of configuration tools and controllers are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NARI TECH CO LTD
- Filing Date
- 2022-10-25
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies cannot effectively guarantee the consistency of function block definitions between the host computer and the slave computer, resulting in differences between the function blocks in the configuration tool and the controller, which poses security risks, and existing methods are inefficient.
The model structure information and CRC value are generated by parsing the source code of the function block. The function block file is generated offline, and the CRC value is embedded during the compilation process. The actual function blocks in the controller are compared online, and the CRC value is used for fast consistency verification.
It improves the efficiency and accuracy of function block file generation, reduces the amount of online comparison calculations, improves the efficiency of function block and page comparison, and ensures the consistency between the configuration tool and the function blocks in the controller.
Smart Images

Figure CN115640014B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to visual configuration, and in particular to an online verification method for function blocks based on compiled and implanted feature codes. Background Technology
[0002] During the visualization configuration process, multiple developers may modify or download function blocks in the same configuration. If function blocks are modified but not downloaded to the controller, discrepancies may occur between the configuration tool and the controller. If these discrepancies are not detected before the visualization configuration is put into operation, they may pose security risks to the entire visualization configuration.
[0003] During configuration and debugging, engineers often need to compare the functional blocks in the configuration tool and the controller to perform debugging work. Online functional block comparison can visually demonstrate the differences between the functional blocks in the configuration tool and the controller, which is of great significance for improving configuration and debugging efficiency and eliminating potential safety hazards.
[0004] The closest prior art to this invention is the patent "A Method and System for Online Configuration Comparison of Distributed Control Systems" (Xi'an Thermal Power Research Institute Co., Ltd., Nanjing NARI Relay Protection & Automation Co., Ltd., CN 113759859 A), which involves uploading the logic configuration page to be compared from the lower-level machine (controller) to the upper-level machine (configuration tool), and then comparing the configuration by comparing the functional blocks and connection lines based on the most basic data storage structure of the logic configuration page.
[0005] The disadvantages of existing technologies are as follows:
[0006] 1. Existing technologies mainly compare the consistency of page logic composed of functional blocks, but cannot guarantee the consistency between the definition of functional blocks referenced by the host computer and the definition of functional blocks called by the slave computer.
[0007] 2. In actual configuration and debugging, engineers only need to understand the overall differences between the upper and lower level machines in the entire configuration project. That is, the similarities and differences between each logical configuration page and each functional block. Then, according to the debugging needs, further analyze the detailed differences between different logical configuration pages and different functional blocks. Identical pages and functional blocks do not require further detailed comparison. Existing technology performs detailed comparisons of all functional block pairs based on instance name, description, memory variables, and intermediate variables, which is very inefficient.
[0008] 3. Functional blocks of the same type share the same abstract model containing structural information such as function block names and interfaces; only the instantiation portion, containing configuration information, differs. Therefore, for comparing function block levels, only the abstract model portions of the corresponding functional blocks in the configuration tool and controller need to be compared. For comparing page levels, the abstract model portions of functional blocks of the same type only need to be calculated and compared once; only the instantiation portions require separate calculation and comparison for each functional block. Existing technology calculates and compares both the abstract model portions and instantiation portions of all functional blocks, resulting in very low comparison efficiency. Summary of the Invention
[0009] Purpose of the invention: The purpose of this invention is to provide an online verification method for function blocks based on compiled and implanted feature codes, thereby enabling online verification of the consistency between function blocks in the configuration tool and the corresponding function blocks actually scheduled and run in the controller.
[0010] Technical solution: The present invention provides an online verification method for function blocks based on compiled and implanted feature codes, comprising the following steps:
[0011] (1) Steps for preparing the host computer: By parsing the function block source code file, an offline function block file (xml description) for configuration programming by the configuration tool is generated; the function block file contains the model structure information of the function block obtained by parsing the source code file and the CRC value of this part of the information; by connecting and configuring the function blocks, an offline page file that can realize the specified operation and control functions is generated.
[0012] (2) Steps for preparing the lower-level machine: During the process of compiling the executable file of the function block, establish a one-to-one correspondence table between the .o file of each function block and its CRC value, and send it to the controller together with the executable file of the function block;
[0013] (3) Steps for online comparison of function blocks: The configuration tool sends the page file to the controller online. The controller parses all function block instances in the page file and compares the CRC value of the function block model corresponding to each function block instance with the CRC value of the corresponding function block actually scheduled and run in the controller. If there is any inconsistency, the controller returns the difference information and displays it on the configuration tool.
[0014] The specific steps (1) are as follows:
[0015] (1.1) Develop the function block source code .c file according to the function block programming specification;
[0016] (1.2) The configuration tool parses the key structural information of the function block from the source code file of the function block according to the function block programming specification. The key structural information includes name, description, input / output / parameter / control interface;
[0017] (1.3) Calculate the CRC value of the key structure information of the functional block organized in XML format;
[0018] (1.4) Save the key structural information and CRC value of the function block to the function block's XML description file (.slf file) and add the file to the function block library of the configuration tool;
[0019] (1.5) Drag and drop function blocks from the function block library of the configuration tool into the configuration page to connect the inputs and outputs between function blocks; generate a configuration page that can realize the specified calculation and control functions by building the function blocks in a modular way.
[0020] Step (2) specifically involves:
[0021] (2.1) Define a global variable in the function block source code .c file. The variable name is the function block name plus the _FB_CRC suffix, and the value is assigned a non-zero value;
[0022] (2.2) Compile the function block source code .c file into an .o file (elf format);
[0023] (2.3) Calculate the CRC code of the function block using the same method as in steps (1.2) and (1.3);
[0024] (2.4) Parse the ELF file to obtain the address of the xxx_FB_CRC variable value in the .data data area, write the corresponding CRC value to that address, and realize the modification of the CRC value of the function block;
[0025] (2.5) Traverse all .o files in the source code directory and complete the CRC modification of all functional blocks;
[0026] (2.6) Link all .o files to generate a function block lib library file (lib file);
[0027] (2.7) Execute the Makefile that generates the executable file (bin file) to compile and link all the function block lib library files (lib files), and link all the .lib files to generate the final executable file (bin file);
[0028] (2.8) The generated .bin file is sent to an online controller for scheduling and execution.
[0029] Step (3) specifically involves:
[0030] (3.1) The configuration tool sends the page file to the controller online;
[0031] (3.2) The controller parses all function block instances from the page file and compares the CRC value of each function block instance with the corresponding function block actually scheduled and run in the controller; the specific comparison method is as follows:
[0032] (3.2.1) For a function block instance in the page, extract the CRC value of the function block from the function block model description in the page file;
[0033] (3.2.2) For the functional blocks that are actually scheduled and run in the controller, firstly, based on the name of the functional block library to which the functional block belongs, find the corresponding functional block lib library file in the controller from the scheduled .bin file; then, based on the name of the functional block, find the corresponding .o file from the functional block lib library file; finally, obtain the address of the xxx_FB_CRC variable value in the .data data area from the .o file, and obtain the CRC value of the functional block from the corresponding address in the .data data area;
[0034] (3.3) If there are inconsistent CRC values, the controller returns the difference information to the configuration tool, and the configuration tool displays the function block comparison results.
[0035] A computer storage medium storing a computer program, which, when executed by a processor, implements the above-described online verification method for function blocks based on compiled and implanted feature codes.
[0036] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described online verification method for function blocks based on compiled and implanted feature codes.
[0037] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0038] 1. This invention reads the source code file of a function block, parses out the function block's name, interface, and other definition information, and automatically generates a function block file, thus improving the efficiency and accuracy of generating function block files.
[0039] 2. This invention utilizes the CRC values of functional blocks to compare their similarities and differences, reducing the computational load of online functional block comparison and improving its efficiency; it also utilizes the CRC values of functional blocks to compare the model structures of functional blocks within a page, reducing the computational load of online page comparison and improving its efficiency.
[0040] 3. During the compilation process, this invention embeds the CRC value of the function block into the executable file of the function block, which is used for online CRC comparison with the corresponding function block in the page issued by the configuration tool. This enables online verification of the consistency between the function block in the configuration tool and the function block actually scheduled and run in the controller. Attached Figure Description
[0041] Figure 1 This is a flowchart of the steps of the present invention. Detailed Implementation
[0042] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0043] like Figure 1 As shown, an online verification method for function blocks based on compiled and implanted feature codes includes the following steps:
[0044] (1) Steps for preparing the host computer: By parsing the function block source code file, an offline function block file (xml description) for configuration programming by the configuration tool is generated; the function block file contains the model structure information of the function block obtained by parsing the source code file and the CRC value of this part of the information; by connecting and configuring the function blocks, an offline page file that can realize the specified operation and control functions is generated.
[0045] The specific steps (1) are as follows:
[0046] (1.1) Develop the function block source code .c file according to the function block programming specification;
[0047] (1.2) The configuration tool parses the key structural information of the function block from the source code file of the function block according to the function block programming specification. The key structural information includes name, description, input / output / parameter / control interface;
[0048] (1.3) Calculate the CRC value of the key structure information of the functional block organized in XML format;
[0049] (1.4) Save the key structural information and CRC value of the function block to the function block's XML description file (.slf file) and add the file to the function block library of the configuration tool;
[0050] (1.5) Drag and drop function blocks from the function block library of the configuration tool into the configuration page to connect the inputs and outputs between function blocks; generate a configuration page that can realize the specified calculation and control functions by building the function blocks in a modular way.
[0051] (2) Steps for preparing the lower-level machine: During the process of compiling the executable file of the function block, establish a one-to-one correspondence table between the .o file of each function block and its CRC value, and send it to the controller together with the executable file of the function block;
[0052] Step (2) specifically involves:
[0053] (2.1) Define a global variable in the function block source code .c file. The variable name is the function block name plus the _FB_CRC suffix, and the value is assigned a non-zero value;
[0054] (2.2) Compile the function block source code .c file into an .o file (elf format);
[0055] (2.3) Calculate the CRC code of the function block using the same method as in steps (1.2) and (1.3);
[0056] (2.4) Parse the ELF file to obtain the address of the xxx_FB_CRC variable value in the .data data area, write the corresponding CRC value to that address, and realize the modification of the CRC value of the function block;
[0057] (2.5) Traverse all .o files in the source code directory and complete the CRC modification of all functional blocks;
[0058] (2.6) Link all .o files to generate a function block lib library file (lib file);
[0059] (2.7) Execute the Makefile that generates the executable file (bin file) to compile and link all the function block lib library files (lib files), and link all the .lib files to generate the final executable file (bin file);
[0060] (2.8) The generated .bin file is sent to an online controller for scheduling and execution.
[0061] (3) Steps for online comparison of function blocks: The configuration tool sends the page file to the controller online. The controller parses all function block instances in the page file and compares the CRC value of the function block model corresponding to each function block instance with the CRC value of the corresponding function block actually scheduled and run in the controller. If there is any inconsistency, the controller returns the difference information and displays it on the configuration tool.
[0062] Step (3) specifically involves:
[0063] (3.1) The configuration tool sends the page file to the controller online;
[0064] (3.2) The controller parses all function block instances from the page file and compares the CRC value of each function block instance with the corresponding function block actually scheduled and run in the controller; the specific comparison method is as follows:
[0065] (3.2.1) For a function block instance in the page, extract the CRC value of the function block from the function block model description in the page file;
[0066] (3.2.2) For the functional blocks that are actually scheduled and run in the controller, firstly, based on the name of the functional block library to which the functional block belongs, find the corresponding functional block lib library file in the controller from the scheduled .bin file; then, based on the name of the functional block, find the corresponding .o file from the functional block lib library file; finally, obtain the address of the xxx_FB_CRC variable value in the .data data area from the .o file, and obtain the CRC value of the functional block from the corresponding address in the .data data area;
[0067] (3.3) If there are inconsistent CRC values, the controller returns the difference information to the configuration tool, and the configuration tool displays the function block comparison results.
[0068] Example:
[0069] S1 defines the following functional block programming conventions:
[0070] a. Declare a function block using `defineFunctionBlock`.
[0071] Example: defineFunctionBlock(p_fb,”and”);
[0072] Where p_fb is the starting address of the function block, and "and" is the name of the function block.
[0073] b. Use `defineFunctionBlockOut` to declare the output of a function block.
[0074] Example: defineFunctionBlockOut(p_fb,”out1”,”0”,”bool”);
[0075] Where p_fb is the starting address of the function block, "out1" is the name of the output channel, "0" is the sequence number of the output channel, and "bool" is the data type of the output channel.
[0076] c, use `defineFunctionBlockIn` to declare the input of a function block.
[0077] Example: defineFunctionBlockIn(p_fb,”in1”,”0”,”bool”,”1”);
[0078] Where p_fb is the starting address of the function block, "in1" is the name of the input channel, "0" is the sequence number of the input channel, "bool" is the data type of the input channel, and "1" is the default value of the input channel.
[0079] d. Use `defineFunctionBlockParameter` to declare a parameter of a function block.
[0080] Example: defineFunctionBlockParameter(p_fb,”para2”,”1”,”float”,“5.01”,”0”,“20.0”,“kV”);
[0081] Where p_fb is the starting address of the function block, "para2" is the name of the parameter channel, "1" is the sequence number of the parameter channel, "float" is the data type of the parameter channel, "5.01" is the default initial value of the parameter channel (which can be modified in the host computer configuration page), "0" is the minimum value of the parameter channel, "20.0" is the maximum value of the parameter channel, and "kV" is the unit of the parameter channel.
[0082] e. Use `defineFunctionBlockOperation` to declare the control command of a function block.
[0083] Example: defineFunctionBlockOperation(p_fb,"oper1","0","3","bool","int","float");
[0084] Where p_fb is the starting address of the function block, "oper1" is the name of the control command, "0" is the sequence number of the control command, "3" is the number of parameters contained in the control command, and "bool", "int", and "float" are the data types of the three parameters of the control command, respectively.
[0085] f, declare a constructor for a function block using the name + FunctionBlockNew.
[0086] Example: The function block is named "and", and its constructor is defined as FB_PUB*andFunctionBlockNew(FB_ARG*p_arg), that is, the constructor name is "name+FunctionBlockNew".
[0087] Then, in the implementation part of the constructor, declare the name, output, input, parameters and control of the function block in the order of a, b, c, d, e above.
[0088] Example of writing a constructor:
[0089]
[0090]
[0091] g. Declare a task function of a function block using the name + FunctionBlockRun. The task function of the function block performs the calculation of the specific algorithm logic.
[0092] S2, based on the functional block programming specifications agreed upon in step S1, writes a set of source code files (.c files) for a set of functional blocks that perform a certain type of operation, and stores them all in the same folder directory.
[0093] S3 uses a function block creation tool to parse all source code files in the directory described in step S2, extracts the key structural information of each function block, calculates the CRC value of the function block based on the key structural information, and saves the key structural information and CRC values of all function blocks to a function block library file. Generally, the filename of this function block library should be consistent with the name of the folder containing the source code files.
[0094] Specifically:
[0095] The S3.1 function block creation tool reads the source code file into the program's memory and parses the source file.
[0096] S3.2 Obtain the name of the function block from the first space before the keyword FunctionBlockNew to the string between the keyword FunctionBlockNew and the first space before the keyword FunctionBlockNew.
[0097] S3.3 Obtain the constructor implementation content sContent of the function block based on the string between the first left curly brace following the keyword FunctionBlockNew and the corresponding right curly brace.
[0098] S3.4 Obtain the location of the keyword defineFunctionBlock in sContent, then find the content within the double quotes after that location to obtain the name of the function block, and compare it with the name of the function block obtained in step b. If they do not match, prompt that the parsing failed.
[0099] S3.5 Locate the keyword `defineFunctionBlockOut` in `sContent`. Then, find the content within the first double quotes after that location as the name of the function block output, the content within the second double quotes as the output sequence number, and the content within the third double quotes as the data type. Add this output record to the function block's output set.
[0100] S3.6 Obtain the position of the keyword `defineFunctionBlockIn` in `sContent`. Then, find the content within the first double quotes after that position as the name of the function block input, the content within the second double quotes as the sequence number of the function block input, the content within the third double quotes as the data type of the function block input, and the content within the fourth double quotes as the initial value of the function block input. Add this input record to the input set of the function block.
[0101] S3.7 Obtain the location of the keyword `defineFunctionBlockParameter` in `sContent`. Then, find the content within the first double quotes following that location as the function block parameter name, the second double quote as the parameter index, the third double quote as the data type, the fourth double quote as the initial value, the fifth double quote as the minimum value, the sixth double quote as the maximum value, and the seventh double quote as the unit. Add this parameter record to the function block's parameter set.
[0102] S3.8 retrieves the keyword `defineFunctionBlockOperation` at the location of `sContent`. Then, it identifies the content within the first double quotes following that location as the name of the function block control operation, the content within the second double quotes as the sequence number of the function block control operation, and the content within the third double quotes as the number of parameters for the function block control operation. Based on the number of parameters obtained, it continues to parse the content within subsequent double quotes to obtain the data type of each parameter of the function block control operation. This control operation record is then added to the function block's control operation set.
[0103] S3.9 Organize the key structural information of the functional blocks parsed in the above steps into XML format and calculate the corresponding CRC value.
[0104] S3.10 Continue repeating steps S3.1 to S3.9 above to parse other source code files in the folder directory.
[0105] S3.11 saves the key structural information and CRC values of all function blocks to the XML description file (.slf file) of the corresponding function block library, and adds the file to the function block library of the configuration tool (that is, copies the .slf file to the symbol folder in the program directory of the configuration tool).
[0106] The S4 function block compiler compiles the source code of each function block to generate the corresponding .o file. It then calls the same parsing and calculation logic as in step S3 to obtain the CRC code of the function block. The obtained CRC code is written to a specified location in the .data area of the .o file. All .o files are merged and linked to generate the function block lib library file (.lib file). The executable file (.bin file) generated by merging and linking all the function block lib library files is then distributed to an online controller for scheduling and execution.
[0107] Specifically:
[0108] S4.1 Define a global variable for each source code to store the CRC value of the function block calculated later. The variable is named by adding the suffix "_FB_CRC" to the function block name and is assigned a non-zero value. For example, in the function block source code add.c, define the global variable add_FB_CRC, Unsigned int add_FB_CRC = 1;
[0109] S4.2 Fill the directory of source code of the function block described in step S2 into the directory location of the source files to be compiled as defined in the Makefile used to compile the function block lib library file, execute the Makefile, compile all source files in the directory, and generate the function block lib library file.
[0110] The specific execution steps of the Makefile are as follows:
[0111] S4.2.1 Compiles all .c files in the source code directory into .o files.
[0112] S4.2.2 Call the same parsing calculation logic as in step S3 to obtain the CRC code of the corresponding function block of all .c files.
[0113] S4.2.3 Locate the .o file (elf format) corresponding to each .c file in the source code directory, parse the elf file to obtain the address of the xxx_FB_CRC variable value in the .data data area, and write the corresponding CRC value to that address to complete the modification of the CRC value of a single .o file.
[0114] S4.2.4 Traverse all .o files in the source code directory and modify the CRC values of all functional blocks.
[0115] S4.2.5 links all .o files to generate a function block lib library file (lib file).
[0116] S4.3 executes the Makefile that generates the executable file (bin file), compiles and links all the function block lib library files (lib files), and links all the .lib files to generate the final executable file (bin file). The generated .bin file is then distributed to an online controller for scheduling and execution.
[0117] The S5 page configuration tool connects multiple function block instances to input and output lines on a page, generating a page file that can perform specified complex calculations and control functions.
[0118] Specifically:
[0119] S5.1 Open the page configuration tool and read the function block file (.slf file) generated in step S3 stored in the symbol folder in the tool's program directory, and display it in sequence as graphic elements on the interface.
[0120] S5.2 Drag and drop function block elements onto the page as needed to generate function block instances, and connect the input and output lines between the function block instances. This allows the configured page to perform specified complex calculations and control functions.
[0121] S5.3 Use the page configuration tool to generate the page file corresponding to the configuration page completed in step S5.2.
[0122] Each function block instance in the page file stores its corresponding function block number, execution number, and other instantiation attributes. However, the function block model structure information, such as the CRC value of the function block to which the function block instance belongs, is only stored once in the configuration page.
[0123] The S6 page configuration tool sends the page file to the online controller described in step S4. The controller parses all function blocks in the page file and compares the CRC value of each function block with the corresponding function block actually scheduled and run in the controller. If there is a discrepancy, the controller sends the difference information to the configuration tool and displays it on the configuration tool.
[0124] Specifically:
[0125] S6.1 The configuration tool successfully connected to the online controller described in step S4 and sent the configuration page to the controller.
[0126] The S6.2 controller receives the page file and reads its contents into memory. It then performs an online comparison of all functional block instances within the page.
[0127] S6.3 For a given function block instance, find the CRC value of the corresponding function block model in the page file based on the function block name of the function block instance.
[0128] S6.4 Based on the function block name of the function block instance, locate the corresponding .o file in the executable program (.bin file) actually scheduled and run by the controller. Parse the .o file to obtain the address of the xxx_FB_CRC variable value in the .data data area, and obtain the CRC value of the corresponding function block instance actually scheduled and run in the controller from the corresponding address in the .data data area.
[0129] S6.5 If the CRC values obtained in steps S6.3 and S6.4 are the same, continue to compare the next function block instance; if they are different, record them temporarily. After comparing all function block instances, return all function block instances with different CRC values to the configuration tool and display them on the configuration tool.
Claims
1. A method for online verification of function blocks based on compiled and implanted feature codes, characterized in that, Includes the following steps: (1) Host computer preparation: By parsing the function block source code file, a function block file for configuration programming by the configuration tool is generated offline; the function block file contains the model structure information of the function block obtained by parsing the source code file and the corresponding CRC value; by configuring the function blocks through connection, a page file that can realize the specified operation and control functions is generated offline. The specific steps are as follows: (1.1) Develop the function block source code .c file according to the function block programming specification; (1.2) The configuration tool parses the key structural information of the function block from the source code file of the function block according to the function block programming specification. The key structural information includes name, description, input / output / parameter / control interface; (1.3) Calculate the CRC value of the key structure information of the functional block organized in XML format; (1.4) Save the key structural information and CRC value of the function block to the XML description file of the function block, and add the file to the function block library of the configuration tool; (1.5) Drag and drop function blocks from the function block library of the configuration tool into the configuration page to connect the inputs and outputs between function blocks; generate a configuration page that can realize the specified calculation and control functions by building the function blocks in a modular way; (2) Lower-level machine preparation: During the compilation of the function block executable file, a one-to-one correspondence table between the .o file of each function block and its CRC value is established, and the table is sent to the controller along with the function block executable file. The specific steps are as follows: (2.1) Define a global variable in the function block source code .c file. The variable name is the function block name plus the _FB_CRC suffix, and the value is assigned to be non-zero. (2.2) Compile the function block source code .c file into an .o file; (2.3) Calculate the CRC value of the function block; (2.4) Parse the ELF file to obtain the address of the xxx_FB_CRC variable value in the .data data area, write the corresponding CRC value to that address, and realize the modification of the CRC value of the function block; (2.5) Traverse all .o files in the source code directory and modify the CRC value of all functional blocks; (2.6) Link all .o files to generate the function block lib library file; (2.7) Execute the Makefile file that generates the executable file to compile and link all the function block lib library files, and link all the .lib files to generate the final executable file; (2.8) The generated .bin file is sent to an online controller for scheduling and execution; (3) Online comparison of function blocks: The configuration tool sends the page file to the controller online. The controller parses all the function block instances in the page file and compares the CRC value of the function block model corresponding to each function block instance with the CRC value of the corresponding function block actually scheduled and run in the controller. If there is any inconsistency, the controller returns the difference information and displays it on the configuration tool.
2. The online verification method for function blocks based on compiled embedded feature codes according to claim 1, characterized in that, The specific steps (3) are as follows: (3.1) The configuration tool distributes page files to the controller online; (3.2) The controller parses all function block instances in the page file and compares the CRC value of each function block instance with the corresponding function block actually scheduled and run in the controller; the specific comparison method is as follows: (3.2.1) For a function block instance in the page, extract the CRC value of the function block from the function block model description in the page file; (3.2.2) For the functional blocks that are actually scheduled and run in the controller, firstly, based on the name of the functional block library to which the functional block belongs, find the corresponding functional block lib library file in the controller from the scheduled .bin file; then, based on the name of the functional block, find the corresponding .o file from the functional block lib library file; finally, obtain the address of the xxx_FB_CRC variable value in the .data data area from the .o file, and obtain the CRC value of the functional block from the corresponding address in the .data data area; (3.3) If there are inconsistent CRC values, the controller returns the difference information to the configuration tool, and the function block comparison results are displayed on the configuration tool.
3. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the online verification method for function blocks based on compiled implanted feature codes as described in any one of claims 1-2.
4. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the online verification method for function blocks based on compiled implanted feature codes as described in any one of claims 1-2.