Multithreaded instrument control test host computer, method and related equipment
The multi-threaded instrument control testing of the host computer is solved through multi-threading technology and LabVIEW. The data blockage and interface lag of traditional host computers when handling complex tasks are solved, the response speed and efficiency are improved, and data integrity and automated testing are ensured. Efficient completion.
Patent Information
- Application Number
- CN202411264154.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-10
AI Technical Summary
When traditional single-threaded computers handle complex instrument control and data processing tasks, they are prone to data blockage and interface lag, especially when multiple data collection and display, it is difficult to ensure data integrity and efficiency.
Using multi-threaded instruments to control the test host computer, built on LabVIEW, including event processing module, data processing module, test sequence module, data display module and data storage module, and different instrument control and data acquisition tasks are processed through multi-threading technology. Loss and Lossless Streaming Channels technology optimizes data transmission and storage.
It improves the response speed and efficiency of the host computer system, avoids the impact of blocking by a single thread, ensures the timeliness and accuracy of instrument control, and strengthens the integrity and security of data, ensuring the efficient completion of automated testing projects.
Smart Images

Figure CN118779188B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial automation testing technology, and in particular to a multi-threaded instrument control test host computer, method and related equipment. Background Art
[0002] In the process of industrial automation testing, a host computer is usually used for testing, generally for test sequence execution, data collection and monitoring, test data processing and analysis, automated test control, and report generation and export, etc. However, when dealing with complex instrument control and data processing tasks, traditional single-threaded host computers often face problems such as slow UI response, low data processing efficiency, and difficulty in ensuring data integrity. For example, in scenarios where multi-channel data collection and real-world applications are required at the same time, especially the display of multi-channel data curves will occupy higher memory resources, and data congestion and interface freezes will be more serious. Summary of the invention
[0003] The main technical problem solved by the implementation method of the present application is the data congestion and interface freeze problem when the traditional host computer processes complex test tasks.
[0004] In order to solve the above technical problems, the first technical solution adopted by the implementation method of the present application is: providing a multi-threaded instrument control test host computer, the multi-threaded instrument control test host computer is built based on LabVIEW, including: an event processing module, a data processing module, a test sequence module, a data display module and a data storage module; the event processing module is used to respond to the user's first operation on the first type of control on the front panel, generate a corresponding test task instruction according to the first operation, and send the test task instruction to the corresponding other modules; the data processing module is used to receive the test task instruction sent by the event processing module through the message channel line of LabVIEW, and execute the corresponding test task instruction according to the test task instruction The test sequence module is used to receive the test task instruction sent by the event processing module, control the corresponding different instruments and equipment to execute the test task according to the test task instruction, and return the test data collected by the instruments and equipment to the data processing module; the data display module is used to receive the test data sent by the data processing module through the lossy streaming channel line, and display the test data through the list control of the front panel; the data storage module is used to receive the data to be stored sent by the data processing module through the streaming channel line when receiving the data storage instruction sent by the data processing module, and store the data to be stored in a lossless manner.
[0005] Optionally, the event processing module is also used to respond to a second operation of the user on the front panel waveform display control; generate a corresponding waveform display instruction according to the second operation, and send the waveform display instruction to the data processing module; receive the waveform display data returned by the data processing module; display the waveform display data through the front panel waveform chart control; determine whether the total number of associated waveform display data of the front panel waveform picture control is greater than a preset first data volume threshold; if greater, calculate the time difference between the test time of the associated waveform time data and the current time of the system, and remove the corresponding associated waveform time data in order of the time difference from large to small until the total number of associated waveform display data is less than or equal to the preset first data volume threshold.
[0006] Optionally, the test sequence module also includes an instrument and equipment control submodule; the instrument and equipment control submodule is used to parse the test task instructions, and collect corresponding test data based on the project unique identification data in the parsing results and the corresponding test configuration parameters; and send the collected test data to the data processing module.
[0007] Optionally, the multi-threaded instrument controls the test host computer, and the event processing module also includes event responses: navigation bar response, configuration button response, start test button response, display waveform button response, stop test button response and front panel close button response; the navigation bar response is used for the user to operate the test standard and test item in the navigation bar on the front panel, and switch the corresponding test item identifier and test item character variable name according to the operation result; the configuration button response is used for the user to click the configuration button on the front panel, open the parameter configuration panel on the front panel, and display the parameter configuration items required for various tests according to the test items selected in the navigation bar; the start test button response is used for the user to click the start test button on the front panel. The start test instruction is sent to the data processing module through the corresponding message channel; the display waveform button response is used when the user clicks the display waveform button on the front panel, the waveform data processed by the data processing module is obtained through the lossy streaming of the channel line mechanism, and different waveform data curves are displayed through at least one copy pop-up window on the front panel; the stop test button response is used when the user clicks the stop test button on the front panel, the stop test instruction is sent to the data processing module through the corresponding message channel; the front panel close button response is used when the user clicks the close panel button on the front panel, the display start button is enabled, the display stop button is disabled, and an exit instruction is sent to the data processing module through the corresponding message channel.
[0008] Optionally, the multi-threaded instrument control test host computer also includes: a temperature acquisition module; the temperature acquisition module is used to read the temperature configuration parameters sent by the data processing module when receiving the temperature acquisition instruction sent by the data processing module; collect corresponding temperature test data according to the temperature configuration parameters; send the temperature test data to the test sequence module through a lossy streaming channel line; send the temperature test data to the data processing module through a lossless streaming channel line.
[0009] Optionally, the event processing module is also used to respond to a third operation of the user on the front panel waveform display control, wherein the third operation includes a target curve selection item selected by the user; according to the target curve selection item, the corresponding target curve is displayed in a copy pop-up window generated using the waveform display control.
[0010] Optionally, the instructions sent by the event processing module to the data processing module include: parameter configuration instructions, start test instructions, stop test instructions, and exit software instructions; when the data processing module receives the parameter configuration instructions, it sends the configured parameters to the corresponding instrument and equipment control sub-module through the corresponding flag channel line; when the data processing module receives the start test instruction, it sends the corresponding start test instruction to the instrument and equipment control sub-module through the corresponding flag channel line; when the data processing module receives the stop test instruction, it sends the corresponding stop test instruction to the instrument and equipment control sub-module through the corresponding flag channel line; when the data processing module receives the exit software instruction, it sends the corresponding stop test instruction and exit software instruction to the instrument and equipment control sub-module.
[0011] In order to solve the above technical problems, the second technical solution adopted by the implementation method of the present application is: to provide a multi-threaded instrument control test method applied to the above-mentioned multi-threaded instrument control test host computer, including: responding to a first operation of a user on a first type of control on the front panel, generating a corresponding test task instruction according to the first operation, and sending the test task instruction to the corresponding other modules; receiving the test task instruction sent by the event processing module through a message channel line of LabVIEW, performing corresponding data processing according to the test task instruction, and sending the processed data to the corresponding other modules; receiving the test task instruction sent by the event processing module, controlling the corresponding different instruments and equipment to perform test tasks according to the test task instruction, and returning the test data collected by the instruments and equipment to the data processing module; receiving the test data of the data processing module through a lossy streaming channel line, and displaying the test data through a list control of the front panel; when receiving a data storage instruction sent by the data processing module, receiving the data to be stored sent by the data processing module through the streaming channel line, and storing the data to be stored in a lossless manner.
[0012] Optionally, after the step of generating corresponding test instructions according to the instrument parameter configuration data and the test sequence data, it also includes: generating corresponding control instructions according to the instrument parameter configuration data and the test sequence data; processing the test data uploaded by the controlled instrument according to the received control instructions and the current system resource utilization rate through the data processing module.
[0013] In order to solve the above technical problems, the third technical solution adopted in the implementation mode of the present application is: to provide an electronic device, wherein the electronic device includes the above multi-threaded instrument control test host computer.
[0014] In order to solve the above technical problems, the fourth technical solution adopted in the implementation mode of the present application is: providing a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by an electronic device, the electronic device executes the above-mentioned multi-threaded instrument control test method.
[0015] Different from the related art, the graphical interface built based on LabVIEW in this application provides an intuitive instrument status display and control panel, which is convenient for users to operate and monitor the execution of test tasks; different instrument control or data acquisition tasks are processed at the same time through multi-threading technology, thereby improving the response speed and efficiency of the host computer system; reasonably allocating system resources, avoiding the blocking of a single thread of the traditional host computer affecting the operation of the entire program, and ensuring the timeliness and accuracy of the control of the lower instruments; further strengthening the integrity and security of the data, and ensuring the efficient and accurate completion of the automated test project. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily described by corresponding drawings, which do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and the figures in the drawings do not constitute proportional limitations unless otherwise stated.
[0017] Figure 1 This is an example diagram of a multi-threaded instrument control test host computer provided in an embodiment of the present application.
[0018] Figure 2 It is a system structure diagram of a multi-threaded instrument control test host computer provided in an embodiment of the present application.
[0019] Figure 3 This is an example diagram of a parameter configuration panel of a multi-threaded instrument control test host computer provided in an embodiment of the present application.
[0020] Figure 4It is a schematic diagram of a multi-threaded communication path of test data output by a test sequence module in a multi-threaded instrument control test host computer provided in an embodiment of the present application.
[0021] Figure 5 It is a schematic diagram of a multi-threaded communication path for temperature data collected by a temperature acquisition module in a multi-threaded instrument control test host computer provided in an embodiment of the present application.
[0022] Figure 6 It is a schematic diagram of the architecture of a multi-threaded instrument control test host computer provided in another embodiment of the present application.
[0023] Figure 7 It is a schematic diagram of the execution flow of the multi-threaded instrument control test method provided in an embodiment of the present application.
[0024] Figure 8 It is a hardware structure diagram of an electronic device including a multi-threaded instrument control test host computer provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0026] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device schematic diagram or the order in the flow chart.
[0027] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0028] In order to facilitate the understanding of this embodiment, first of all, a multi-threaded instrument control test host computer disclosed in the embodiment of the present application is described in detail. Figure 1 , Figure 1This is an example diagram of a multi-threaded instrument control test host computer provided in an embodiment of the present application. As shown in the figure, the front panel of the host computer has a clear layout, including a left navigation bar, a centered multi-column list box, a graphic control (as shown in the figure, displaying voltage, current, temperature, etc.), a waveform display, and control buttons. Among them, the left navigation bar is used to display various test standards and items, and the centered multi-column list box is used to display the corresponding test data of different test standards and items, such as serial number, test item name, test results, real-time voltage, real-time current, real-time power, discharge capacitance, discharge electric energy, charging capacitance and other data. The waveform display and control buttons are used to control the display of the corresponding waveform data, and the graphic control is used to graphically display the test data of the test task. It should be specially noted that, unlike the hardware concept of the traditional host computer, the multi-threaded instrument control test host computer disclosed in the embodiment of the present application belongs to the software concept. At the same time, Figure 1 The data items shown are only exemplary. In actual application scenarios, corresponding test data items can be changed according to different industry fields, different test requirements, etc.
[0029] Please continue reading Figure 2 , Figure 2 1 is a system structure diagram of a multi-threaded instrument control test host computer provided in an embodiment of the present application. The multi-threaded instrument control system is built based on LabVIEW. As shown in the figure, the multi-threaded instrument control test host computer 10 includes an event processing module 11, a data processing module 12, a test sequence module 13, a data display module 14 and a data display module 15.
[0030] Among them, LabVIEW (Laboratory Virtual Instrument Engineering Workbench, LabVIEW) is a program development environment, similar to C and BASIC development environment, but the significant difference between LabVIEW and other computer languages is that other computer languages use text-based languages to generate codes, while LabVIEW uses the graphical editing language G to write programs. The generated program is in the form of a block diagram, and the program can be decomposed into modules (VI, VirtualInstruments) for easy reuse, maintenance and expansion. It provides real-time modules (Real-Time Module) and FPGA modules (FPGA Module) for real-time control and high-performance computing.
[0031] The event processing module 11 is used to respond to the user's first operation on the first type of controls on the front panel, wherein the first operation generally refers to the user clicking the corresponding graphic control operation on the front panel using a mouse or touch, such as clicking the "parameter configuration", "start test", "stop test", "data storage", "waveform display" and other graphic controls on the front panel using a mouse or touch; generating a corresponding test task instruction according to the first operation, for example, the test task instruction can be a corresponding parameter configuration (such as an oscilloscope, a data acquisition cycle or frequency of a multimeter), a test control (such as a control instruction for starting, pausing, stopping, etc. of a corresponding oscilloscope test), a waveform display and data saving. Then, the test task instruction is sent to the corresponding other modules.
[0032] The data processing module 12 is used to receive the test task instructions sent by the event processing module through the message channel line of LabVIEW, perform corresponding data processing according to the test task instructions, and send the processed data to corresponding other modules.
[0033] The test sequence module 13 is used to receive the test task instructions sent by the event processing module, control the corresponding different instruments and equipment to execute the test tasks according to the test task instructions, and return the test data collected by the instruments and equipment to the data processing module.
[0034] The data display module 14 is used to receive the test data sent by the data processing module through the lossy streaming channel line, and display the test data through the list control of the front panel. For example, based on the lossy streaming communication mechanism, the multi-column list control can dynamically discard early data to ensure efficient use of system memory, and the multi-column list control will not be stuck due to data blocking when displaying data, and will not cause timing errors in data display.
[0035] The data storage module 15 is used to receive the data to be stored sent by the data processing module through the streaming channel line when receiving the data storage instruction sent by the data processing module, and store the data to be stored in a lossless manner.
[0036] As a preferred embodiment, the event processing module 11 is also used to respond to the user's second operation on the front panel waveform display control, wherein in the embodiment of the present application, the second operation refers to the operation on the waveform data display; according to the second operation, a corresponding waveform display instruction is generated, and the waveform display instruction is sent to the data processing module, and then, the lossy streaming technology of the LabVIEW channel line mechanism is adopted to send the waveform display data of the data processing module 12 to the corresponding waveform chart control for display, that is, the waveform display data returned by the data processing module is received, and the waveform display data is displayed through the front panel waveform chart control. In addition, it is determined whether the total number of associated waveform display data of the front panel waveform picture control is greater than the preset first data volume threshold. If it is greater than the preset first data volume threshold, the time difference between the test time of the associated waveform time data and the current time of the system is calculated, and the corresponding associated waveform time data is removed in order from large to small according to the time difference, until the total number of associated waveform display data is less than or equal to the above-mentioned preset first data volume threshold, so as to ensure that the front panel waveform chart control only displays the latest and no more than the preset number of waveform data, which not only ensures the efficient utilization of the system memory, but also the waveform display will not be jammed due to data blocking.
[0037] Among them, lossy streaming technology is a technology that compresses data during data transmission or storage, by discarding some data or simplifying data representation to reduce the amount of data, thereby reducing transmission or storage costs. For example, different data loss strategies can be set according to the size of the system memory. If 10 collected voltage data are received within 1 minute during a test task, 5 of the 10 voltage data are discarded in the test task with a larger memory, and only 5 voltage data are displayed on the graphical display control of the front panel. In the test task with a smaller memory, 8 of the 10 voltage data are discarded, and only 2 voltage data are displayed on the graphical display control of the front panel.
[0038] As a preferred implementation, the test sequence module also includes an instrument control submodule; the instrument control submodule is used to parse the test task instructions, and collect corresponding test data according to the project unique identification data in the parsing results, and the corresponding test configuration parameters, the test configuration parameters include: test items, serial port numbers, serial communication baud rates, and other parameters of the test items (such as the continuous discharge current, charge cutoff voltage, discharge cutoff voltage, continuous charge current, ambient temperature position, etc. required for testing lithium battery overcharge). Then, the collected test data is sent to the data processing module.
[0039] As a preferred implementation, the multi-threaded instrument controls the test host computer, and the above-mentioned event processing module also includes event responses: navigation bar response, configuration button response, start test button response, display waveform button response, stop test button response and front panel close button response. The navigation bar response is used when the user operates the test standard and test item in the navigation bar on the front panel, and switches the corresponding test item identifier and test item character variable name according to the operation result; the configuration button response is used when the user clicks the configuration button on the front panel, opens the parameter configuration panel on the front panel, and displays the parameter configuration items required for various tests according to the test items selected in the navigation bar, for example, Figure 3 The corresponding serial port selection is made in the parameter configuration panel shown; the start test button response is used when the user clicks the start test button on the front panel, and the start test instruction is sent to the data processing module through the corresponding message channel; the display waveform button response is used when the user clicks the display waveform button on the front panel, and the waveform data processed by the data processing module is obtained through the lossy serial stream of the channel line mechanism, and different waveform data curves are displayed on the front panel through at least one copy pop-up window; the stop test button response is used when the user clicks the stop test button on the front panel, and the stop test instruction is sent to the data processing module through the corresponding message channel; the front panel close button response is used when the user clicks the close panel button on the front panel, enables the display start button to be available, enables the display stop button to be unavailable, and sends an exit instruction to the data processing module through the corresponding message channel.
[0040] Among them, the above-mentioned lossless storage is based on lossless streaming technology (Lossless Streaming). Lossless streaming technology is a data transmission or storage technology, which is characterized by not introducing any information loss during the data processing process, that is, the data can be completely restored to the original data, and the data volume is reduced by compressing the data, but the integrity of the data is maintained during the compression and decompression process, and no information is lost, ensuring that the data is completely consistent with the original data after compression and decompression, and no changes or distortions are introduced. Although the use of lossless streaming technology can ensure the integrity of the test data, it is still necessary to consider the remaining capacity of the system's storage device, that is, to set the corresponding capacity warning value. When the remaining storage capacity of the system is less than the preset storage capacity threshold, the corresponding remaining storage capacity warning should be issued to prevent the test data generated during the test from being unable to be saved due to insufficient storage capacity of the system, thereby causing the loss of test data and the failure of the test task execution.
[0041] Among them, the above-mentioned data preservation period can set the preservation period of all test data corresponding to the test task according to the test task requirements, and can also set different data preservation periods according to the frequency of test data generated by different types of test tasks, so as to realize test data preservation control of different granularities, such as using a 1 millisecond data preservation period for the test data uploaded by the oscilloscope, and using a 0.5 second data preservation period for the test data uploaded by the digital multimeter. In addition, the test data is also saved in different forms according to different types of test tasks or different types of data attributes. For example, the test data uploaded by the digital multimeter can be saved as text type, and the waveform data uploaded by the oscilloscope can be saved as picture type.
[0042] As an example, see Figure 4 , Figure 4 Schematic diagram of a multi-thread communication path of test data output by a test sequence module in a multi-thread instrument control test host computer provided in an embodiment of the present application, such as Figure 4 As shown, after the instrument control submodule in the test sequence module 13 outputs the test data, on the one hand, the test data reaches the data processing module 12 through the lossy channel line, and then reaches the event processing module 11 through the lossy channel line for waveform display and general data display. On the other hand, the test data reaches the data processing module 12 through the lossless channel line, and then reaches the data storage module through the lossless channel line for data storage.
[0043] As a preferred embodiment, the multi-threaded instrument control test host computer also includes: a temperature acquisition module; the temperature acquisition module is used to read the temperature configuration parameters sent by the data processing module when receiving the temperature acquisition instruction sent by the data processing module; collect corresponding temperature test data according to the temperature configuration parameters; send the temperature test data to the test sequence module through the lossy streaming channel line; send the temperature test data to the data processing module through the lossless streaming channel line.
[0044] As an example, see Figure 5 , Figure 5 Schematic diagram of multi-thread communication path of temperature data collected by temperature acquisition module in multi-thread instrument control test host computer provided by the embodiment of the present application, such as Figure 5 As shown, on the one hand, the temperature data collected by the temperature acquisition module reaches the data processing module 12 through the lossy channel line, and then reaches the event processing module 11 through the lossy channel line for waveform display and general data display. On the other hand, the temperature data collected by the temperature acquisition module reaches the data processing module 12 through the lossless channel line, and then reaches the data storage module through the lossless channel line for data storage.
[0045] As a preferred embodiment, the event processing module is also used to respond to the user's third operation on the front panel waveform display control, and the third operation includes a target curve selection item selected by the user; according to the target curve selection item, the corresponding target curve is displayed in the copy pop-up window generated by the waveform display control. Among them, in order to solve the problem of displaying multiple data curves, the traditional way is to display multiple curves in one graphic, or to use many graphic controls to display different curves respectively, but the disadvantages are obvious. The former displays the curves in a waveform display in a disorderly and unclear manner, and the latter causes the front panel interface to be crowded. In the embodiment of the present application, a method of displaying different data curves in multiple copy pop-up windows is adopted, and each pop-up window can select the corresponding target display curve, so that the display interface is more concise and clear. Combined with the control operation tasks of the front panel, the event processing module 11 ensures the logic and fluency of the system operation.
[0046] As a preferred embodiment, the instructions sent by the event processing module to the data processing module include: parameter configuration instructions, start test instructions, stop test instructions, and exit software instructions; when the data processing module receives the parameter configuration instructions, it sends the configured parameters to the corresponding instrument and equipment control submodule through the corresponding flag channel line; when the data processing module receives the start test instruction, it sends the corresponding start test instruction to the instrument and equipment control submodule through the corresponding flag channel line; when the data processing module receives the stop test instruction, it sends the corresponding stop test instruction to the instrument and equipment control submodule through the corresponding flag channel line; when the data processing module receives the exit software instruction, it sends the corresponding stop test instruction and exit software instruction to the instrument and equipment control submodule.
[0047] As an example, see Figure 6 , Figure 6 is a schematic diagram of the architecture of a multi-threaded instrument control test host computer provided by another embodiment of the present application, such as Figure 6As shown, the event processing module sends the front panel instruction information generated after the user operation to the data processing module, and obtains the lossy waveform display data from the data processing module for waveform display. The data processing module sends the corresponding parameter configuration data to the instrument and equipment control submodule in the test sequence module, and controls the corresponding instrument and equipment to perform the corresponding test task through the test start instruction, the test exit instruction, etc., and receives the test data returned by the corresponding instrument and equipment. The data processing module also sends the storage instruction and the corresponding lossless storage data to the data storage module to store the test result data. The data processing module also sends the lossy data display data to the data display module for data display. The data processing module also sends the temperature acquisition instruction and the corresponding temperature configuration parameter value temperature acquisition module. The temperature acquisition module sends the acquired lossy data to the instrument and equipment control submodule, and the temperature acquisition module also sends the acquired lossless data to the data processing module.
[0048] The multi-threaded instrument control system provided in the embodiment of the present application provides an intuitive instrument status display and control panel based on a graphical interface built on LabVIEW, which is convenient for users to operate and monitor the execution of test tasks; different instrument control or data acquisition tasks are processed at the same time through multi-threading technology, thereby improving the response speed and efficiency of the host computer system; reasonably allocating system resources, avoiding the blocking of a single thread of a traditional host computer that affects the operation of the entire program, and ensuring the timeliness and accuracy of controlling the lower instruments; further strengthening the integrity and security of the data, and ensuring the efficient and accurate completion of automated test projects.
[0049] Please continue reading Figure 7 , Figure 7 1 is a schematic diagram of the execution flow of the multi-threaded instrument control test method provided in the embodiment of the present application. The multi-threaded instrument control test method is applied to the multi-threaded instrument control test host computer provided in the embodiment of the present application. The multi-threaded instrument control test method provided in the embodiment of the present application is described below by taking the execution subject as the multi-threaded instrument control test host computer as an example. Figure 7 As shown, the multi-threaded instrument control method includes the following steps:
[0050] S1. Respond to a first operation of a user on a first type of control on a front panel through the event processing module, generate a corresponding test task instruction according to the first operation, and send the test task instruction to corresponding other modules.
[0051] S2. Receive the test task instruction sent by the event processing module through the message channel line of LabVIEW, perform corresponding data processing according to the test task instruction, and send the processed data to corresponding other modules.
[0052] S3, receiving the test task instruction sent by the event processing module, controlling the corresponding different instruments and equipment to execute the test task according to the test task instruction, and returning the test data collected by the instruments and equipment to the data processing module.
[0053] S4. Receive the test data of the data processing module through the lossy streaming channel line, and display the test data through the list control of the front panel.
[0054] S5. When receiving a data storage instruction sent by the data processing module, receiving the data to be stored sent by the data processing module through the streaming channel line, and storing the data to be stored in a lossless manner.
[0055] As a preferred implementation, after step S1, it also includes: responding to a second operation of the user on the front panel waveform display control; generating a corresponding waveform display instruction according to the second operation, and sending the waveform display instruction to the data processing module; receiving the waveform display data returned by the data processing module; displaying the waveform display data through the front panel waveform chart control; determining whether the total number of associated waveform display data of the front panel waveform picture control is greater than a preset first data volume threshold; if greater, calculating the time difference between the test time of the associated waveform time data and the current time of the system, and removing the corresponding associated waveform time data in order of the time difference from large to small, until the total number of associated waveform display data is less than or equal to the preset first data volume threshold.
[0056] As a preferred implementation, after step S3, it also includes: parsing the test task instruction, and collecting corresponding test data according to the project unique identification data in the parsing result and the corresponding test configuration parameters; sending the collected test data to the data processing module.
[0057] As a preferred implementation, after step S4, it also includes: when the user operates the test standard and test item in the navigation bar on the front panel, the corresponding test item identifier and test item character variable name are switched according to the operation result; when the user clicks the configuration button on the front panel, the parameter configuration panel is opened on the front panel, and the parameter configuration items required for various tests are displayed according to the test items selected in the navigation bar; when the user clicks the start test button on the front panel, the start test instruction is sent to the data processing module through the corresponding message channel; when the user clicks the display waveform button on the front panel, the waveform data processed by the data processing module is obtained through the lossy stream of the channel line mechanism, and different waveform data curves are displayed on the front panel through at least one copy pop-up window; when the user clicks the stop test button on the front panel, the stop test instruction is sent to the data processing module through the corresponding message channel; when the user clicks the close panel button on the front panel, the display start button is enabled to be available, the display stop button is enabled to be unavailable, and an exit instruction is sent to the data processing module through the corresponding message channel.
[0058] As a preferred implementation, after step S4, it also includes: when receiving a temperature acquisition instruction sent by the data processing module, reading the temperature configuration parameters sent by the data processing module; acquiring corresponding temperature test data according to the temperature configuration parameters; sending the temperature test data to the test sequence module through a lossy streaming channel line; and sending the temperature test data to the data processing module through a lossless streaming channel line.
[0059] As a preferred implementation, after step S1, it also includes: responding to a third operation of the user on the front panel waveform display control, the third operation including a target curve selection item selected by the user; according to the target curve selection item, displaying the corresponding target curve in a copy pop-up window generated using the waveform display control.
[0060] As a preferred embodiment, the instructions sent by the event processing module to the data processing module include: parameter configuration instructions, start test instructions, stop test instructions, and exit software instructions. After step S2, it also includes: when the data processing module receives the parameter configuration instruction, sending the configured parameters to the corresponding instrument and equipment control submodule through the corresponding flag channel line; when the data processing module receives the start test instruction, sending the corresponding start test instruction to the instrument and equipment control submodule through the corresponding flag channel line; when the data processing module receives the stop test instruction, sending the corresponding stop test instruction to the instrument and equipment control submodule through the corresponding flag channel line; when the data processing module receives the exit software instruction, sending the corresponding stop test instruction and exit software instruction to the instrument and equipment control submodule.
[0061] It should be noted that the above multi-threaded instrument control test host computer can execute the multi-threaded instrument control test method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in the embodiment of the multi-threaded instrument control test method, please refer to the multi-threaded instrument control test host computer provided in the embodiment of the present application.
[0062] Figure 8 4 is a schematic diagram of the hardware structure of an electronic device 400 including the multi-threaded instrument control test host computer provided in an embodiment of the present application, such as Figure 8 As shown, the electronic device 400 includes:
[0063] One or more processors 410 and memory 420, Figure 8 A processor 410 is taken as an example.
[0064] The processor 410 and the memory 420 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0065] The memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the corresponding program instructions / modules in the multi-threaded instrument control test host computer in the embodiment of the present application. The processor 410 executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions and modules stored in the memory 420, that is, the multi-threaded instrument control test method of the above method embodiment is implemented.
[0066] The memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the multi-threaded instrument control system, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the multi-threaded instrument control system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0067] The one or more modules are stored in the memory 420, and when executed by the one or more processors 410, perform the multi-threaded instrument control method in any of the above method embodiments, for example, perform the above described Figure 7Steps S1 to S5 of the method are implemented Figure 2 Functions in modules 11-15.
[0068] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0069] The embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, such as Figure 8 A processor 410 in the embodiment may enable the one or more processors to execute the multi-threaded instrument control test method in any of the above method embodiments, for example, to execute the above described Figure 7 Steps S1 to S5 of the method are implemented Figure 2 Functions in modules 11-15.
[0070] The present application provides a computer program product, wherein the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by the electronic device, the electronic device is enabled to execute the multi-threaded instrument control test method in any of the above method embodiments, for example, to execute the above described Figure 7 Steps S1 to S5 of the method are implemented Figure 2 Functions in modules 11-15.
[0071] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0072] Through the description of the above embodiments, it can be clearly understood by those skilled in the art that each embodiment can be implemented by means of software plus a general hardware platform, or by hardware. It can be understood by those skilled in the art that all or part of the processes in the above embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A multi-threaded instrument control test host computer, characterized in that: The multi-threaded instrument control test host computer is built based on LabVIEW, including: an event processing module, a data processing module, a test sequence module, a data storage module and a data storage module; The event processing module is used to respond to the user's first operation on the first type of controls on the front panel, generate a corresponding test task instruction according to the first operation, and send the test task instruction to the corresponding test sequence module, the data display module, the data storage module and the data processing module; The data processing module is used to receive the test task instruction sent by the event processing module through the message channel line of LabVIEW, perform corresponding data processing according to the test task instruction, and send the processed data to the corresponding test sequence module, the data display module, the data storage module and the event processing module; The test sequence module is used to receive the test task instruction sent by the event processing module, control the corresponding different instruments and equipment to perform the test task according to the test task instruction, and return the test data collected by the instruments and equipment to the data processing module; The data display module is used to receive the test data sent by the data processing module through the lossy streaming channel line, and display the test data through the list control of the front panel; The data storage module is used for receiving the data storage instruction sent by the data processing module through the streaming channel line, and storing the data to be stored in a lossless manner; Among them, the event processing module is also used to respond to the user's second operation on the front panel waveform display control; generate a corresponding waveform display instruction according to the second operation, and send the waveform display instruction to the data processing module; receive the waveform display data returned by the data processing module; display the waveform display data through the front panel waveform chart control; determine whether the total number of waveform display data is greater than a preset first data volume threshold; if greater, calculate the time difference between the test time of the waveform display data and the current time of the system, and remove the corresponding waveform display data in order of time difference from large to small until the total number of waveform display data is less than or equal to the preset first data volume threshold.
2. The multi-threaded instrument control test host computer according to claim 1, characterized in that: The test sequence module also includes an instrument control submodule; The instrument control submodule is used to parse the test task instruction and collect corresponding test data according to the project unique identification data in the parsing result and the corresponding test configuration parameters; The collected test data is sent to the data processing module.
3. The multi-threaded instrument control test host computer according to claim 1, characterized in that: The event processing module also includes event response, navigation bar response, configuration button response, start test button response, display waveform button response, stop test button response and front panel close button response; the navigation bar response is used for switching the corresponding test item identifier and test item character variable name according to the operation result when the user operates the test standard and test item of the navigation bar on the front panel; The configuration button response is used to open the parameter configuration panel on the front panel when the user clicks the configuration button on the front panel, and display the parameter configuration items required for various tests according to the test items selected in the navigation bar; The start test button response is used to send a start test instruction to the data processing module through a corresponding message channel when a user clicks the start test button on the front panel; The waveform display button response is used to obtain the waveform data processed by the data processing module through the lossy streaming of the channel line mechanism when the user clicks the waveform display button on the front panel, and display different waveform data curves through at least one copy pop-up window on the front panel; The stop test button response is used to send a stop test instruction to the data processing module through a corresponding message channel when the user clicks the stop test button on the front panel; The front panel close button response is used to enable the display start button to be available and the display stop button to be unavailable when the user clicks the close panel button on the front panel, and send an exit instruction to the data processing module through the corresponding message channel.
4. The multi-threaded instrument control test host computer according to claim 1, characterized in that: The multi-threaded instrument control test host computer also includes: a temperature acquisition module; The temperature acquisition module is used to read the temperature configuration parameters sent by the data processing module when receiving the temperature acquisition instruction sent by the data processing module; Collect corresponding temperature test data according to the temperature configuration parameters; Sending the temperature test data to the test sequence module via a lossy streaming channel line; The temperature test data is sent to the data processing module via a lossless streaming channel line.
5. The multi-threaded instrument control test host computer according to claim 2, characterized in that: The event processing module is also used to respond to a third operation of the user on the front panel waveform display control, wherein the third operation includes a target curve selection item selected by the user; According to the target curve selection item, the corresponding target curve is displayed in a copy pop-up window that has been generated using the waveform display control.
6. The multi-threaded instrument control test host computer according to claim 5, characterized in that: The instructions sent by the event processing module to the data processing module include: parameter configuration instructions, start test instructions, stop test instructions, and exit software instructions; When the data processing module receives the parameter configuration instruction, it sends the configured parameters to the corresponding instrument control submodule through the corresponding flag channel line; When the data processing module receives the start test instruction, it sends the corresponding start test instruction to the instrument control submodule through the corresponding flag channel line; When the data processing module receives the stop test instruction, it sends the corresponding stop test instruction to the instrument control submodule through the corresponding flag channel line; When the data processing module receives the exit software instruction, it sends a corresponding stop test instruction and exit software instruction to the instrument control submodule.
7. A multi-threaded instrument control test method applied to a multi-threaded instrument control test host computer as claimed in any one of claims 1 to 6, characterized in that: include: In response to a first operation of a user on a first type of control on the front panel, a corresponding test task instruction is generated according to the first operation, and the test task instruction is sent to the corresponding test sequence module, the data display module, the data storage module and the data processing module; Receive the test task instruction sent by the event processing module through the message channel line of LabVIEW, perform corresponding data processing according to the test task instruction, and send the processed data to the corresponding test sequence module, the data display module, the data storage module and the event processing module; Receive the test task instruction sent by the event processing module, control the corresponding different instruments and equipment to execute the test task according to the test task instruction, and return the test data collected by the instruments and equipment to the data processing module; receiving test data of the data processing module through a lossy streaming channel line, and displaying the test data through a list control of a front panel; When receiving a data storage instruction sent by the data processing module, receiving the data to be stored sent by the data processing module through a streaming channel line, and storing the data to be stored in a lossless manner; Among them, after the step of responding to the user's first operation on the first type of control on the front panel, generating a corresponding test task instruction according to the first operation, and sending the test task instruction to the corresponding test sequence module, the data storage module, the data storage module and the data processing module, it also includes: responding to the user's second operation on the front panel waveform display control; generating a corresponding waveform display instruction according to the second operation, and sending the waveform display instruction to the data processing module; receiving the waveform display data returned by the data processing module; displaying the waveform display data through the front panel waveform chart control; determining whether the total number of waveform display data is greater than a preset first data volume threshold; if greater, calculating the time difference between the test time of the waveform display data and the current time of the system, and removing the corresponding waveform display data in order of the time difference from large to small until the total number of waveform display data is less than or equal to the preset first data volume threshold.
8. An electronic device, characterized in that: The electronic device comprises the multi-threaded instrument control test host computer as described in any one of claims 1-6.
9. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an electronic device, the electronic device executes the multi-threaded instrument control test method according to claim 7.
Citation Information
Patent Citations
Realization method of LabVIEW-based high-pressure pump performance testing system
CN102777370A
Realization method of calibration system of strapdown inertial measurement unit based on Labview
CN103196463A
Reconfigurable multi-thread parallel upper computer system based on can communication
CN113407214A
Systems and methods for evaluating assessments
EP3667582A1
System and method for performing batch synchronization for a test sequence
US20020124205A1
