A parameter updating method and system based on periodic check I / O board card parameters, a storage medium and an electronic device
Patent Information
- Application Number
- CN202510545124.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-04-28
AI Technical Summary
[0005]本发明所要解决的技术问题是:克服现有技术中存在的系统运行过程中I/O板卡参数被篡改以及参数更新及校验过程占用过多负载,影响系统运行的安全性与稳定性的问题和缺陷,提供一种基于周期校验I/O板卡参数的参数更新方法、系统、存储介质及电子设备
(1)针对I/O板卡运行过程中可能出现参数错误的问题,控制器通过与I/O板卡周期实时通讯环节校验I/O板卡上送的参数校验值与控制器本地计算的参数校验值是否一致,判断是否需要更新I/O板卡的所有参数,保证了控制器下I/O板卡在运行期间参数的准确性;
Smart Images

Figure CN120491596B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial automation control technology, and in particular relates to a parameter update method, system, storage medium and electronic device based on periodic verification of I / O board parameters. Background Technology
[0002] In the field of industrial process control, controllers send appropriate parameters to their connected I / O boards, enabling the I / O boards to perform basic sampling / output functions normally. Industrial sites often have a large number of controllers, and each controller has dozens of I / O pins. Current technology often only verifies the parameters of the I / O boards during the initial configuration and updates them to ensure that the operating parameters of the I / O boards are consistent with the configuration.
[0003] Existing technologies lack a continuous and effective parameter verification mechanism, which may lead to the following problems: (1) During the debugging process, the I / O board configuration error or the harsh working conditions such as strong electromagnetic interference that are common on site may cause the parameters running in the I / O board to be incorrect. If the parameters are not corrected and updated, it will directly affect the safety and stability of the system operation.
[0004] (2) The control cycle of a typical DCS / PLC system needs to be controlled in the range of 10-100ms. The real-time requirements for data interaction between the controller and the I / O board are very high. Therefore, in scenarios with a large number of parameters, the verification and updating of all parameters of the I / O board will consume too much communication load. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the problems and defects in the prior art where I / O board parameters are tampered with during system operation and the parameter update and verification process occupies too much load, affecting the security and stability of system operation. The present invention provides a parameter update method, system, storage medium and electronic device based on periodic verification of I / O board parameters.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a parameter update method based on periodic verification of I / O board parameters, used by a controller to perform parameter verification during real-time periodic communication with the I / O board, the method comprising: The system sequentially checks whether each I / O board connected to the controller is configured correctly and communicates normally. If the configuration is correct and communication is normal, it scans and packages the parameters that need to be updated and records the information; otherwise, it moves on to the next I / O board. After all parameters are updated, the parameter validation and update logic is executed.
[0007] Preferably, the scanning, packaging, and recording of parameters that need to be updated includes two cases: The I / O board needs to update all parameters; In addition, the I / O board only needs to update the parameters that need to be updated as issued by the host computer.
[0008] Preferably, the step of scanning, packaging, and recording the parameters that need to be updated includes: Package the I / O board parameters that need to be updated one by one, and record the number of I / O board parameters that have been packaged and the index of the parameters that have been processed.
[0009] Preferably, all parameters of the I / O board need to be updated only when the I / O board is registered for the first time, and when the I / O board parameters are inconsistent during the operation phase.
[0010] Preferably, the step of scanning, packaging, and recording the parameters that need to be updated further includes: Set the limit on the number of I / O board parameters that the host computer needs to update per communication cycle, and set the limit on the number of I / O board parameters that need to be packaged per communication cycle.
[0011] Preferably, the execution parameter verification and update logic includes the following states: If there are parameters that need to be updated in the current communication cycle, it means that there are parameters being sent to the I / O board in the current communication cycle, so no operation is performed; If the current communication cycle status is that the parameters that the I / O board needs to update have been updated, then the I / O board parameter verification value of the controller is recalculated locally. If the current communication cycle status requires parameter verification, then verify whether the verification value of the I / O board parameters calculated locally by the controller is consistent with the verification value returned by the I / O board; if they are inconsistent, all parameters need to be updated again.
[0012] Preferably, whether the verification value of the I / O board parameters calculated locally by the verification controller is consistent with the verification value returned by the I / O board includes: After all the parameters that need to be verified have been sent, delay for N communication cycles to ensure that the I / O board receives all the parameters and replies with the parameter verification values before performing the verification.
[0013] Preferably, the verification of whether the verification value of the I / O board parameters calculated locally by the verification controller is consistent with the verification value returned by the I / O board further includes: It is necessary to ensure that all I / O board parameters are received from the controller before updating the board parameter verification value, and to reply to the controller with the I / O board parameter verification value via real-time data message; And ensure that the controller has received the parameter verification value from the I / O board before applying the I / O board parameters.
[0014] Preferably, the step of activating the I / O board parameters includes: If the I / O board is powered on for the first time, it will only operate normally after receiving and taking effect the complete parameters issued by the controller for the first time. Thereafter, during the normal operation of the I / O board, it will periodically reply with the parameter verification value of the I / O board so that the controller can verify whether it is consistent with the parameter verification value calculated locally by the controller. If the verification is consistent, the parameter update is completed. If it is inconsistent, the controller will be triggered to update all parameter logic again.
[0015] Secondly, the present invention provides a parameter update system based on periodic verification I / O board parameters, used to implement the above-mentioned parameter update method based on periodic verification I / O board parameters, the system comprising: The judgment module is used to perform parameter verification during the real-time periodic communication between the controller and the I / O board, and to sequentially determine whether each I / O board connected to the controller is configured correctly and communicates normally. The packaging module is used to scan and package the parameters that need to be updated and record the information if the I / O board is configured correctly and communication is normal. The execution module is used to perform parameter validation and update logic after all parameters have been updated.
[0016] Thirdly, the present invention provides a computer-readable storage medium for storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform any of the above-described parameter update methods based on periodic verification I / O board parameters.
[0017] Fourthly, the present invention provides a computing device comprising one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any of the above-described parameter update methods based on periodic check I / O board parameters.
[0018] The method of this invention for updating I / O board parameters is applicable to scenarios such as distributed control systems (DCS) and programmable logic control systems (PLCs) that require the cooperation of controllers and I / O boards. Compared with existing technologies, it has the following advantages: (1) In response to the problem of parameter errors that may occur during the operation of the I / O board, the controller verifies whether the parameter verification value sent by the I / O board is consistent with the parameter verification value calculated locally by the controller through the periodic real-time communication link with the I / O board, and determines whether all parameters of the I / O board need to be updated, thus ensuring the accuracy of the parameters of the I / O board under the controller during operation. (2) In response to the problem that updating all parameters of the I / O board may consume too much communication load, during normal operation, only the parameters that need to be updated by the host computer configuration software are scanned, and the parameters that do not change are not updated, so as not to increase the communication load between the controller and the I / O board, and also reduce the requirements for the controller's task resources. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating a parameter update method based on periodic verification of I / O board parameters provided in an embodiment of the present invention. Figure 2 This is a flowchart illustrating the logic for scanning and packaging board parameters in an embodiment of the present invention; Figure 3 This is a flowchart illustrating the board parameter verification and update logic in an embodiment of the present invention; Figure 4 This is a flowchart illustrating the logic of the I / O board receiving parameters and replying with a verification value in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0021] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0022] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0023] It should be emphasized here that the step markers mentioned below are not a limitation on the order of the steps, but should be understood as meaning that the steps can be executed in the order mentioned in the embodiments, or in a different order than in the embodiments, or several steps can be executed simultaneously. Example 1
[0024] like Figure 1As shown, this embodiment 1 provides a parameter update method based on periodic verification of I / O board parameters. During the real-time periodic communication between the controller and the I / O, parameter verification is performed to ensure the accuracy of the parameters sent to the I / O board. The specific implementation steps are as follows: Step S101: Sequentially determine whether each I / O board connected to the controller is configured correctly and communicates normally. If the configuration is correct and the communication is normal, proceed to step S102; otherwise, determine the next I / O board.
[0025] Step S102: If the board is configured correctly and communicates normally with the controller, scan and package the parameters that need to be updated and record the information.
[0026] Step S103: Execute parameter verification and update logic.
[0027] It should be noted that, in this embodiment, parameter verification includes, but is not limited to, cyclic redundancy check (CRC check) and MD5 check.
[0028] Specifically, in step S102 of this embodiment, the specific implementation steps for scanning, packaging, and recording the parameters that need to be updated are detailed in [reference needed]. Figure 2 ,include: Step S201: Determine whether the I / O board needs to update all parameters. If not, proceed to step S202; if so, proceed to step S203.
[0029] It should be noted that all parameters of the I / O board need to be updated only when registering the I / O board for the first time, and when the I / O board parameters are inconsistent during operation.
[0030] Step S202: If the board does not need to update all parameters, scan for parameters that the host computer needs to update. If so, proceed to step S203; otherwise, proceed to step S204.
[0031] It should be noted that, in order to reduce the load on real-time communication between the controller and the board, the number of board parameters that the host computer needs to update during each communication cycle is limited to a maximum of 20.
[0032] Step S203: Pack the board parameters that need to be updated one by one.
[0033] It should be noted that, in order to reduce the load on real-time communication between the controller and the board, the number of board parameters packaged per communication cycle is limited to a maximum of 8.
[0034] Step S204: Record the number of board parameters that have been packaged this time, as well as the index of the processed parameters, so that processing can continue in the next communication cycle until all board parameters have been processed.
[0035] Specifically, in step S103 of this embodiment, the parameter verification and update logic needs to be executed based on the auxiliary variable of the verification status, which requires different logic to be performed. Figure 3 Taking CRC check as an example, the specific implementation steps include: Step S301: Determine if any parameters need to be updated in this round. If so, proceed to step S302; otherwise, proceed to step S303.
[0036] Step S302: If there are parameters that need to be updated, set the parameter CRC check status to 0, indicating that there are parameters being sent to the board in the current communication cycle, and jump to step S307.
[0037] Step S303: If there are no parameters to update, determine whether the parameter CRC check status is 0. If it is, proceed to step S304; otherwise, proceed to step S305.
[0038] Step S304: If the parameter CRC check status is 0, then set the parameter CRC check status to 1, indicating that the local board parameter CRC of the controller needs to be recalculated, and jump to step S307.
[0039] Step S305: If the parameter CRC check status is not 0, check whether the CRC parameter calculated locally by the controller is consistent with the parameter CRC returned by the board.
[0040] It should be noted that, considering that the controller sends 8 parameters to the I / O board in each frame, after all parameters have been sent, there is a delay of N communication cycles to ensure that the I / O board receives all parameters and replies with the parameter CRC before verifying whether it is consistent with the parameter CRC calculated locally. If they are inconsistent, step S306 is executed; otherwise, step S307 is skipped.
[0041] It should be noted that N here can be set according to the situation. For example, in one embodiment, N is set to 4.
[0042] Step S306: If the parameter CRC check is inconsistent, set the index of the processed board parameter to 0 and set the flag of all parameters of the board that need to be updated to TRUE.
[0043] Step S307: If the parameter CRC check status is 1, recalculate the local board parameter CRC of the controller and set the flag to 2 to indicate that the local board parameter CRC of the controller has been recalculated.
[0044] Furthermore, for the specific implementation steps of the I / O board receiving real-time data packets from the controller and passively responding, please refer to [link to relevant documentation]. Figure 4 ,include: Step S401: Determine whether a parameter consistent with the type of this board has been received. If so, proceed to step S402. Otherwise, do not process the frame message and reply with a board type error to the controller. Step S402: If a parameter consistent with the type of this board is received, delay for 1 communication cycle to ensure that all board parameters sent by the controller are received before updating the board parameter CRC, and reply to the controller with the parameter CRC via real-time data message; Step S403: Delay for one communication cycle to ensure that the controller has received the CRC parameter reply from the board before making the board parameters effective, thereby ensuring that the board can operate with the parameters expected by the host computer debugging personnel.
[0045] In summary, if the I / O board is powered on for the first time, its basic functions can only be performed normally after the complete parameters issued by the controller are received and take effect for the first time. Thereafter, during the normal operation of the board, parameter updates by the host computer will no longer affect the basic functions of the board, but will periodically reply with real-time data messages to return the board parameter verification values, so that the controller can verify whether they are consistent with the parameter verification values calculated locally by the controller. If they are consistent, the parameter update is completed; if they are inconsistent, the controller will be triggered to update all parameter logic again. Example 2
[0046] Based on the above inventive concept, this embodiment 2 provides a parameter update system based on periodic verification of I / O board parameters, used to implement the parameter update method based on periodic verification of I / O board parameters in the above embodiment. The system includes: The judgment module is used to perform parameter verification during the real-time periodic communication between the controller and the I / O board, and to sequentially determine whether each I / O board connected to the controller is configured correctly and communicates normally. The packaging module is used to scan and package the parameters that need to be updated and record the information if the I / O board is configured correctly and communication is normal. The execution module is used to perform parameter validation and update logic after all parameters have been updated.
[0047] It is worth noting that the system embodiment corresponds to the above method embodiment. The implementation methods of the above method embodiments are all applicable to this device embodiment and can achieve the same or similar technical effects, so they will not be described in detail here. Example 3
[0048] Based on the above inventive concept, this embodiment 3 provides a computer-readable storage medium for storing one or more programs, the one or more programs including instructions, which, when executed by a computing device, cause the computing device to perform any of the parameter update methods based on periodic verification I / O board parameters according to the above embodiments. Example 4
[0049] Based on the above inventive concept, this embodiment 4 provides a computing device, see [link to previous document]. Figure 5 It includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the parameter update methods based on periodic check I / O board parameters according to the above embodiments, and for exchanging data between devices via a communication module.
[0050] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0051] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0052] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0053] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0054] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do 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 parameter update method based on periodic verification of I / O board parameters, characterized in that, The method for parameter verification during real-time periodic communication between the controller and the I / O board includes: The system sequentially checks whether each I / O board attached to the controller is configured correctly and communicating normally. If the configuration is correct and communication is normal, it scans and packages the parameters that need to be updated, packaging the parameters of the I / O boards that need to be updated in sequence, and records the number of I / O board parameters packaged and the index of the processed parameters; otherwise, it moves on to the next I / O board. The scanning and packaging of parameters that need to be updated includes two cases: The I / O board needs to update all parameters; In addition, the I / O board only needs to update the parameters that need to be updated as sent by the host computer; Specifically, all parameters of the I / O board need to be updated only when the I / O board is registered for the first time, and when the I / O board parameters are inconsistent during the operation phase. After all parameters are updated, the parameter validation and update logic is executed.
2. The parameter update method based on periodic verification of I / O board parameters according to claim 1, characterized in that, The process of scanning, packaging, and recording the parameters that need to be updated also includes: Set the limit on the number of I / O board parameters that the host computer needs to update per communication cycle, and set the limit on the number of I / O board parameters that need to be packaged per communication cycle.
3. The parameter update method based on periodic verification of I / O board parameters according to claim 1, characterized in that, The execution parameter verification and update logic includes the following states: If there are parameters that need to be updated in the current communication cycle, it means that there are parameters being sent to the I / O board in the current communication cycle, so no operation is performed; If the current communication cycle status is that the parameters that the I / O board needs to update have been updated, then the I / O board parameter verification value of the controller is recalculated locally. If the current communication cycle status is that parameters need to be verified, then verify whether the verification value of the I / O board parameters calculated locally by the controller is consistent with the verification value returned by the I / O board; If there is a discrepancy, all parameters need to be updated.
4. The parameter update method based on periodic verification of I / O board parameters according to claim 3, characterized in that, Whether the verification value of the I / O board parameters calculated locally by the verification controller is consistent with the verification value returned by the I / O board includes: After all the parameters that need to be verified have been sent, delay for N communication cycles to ensure that the I / O board receives all the parameters and replies with the parameter verification values before performing the verification.
5. The parameter update method based on periodic verification of I / O board parameters according to claim 4, characterized in that, The verification controller's locally calculated I / O board parameter verification value is consistent with the verification value returned by the I / O board, and the verification function also includes: It is necessary to ensure that all I / O board parameters are received from the controller before updating the board parameter verification value, and to reply to the controller with the I / O board parameter verification value via real-time data message; And ensure that the controller has received the parameter verification value from the I / O board before applying the I / O board parameters.
6. The parameter update method based on periodic verification of I / O board parameters according to claim 5, characterized in that, The step of applying the I / O board parameters includes: If the I / O board is powered on for the first time, it will only operate normally after receiving and taking effect the complete parameters issued by the controller for the first time. Thereafter, during the normal operation of the I / O board, it will periodically reply with the parameter verification value of the I / O board so that the controller can verify whether it is consistent with the parameter verification value calculated locally by the controller. If the verification is consistent, the parameter update is completed. If it is inconsistent, the controller will be triggered to update all parameter logic again.
7. A parameter update system based on periodic verification of I / O board parameters, characterized in that, The system is used to implement the parameter update method based on periodic verification I / O board parameters as described in any one of claims 1 to 6, the system comprising: The judgment module is used to perform parameter verification during the real-time periodic communication between the controller and the I / O board, and to sequentially determine whether each I / O board connected to the controller is configured correctly and communicates normally. The packaging module is used to scan and package the parameters that need to be updated and record the information when the I / O board is configured correctly and communication is normal. The execution module is used to perform parameter validation and update logic after all parameters have been updated.
8. A computer-readable storage medium for storing one or more programs, characterized in that, The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any of the parameter update methods based on periodic verification I / O board parameters according to claims 1 to 6.
9. A computing device, characterized in that, include, One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the parameter update methods based on periodic check I / O board parameters according to claims 1 to 6.
Citation Information
Patent Citations
Online I / O undisturbed configuration method for distributed control system
CN113220229A