Disclosure of Invention
The present invention aims to solve at least one of the technical problems in the related art to some extent. Therefore, a first object of the present invention is to provide an experimental method, which improves the robustness of the device and avoids unnecessary energy consumption and calculation resources.
A second object of the present invention is to propose a computer readable storage medium.
A third object of the present invention is to propose an electronic device.
A fourth object of the invention is to propose an experimental system.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides an experimental method for an EPR device, where the EPR device includes a plurality of lower computer modules, the method includes obtaining a process control program file according to a selected experiment type, extracting target information from the process control program file, generating a target module list according to the target information, establishing connection with a target module in the target module list, and performing an experiment after completing configuration of the target module.
According to the experimental method, firstly, a process control program file is acquired according to the selected experimental type, target information is extracted from the process control program file, then, a target module list is generated according to the target information, finally, connection with a target module in the target module list is established, and experiments are conducted after the configuration of the target module is completed. Therefore, according to the experimental method, the required modules can be automatically selected to be connected for carrying out experiments according to actual needs, and the unconnected modules are in a closed or standby state, so that unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
In addition, the experimental method according to the embodiment of the invention may further have the following additional technical features:
in one embodiment of the invention, the establishment of the connection with the target modules in the target module list comprises the steps of sending a handshake instruction to the target modules, receiving connection confirmation information and self parameter information sent by the target modules aiming at the handshake instruction, traversing the target modules in the target module list according to the connection confirmation information and the self parameter information, and judging whether the connection with all the target modules in the target module list is established or not.
In one embodiment of the invention, before configuring the target module, the method further comprises the steps of sending a polling request to the target module, and receiving a polling response sent by the target module for the polling request to judge whether the target module with abnormal polling exists, wherein the target module is configured when the target module with abnormal polling does not exist.
In one embodiment of the invention, the lower computer module comprises a control module and a signal module, wherein the polling response sent by the control module in the target module list comprises changed module parameter information and null data with unchanged module parameters, and the polling response sent by the signal module in the target module list comprises changed module parameter information, null data with unchanged module parameters and detection data information.
In one embodiment of the invention, the extracting the target information from the process control program file comprises traversing the process control program file, extracting information which appears in the process control program file and is the same as the content in an extraction target list, and forming an extraction result list, wherein the extraction result list comprises the target information, and the extraction target list comprises information corresponding to all lower computer modules in the EPR equipment.
In one embodiment of the present invention, the process control program file includes a configuration file, the object information includes module fields, and the generating the object module list according to the object information includes merging the same module fields in the extraction result list to obtain the object module list.
In one embodiment of the invention, the process control program file comprises a time sequence control file and a data acquisition file, the target information comprises a control instruction and a data receiving instruction, and the generation of the target module list according to the target information comprises the steps of replacing the control instruction and the data receiving instruction in the extraction result list with corresponding lower computer module fields, and merging the same module fields to obtain the target module list.
To achieve the above object, an embodiment of a second aspect of the present invention proposes a computer-readable storage medium. On which a computer program is stored which, when being executed by a processor, implements the experimental method described above.
The computer readable storage medium according to the embodiment of the invention stores a computer program thereon, which when executed by a processor, firstly obtains a process control program file according to a selected experiment type and extracts target information from the process control program file, then generates a target module list according to the target information, and finally establishes connection with a target module in the target module list and performs an experiment after completing configuration of the target module. Therefore, according to actual needs, the required modules can be automatically selected to be connected for carrying out experiments, the unconnected modules are in a closed or standby state, unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
In order to achieve the above object, an embodiment of a third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the above experimental method.
According to the electronic equipment, when the computer program on the electronic equipment is executed by the processor, firstly, a process control program file is acquired according to the selected experiment type, target information is extracted from the process control program file, then, a target module list is generated according to the target information, finally, connection with a target module in the target module list is established, and an experiment is carried out after the configuration of the target module is completed. Therefore, according to actual needs, the required modules can be automatically selected for connection and expansion experiments, and unconnected modules are in a closed or standby state, so that unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
In order to achieve the above objective, an embodiment of a fourth aspect of the present invention provides an experimental system, which includes a host computer and an EPR device, where the host computer includes the above electronic device.
According to the experimental system provided by the embodiment of the invention, the EPR equipment is connected with the upper computer, when the computer program on the electronic equipment of the upper computer is executed by the processor, the process control program file is firstly obtained according to the selected experimental type, the target information is extracted from the process control program file, then the target module list is generated according to the target information, finally, the connection with the target module in the target module list is established, and the experiment is carried out after the configuration of the target module is completed. Therefore, according to actual needs, the required modules can be automatically selected to be connected for carrying out experiments, the unconnected modules are in a closed or standby state, unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
Experimental methods, storage media, electronic devices, experimental systems of embodiments of the present invention are described below with reference to the accompanying drawings.
FIG. 1 is a flow chart of an experimental method of one embodiment of the invention.
In the embodiment of the invention, the experimental method is used for the EPR equipment, the EPR equipment comprises a plurality of lower computer modules, the upper computer is used for controlling the EPR equipment, the plurality of lower computer modules can be divided in a upscaling mode, further, according to actual needs, the connection with any module required can be automatically selected to be established, the experiment is carried out after the connection is established, and the module which is not established is in a closed or standby state. In a specific example, the plurality of lower computer modules in the EPR device are divided into a control module and a signal module, wherein the control module comprises a microwave transmitting module, a microwave receiving module, a resonant cavity module, a magnetic field module, a radio frequency module, a modulation field module and a temperature control module, and the signal module comprises a lock-release module, an integration module, an oscillography module and an acquisition module.
As shown in fig. 1, the experimental method includes the steps of:
S101, acquiring a process control program file according to the selected experiment type, and extracting target information from the process control program file.
Specifically, when an experiment needs to be performed, the user needs to first select an experiment type, for example, a selection interface may be provided, on which the user performs selection of the experiment type, and on which the user may determine the selection by clicking to implement determination of the selected experiment type.
After the experiment type is selected, different process control program files are generated according to different experiment types, and target information pointing to target modules required by the experiment is included in the process control program files, so that the target information can be extracted from the process control program files.
S102, generating a target module list according to the target information.
Specifically, after the target information is extracted, the same information in the target information is combined, so that a target module list is generated.
S103, establishing connection with the target modules in the target module list, and carrying out verification after completing configuration of the target modules.
Specifically, after the connection with the target module in the target module list is established, the upper computer needs to configure the target module, specifically, the upper computer issues configuration information to the target module in the target module list according to the configuration file, and a user can directly adopt preset state parameters corresponding to the target module in the configuration file, or input required state parameters for specific target modules so as to manually change the configuration file. After the configuration of the target module is completed, experiments can be performed according to the time sequence control file and the data acquisition file.
The configuration file, the time sequence control file and the data acquisition file are files generated according to the experiment type after the experiment type is acquired, and different configuration files, time sequence control files and data acquisition files can be generated according to different experiment types. The configuration file is used for issuing configuration information to enable the state parameters of each target module related to experiments to meet the requirements of the experiments, the specific state parameters of each target module in the configuration file are provided with preset values and can be manually changed according to the requirements of users, the time sequence control file is used for sending control instructions to each target module according to the time sequence of the experiment process, and the data acquisition file is used for acquiring the data information sent by each target module according to the time sequence of the experiment process.
Therefore, the EPR equipment comprises a plurality of lower computer modules, process control Cheng Xuwen pieces are acquired according to the experiment types, target information is extracted from the process control program files, a target module list is generated according to the target information, and connection with the target modules in the target module list is established, so that the modules which only participate in the experiment are in a working state, the modules which do not participate in the experiment are in a closing or standby state, data transmission is not needed between the modules which do not participate in the experiment and an upper computer, and unnecessary energy consumption and calculation resources are avoided. In addition, when the module which does not participate in the experiment fails, the whole equipment cannot report errors, and the experiment can still be normally carried out. Moreover, even if individual modules involved in the experiment fail, the user can select an experiment to work according to the available module collocation.
In one embodiment of the present invention, for the case where a plurality of experiments are continuously performed, process control program files corresponding to all of the experiment types may be acquired, and then a module list including lower computer modules required for all of the experiment types may be formed. As an example, if the process control program file is a configuration file, and before a common continuous wave experiment starts, a modulation field amplitude scanning experiment is first performed to correct the modulation field amplitude of the spectrometer, and then a microwave power scanning experiment is performed, because the sample signal intensity and the microwave power are not in a simple linear relationship, the experiment type is suitable for searching for the microwave power suitable for the sample, and in this case, the configuration files corresponding to all the experiment types can be obtained, and then a module list containing the lower computer modules required by all the experiment types is formed.
Therefore, a module list containing all lower computer modules required by all test types is formed, and the upper computer can be connected with all lower computer modules in the module list and configured, so that the efficiency of performing a plurality of experiments is improved.
In one embodiment of the present invention, referring to fig. 2, the establishing a connection with a target module in the target module list includes:
s201, a handshake instruction is sent to the target module, and connection confirmation information and self parameter information sent by the target module aiming at the handshake instruction are received.
Specifically, the upper computer sends a handshake instruction to a corresponding lower computer module, namely the target module, according to the list content of the target module, and after receiving the handshake instruction, the corresponding lower computer module starts and acquires own parameters and sends connection confirmation information and own parameter information to the upper computer.
S202, traversing the target modules in the target module list according to the connection confirmation information and the self parameter information to judge whether the connection with all the target modules in the target module list is established.
Specifically, after receiving the connection confirmation information and the device parameter information, the upper computer needs to traverse the target module list, and after receiving the connection confirmation information and the device parameter information corresponding to all the target modules in the target module list, the upper computer determines that the connection with all the target modules in the target module list is established.
Therefore, a handshake instruction can be sent to the target module through the upper computer to establish connection with the target module, connection confirmation information and self parameter information are received through the upper computer, and all the connection confirmation information and the target parameter information are received, so that connection between the upper computer and the target module is further ensured.
In one embodiment of the invention, before configuring the target module, the experimental method further comprises the steps of sending a polling request to the target module, and receiving a polling response sent by the target module for the polling request so as to judge whether the polling abnormal target module exists.
Specifically, there are different types of modules in the plurality of lower computer modules, and the different types may be, for example, the result obtained by dividing the plurality of lower computer modules in the above-mentioned manner. And because different types of lower computer modules may need to send different polling responses to the upper computer, after the upper computer sends a polling request to the target module, the upper computer may receive different types of polling responses, so that the upper computer needs to determine whether the target module sending the polling response is abnormal or not, and when no target module with abnormal polling is present, configure the target module.
In a specific example, the lower computer module comprises a control module and a signal module, wherein for the control module in the target module list, the transmitted polling response comprises changed module parameter information and null data with unchanged module parameters, and for the signal module in the target module list, the transmitted polling response comprises changed module parameter information, null data with unchanged module parameters and detection data information.
In one embodiment of the present invention, extracting the target information from the process control program file includes traversing the process control program file, and extracting information that appears in the process control program file and is the same as the content in the extraction target list to form an extraction result list. The extraction result list comprises target information, and the extraction target list comprises information corresponding to all lower computer modules in the EPR equipment.
The process control program file comprises a configuration file, the target information comprises module fields, and the target module list is generated according to the target information, wherein the process control program file comprises the steps of merging the same module fields in the extraction result list to obtain the target module list.
At this time, referring to fig. 3, first, an experiment type is determined, and a process control program file, which is a configuration file, is acquired.
The method comprises the steps of obtaining a pre-established extraction target list containing all lower computer module fields, traversing the configuration file, extracting the fields in the extraction target list, namely traversing the configuration file according to the content in the extraction target list, extracting the fields which are the same as the fields in the extraction target list and appear in the configuration file, listing the extracted fields to form an extraction result list, and further combining the same fields in the extraction result list to form the target module list.
And finally, the upper computer sends a handshake instruction to the target module according to the target module list. After receiving the handshake instruction, the target module sends information to the upper computer, namely the target module starts and acquires own parameters, and sends connection confirmation information and own parameter information to the upper computer. The upper computer judges that the connection is completed, and starts polling, namely the upper computer receives connection confirmation information and self parameter information sent by the target modules and traverses the target module list, and after the target modules in the target module list are connected with the upper computer, the upper computer judges that the connection is completed, and starts polling for the target modules in the target module list. After receiving the polling request, the target module sends a data packet to the upper computer, wherein the data packet of the control module comprises changed equipment parameter information and null data with unchanged equipment parameters, and the data packet of the signal module comprises changed equipment parameter information, null data with unchanged equipment parameters and detection data information. When the upper computer is connected with the lower computer module in the module list and the polling is abnormal, the state parameters of the target module can be selected or set, specifically, the upper computer transmits configuration information to the lower computer module in the module list according to the configuration file, and a user can directly adopt the preset state parameters of the target module in the configuration file or manually input the required state parameters of the target module. After the parameter configuration, the experiment can be started.
Or in order to make the experimental method better suitable for self-editable self-defining experiments in the experimental process, so that the process control freedom degree of the experiments is higher, the process control program files can be set to comprise a time sequence control file and a data acquisition file, the target information comprises a control instruction and a received data instruction, and a target module list is generated according to the target information, wherein the method comprises the steps of replacing the control instruction and the received data instruction in the extraction result list with corresponding lower computer module fields, and merging the same module fields to obtain the target module list.
At this time, referring to fig. 4, first, the type of experiment is determined and a process control program file is acquired. Specifically, the user selects the test type, and after clicking to determine the selection, the time sequence control file and the data acquisition file are automatically acquired. The method comprises the steps of obtaining a pre-established extraction target list, wherein the extraction target list comprises all lower computer module fields, control instructions corresponding to lower computer modules and data receiving instructions, traversing a process control program file, extracting target fields, namely traversing the sequence control file and the data acquisition file according to the content in the extraction target list, extracting the same fields in the extraction target list from the sequence control file and the data acquisition file, listing the extracted fields to form an extraction result list, replacing corresponding instruction fields with corresponding lower computer module fields, replacing control instructions corresponding to the lower computer modules and data receiving instructions with corresponding lower computer module fields in the extraction result list, and combining the same fields, so that the target module list is generated according to the result.
After the target module list is generated, the subsequent steps can be referred to the related description of fig. 3, and the repeated description is omitted.
Optionally, after the target module list is formed, the file and the data acquisition file may be controlled according to the content of the target module list and the time sequence traversal order, so that the time when each lower computer module in the target module list starts to operate is known, and since a period of time is required to run after the lower computer module is started to ensure stable performance, each lower computer module sets an additional time with stable performance, and after the additional time is subtracted from the starting time of each lower computer module, the shortest waiting time for the whole module to operate can be obtained by sequential arrangement.
As an example, the working time sequence sequentially comprises an A module, a B module and a C module, wherein the starting working time of the A module is 0min, the additional time is 5min, the starting working time of the B module is 5min, the additional time is 15min, the starting working time of the C module is 15min, and the additional time is 30min. Therefore, the actual working time sequence is that the module A is-5 min, the module B is-10 min, the module C is-15 min, and the shortest waiting time for the whole module to work is 15min after the module A, the module B and the module C are all connected and activated.
In summary, according to the experimental method of the embodiment of the invention, firstly, a process control program file is acquired according to the selected experimental type, target information is extracted from the process control program file, then, a target module list is generated according to the target information, finally, connection with a target module in the target module list is established, and experiments are carried out after the configuration of the target module is completed. According to the experimental method, the upper computer can automatically select and connect any module according to actual needs, the experiment can be unfolded after connection is established between the upper computer and the module which is not established is in a closed or standby state. Therefore, on one hand, when the modules which do not participate in the experiment fail, the whole equipment does not report errors, the experiment can still be normally carried out, when the individual modules fail, a user can select the experiment which can be carried out to work according to the available module collocation, on the other hand, only the modules which participate in the experiment are in a working state, the modules which do not participate in the experiment are in a closing or standby state, data transmission is not needed between the modules which do not participate in the experiment and an upper computer, unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
Further, the present invention proposes a computer-readable storage medium.
In an embodiment of the present invention, a computer program is stored on a computer readable storage medium, which when executed by a processor implements the experimental method described above.
The computer readable storage medium of the embodiment of the invention stores a computer program thereon, and when the computer program is executed by a processor, the computer program firstly obtains a process control program file according to the selected experiment type, extracts target information from the process control program file, then generates a target module list according to the target information, finally establishes connection with a target module in the target module list, and performs an experiment after completing configuration of the target module. Therefore, the upper computer can automatically select and connect any module according to actual needs, and can expand the experiment after establishing connection with the needed module, and the module which is not connected is in a closing or standby state. On the one hand, the modules which do not participate in the experiment are in a fault state, the whole equipment cannot report errors, the experiment can still be normally carried out, when the individual modules are in fault, a user can select the experiment which can be carried out to work according to the available module collocation, on the other hand, only the modules which participate in the experiment are in a working state, the modules which do not participate in the experiment are in a closing state or a standby state, data transmission is not needed between the modules which do not participate in the experiment and an upper computer, unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
Further, the invention provides electronic equipment.
In an embodiment of the present invention, an electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the experimental method described above when executing the computer program.
According to the electronic equipment provided by the embodiment of the invention, through the implementation of the experimental method, the upper computer can automatically select and connect any module according to actual needs, the experiment can be developed after the connection between the upper computer and the required module is established, and the module which is not established is in a closed or standby state. Therefore, on one hand, when the modules which do not participate in the experiment fail, the whole equipment does not report errors, the experiment can still be normally carried out, when the individual modules fail, a user can select the experiment which can be carried out to work according to the available module collocation, on the other hand, only the modules which participate in the experiment are in a working state, the modules which do not participate in the experiment are in a closing or standby state, data transmission is not needed between the modules which do not participate in the experiment and an upper computer, unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
Further, the invention provides an experimental system.
In one embodiment of the invention, the experimental system includes an EPR device and an upper computer. The upper computer comprises the electronic equipment of the embodiment.
According to the experimental system provided by the embodiment of the invention, through the electronic equipment, the upper computer can automatically select and connect any module according to actual needs, the experiment can be developed after connection is established between the upper computer and the module which is not established is in a closed or standby state. On the one hand, the modules which do not participate in the experiment are in a fault state, the whole equipment cannot report errors, the experiment can still be normally carried out, when the individual modules fail, a user can select the experiment which can be carried out to work according to the available module collocation, on the other hand, only the modules which participate in the experiment are in a working state, the modules which do not participate in the experiment are in a closing or standby state, data transmission is not needed between the modules which do not participate in the experiment and an upper computer, unnecessary energy consumption and calculation resources are avoided, and the robustness of the equipment is improved.
It should be noted that the logic and/or steps represented in the flow diagrams or otherwise described herein may be considered a ordered listing of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include an electrical connection (an electronic device) having one or more wires, a portable computer diskette (a magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, may be implemented using any one or combination of techniques known in the art, discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present specification, the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. refer to an orientation or positional relationship based on that shown in the drawings, and do not indicate or imply that the apparatus or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and should not be construed as limiting the invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the description of the present specification, unless otherwise indicated, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed, mechanically connected, electrically connected, directly connected, indirectly connected via an intermediate medium, or in communication between two elements or in an interaction relationship between two elements, unless otherwise specifically defined. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In the present invention, unless expressly stated or limited otherwise, a first feature "up" or "down" a second feature may be the first and second features in direct contact, or the first and second features in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is at a lesser level than the second feature.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.