Parameter calibration method, device and equipment based on EPICS, and medium

By predefining electrical connections and functional modules in the EPICS system, parsing and executing batch processing instructions, the problem of high-precision parameter calibration of sensor calibration devices when flexibly adjusting experimental procedures is solved, and efficient calibration of automatic control processes is realized.

CN121050335BActive Publication Date: 2026-02-03聚变新能(安徽)有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511590214.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-02-03
Estimated Expiration
2045-11-03

AI Technical Summary

Technical Problem

Existing sensor calibration devices struggle to achieve high-precision parameter calibration when experimental procedures require flexible adjustments. Furthermore, manually switching devices is time-consuming and prone to errors, and they cannot achieve adaptive self-adjustment.

Method used

By electrically connecting the devices in the controlled system to the input/output controllers of the EPICS system, configuring the database template file based on the electrical connection relationship between the device interface and the controller interface, predefining the functional modules of the devices, parsing the target parameter calibration instructions into batch processing instructions, and sequentially executing the functional modules to complete the parameter calibration.

Benefits of technology

An automated control process for parameter calibration was implemented, which reduced calibration complexity, improved calibration efficiency, reduced reliance on low-level code programming, and enhanced the flexibility and reliability of experiments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121050335B_ABST
    Figure CN121050335B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of automatic control, and provides a parameter calibration method, device, equipment and medium based on EPICS. The method is characterized in that: each device in a controlled system is electrically connected with an input / output controller of an EPICS system, a database template file is configured based on an electrical connection relationship, a function module of each device in the controlled system is predefined, when a target parameter calibration instruction is received, the target parameter calibration instruction is parsed to obtain N instruction segments in sequence, after instruction recognition, a function module corresponding to each instruction segment is acquired, and an execution parameter in the target parameter calibration instruction is input into the function module, so that parameter calibration is completed by sequentially executing the function modules corresponding to the N instruction segments, an automatic control process of parameter calibration is realized, the parameter calibration no longer completely depends on a fixed program written in underlying code, programming does not need to be adjusted every time the experimental process is stopped, the calibration complexity is reduced, and the calibration efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automation control technology, and in particular to a parameter calibration method, apparatus, device and medium based on EPICS. Background Technology

[0002] Existing sensor calibration devices are categorized into manual, semi-automatic, and fully automatic experimental equipment. Many of these devices rely on PLCs (Programmable Logic Controllers) to achieve non-standard automation designs, and all have fixed automation processes (fully automatic) or standardized modular approaches that fix only certain experimental steps (semi-automatic). Because PLC programming and debugging require a certain level of technical expertise, it is difficult for experimental personnel to immediately modify the automatic control process based on temporary experimental ideas.

[0003] When calibration tests require temporary adjustments, such as changes in system architecture, existing solutions typically require operators to manually switch equipment and then reprogram and debug the PLC. In cases requiring high precision, manual equipment switching is time-consuming and prone to errors. Furthermore, data from different devices cannot be shared to achieve adaptive self-adjustment. Additionally, the inability to precisely adjust equipment parameters at specific times and locations results in poor experimental repeatability. Summary of the Invention

[0004] In view of this, embodiments of this application provide a parameter calibration method, apparatus, device and medium based on EPICS to solve the problem of how to flexibly achieve high-precision parameter calibration in scenarios where flexible adjustment of experimental procedures is required in the prior art.

[0005] A first aspect of this application provides a parameter calibration method based on EPICS, which is used to calibrate target parameters in a controlled system based on an EPICS system; the method includes:

[0006] Each device in the controlled system is electrically connected to the input / output controller of the EPICS system; all device interfaces and controller interfaces are configured in a standardized manner.

[0007] Configure the database template file based on the electrical connection relationship between the device interface and the controller interface to determine the hardware parameters of each device;

[0008] At least the functional modules of each device in the controlled system are predefined based on the database template file;

[0009] In response to receiving the target parameter calibration instruction, the target parameter calibration instruction is parsed to obtain the batch processing instruction; the batch processing instruction consists of N instruction segments arranged in sequence, where N is a positive integer;

[0010] In response to the confirmation that the instruction recognition has passed, the instruction execution algorithm is used to obtain the functional module corresponding to each instruction segment, and the target parameter is used to specify the execution parameter in the instruction and input into the functional module.

[0011] The instruction execution algorithm is used to sequentially execute the functional modules corresponding to N instruction segments to complete the calibration of the target parameters in the execution device.

[0012] A second aspect of this application provides a calibration apparatus based on EPICS, comprising:

[0013] The connection module is configured to electrically connect each device in the controlled system to the input / output controller of the EPICS system; the interfaces of each device and the controller are all configured in a standardized manner.

[0014] The configuration module is configured to configure a database template file based on the electrical connection relationship between the device interface and the controller interface, and to determine the hardware parameters of each device.

[0015] Predefined modules are configured to predefine the functional modules of each device in the controlled system based at least on a database template file.

[0016] The parsing module is configured to parse the target parameter calibration instruction to obtain a batch processing instruction in response to receiving the target parameter calibration instruction; the batch processing instruction consists of N instruction segments arranged in sequence, where N is a positive integer;

[0017] The execution module is configured to, in response to the determination that the instruction recognition has passed, use the instruction execution algorithm to obtain the functional module corresponding to each instruction segment, and input the execution parameters in the target parameter calibration instruction into the functional module;

[0018] The calibration module is configured to sequentially execute the functional modules corresponding to N instruction segments using the instruction execution algorithm to complete the calibration of the target parameters in the execution device.

[0019] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0020] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0021] The beneficial effects of the embodiments of this application compared with the prior art are:

[0022] This application embodiment electrically connects each device in the controlled system to the input / output controller of the EPICS system. Based on the electrical connection relationship between the device interface and the controller interface, a database template file is configured, and the functional modules of each device in the controlled system are predefined based on the database template file. When a target parameter calibration command is received, the target parameter calibration command is parsed to obtain N command segments arranged in sequence. After the command is recognized, the functional module corresponding to each command segment is obtained, and the execution parameters in the target parameter calibration command are input into the functional module. Thus, the parameter calibration is completed by sequentially executing the functional modules corresponding to the N command segments. This realizes an automatic control process for parameter calibration, no longer relying entirely on the fixed program written in the underlying code, eliminating the need to stop and adjust the programming for each experimental process, reducing calibration complexity, and improving calibration efficiency. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating a parameter calibration method based on EPICS provided in an embodiment of this application.

[0025] Figure 2 This is a schematic diagram of a quick-plug connector provided in an embodiment of this application.

[0026] Figure 3 This is a system schematic diagram for implementing the method provided in the embodiments of this application.

[0027] Figure 4 This is a flowchart illustrating the flow control algorithm provided in the embodiments of this application.

[0028] Figure 5 This is a flowchart illustrating the instruction recognition algorithm of the system in the embodiment of this application.

[0029] Figure 6 This is a flowchart illustrating the instruction execution algorithm of the system in the embodiment of this application.

[0030] Figure 7 This is a flowchart illustrating the underlying security logic algorithm of the system in the embodiments of this application.

[0031] Figure 8 This is a schematic diagram showing the connection of the equipment and the functional positioning of the measurement and control objects in the experimental system.

[0032] Figure 9This is a schematic diagram showing the connection of another device and the functional positioning of the measurement and control object in the experimental system.

[0033] Figure 10 This is a schematic diagram illustrating the connection of another type of equipment and the functional positioning of the measurement and control object within the experimental system.

[0034] Figure 11 This is a schematic diagram of a parameter calibration device based on EPICS provided in an embodiment of this application.

[0035] Figure 12 This is a schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0036] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0037] The following will describe in detail, with reference to the accompanying drawings, a parameter calibration method and apparatus based on EPICS according to embodiments of this application.

[0038] As mentioned above, when calibration tests require temporary adjustments, such as changes in system structure, existing solutions typically require operators to manually switch equipment and then reprogram and debug the PLC. In cases requiring high precision, manual equipment switching is time-consuming and prone to errors. Furthermore, data from different devices cannot be shared to achieve adaptive self-adjustment. Additionally, the inability to precisely adjust equipment parameters at specific times and locations results in poor experimental repeatability.

[0039] In view of this, this application provides a parameter calibration method based on EPICS. By electrically connecting each device in the controlled system to the input / output controller of the EPICS system, configuring a database template file based on the electrical connection relationship between the device interface and the controller interface, and predefining the functional modules of each device in the controlled system based on the database template file, when a target parameter calibration command is received, the command is parsed to obtain N sequentially arranged command segments. After the command is recognized, the corresponding functional module for each command segment is obtained, and the execution parameters in the target parameter calibration command are input into the functional module. Parameter calibration is completed by sequentially executing the functional modules corresponding to the N command segments, thus realizing an automatic control process for parameter calibration. This eliminates the need to rely entirely on fixed programs written in the underlying code, avoids the need to stop and adjust programming for each experimental process, reduces calibration complexity, and improves calibration efficiency.

[0040] Figure 1 This is a flowchart illustrating a parameter calibration method based on EPICS provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps:

[0041] In step S101, each device in the controlled system is electrically connected to the input / output controller of the EPICS system.

[0042] All device interfaces and controller interfaces have been configured in a standardized manner.

[0043] In step S102, a database template file is configured based on the electrical connection relationship between the device interface and the controller interface to determine the hardware parameters of each device.

[0044] In step S103, the functional modules of each device in the controlled system are predefined based on at least the database template file.

[0045] In step S104, in response to receiving the target parameter calibration instruction, the target parameter calibration instruction is parsed to obtain the batch processing instruction.

[0046] The batch processing instructions consist of N instruction segments arranged in sequence, where N is a positive integer.

[0047] In step S105, in response to the determination that the instruction recognition has passed, the instruction execution algorithm is used to obtain the functional module corresponding to each instruction segment, and the execution parameters in the target parameter calibration instruction are input into the functional module.

[0048] In step S106, the instruction execution algorithm is used to sequentially execute the functional modules corresponding to N instruction segments to complete the calibration of the target parameters in the execution device.

[0049] In some embodiments of this application, the method can be executed by EPICS (Experimental Physics and Industrial Control System) to calibrate target parameters in the controlled system.

[0050] In some embodiments of this application, each device in the controlled system can first be electrically connected to the input / output controller of the EPICS system. The devices in the controlled system may include actuators and sensors, and the input / output controller of the EPICS system may be an IO (Input / Output) acquisition board.

[0051] A standardized connector can be used to connect actuators, sensors, and I / O acquisition boards. In one example, the wiring for the I / O acquisition board, actuators, and sensors can be extended using a standardized quick-connect connector and connector interface definition. For instance, sensors can use a four-pin connector: pin 1 is positive power, pin 2 is negative power, pin 3 is positive signal 1, and pin 4 is negative signal 1. The actuator and sensor ends use male connectors, while the I / O acquisition board ends use female connectors, with the positive and negative power and signal terminals arranged in the same order as the male connector.

[0052] Figure 2 This is a schematic diagram of a quick-plug connector provided in an embodiment of this application. Figure 2 As shown, actuators 1, 2, and 3 are all actuation devices, which can be connected to the digital output board via quick-connect connectors. Sensors 1, 2, and 3 can be connected to the analog input board via quick-connect connectors.

[0053] In some embodiments of this application, a database template file can be configured based on the electrical connection relationship between the device interface and the controller interface to determine the hardware parameters of each device. In other words, signals and data can be defined using the core component Device Support in the EPICS system IOC (Input / Output Controller) and a structured database file (.db), enabling functional modifications and extensions of the experimental platform.

[0054] In some embodiments of this application, functional modules for each device in the controlled system can be predefined, at least based on a database template file. These functional modules can be processing flows for each type of device in the system when performing different functions. For example, one functional module might include a processing flow for opening a valve in the control system, while another functional module might include a processing flow for closing a valve in the control system.

[0055] When a user inputs a target parameter calibration command, the EPICS system can parse the command and automatically convert it into a batch processing command. This batch processing command consists of N sequentially arranged command segments. The target parameter can be any parameter in the controlled system, such as the calibration parameter of a sensor in the system, or the start / stop or adjustment parameter of an actuator in the system.

[0056] In some embodiments of this application, each instruction segment in the batch processing instruction can be identified, and after successful identification, an instruction execution algorithm can be used to obtain the functional module corresponding to each instruction segment. This functional module corresponds to the instruction object and instruction action within the instruction segment. For example, if the instruction object in the instruction segment is valve 1, and the instruction action is "open," then its corresponding functional module is the "open valve" functional module.

[0057] In some embodiments of this application, the execution parameters in the target parameter calibration instruction can be input into a determining function module so that the function module can perform specific operations. In one example, the execution parameter can be valve 1 in the above-mentioned valve opening function module, so that valve 1 can be opened when the function module is executed.

[0058] In some embodiments of this application, an instruction execution algorithm can be used to sequentially execute the functional modules corresponding to N instruction segments, thereby completing the calibration of the target parameters in the execution device.

[0059] In one example, the N instruction segments can be sequentially input into a queue, and then the instruction segments in the instruction queue are sequentially ordered in a first-in-first-out manner to complete the target parameter calibration.

[0060] According to the technical solution provided in the embodiments of this application, by electrically connecting each device in the controlled system with the input / output controller of the EPICS system, configuring a database template file based on the electrical connection relationship between the device interface and the controller interface, and predefining the functional modules of each device in the controlled system based on the database template file, when a target parameter calibration instruction is received, the target parameter calibration instruction is parsed to obtain N instruction segments arranged in sequence. After the instruction is recognized, the functional module corresponding to each instruction segment is obtained, and the execution parameters in the target parameter calibration instruction are input into the functional module. Thus, parameter calibration is completed by sequentially executing the functional modules corresponding to the N instruction segments, realizing an automatic control process for parameter calibration. It no longer relies entirely on the fixed program written in the underlying code, and there is no need to stop and adjust the programming for each experimental process, reducing calibration complexity and improving calibration efficiency.

[0061] In some embodiments of this application, configuring the database template file may include first adding controller interfaces using a macro definition configuration file, which at least includes the interface type, interface location, and wiring definition for each controller interface. Then, configuring the database template file for the target device, the database template file determines the hardware parameters of the device by referencing the macro definition configuration file corresponding to the target device.

[0062] The target device is any device in the controlled system, and the macro definition configuration file corresponding to the target device is the macro definition configuration file of the controller interface that is electrically connected to the target device.

[0063] In some embodiments of this application, the addition of IO acquisition boards can be centrally managed through macro definition configuration files, and the boards are pre-configured according to their interfaces. Some exemplary board macro definition configuration files are shown below:

[0064] Analog input board (AI board 1):

[0065] setenv AI_CARD1_P "AI:Card1:" # Device logical prefix (including location information)

[0066] setenv AI_CARD1_SLOT 2 # Physical slot number (PCI / PCIe slot)

[0067] setenv AI_CARD1_PORT "AI_PORT1" # asyn driver port name (logical identifier)

[0068] setenv AI_CARD1_CHANS 8 # Total number of channels

[0069] setenv AI_CARD1_RESOLUTION 16 # Resolution (bits)

[0070] Digital Output Board (DO Board 1):

[0071] setenv DO_CARD1_P "DO:Card1:" # Device logical prefix

[0072] setenv DO_CARD1_IP "192.168.1.101" # Network interface card IP address (hardware location)

[0073] setenv DO_CARD1_PORT "DO_PORT1" # asyn driver port name

[0074] setenv DO_CARD1_CHANS 16 # Total number of channels

[0075] setenv DO_CARD1_PROTOCOL "Modbus" # Communication protocol

[0076] The device types can include at least analog inputs, analog outputs, digital inputs, digital outputs, pulse inputs, and pulse outputs. If the controlled device is wired to the next-level device, its macro definition configuration file may not include a communication protocol.

[0077] The corresponding database template file can be a data record .db file, where the hardware parameters can be obtained through " The "(macro name)" can be referenced from the configuration file, achieving "one template adaptable to multiple devices" without the need for real-time modifications. Some example database template files are shown below:

[0078] record(ai, " (AI_CARD1_P)TempSensor1")

[0079] {

[0080] field(DESC, "Temperature sensor (AI board channel 1) ") (TEMP_SENSOR1_CHAN))")

[0081] field(DTYP, "asynInt32") # Use the asyn driver

[0082] field(INP, "@asyn( (AI_CARD1_PORT), (AI_CARD1_SLOT),

[0083] (TEMP_SENSOR1_CHAN))") # Referencing slot and channel macros

[0084] field(EGU, "℃") # Engineering unit

[0085] field(PREC, "1") # Precision

[0086] field(SCAN, "1 second") # Scan cycle

[0087] }

[0088] Using this method, when the devices in the controlled system are expanded or adjusted, resulting in changes to the electrical connection between the IO acquisition board and each device, it is only necessary to reference the macro definition configuration file corresponding to the changed board in the device's database template file. There is no need to manually switch devices, which improves the reliability of calibration tests.

[0089] In some embodiments of this application, each type of device includes at least one functional module, and different functional modules of the same type of device correspond to different actions of the device. Furthermore, each functional module includes at least a condition judgment module, an action execution module, and a result feedback module.

[0090] The functional modules can be predefined. That is, users can predefine each functional module according to the actual situation, including the judgment conditions for executing the functional module, the corresponding action of the functional module, and how the execution result of the functional module should be fed back.

[0091] In some embodiments of this application, parsing the target parameter calibration instruction to obtain batch processing instructions may include: first, identifying action-type keywords in the target parameter calibration instruction and dividing the instruction into M fields, where M is a positive integer less than or equal to N. Then, identifying object-type keywords in each field to obtain M instruction segments. Finally, identifying logical-type keywords in each instruction segment and combining the M instruction segments based on the identification results to obtain a batch processing instruction comprising N sequentially arranged instruction segments.

[0092] Each keyword can be defined by the user based on experience for different measurement and control experiments. In one example, the measurement and control experiment process can be summarized into the following categories, and custom keywords can be designed accordingly:

[0093] a) Conditional judgments: "=", ">", "<", "<> (not equal to)", "AND", "OR" (judgment result data register: comparison object 1 + comparison sign + comparison object 2). The judgment result is divided into "YES + branch instruction 1" and "NO + branch instruction 2". One branch is selected for execution based on the judgment result.

[0094] b) Calculation classes: ":(Assigns the result of the calculation to the object before the sign)", "+", "-", " , , / , and ( ) .

[0095] c) Timed delay: "T# + duration + unit" (seconds S, minutes MIN, hours H).

[0096] d) Read and write: Set up custom data storage areas (binary data storage area BL, real number storage area RL, and data storage areas AI, AQ, DI, and DQ for direct measurement and control data defined by IO board points, with default values ​​of 0). Define GET (get, read) and PUT (set, write) for data read and write operations, with the format: GET + read object, PUT + write object: data.

[0097] e) Looping and repeating: Define "LABS + number" and "LABE + number" as the start and end of the loop, and use JUMP to define jumps to achieve the loop function.

[0098] f) Other: Define other specific process parameters according to requirements, such as the parameters P, I, D, etc. for PID control.

[0099] g) Define the separator for consecutive instruction inputs as “;”, so that the EPICS algorithm can recognize the number and order of batch instructions.

[0100] When parsing target parameter calibration instructions, the action-type keywords can be identified first to segment the instructions into M fields, each containing one action-type keyword. Then, object-type keywords in each field can be identified to obtain M instruction segments. Finally, logical-type keywords in each instruction segment can be identified, and the M instruction segments can be combined based on the identification results to obtain a batch processing instruction consisting of N sequentially arranged instruction segments.

[0101] These N instruction segments can be numbered, for example, by assigning them sequential IDs and storing them in a queue. Adjacent instruction segments can be separated by a semicolon (;) or other user-defined delimiters.

[0102] In other words, after batch processing instructions are input, they can be divided into multiple instruction segments using delimiters. Then, the instructions are parsed using a parsing script, assigned a sequence ID, and stored in a queue. According to the "first-in, first-out" principle of the queue, the executor retrieves the instruction segment from the queue, calls the corresponding predefined function block to execute it, and triggers the next operation (such as continuing to dequeue or inserting an exception handling instruction segment) based on the module's output signal (done / error).

[0103] In some embodiments of this application, the instruction recognition algorithm may operate as follows: perform format recognition on batch processing instructions; in response to determining that the format recognition is successful and the batch processing instruction is the same as the batch processing instruction previously received by the EPICS system, determine that the instruction recognition is successful; in response to determining that the format recognition is successful and the batch processing instruction is different from the batch processing instruction previously received by the EPICS system, determine that the instruction recognition is successful after clearing the original parameter record.

[0104] In some embodiments of this application, the instruction execution algorithm may operate as follows: acquire the instruction object, instruction action, and instruction data for each instruction segment; wherein the instruction object includes at least a process control object, a device control object, and a timer; the instruction action includes at least a process control parameter adjustment action, a start / stop action for control signal output, and a delay timing control action; the data information includes at least data modification information, data comparison information, data calculation information, and delay timing values; store N instruction segments sequentially into a queue; wherein each instruction segment includes at least a sequence number, an instruction object, an instruction action, and a target for instruction object data change; determine the corresponding functional module based on the instruction action of each instruction segment, and input the instruction data of this instruction segment into the functional module; execute the N instruction segments sequentially.

[0105] If an error is detected during the sequential execution of N instruction segments, the error information can be sent to the underlying security logic algorithm. The underlying security logic algorithm runs automatically after the system is powered on, reset, or undergoes fault recovery initialization. The underlying security logic algorithm generates alarm information and clears the queue.

[0106] In some embodiments of this application, the underlying security logic algorithm may operate as follows: after the system is powered on, reset, or undergoes fault recovery initialization, scan scheduling is performed based on a predefined scanning mechanism to detect hardware scan interrupts, detect chain signal trigger events, and periodically record scans; based on a custom control flow, during the execution of the instruction execution algorithm, hardware scan interrupt detection, chain signal trigger event detection, and periodic recording scans are performed on the system in real time; in response to the detection of an abnormal situation, the operating equipment is stopped or safely handled according to the emergency handling plan corresponding to the abnormal situation; after the abnormal situation is resolved, the system is powered on, reset, or undergoes fault recovery initialization, and scan scheduling is performed again based on the predefined scanning mechanism.

[0107] Abnormal situations include at least one of the following: external signal input, exceeding the safety threshold of the acquired signal, abnormal equipment status and fault feedback, communication signal timeout loss, operation logic conflict, abnormal function block mapping, and actuator action monitoring timeout.

[0108] In some embodiments of this application, after receiving the target parameter calibration instruction, the underlying security logic algorithm can also be run; in response to receiving error information sent by any one of the instruction recognition algorithm, instruction execution algorithm and underlying security logic algorithm, an error prompt message can be generated.

[0109] In other words, the technical solution provided in this application embodiment enables autonomous adjustment of the experimental equipment operation process through flexible wiring and visualized process control, thereby enhancing the availability and flexibility of the experimental equipment.

[0110] Parameter calibration primarily uses sequential control: "Process 1 executes action B under condition A. After action B achieves effect C, C becomes condition A for the next process 2..." Previously, equipment was programmed according to the control flow determined during engineering implementation design, allowing the experimental setup to achieve a single goal as a whole. However, by extracting the control programming process and using user-input batch processing commands and keyword recognition, combined with EPICS's algorithm processing and the online expansion capabilities of IOC and Phoebus (a newer control system toolset), the hardware and software of the engineering equipment can be separated into two parts. This allows experimenters to independently modify experimental procedures and obtain desired results without relying on professional programmers or spending significant time learning specialized programming languages ​​and electrical technologies.

[0111] The technical solutions provided in this application can be divided into physical layer electrical connections and software custom programming algorithm implementation.

[0112] The physical layer hardware is divided into execution devices, I / O boards, and the server host. The connection between the execution devices and I / O boards is designed to be pluggable, using a unified quick connector and connector interface definition. All wiring from the relevant devices is brought out and configured as male connectors. I / O board wiring is categorized, numbered, and defined according to board type and I / O points, with all live I / O board wiring brought out and configured as female connectors. Modular wiring and a unified interface definition enable modular connectivity at the physical layer.

[0113] The software is divided into Phoebus's UI interaction platform and EPICS's input command recognition and processing algorithm and flow control algorithm.

[0114] In terms of configuration file management, macro definition configuration files and database template files (db files) can be configured. Macro definition configuration files centrally store the hardware parameters of the I / O board (such as board number, number of points, interface type); database template files are configured through " (Hongming) refers to the hardware parameters in the configuration file to enable one template to adapt to multiple IO boards; the signal records in the db file are named according to the rule of "board type + similar board number + board point number", where "board type" identifies the board function (such as analog input AI, digital output DO), "similar board number" identifies the serial number of the same type of board, and "board point number" identifies the specific channel on the board.

[0115] The input instruction recognition and processing algorithm and the flow control algorithm can be as follows: receive a string containing control instructions input from the UI, check whether the format of the independent steps conforms to the preset specifications (such as "mapping keywords"), and if the format conforms, split the string into multiple independent steps according to the preset rules. Each independent step contains operation keywords and parameters (if it does not conform, an error message is output).

[0116] Based on the pre-stored mapping relationship between operation keywords and function blocks (a configurable dynamic mapping table, which allows adding or deleting associations between operation keywords and function blocks by modifying the mapping table without modifying the core system code), each independent step is converted into function block call information. The function block call information includes the function block identifier and standardized parameters. A function block is a set of pre-compiled atomic units that can perform specific hardware operations.

[0117] The function block call information for independent step transformation will be stored in the step queue in sequence. The executor will extract the function block call information from the step queue in sequence and trigger the execution of the corresponding function block.

[0118] The system software contains multiple predefined function blocks that can execute corresponding hardware operations (such as device on / off, delay, and status detection) based on received standardized parameters and output execution result signals. If the signal is successful, the system continues to retrieve the next function block call information from the step queue and execute it; if the signal fails (action execution monitoring timeout / unexpected state / function block mapping does not exist), the executor reports an error and switches from the step queue to the underlying safety logic, retrieves the current data information for emergency processing, and terminates the original process.

[0119] In other words, Phoebus enables the input and parameter debugging of custom batch processing commands, triggers IOC analysis, executes control commands, and reads and writes all PV data related to device measurement and control from EPICS in real time through the CA protocol, displaying and assisting in the analysis of data generated during the experiment.

[0120] EPICS reads and processes data through Device support and stores it in the IOC's records; it receives batch processing commands input from the UI, and through the definition of batch processing commands and the corresponding program scripts, it parses keywords, translates commands, manages the command queue, and executes actions sequentially, thereby enabling flexible modification of the device's automatic operation process.

[0121] Figure 3 This is a system schematic diagram illustrating the implementation of the method provided in the embodiments of this application. For example... Figure 3 As shown, users can input target parameter calibration commands through the UI interaction design module. This UI interaction design module can be implemented using Phoebus. The UI interaction design module and the algorithm design module communicate via the CA (Channel Access) protocol. The algorithm design module is connected to multiple IOCs, such as IOC1, IOC2, ..., IOCn. Different IOCs connect to different I / O board groups, and each IOC board group can be quickly connected to various devices via pluggable connections. These devices can be, for example, motor inverters, switching valves, regulating valves, heaters, other actuators, and measurement and control sensors.

[0122] EPICS is a distributed control architecture that connects to corresponding types of I / O boards via quick-plug connectors to acquire data. EPICS is responsible for data processing and control algorithms. Batch processing commands input through the UI platform are compiled into sequential control flows that the underlying controller can recognize through keyword recognition, or signals are directly output to control the execution devices as required.

[0123] By employing the technical solution provided in this application, when configuring new equipment, the experimental platform's functionality can be modified and expanded through unified electrical connection definitions and pluggable IO acquisition boards, combined with Device Support in the software and structured database files (.db) defining signals and data. Alternatively, the EPICS system can directly integrate controllers from multiple experimental platforms. Without violating the underlying safety logic, custom concise batch processing instructions can interpret control logic requirements, translating user needs into data information recognizable by the underlying controller or directly interlocking the required automatic control processes through IO boards. This eliminates the complete reliance on fixed programs written in the underlying code and avoids the need for downtime and programming adjustments for each experimental process.

[0124] Figure 4 This is a flowchart illustrating the flow control algorithm provided in an embodiment of this application. Figure 4 As shown, the fixed operating parameters of the controlled system, the instruction codes of batch processing commands, and the instruction separators can be input into the corresponding EPICS system stringin (String Input Record). The input information is then subject to secondary verification. After verification, the input instruction code is recognized using an instruction recognition algorithm. If the instruction is not recognized (i.e., the instruction format is incorrect), an error message is generated. Conversely, if recognition is successful, the instruction code is executed using an instruction execution algorithm, i.e., the function of each instruction segment is executed. If an error occurs during execution, an error message is generated; otherwise, the process terminates after all code segments have been executed.

[0125] Simultaneously, after the system undergoes power-on, reset, or fault recovery initialization, the underlying safety logic algorithm will automatically run. If the underlying safety logic algorithm reports an error at any time, an error message will be generated, and the calibration process will be interrupted until the error is resolved.

[0126] Figure 5 This is a flowchart illustrating the instruction recognition algorithm of the system in an embodiment of this application. For example... Figure 5 As shown, the instruction recognition algorithm first identifies the format of the input batch processing instruction. If the instruction is not recognized (i.e., the format is incorrect), the process ends. Conversely, if the instruction is recognized (i.e., the format is correct), the new input instruction is compared with the instruction from the previous process. If the comparison result shows that the instructions are inconsistent, the original parameter record in the VAL field is cleared before entering the instruction execution algorithm; otherwise, if the comparison result shows that the instructions are consistent, the instruction execution algorithm is entered directly.

[0127] Figure 6 This is a flowchart illustrating the instruction execution algorithm of the system in an embodiment of this application. For example... Figure 6As shown, after the process begins, the instruction format can be re-identified to ensure its correctness. Then, the instruction object, instruction action, and instruction data are obtained.

[0128] The instruction objects can include process control objects, equipment control quantity objects, and timers. Process control objects include, for example, P (proportional), I (integral), D (derivative), and comparison values. Equipment control quantity objects include, for example, valves, frequency converters, mass flow controllers, heaters, and alarms.

[0129] Instructions can include process control parameter adjustment actions, start / stop actions of control signal output, and delay / timing actions.

[0130] Instruction data can include data modification, data comparison, data calculation, and delay timing values.

[0131] The instruction execution algorithm can identify the delimiters in batch instructions, thereby parsing and translating the batch instructions and storing them in a queue. The data format can be object + action + purpose, that is, control object data changes.

[0132] Instruction segments can be retrieved sequentially from the queue in a first-in, first-out (FIFO) order, and the functional modules of each instruction segment can be determined based on a preset mapping relationship. Specifically, functional modules can be determined based on actions, and input parameters for functional blocks can be determined based on objects and targets. Furthermore, functional blocks have output parameters used to output execution results, such as "done" (success) or "error" (failure).

[0133] The system calls the designated functional modules to execute each instruction segment. After the current instruction segment is executed, it checks if the result is "done". If so, it further checks if there are any remaining instruction segments in the queue. If so, it executes the next instruction segment in the queue according to its sequence number. If not, it means the queue has been cleared, and the code execution flow ends.

[0134] Conversely, if the execution result is an error, exception handling is performed. Exceptions may include timeouts, unexpected states, or missing function blocks. Exceptions can be input into the underlying security logic algorithm for processing, which then clears the queue and terminates the process.

[0135] Figure 7 This is a flowchart illustrating the underlying security logic algorithm of the system in this application embodiment. Figure 7 As shown, after the system is powered on, reset, or undergoes fault recovery initialization, a predefined scanning mechanism can be used to schedule scans, perform hardware scan interrupt detection, chain signal trigger event detection, and periodic recording scans on the system.

[0136] In addition, based on a custom control flow, the system can perform hardware scanning interrupt detection, chain signal trigger event detection, and periodic recording scanning in real time during the execution of the instruction execution algorithm.

[0137] If an anomaly is detected, the underlying safety logic algorithm can stop or safely handle the operating equipment according to the corresponding emergency response plan. Anomalies include at least one of the following: external signal input, exceeding the safety threshold of the acquired signal, abnormal equipment status and fault feedback, communication signal timeout and loss, operational logic conflict, abnormal function block mapping, and actuator action monitoring timeout.

[0138] After the abnormal situation is resolved, the system is powered on, reset, or initialized for fault recovery, and then scanned and scheduled again based on the predefined scanning mechanism.

[0139] The following example, “Open valve PV → Delay for 3 seconds → Record pressure P1 → End”, illustrates the parameter calibration process in detail.

[0140] Step 1: Input string and parse.

[0141] Input: Control flow described in natural language.

[0142] Analysis: Identify the "actions" (such as "open valve" and "delay") and "parameters" (such as valve PV and delay duration) in the string, map the actions to predefined function blocks (such as "open valve" → OPEN_VALVE, "delay" → DELAY), and generate a structured sequence of instruction segments.

[0143] Example: Input string → Parsing and storing in a queue:

[0144] OPEN_VALVE,PV;

[0145] T# 3S;

[0146] GET RL1:P1 (RL1 is a custom data storage address).

[0147] Step 2: Queue initialization.

[0148] The parser enqueues the instruction segment sequence in chronological order (following the first-in, first-out principle of the queue); the head of the queue contains the "current instruction segment to be executed", and the tail contains the "subsequent instruction segments".

[0149] Example: Queue status after enqueueing: Head of queue → [OPEN_VALVE] → [DELAY] → [GETRL1] → Tail of queue.

[0150] Step 3: Actuator action.

[0151] Retrieve instruction segments from the queue, invoke the corresponding module to execute them, and proceed to the next step based on the execution result:

[0152] 1) Fetch instruction segment: The executor "dequeues" the first instruction segment (such as OPEN_VALVE) from the head of the queue.

[0153] 2) Module call: Based on the mapping relationship, activate the corresponding predefined module (OPEN_VALVE module) and pass in the parameter (valve PV);

[0154] 3) Execution Module: The module executes specific logic (such as opening valve PV and waiting for feedback);

[0155] 4) Signal feedback: After the module completes execution, it returns a signal to the executor (done = success, error = failure).

[0156] 5) If done: The executor retrieves the next instruction segment (e.g., DELAY) from the queue and repeats step 3;

[0157] 6) If error occurs: trigger "Exception handling".

[0158] Step 4: Exception handling.

[0159] Triggering scenario: Command segment execution fails (e.g., valve not opened).

[0160] The original process is terminated, and the underlying security logic is switched to ensure equipment and personal safety, and an alarm is issued.

[0161] Step 5: The process has been completed normally.

[0162] Normal termination: When all instruction segments in the queue have been executed (the last instruction segment is END), the executor clears the queue, resets the state, and waits for the next start signal.

[0163] Therefore, in the software layer, custom string input is a way to convert the textual description of user requirements into a simple, structured process description, summarizing the switching criteria between steps as "A (object state) + B (action) = C (state)". This is then translated into SNL (Small Nested Language, a programming / markup language to be confirmed) functional modules that EPICS can understand: each functional block is a programming language expression of the action corresponding to each keyword, linked to the input instruction string through parsed keyword mapping.

[0164] This completes the identification and execution of the instruction "Open valve PV → Delay for 3 seconds → Record pressure P1 → End".

[0165] The following section uses the static volumetric calibration of a water flow meter in a controlled system as an example to explain the parameter calibration process in detail.

[0166] The statistics of each implementation object in the system, the I / O board connection points of the implementation objects, and the data storage address definitions are shown in Table 1.

[0167] Table 1. Statistics of Implementation Targets, I / O Board Wiring Points and Data Storage Address Definitions for Implementation Targets

[0168]

[0169] Figure 8 This is a schematic diagram illustrating the connection of the equipment and the functional positioning of the monitored and controlled objects within the experimental system. The total number of monitoring and control parameters is as follows:

[0170] 1) Temperature T;

[0171] 2) Pressure P;

[0172] 3) (To be measured) Flow rate Q;

[0173] 4) Liquid level L;

[0174] 5) Control valve SV (defined as a percentage);

[0175] 6) Return water valve PV;

[0176] 7) Pump frequency setting AQ and feedback AI (defined as a percentage).

[0177] The experimental methods and procedures include:

[0178] Step 1: System exhaust and pre-run.

[0179] Open valves SV and PV, start the water pump, and let the water circulate in the system for 5 minutes; close the regulating valve, open the manual air vent valve upstream of the flow meter to remove air bubbles from the pipeline; observe whether the pressure reading is stable (pipeline leak or pump malfunction).

[0180] Batch processing command expression:

[0181] PUT SV:100;

[0182] PUT PV:1;

[0183] PUT MOTOR: 100

[0184] T# 5MIN;

[0185] PUT SV:0;

[0186] Step 2: Adjust the flow rate.

[0187] Adjust the opening of valve SV to stabilize the flow meter reading at a certain flow point for 30 seconds.

[0188] Batch processing command expression:

[0189] PUT SV:20;

[0190] T# 30S;

[0191] Step 3: Record the status parameters.

[0192] Read and record (current): flow meter reading Q, temperature T, liquid level L, pressure P.

[0193] Batch processing command expression:

[0194] PUT RL10:RL1;

[0195] PUT RL11:RL2;

[0196] PUT RL12:RL3;

[0197] PUTRL13:RL5;

[0198] Step 4: Measurement using standard equipment.

[0199] Close the return valve PV of the standard measuring vessel, open the regulating valve SV, and start timing simultaneously; when the liquid level in the measuring vessel reaches a certain scale mark (volume V1 is calculated from the liquid level L, here taken as 1 dm³),... 2 Taking a standard cylindrical container with a base area of ​​V=10L as an example, open the regulating valve and continue to add water for 5 seconds until the higher scale line (volume V2) is reached, then close the water inlet valve of the measuring vessel.

[0200] Calculate the actual flow rate: Standard flow rate Qstandard = (V2 - V1) / 5.

[0201] Batch processing command expression:

[0202] PUT DQ0.1:0;

[0203] RL21: 1 RL11;

[0204] T# 5S;

[0205] PUT RL14:RL2;

[0206] RL22:1 RL14;

[0207] RL23:(RL22-RL21) / 5;

[0208] After sorting the batch instructions, input them into the queue, and then sequentially execute the instructions in sequence to complete the static volume calibration of the water flow meter.

[0209] In addition to the static volumetric calibration experiment of the water flow meter mentioned above, other experiments can also be conducted by adjusting the pipeline connection and the functional positioning of the measurement and control object without adjusting the underlying code.

[0210] Figure 9 This is a schematic diagram showing the connection of another device and the functional positioning of the measurement and control object in the experimental system. Figure 10 This is a schematic diagram illustrating the connection of another type of equipment and the functional positioning of the measurement and control object within the experimental system.

[0211] For example, it can be targeted Figure 9 The controlled system shown can be calibrated by performing pipeline pressure loss (resistance) tests, and can also be used for... Figure 10 The controlled system undergoes pump performance testing and calibration.

[0212] Figures 8 to 10 The pipeline connections and the connection positions and functional positioning (test objects) of the required sensors for the three corresponding process flows (as well as other sensor and equipment calibration and testing experimental processes) have changed. Traditional design methods limit the equipment to manual operation or fixed process automatic flow operation, and cannot be flexibly adjusted according to needs. Modular programming and simple control command input will greatly improve the usability of the program and get rid of the high dependence of software on hardware.

[0213] The technical solution provided in this application ensures the stability and reliability of the underlying operations through predefined functional blocks, and enables flexible and variable upper-layer processes through string parsing and queue scheduling. Its specific advantages are as follows:

[0214] 1) It lowers the barrier to entry and facilitates human-computer interaction.

[0215] String descriptions are intuitive and easy to understand: Operators can define processes using natural language-style strings without having to consider complex programming structures, ideas, or professional skills, and without having to master the underlying syntax of EPICS (such as SNL and database records), further reducing the difficulty of use for non-developers.

[0216] 2) High flexibility, can quickly adapt to process changes.

[0217] String description and dynamic scheduling: Control flow can be defined using strings, and modifying the flow only requires adjusting the input string instructions, without modifying function blocks or core code.

[0218] The queue supports dynamic adjustment: during runtime, the queue can be inserted / deleted (e.g., in case of an exception, the underlying security logic can be switched to insert an emergency development pressure relief action) to adapt to sudden situations (such as equipment failure or parameter exceeding the standard).

[0219] Parameterized configuration: The parameters of the function block (such as a 5-minute delay and a pressure threshold of 0.8 MPa) are dynamically passed in via strings. The same function block can be reused in different scenarios (such as T#5MIN and T#10MIN sharing the same delay function block).

[0220] 3) Modular design improves development and maintenance efficiency.

[0221] The functional blocks have undergone rigorous testing and are highly stable and reusable. The functional block corresponding to the same operation (such as "opening the valve") can be reused in multiple processes, reducing code redundancy.

[0222] Layered decoupling and clear responsibilities: Layered design of input processing, scheduling, function blocks, hardware interfaces, etc., allows developers to focus on a single module without affecting the overall framework (e.g., hardware engineers develop drivers, and logic engineers design function blocks).

[0223] Fault localization is simpler (e.g., when a process is stuck, the scheduling layer logs can be used to quickly locate whether it is a queue problem or a non-responsive function block).

[0224] Easy to expand: When adding a new device, after managing and setting up the data records through predefined interfaces and configuration files, you only need to ensure that the keyword mapping relationship is correct (e.g., when adding a valve, ensure that the new valve is mapped to the valve control-related function blocks); when adding a new operation type, you can develop the corresponding new function block (without modifying the existing code) to integrate the new process.

[0225] 4) Adapts to distributed control and supports multi-IOC collaboration.

[0226] Cross-IOC function block calls: Through the CA protocol of EPICS, function blocks can access the PVs of other IOCs to achieve distributed control and system expansion.

[0227] Global queue scheduling: The central IOC can maintain a global step queue and coordinate the execution order of function blocks of multiple sub-IOCs (such as "start the pump of IOC1 first, then start the valve of IOC2") to ensure the independence and continuity of the execution of each action.

[0228] Unified monitoring and logging: The logging layer can summarize the execution status of all IOC steps, which facilitates the overall operation and maintenance of the distributed system.

[0229] 5) Strict process controllability to meet safety standards.

[0230] Sequential execution guarantee: The FIFO characteristic of the queue ensures that the steps are executed in a predetermined order, avoiding accidents caused by "operation sequence errors" in industrial processes (such as the logic of "starting the pump first and then opening the valve" will not be reversed).

[0231] Abnormal closed-loop processing: The error signal of the function block is combined with the dynamic adjustment of the queue to realize the closed loop of "abnormality → emergency handling → alarm" (such as automatically closing the valve and notifying operation and maintenance when the pressure exceeds the standard), which complies with industrial safety specifications.

[0232] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0233] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0234] Figure 11 This is a schematic diagram of a parameter calibration device based on EPICS provided in an embodiment of this application. Figure 11 As shown, the device includes:

[0235] The connection module 1101 is configured to electrically connect each device in the controlled system to the input / output controller of the EPICS system; wherein, the interfaces of each device and the controller are all configured in a standardized manner.

[0236] Configuration module 1102 is configured to configure a database template file based on the electrical connection relationship between the device interface and the controller interface to determine the hardware parameters of each device.

[0237] Predefined module 1103 is configured to predefine the functional modules of each device in the controlled system based at least on the database template file.

[0238] The parsing module 1104 is configured to parse the target parameter calibration instruction to obtain a batch processing instruction in response to receiving the target parameter calibration instruction; the batch processing instruction includes N instruction segments arranged in sequence, where N is a positive integer.

[0239] The execution module 1105 is configured to, in response to the determination that the instruction recognition has passed, use the instruction execution algorithm to obtain the functional module corresponding to each instruction segment, and input the execution parameters in the target parameter calibration instruction into the functional module.

[0240] The calibration module 1106 is configured to use the instruction execution algorithm to sequentially execute the functional modules corresponding to N instruction segments to complete the calibration of the target parameters in the execution device.

[0241] According to the technical solution provided in the embodiments of this application, by electrically connecting each device in the controlled system with the input / output controller of the EPICS system, configuring a database template file based on the electrical connection relationship between the device interface and the controller interface, and predefining the functional modules of each device in the controlled system based on the database template file, when a target parameter calibration instruction is received, the target parameter calibration instruction is parsed to obtain N instruction segments arranged in sequence. After the instruction is recognized, the functional module corresponding to each instruction segment is obtained, and the execution parameters in the target parameter calibration instruction are input into the functional module. Thus, parameter calibration is completed by sequentially executing the functional modules corresponding to the N instruction segments, realizing an automatic control process for parameter calibration. It no longer relies entirely on the fixed program written in the underlying code, and there is no need to stop and adjust the programming for each experimental process, reducing calibration complexity and improving calibration efficiency.

[0242] In some implementations, configuring a database template file includes: adding controller interfaces using a macro definition configuration file, wherein the macro definition configuration file includes at least the interface type, interface location, and wiring definition of each controller interface; configuring a database template file for the target device, wherein the database template file determines the hardware parameters of the device by referencing the macro definition configuration file corresponding to the target device; wherein the target device is any device in the controlled system, and the macro definition configuration file corresponding to the target device is the macro definition configuration file of the controller interface electrically connected to the target device.

[0243] In some implementations, each type of device includes at least one functional module, and different functional modules of the same type of device correspond to different actions of the device; each functional module includes at least a condition judgment module, an action execution module, and a result feedback module.

[0244] In some implementations, parsing the target parameter calibration instruction to obtain batch processing instructions includes: identifying action-type keywords in the target parameter calibration instruction, dividing the target parameter calibration instruction into M fields, where M is a positive integer less than or equal to N; identifying object-type keywords in each field to obtain M instruction segments; identifying logical-type keywords in each instruction segment, and combining the M instruction segments based on the identification results to obtain batch processing instructions including N instruction segments arranged in sequence.

[0245] In some implementations, the instruction recognition algorithm works as follows: it performs format recognition on batch processing instructions; in response to determining that the format recognition is successful and the batch processing instruction is the same as the batch processing instruction previously received by the EPICS system, it determines that the instruction recognition is successful; in response to determining that the format recognition is successful and the batch processing instruction is different from the batch processing instruction previously received by the EPICS system, it determines that the instruction recognition is successful after clearing the original parameter record.

[0246] In some implementations, the instruction execution algorithm operates as follows: It acquires the instruction object, instruction action, and instruction data for each instruction segment; wherein the instruction object includes at least process control objects, equipment control objects, and timers; the instruction action includes at least process control parameter adjustment actions, start / stop actions for control signal output, and delay timing control actions; the data information includes at least data modification information, data comparison information, data calculation information, and delay timing values; it sequentially stores N instruction segments into a queue; wherein each instruction segment includes at least an instruction object, an instruction action, and a target for instruction object data change; it determines the corresponding functional module based on the instruction action of each instruction segment and inputs the instruction data of this instruction segment into the functional module; and it sequentially executes the N instruction segments.

[0247] In some implementations, when executing N instruction segments sequentially, the method further includes: in response to detecting an error message, sending the error message to the underlying security logic algorithm; the underlying security logic algorithm automatically running after the system is powered on, reset, or fault recovery initialization; and the underlying security logic algorithm generating an alarm message and clearing the queue.

[0248] In some implementations, the underlying safety logic algorithm operates as follows: After the system is powered on, reset, or undergoes fault recovery initialization, a scan scheduling is performed based on a predefined scanning mechanism to detect hardware scan interruptions, chain signal trigger events, and periodically record scans. Based on a custom control flow, during the execution of the instruction execution algorithm, the system is monitored in real time for hardware scan interruption detection, chain signal trigger event detection, and periodic recording scans. In response to the detection of an anomaly, the operating equipment is stopped or safely processed according to the emergency response plan corresponding to the anomaly. After the anomaly is resolved, the system is powered on, reset, or undergoes fault recovery initialization, and scan scheduling is performed again based on the predefined scanning mechanism. The anomaly includes at least one of the following: external signal input, exceeding the safety threshold of the acquired signal, abnormal equipment status and fault feedback, communication signal timeout loss, operational logic conflict, abnormal function block mapping, and actuator action monitoring timeout.

[0249] In some implementations, after receiving the target parameter calibration instruction, the method further includes: running the underlying security logic algorithm; and generating an error message in conjunction with the underlying security logic algorithm in response to receiving an error message sent by at least one of the instruction recognition algorithm and instruction execution algorithm.

[0250] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0251] Figure 12This is a schematic diagram of the electronic device provided in an embodiment of this application. For example... Figure 12 As shown, the electronic device 12 of this embodiment includes: a processor 1201, a memory 1202, and a computer program 1203 stored in the memory 1202 and executable on the processor 1201. When the processor 1201 executes the computer program 1203, it implements the steps in the various method embodiments described above. Alternatively, when the processor 1201 executes the computer program 1203, it implements the functions of each module / unit in the various device embodiments described above.

[0252] Electronic device 12 can be a desktop computer, laptop, handheld computer, or cloud server, etc. It can be a device running an operating system suitable for developing and running EPIC (Experimental Physics and Industrial Control Systems) and the collaborative office software Phoebus, such as an electronic device running one or more of the following operating systems: Windows, Linux, or macOS. Electronic device 12 may include, but is not limited to, processor 1201 and memory 1202. Those skilled in the art will understand that... Figure 12 This is merely an example of electronic device 12 and does not constitute a limitation on electronic device 12. It may include more or fewer components than shown, or different components.

[0253] The processor 1201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0254] The memory 1202 can be an internal storage unit of the electronic device 12, such as a hard disk or RAM of the electronic device 12. The memory 1202 can also be an external storage device of the electronic device 12, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, FlashCard, etc., equipped on the electronic device 12. The memory 1202 can also include both internal and external storage units of the electronic device 12. The memory 1202 is used to store computer programs and other programs and data required by the electronic device.

[0255] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0256] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0257] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A parameter calibration method based on EPICS, characterized in that, The method is used to calibrate target parameters in a controlled system based on the EPICS system; The method includes: Each device in the controlled system is electrically connected to the input / output controller of the EPICS system; wherein, the interfaces of each device and the controller are all configured in a standardized manner; Configure the database template file based on the electrical connection relationship between the device interface and the controller interface to determine the hardware parameters of each device; The functional modules of each device in the controlled system are predefined at least based on the database template file; In response to receiving a target parameter calibration instruction, the target parameter calibration instruction is parsed to obtain a batch processing instruction; the batch processing instruction includes N instruction segments arranged in sequence, where N is a positive integer; In response to the confirmation that the instruction recognition is successful, the instruction execution algorithm is used to obtain the functional module corresponding to each instruction segment, and the execution parameters in the target parameter calibration instruction are input into the functional module. The N instruction segments are executed sequentially using an instruction execution algorithm to complete the calibration of the target parameters in the execution device. The database template configuration file includes: Add controller interfaces using macro definition configuration files, which must include at least the interface type, interface location, and wiring definition for each controller interface. Configure the database template file of the target device. The database template file determines the hardware parameters of the device by referencing the macro definition configuration file corresponding to the target device. The target device can be any device in the controlled system, and the macro definition configuration file corresponding to the target device is the macro definition configuration file of the controller interface that is electrically connected to the target device.

2. The method according to claim 1, characterized in that, Each type of equipment includes at least one functional module, and different functional modules of the same type of equipment correspond to different actions of the equipment; Each functional module includes at least a condition judgment module, an action execution module, and a result feedback module.

3. The method according to claim 1, characterized in that, Parsing the target parameter calibration instructions yields batch processing instructions, including: The action-related keywords in the target parameter calibration instruction are identified, and the target parameter calibration instruction is divided into M fields, where M is a positive integer less than or equal to N; Identify the object class keywords in each field to obtain M instruction segments; Logical keywords in each instruction segment are identified, and the M instruction segments are combined based on the identification results to obtain the batch processing instruction consisting of N instruction segments arranged in sequence.

4. The method according to claim 1, characterized in that, The instruction recognition algorithm works in the following way: The batch processing instructions are formatted and identified. In response to the determination that the format recognition is successful and that the batch processing instruction is the same as the batch processing instruction previously received by the EPICS system, the instruction recognition is determined to be successful. In response to the determination that the format recognition is successful and that the batch processing instruction is different from the batch processing instruction previously received by the EPICS system, the instruction recognition is determined to be successful after clearing the original parameter record.

5. The method according to claim 1, characterized in that, The instruction execution algorithm works in the following manner: Acquire the instruction object, instruction action, and instruction data for each instruction segment; wherein, the instruction object includes at least process control objects, equipment control objects, and timers; the instruction action includes at least process control parameter adjustment actions, start / stop actions for control signal output, and delay timing control actions; the data information includes at least data modification information, data comparison information, data calculation information, and delay timing values; The N instruction segments are stored sequentially into a queue; each instruction segment includes at least a sequence number, an instruction object, an instruction action, and a target for changes in the instruction object data. Based on the instruction actions of each instruction segment, determine the functional module corresponding to this instruction segment, and input the instruction data of this instruction segment into the functional module; The N instruction segments are executed sequentially.

6. The method according to claim 5, characterized in that, When executing the N instruction segments sequentially, the method further includes: In response to the detection of an error message, the error message is sent to the underlying security logic algorithm; the underlying security logic algorithm runs automatically after the system is powered on, reset, or undergoes fault recovery initialization. The underlying security logic algorithm generates alarm information and clears the queue.

7. The method according to claim 6, characterized in that, The underlying security logic algorithm works in the following manner: After the system is powered on, reset, or initialized for fault recovery, a scan schedule is performed based on a predefined scan mechanism to perform hardware scan interrupt detection, chain signal trigger event detection, and periodic recording scan on the system. Based on a custom control flow, during the execution of the instruction execution algorithm, the system performs real-time hardware scan interrupt detection, chain signal trigger event detection, and periodic recording scan. In response to the detection of an abnormal situation, the operating equipment shall be stopped or safely handled in accordance with the emergency response plan corresponding to the abnormal situation. After the abnormal situation is resolved, the system is powered on, reset, or initialized for fault recovery, and then scan scheduling is performed again based on the predefined scan mechanism; The abnormal conditions include at least one of the following: external signal input, exceeding the safety threshold of the acquired signal, abnormal equipment status and fault feedback, communication signal timeout loss, operation logic conflict, abnormal function block mapping, and actuator action monitoring timeout.

8. The method according to claim 1, characterized in that, After receiving the target parameter calibration instruction, the method further includes: Run the underlying security logic algorithm; In response to receiving error messages from at least one of the instruction recognition algorithm and the instruction execution algorithm, an error message is generated in conjunction with the underlying security logic algorithm.

9. A parameter calibration device based on EPICS, characterized in that, include: The connection module is configured to electrically connect each device in the controlled system to the input / output controller of the EPICS system; the interfaces of each device and the controller are all configured in a standardized manner. The configuration module is configured to configure a database template file based on the electrical connection relationship between the device interface and the controller interface, and to determine the hardware parameters of each device. The predefined module is configured to predefine the functional modules of each device in the controlled system based at least on the database template file; The parsing module is configured to, in response to receiving a target parameter calibration instruction, parse the target parameter calibration instruction to obtain a batch processing instruction; the batch processing instruction includes N instruction segments arranged in sequence, where N is a positive integer; The execution module is configured to, in response to the determination that the instruction recognition has passed, use the instruction execution algorithm to obtain the functional module corresponding to each instruction segment, and input the execution parameters in the target parameter calibration instruction into the functional module; The calibration module is configured to sequentially execute the functional modules corresponding to the N instruction segments using an instruction execution algorithm to complete the calibration of the target parameters in the execution device; The database template configuration file includes: Add controller interfaces using macro definition configuration files, which must include at least the interface type, interface location, and wiring definition for each controller interface. Configure the database template file of the target device. The database template file determines the hardware parameters of the device by referencing the macro definition configuration file corresponding to the target device. The target device can be any device in the controlled system, and the macro definition configuration file corresponding to the target device is the macro definition configuration file of the controller interface that is electrically connected to the target device.

10. An electronic 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 steps of the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Control code generation method and device

    CN112034765A

  • Object detection method and device, electronic equipment and storage medium

    CN116340132A