CN112925699A - LabVIEW-based test method - Google Patents

LabVIEW-based test method Download PDF

Info

Publication number
CN112925699A
CN112925699A CN201911234241.1A CN201911234241A CN112925699A CN 112925699 A CN112925699 A CN 112925699A CN 201911234241 A CN201911234241 A CN 201911234241A CN 112925699 A CN112925699 A CN 112925699A
Authority
CN
China
Prior art keywords
parameter
configuration file
test
circuit
parameter configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911234241.1A
Other languages
Chinese (zh)
Inventor
严寒文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai OFilm Smart Car Technology Co Ltd
Original Assignee
Shanghai OFilm Smart Car Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai OFilm Smart Car Technology Co Ltd filed Critical Shanghai OFilm Smart Car Technology Co Ltd
Priority to CN201911234241.1A priority Critical patent/CN112925699A/en
Publication of CN112925699A publication Critical patent/CN112925699A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application relates to the technical field of terminals, in particular to a LabVIEW-based test method, which is executed in a computer, wherein the computer comprises a display screen, a memory, a processor and a computer program which is stored in the memory and can be run on the processor, and the processor executes the following steps when running the computer program: defining parameter types and parameter values of a parameter configuration file on the display screen through a visual user interface, and storing the parameter types and the parameter values in the memory; writing the execution mark of the parameter configuration file into a test sequence configuration file; and the processor executes the test sequence configuration file and calls the parameter configuration file to test when executing the execution mark of the parameter configuration file. The technical scheme of the embodiment of the application enables the circuit test to be visual, and further improves the test efficiency.

Description

LabVIEW-based test method
Technical Field
The application relates to the technical field of terminals, in particular to a LabVIEW-based test method.
Background
LabVIEW (laboratory Virtual Instrument Engineering workbench) is a program development environment developed by national instruments Limited (NI) corporation, similar to the C and BASIC development environments. The user can use icons and connecting lines on a graphical interface according to the requirement of the user, and the object on the LabVIEW front panel is controlled through programming. The user can carry out test measurement, software simulation and the like based on LabVIEW. However, the existing testing method has the disadvantages of multiple calling functions, complex manual operation and low testing efficiency.
Disclosure of Invention
The embodiment of the application provides a LabVIEW-based test method, which can improve the quality and efficiency of programming.
In a first aspect, an embodiment of the present application provides a LabVIEW-based testing method, where the testing method is implemented in a computer, the computer includes a display screen, a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to perform the following steps:
defining parameter types and parameter values of a parameter configuration file on the display screen through a visual user interface, and storing the parameter types and the parameter values in the memory;
writing the execution mark of the parameter configuration file into a test sequence configuration file;
and the processor executes the test sequence configuration file and calls the parameter configuration file to test when executing the execution mark of the parameter configuration file. By generating parameter configuration files, namely test parameter files, based on the parameter types and parameter values, the programming time of users can be reduced, the difference between the parameter configuration files written by different users can be reduced, and the programming quality and efficiency can be improved.
According to some embodiments, the method further comprises:
the processor executes test instructions for a circuit.
Thus, the circuit testing efficiency is improved.
According to some embodiments, the method further comprises:
obtaining the circuit test result;
and when the circuit test result is detected to accord with the preset condition, displaying prompt information that the circuit test result accords with the preset condition through display equipment. Therefore, the circuit test is visual, and the test efficiency is improved.
According to some embodiments, the parameter profile comprises an encapsulation function, the method further comprising:
and generating the encapsulation function.
According to some embodiments, the generating the encapsulation function comprises:
acquiring the calling times of the parameter configuration file;
when detecting that the calling times are greater than the preset times, packaging the parameter configuration file to generate the packaging function;
associating the encapsulation function with a circuit, and storing the encapsulation function to a function library.
According to some embodiments, the method further comprises:
receiving a test instruction for a circuit;
querying a packaging function associated with the circuit based on the test instruction;
testing the circuit based on the encapsulation function.
In a second aspect, an embodiment of the present application provides an apparatus for generating a LabVIEW-based parameter profile, including:
the file definition unit is used for defining the parameter types and parameter values of the parameter configuration files on the display screen through a visual user interface and storing the parameter types and parameter values in the memory;
a mark writing unit, configured to write an execution mark of the parameter configuration file into a test sequence configuration file;
and the file testing unit is used for executing the testing sequence configuration file and calling the parameter configuration file for testing when the execution mark of the parameter configuration file is executed.
In a third aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method described in any one of the above when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method of any one of the above.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application provides a LabVIEW-based test method, which comprises the following steps: defining the parameter type and parameter value of the parameter configuration file on a display screen through a visual user interface, and storing the parameter type and parameter value in a memory; writing the execution mark of the parameter configuration file into a test sequence configuration file; the processor executes the test sequence configuration file and calls the parameter configuration file for testing when executing the execution mark of the parameter configuration file.
According to the technical scheme, the processor can execute the test sequence configuration file and call the parameter configuration file defined by the visual user interface on the display screen for testing when the execution mark of the parameter configuration file is executed, so that the circuit test is visual, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 shows a schematic interface diagram of a front panel of a LabVIEW of an embodiment of the present application;
FIG. 2 is a schematic flow chart of a LabVIEW-based testing method according to an embodiment of the present application;
FIG. 3 illustrates an interface diagram of a terminal according to another embodiment of the present application;
FIG. 4 illustrates an interface diagram of a terminal according to another embodiment of the present application;
FIG. 5 is a schematic flow chart of a LabVIEW-based testing method according to another embodiment of the present application;
FIG. 6 shows a schematic flow diagram of a LabVIEW-based testing method according to another embodiment of the present application;
fig. 7 is a schematic structural diagram of a LabVIEW-based parameter profile generation apparatus according to an embodiment of the present application;
fig. 8 shows a schematic structural diagram of a terminal provided in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
With the development of scientific technology, users develop more and more program development environments. LabVIEW is a program development environment developed by national instruments Limited (NI) corporation of America, similar to the C and BASIC development environments. The significant differences between LabVIEW and other computer languages are: other computer languages all use text-based language to generate code, while LabVIEW uses graphical editing language G to write a program, the generated program being in the form of a block diagram. LabVIEW provides a number of controls that look similar to traditional instruments (e.g., oscilloscopes, multimeters) and can be used to create a user interface conveniently and intuitively. LabVIEW is widely accepted by the industry, academia, and research laboratories as a standard data acquisition and instrument control software. The user interface is referred to as a front panel in LabVIEW, and objects on the front panel can be programmatically controlled using icons and wires. The front panel of LabVIEW can be as shown in figure 1. The user can select a numerical value input control element a, a numerical value input control element b and a numerical value output control element c on the LabVIEW front panel, then find an addition function in a program block diagram window, after the related ports are connected by using a data connecting line, the user can return to the front panel, respectively input numerical values in the numerical value input control element a and the numerical value input control element b, and after clicking a running button, the numerical value output control element c can display the addition result of the two numerical values. For example, after the user inputs the value 3 at the a-value input control and the value 6 at the b-value input control and clicks the "run" button, the c-value output control may display the result of adding the two values as the value 9.
It is easily understood that LabVIEW can be used in various fields such as a control field, a test field, a simulation field, a child education field, and the like. When the LabVIEW is used in the testing field, a user can conveniently find the LabVIEW testing system suitable for the user. Based on the acquired test system, the user can perform program re-development on the basis of the acquired test system so as to realize the test requirement of the user, thereby simplifying the operation of the user. When the user test object is simple, a part of programs in the test system is called to form a complete test application program, and the convenience of the user test can be improved.
Wherein, the user can realize different functions by using LabVIEW. For example, when multiple users test the same circuit, the quality and efficiency of programming varies from user to user due to differences in the users' own conditions. For example, when different users test automotive electronic products, because peripheral circuits of the body control module are complex, the programming quality and efficiency are different among different users based on different familiarity times of the users with the LabVIEW environment and different degrees of understanding of instruments used in the test system, so that the time for completing the test task of different users is greatly different, and the test efficiency is low.
It is easy to understand that, the embodiment of the present application provides a test method based on LabVIEW, which defines the parameter types and parameter values of the parameter configuration files on the display screen through the visual user interface, and stores the parameter types and parameter values in the memory; writing the execution mark of the parameter configuration file into a test sequence configuration file; the processor executes the test sequence configuration file and calls the parameter configuration file for testing when executing the execution mark of the parameter configuration file. The technical scheme of the embodiment of the application enables the circuit test to be visual, and further improves the test efficiency.
Fig. 2 shows a schematic flow chart of a LabVIEW-based test method according to an embodiment of the present application.
It should be noted that the LabVIEW-based test method according to the embodiment of the present application may be applied to a device for generating a LabVIEW-based parameter configuration file, and the LabVIEW-based test method may be configured in a terminal. Wherein the terminal may be various electronic devices having a display screen including, but not limited to, a computer, a notebook computer, and the like. The terminal of the embodiment of the application is introduced by taking a computer as an example. The computer comprises a display screen, a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to execute the steps of the LabVIEW-based testing method.
As shown in fig. 2, the LabVIEW-based test method includes:
s201, defining the parameter type and the parameter value of the parameter configuration file on a display screen through a visual user interface, and storing the parameter type and the parameter value in a memory.
According to some embodiments, a user may click on a control of a configuration parameter profile on an input device of a computer according to test requirements. The input device of the computer generates a parameter configuration file configuration instruction according to the clicking operation of the user and sends the parameter configuration file configuration instruction to the computer processor. The parameter configuration file configuration instruction may include a name of the parameter configuration file, a parameter type of the parameter configuration file, and a parameter value of the parameter configuration file. The parameter profile generation instruction sent by the input device of the computer may be, for example, a parameter profile configured to measure a 10 Ω resistance using a multimeter, where the numerical precision is set to a single precision value. And after receiving the instruction, the computer processor analyzes the instruction, acquires the configuration information carried in the instruction, defines the parameter type and the parameter value of the parameter configuration file on a display screen through a visual user interface according to the configuration information, and stores the parameter type and the parameter value in the memory. According to the acquired configuration information, the computer processor can define a parameter configuration file with the name of multimeter 34450 resistance on the display screen through a visual user interface, define the parameter type of the parameter configuration file as resistance and the parameter value of the parameter configuration file as 10 omega, and store the parameter type and the parameter value of the parameter configuration file in the memory.
It is easy to understand that the name of the parameter configuration file can be set according to the function of the parameter configuration file, and can also be set according to the execution sequence of the parameter configuration file. The name of the parameter configuration file set by the computer processor can be multimeter test resistance, and the name of the parameter configuration file set by the computer processor can be 15-meter resistance.
Optionally, the parameter type of the parameter configuration file may be a parameter type obtained by a component in the parameter configuration file, and the parameter type may include, for example, a resistance, a capacitance, and the like. The parameter types may also include, for example, types of parameter values that are obtained or output, such as single-precision values, double-precision values, and multi-precision values.
According to some embodiments, when the computer processor defines the parameter values of the parameter profile, the number of times the parameter values are sampled, the sampling accuracy, and the output method may be defined. The output method refers to an output mode of the parameter value of the parameter configuration file output by the computer processor, and the output mode includes but is not limited to an average value, a maximum value or a minimum value of a plurality of sampling values. The computer processor sets the sampling times, so that the accuracy of the circuit test based on LabVIEW can be improved.
S202, writing the execution mark of the parameter configuration file into the test sequence configuration file.
According to some embodiments, a computer processor may execute test instructions for a circuit. A circuit may correspond to multiple parameter profiles, and thus, when a computer processor tests the circuit, it is necessary to set execution flags for the multiple parameter profiles corresponding to the circuit. The setting of the execution flag may be completed before receiving the parameter configuration file configuration instruction, or may be set after configuring the name of the parameter configuration file, the parameter type of the parameter configuration file, and the parameter value of the parameter configuration file. For example, after the computer processor defines the name of the first parameter configuration file corresponding to the circuit, the parameter type of the first parameter configuration file, and the parameter value of the first parameter configuration file, the execution flags of the plurality of parameter configuration files corresponding to the circuit may be set.
It will be readily appreciated that the plurality of parameter profiles for a circuit may include, for example, testing the input impedance of the circuit, testing the output voltage of the transformer of the circuit, and testing the output current of the circuit. It is therefore necessary to set the execution flags for multiple parameter profiles when the computer processor tests the circuit. The computer processor may set the execution flags for the plurality of parameter profiles based on the received set instructions for the test sequence. The execution flag of the computer processor setting parameter profile may be, for example, that the execution flag of the parameter profile of the test circuit input impedance is first, that of the test circuit transformer output voltage is second, and that of the test circuit output current is third.
It will be readily appreciated that when the computer processor sets the execution flag for the completed parameter configuration file, the execution flag for the parameter configuration file may be written to the test order configuration file. For example, when the execution flag of the T parameter configuration file is undefined by the computer processor, the execution flag of the a parameter configuration file in the test sequence configuration file is first, the execution flag of the B parameter configuration file is second, the execution flag of the C parameter configuration file is third, the execution flag of the D parameter configuration file is fourth, the execution flag of the E parameter configuration file is fifth, and the execution flag of the F parameter configuration file is sixth. When the computer processor defines that the T parameter configuration file is completed, the test sequence of the T parameter configuration file set by the computer processor is between the E parameter configuration file and the F parameter configuration file, the computer processor may write the execution flag of the T parameter configuration file into the test sequence configuration file, and modify the execution flags of other parameter configuration files, where the test sequence configuration file displayed by the computer interface may be as shown in fig. 3. The parameter configuration files corresponding to the first to seventh execution flags of the test order configuration file may be, for example, an a parameter configuration file, a B parameter configuration file, a C parameter configuration file, a D parameter configuration file, an E parameter configuration file, a T parameter configuration file, and an F parameter configuration file, respectively.
S203, the processor executes the test sequence configuration file and calls the parameter configuration file to test when executing the execution mark of the parameter configuration file.
According to some embodiments, after the computer processor defines the parameter type and the parameter value of the parameter profile, information that the parameter type and the parameter value of the parameter profile are defined may be issued. When the input device of the computer detects the input operation of clicking the control of the 'saving parameter configuration file', the operation information of the user can be sent to the processor of the computer. The computer processor may generate a parameter profile corresponding to the parameter profile from the parameter type and the parameter value. The test order profile may be executed when the computer processor generates the parameter profile. And calling the parameter configuration file for testing when the computer executes the execution mark of the parameter configuration file. For example, the parameter profiles that the computer processor configures to complete the test of 10 Ω resistance of multimeter 34450 include an a parameter profile, a B parameter profile, a C parameter profile, a D parameter profile, an E parameter profile, a T parameter profile, and an F parameter profile, and the processor may set, for example, the execution flag of the a parameter profile to be first, the execution flag of the B parameter profile to be second, the execution flag of the C parameter profile to be third, the execution flag of the D parameter profile to be fourth, the execution flag of the E parameter profile to be fifth, the execution flag of the T parameter profile to be sixth, and the execution flag of the F parameter profile to be seventh. When the processor performs a current test on the 10 Ω resistor, the corresponding T parameter profile may be invoked according to the execution flag of the parameter profile.
As will be readily appreciated, the format of the parameter configuration file generated by the computer processor based on the parameter type and the parameters includes, but is not limited to, txt, doc, and docx. For example, based on multimeter 34450 testing 10 Ω resistance, a computer processor may generate a plurality of parameter profiles for multimeter 34450 testing resistance and save the parameter profiles to a memory, where the plurality of parameter profiles corresponding to the circuits displayed on the computer interface may be as shown in fig. 4.
The embodiment of the application provides a method for generating a parameter configuration file based on LabVIEW, which comprises the following steps: defining the parameter type and parameter value of the parameter configuration file on a display screen through a visual user interface, and storing the parameter type and parameter value in a memory; writing the execution mark of the parameter configuration file into a test sequence configuration file; the processor executes the test sequence configuration file and calls the parameter configuration file for testing when executing the execution mark of the parameter configuration file. According to the technical scheme, the processor can execute the test sequence configuration file, and call the parameter configuration file defined through the visual user interface on the display screen for testing when the execution mark of the parameter configuration file is executed, so that the circuit test is visual, and the test efficiency is improved.
Fig. 5 shows a schematic flow diagram of a LabVIEW-based testing method according to another embodiment of the present application.
As shown in fig. 5, the LabVIEW-based test method specifically includes:
s501, a test instruction for the circuit is executed.
According to some embodiments, a user may test the circuit based on LabVIEW. The user may click on a control of the test circuit on an input device of the computer. The input device of the computer generates a test instruction aiming at the circuit according to the clicking operation of the user and sends the test instruction aiming at the circuit to the processor of the computer. When the computer processor detects the test instruction for the circuit, a test instruction for the circuit is received. The test instruction sent by the user may be, for example, testing the LC resonant circuit. And when the computer processor receives the test instruction, analyzing the instruction to acquire the test instruction for the LC resonance circuit.
S502, based on the test instruction, obtaining a test sequence configuration file associated with the circuit.
According to some embodiments, a circuit may correspond to multiple parameter profiles. For example, the LC resonant circuit may correspond to a test inductance case, a test capacitance case, and a test resistance case. Therefore, when the computer processor receives a test instruction for a circuit, it needs to test a plurality of parameter configuration files corresponding to the circuit. When a circuit corresponds to only one parameter profile, the computer processor need not obtain a test order profile associated with the circuit. However, when a circuit corresponds to a plurality of parameter configuration files, if the computer processor does not obtain the test sequence of the plurality of parameter configuration files, the computer processor may not perform the test on the circuit or the test result may be confused. The computer processor may thus retrieve a test order profile associated with the circuit such that a plurality of parameter profiles corresponding to a circuit may be tested in order. The test sequence configuration file comprises names of a plurality of parameter configuration files and execution marks of the plurality of parameter configuration files. For example, the BUCK circuit may be composed of a switching tube Q1, a diode D1, an inductor L, and an output capacitor C. When a computer processor receives a test instruction for a BUCK circuit, a test sequence configuration file for the BUCK circuit can be acquired. The test sequence profile may be, for example, the execution flag of the parameter profile of the BUCK circuit input voltage is first, the execution flag of the parameter profile of the switch-on duty ratio of the BUCK circuit switch Q1 is second, and the execution flag of the parameter profile of the BUCK circuit output voltage is third.
S503, acquiring a first parameter configuration file based on the execution mark of the parameter configuration file.
According to some embodiments, when the computer processor obtains the test order profile, the first parameter profile name may be read according to a preset execution flag of the parameter profile. The first parameter configuration file refers to a parameter configuration file corresponding to an execution mark of the parameter configuration file in a circuit. For example, when the computer processor acquires a test sequence configuration file for the BUCK circuit, the second parameter configuration file name read from the test sequence configuration file may be a switch on duty ratio of the switch pipe Q1 in the test BUCK circuit according to the second execution flag of the parameter configuration file.
S504, the first parameter configuration file is analyzed to obtain a first test parameter.
According to some embodiments, when the first parameter profile is obtained, the computer processor may obtain the first test parameter by parsing the first parameter profile. For example, the computer processor acquires a first parameter configuration file as a parameter file for testing 10 Ω resistance of the multimeter 34450, and analyzes the first parameter configuration file, and the first test parameter obtained by the computer processor may be 10 Ω resistance.
Optionally, the computer processor may create an image configuration interface prior to generating the parameter configuration file. The computer processor may configure the corresponding parameter type and parameter value on the image configuration interface. When the computer processor configures the parameter type and the parameter value of the completed parameter configuration file, the parameter type and the parameter value are stored in the memory of the computer.
And S505, testing the circuit based on the first test parameter.
According to some embodiments, the computer processor may test the circuit while obtaining the first test parameter by parsing the first parameter profile. For example, the test instruction received by the computer processor may be to test a current value of the series circuit. For example, the K circuit may be a series circuit composed of two resistors. When a user tests the circuit based on LabVIEW, the user can click on a control of the test K circuit on the input device of the computer. The input device of the computer generates a test instruction aiming at the K circuit according to the clicking operation of the user and sends the test instruction aiming at the circuit to the processor of the computer. The computer processor may derive the first test parameter by parsing a first parameter profile associated with a first parameter profile name based on receiving a test instruction for the K circuit, the first test parameter may be, for example, an input voltage of 20V, a first resistance of 5 Ω, and a second resistance of 5 Ω. Based on the derived first test parameter, the computer processor may test the current value of the circuit.
S506, obtaining a circuit test result.
According to some embodiments, when a computer processor tests a circuit, the computer processor may detect a progress of the test. When the computer processor detects that testing of the circuit is complete, test results for the circuit may be obtained. For example, the computer processor tests the K circuit based on LabVIEW, and when the test is detected to be completed, the obtained test result of the K circuit can be that the current value of the circuit is 2A.
And S507, when the circuit test result is detected to accord with the preset condition, displaying prompt information that the circuit test result accords with the preset condition through the display equipment.
According to some embodiments, when the computer processor acquires the LabVIEW-based test result for the circuit, whether the circuit test result meets the preset condition or not can be detected. When the computer processor tests the K circuit, the preset condition set by the computer processor may be, for example, that the current value of the K circuit is 2A. And when the computer processor acquires that the test result of the K circuit is 2A, the computer processor detects that the test result meets the preset condition. The computer processor may send a prompt to the computer display device that the circuit test result meets the predetermined condition. The computer display equipment can display prompt information that the circuit test result meets the preset conditions. For example, the computer processor may send a prompt to the computer display device that the test result of the K circuit meets the predetermined condition. The computer display equipment can display prompt information that the test result of the K circuit meets the preset condition, and a user can directly see the test result aiming at the circuit based on LabVIEW, so that the user can carry out subsequent work.
The embodiment of the application provides a LabVIEW-based test method, which comprises the steps of executing a test instruction aiming at a circuit, obtaining a circuit test result, and displaying prompt information that the circuit test result meets a preset condition through display equipment when the circuit test result meets the preset condition. According to the technical scheme of the embodiment of the application, the circuit can be tested by executing the test instruction aiming at the circuit, the programming time of a user can be reduced, the difference between parameter configuration files written by different users can be reduced, and the test efficiency is further improved.
Fig. 6 shows a schematic flow diagram of a LabVIEW-based testing method according to another embodiment of the present application.
As shown in fig. 6, the LabVIEW-based test method includes:
s601, generating a packaging function.
According to some embodiments, the parameter profile comprises an encapsulation function. When the computer processor completes the configuration of the parameter configuration file, the calling times of the parameter configuration file can be obtained and recorded. The computer processor can detect whether the calling times are more than a preset number or not every time the calling times of the parameter configuration file are recorded by the computer processor. And when the computer processor detects that the calling times of the parameter configuration file are greater than the preset times, packaging the parameter configuration file to generate a packaging function. The encapsulation function may be a function of a computer processor that re-develops an original function in an original test system of LabVIEW.
It is easy to understand that, when the computer processor completes the configuration of the resistance parameter configuration file of the K circuit, the calling times of the resistance parameter configuration file can be obtained and recorded. The computer processor can detect whether the calling times are more than a preset number or not every time the calling times of the parameter configuration file are recorded by the computer processor. The preset number of times set by the computer may be, for example, 5 times. When the number of times of calling the resistance parameter configuration file acquired by the computer processor is 6 times and the number of times of calling the resistance parameter configuration file detected by the computer processor is 6 times greater than 5 times, the parameter configuration file of the K circuit can be packaged to generate a packaging function corresponding to the K circuit. The computer processor may save the wrapper function to a memory of the computer or to a server.
S602, executing a test instruction aiming at the circuit.
The specific process is as described above, and is not described herein again.
S603, based on the test instruction, inquiring a packaging function related to the circuit.
According to some embodiments, when a computer processor receives a test instruction for a circuit, the instruction may be parsed to obtain the names of all tests corresponding to the circuit. The computer processor may query the computer's memory for the presence of the parameter profile's wrapper function based on the name of each parameter profile. When the computer processor inquires that the packaging function with a certain parameter configuration file exists in the memory, the packaging function is directly read. When the computer processor does not query the wrapper function associated with the parameter profile, a parameter profile corresponding to the received test instruction may be defined.
And S604, testing the circuit based on the packaging function.
According to some embodiments, when a computer processor queries a wrapper function associated with a circuit, the wrapper function is read directly and the circuit is then tested according to the wrapper function. The computer processor may associate the wrapper function with the circuit and store the wrapper function to the function library. When the computer processor uses the parameter configuration file again, the packaging function can be directly called, and the convenience of the LabVIEW-based test circuit of the computer processor can be improved.
The embodiment of the application provides a method for generating a parameter configuration file based on LabVIEW, which comprises the steps of generating a packaging function of the parameter configuration file based on the parameter configuration file, receiving a test instruction aiming at a circuit, inquiring the packaging function associated with the circuit based on the test instruction, and testing the circuit based on the packaging function. According to the technical scheme of the embodiment of the application, the encapsulation function associated with the circuit is inquired through obtaining, the circuit is tested on the basis of the encapsulation function, programming time of users can be shortened, differences among parameter configuration files written by different users can be reduced, and then testing efficiency is improved.
The above description mainly introduces the scheme of the embodiment of the present application from the perspective of executing processes on the method side. It is understood that the terminal and the server include hardware structures and/or software modules for performing the respective functions in order to implement the above functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the server may be divided into the functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 7 is a schematic structural diagram of a LabVIEW-based parameter profile generation apparatus according to an embodiment of the present application.
As shown in fig. 7, the apparatus 700 for generating a LabVIEW-based parameter profile includes: a file configuration unit 701, a mark writing unit 702, and a file testing unit 703, wherein:
the file definition unit 701 is used for defining the parameter types and parameter values of the parameter configuration files on the display screen through a visual user interface and storing the parameter types and parameter values in the memory;
a flag writing unit 702, configured to write an execution flag of the parameter configuration file into the test order configuration file;
the file testing unit 703 is configured to execute the test sequence configuration file and call the parameter configuration file for testing when the execution flag of the parameter configuration file is executed.
According to some embodiments, the apparatus 700 for generating a LabVIEW-based parameter profile further comprises an instruction execution unit 704 for executing a test instruction for a circuit by a processor.
According to some embodiments, the apparatus 700 for generating a LabVIEW-based parameter configuration file further includes an information prompting unit 705 for obtaining a circuit test result;
and when the circuit test result is detected to accord with the preset condition, displaying prompt information that the circuit test result accords with the preset condition through the display equipment.
According to some embodiments, the parameter configuration file comprises a wrapper function, and the generating device 700 for LabVIEW-based parameter configuration file further comprises a function generating unit 706 for generating the wrapper function.
According to some embodiments, the function generating unit 706 is further configured to obtain a number of times of calling the parameter configuration file;
when the calling times are detected to be larger than the preset times, packaging the parameter configuration file to generate a packaging function;
the method includes associating an encapsulation function with the circuit and storing the encapsulation function to a function library.
According to some embodiments, the circuit test unit 704 is further configured to receive a test instruction for the circuit;
querying a packaging function associated with the circuit based on the test instruction;
the circuit is tested based on the packaging function.
The embodiment of the application provides a device for generating a parameter configuration file based on LabVIEW, which comprises a file configuration unit, wherein the file configuration unit defines the parameter type and the parameter value of the parameter configuration file on a display screen through a visual user interface and stores the parameter type and the parameter value in a memory, a mark writing unit writes an execution mark of the parameter configuration file into a test sequence configuration file, and a file test unit executes the test sequence configuration file and calls the parameter configuration file to test when the execution mark of the parameter configuration file is executed. The device for generating the LabVIEW-based parameter configuration file can execute the test sequence configuration file, and call the parameter configuration file defined by the visual user interface on the display screen for testing when the execution mark of the parameter configuration file is executed, so that the circuit test is visual, and the test efficiency is improved.
Please refer to fig. 8, which is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
As shown in fig. 8, the terminal 800 may include: at least one processor 801, at least one network interface 804, a user interface 803, a memory 805, at least one communication bus 802.
Wherein a communication bus 802 is used to enable connective communication between these components.
The user interface 803 may include a Display screen (Display) and an antenna, and the optional user interface 803 may also include a standard wired interface and a wireless interface.
The network interface 804 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Processor 801 may include one or more processing cores, among other things. The processor 801 connects various parts within the overall server farm 800 using various interfaces and lines, and performs various functions of the terminal 800 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 805, as well as invoking data stored in the memory 805. Alternatively, the processor 801 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 801 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is to be understood that the modem may not be integrated into the processor 801, but may be implemented by a single chip.
The Memory 805 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 805 includes a non-transitory computer-readable medium. The memory 805 may be used to store instructions, programs, code sets, or instruction sets. The memory 805 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 805 may optionally be at least one memory device located remotely from the processor 801 as previously described. As shown in fig. 8, the memory 805 as a kind of computer storage medium may include therein an operating system, a network communication module, a user interface module, and a generation program for a LabVIEW-based parameter profile.
In the terminal 800 shown in fig. 8, the processor 801 may be configured to call an application program stored in the memory 805, and specifically perform the following operations:
defining the parameter type and parameter value of the parameter configuration file on a display screen through a visual user interface, and storing the parameter type and parameter value in a memory;
writing the execution mark of the parameter configuration file into a test sequence configuration file;
the processor executes the test sequence configuration file and calls the parameter configuration file for testing when executing the execution mark of the parameter configuration file.
According to some embodiments, the processor is further configured to perform the steps of:
the processor executes test instructions for the circuit.
According to some embodiments, the processor is further configured to perform the steps of:
obtaining a circuit test result;
and when the circuit test result is detected to accord with the preset condition, displaying prompt information that the circuit test result accords with the preset condition through the display equipment.
According to some embodiments, the parameter profile comprises an encapsulation function, the processor being further configured to perform the steps of:
and generating an encapsulation function.
According to some embodiments, the processor, when executing the generate package function, specifically performs the following steps:
acquiring the calling times of the parameter configuration file;
when the calling times are detected to be larger than the preset times, packaging the parameter configuration file to generate a packaging function;
the method includes associating an encapsulation function with the circuit and storing the encapsulation function to a function library.
According to some embodiments, the processor is further configured to perform the steps of:
receiving a test instruction for a circuit;
querying a packaging function associated with the circuit based on the test instruction;
the circuit is tested based on the packaging function.
The embodiment of the application provides a terminal, wherein the parameter type and the parameter value of a parameter configuration file are defined on a display screen through a visual user interface and are stored in a memory; writing the execution mark of the parameter configuration file into a test sequence configuration file; the processor executes the test sequence configuration file and calls the parameter configuration file for testing when executing the execution mark of the parameter configuration file. According to the technical scheme, the terminal can execute the test sequence configuration file and call the parameter configuration file defined by the visual user interface on the display screen to test when the execution mark of the parameter configuration file is executed, so that the circuit test is visual, and the test efficiency is improved.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the LabVIEW-based testing methods as described in the above method embodiments.
It is clear to a person skilled in the art that the solution of the present application can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, a Field-ProgrammaBLE Gate Array (FPGA), an Integrated Circuit (IC), or the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some microservice interface, and may be an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program, which is stored in a computer-readable memory, and the memory may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above description is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure should not be limited thereby. That is, all equivalent changes and modifications made in accordance with the teachings of the present disclosure are intended to be included within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (9)

1. A LabVIEW-based test method, wherein the test method is executed in a computer, the computer comprises a display screen, a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to perform the following steps:
defining the parameter type and the parameter value of a parameter configuration file on the display screen through a visual user interface, and storing the parameter type and the parameter value in the memory;
writing the execution mark of the parameter configuration file into a test sequence configuration file;
and the processor executes the test sequence configuration file and calls the parameter configuration file to test when executing the execution mark of the parameter configuration file.
2. The method of claim 1, wherein the method further comprises:
the processor executes test instructions for a circuit.
3. The method of claim 2, wherein the method further comprises:
obtaining the circuit test result;
and when the circuit test result is detected to accord with the preset condition, displaying prompt information that the circuit test result accords with the preset condition through display equipment.
4. The method of claim 3, wherein the parameter profile comprises an encapsulation function, the method further comprising:
and generating the encapsulation function.
5. The method of claim 4, wherein the generating the encapsulation function comprises:
acquiring the calling times of the parameter configuration file;
when detecting that the calling times are greater than the preset times, packaging the parameter configuration file to generate the packaging function;
associating the encapsulation function with a circuit, and storing the encapsulation function to a function library.
6. The method of claim 4, wherein the method further comprises:
receiving a test instruction for a circuit;
querying a packaging function associated with the circuit based on the test instruction;
testing the circuit based on the encapsulation function.
7. An apparatus for generating a LabVIEW-based parameter configuration file, comprising:
the file definition unit is used for defining the parameter types and parameter values of the parameter configuration files on the display screen through a visual user interface and storing the parameter types and parameter values in the memory;
a mark writing unit, configured to write an execution mark of the parameter configuration file into a test sequence configuration file;
and the file testing unit is used for executing the testing sequence configuration file and calling the parameter configuration file for testing when the execution mark of the parameter configuration file is executed.
8. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of the preceding claims 1 to 6.
CN201911234241.1A 2019-12-05 2019-12-05 LabVIEW-based test method Pending CN112925699A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911234241.1A CN112925699A (en) 2019-12-05 2019-12-05 LabVIEW-based test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911234241.1A CN112925699A (en) 2019-12-05 2019-12-05 LabVIEW-based test method

Publications (1)

Publication Number Publication Date
CN112925699A true CN112925699A (en) 2021-06-08

Family

ID=76161328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911234241.1A Pending CN112925699A (en) 2019-12-05 2019-12-05 LabVIEW-based test method

Country Status (1)

Country Link
CN (1) CN112925699A (en)

Similar Documents

Publication Publication Date Title
CN105653056B (en) The test method and device of input method
CN108170425B (en) Program code modification method and device and terminal equipment
CN109522208B (en) Page fluency testing method and device, computer device and storage medium
CN110221899B (en) User interface adjusting method, device and system
WO2019169723A1 (en) Test case selection method, device and equipment, and computer-readable storage medium
CN113467868B (en) Method and device for creating equipment resources
CN104915297B (en) A kind of automated testing method of the APP power consumption of android equipment
CN109684008A (en) Card rendering method, device, terminal and computer readable storage medium
CN109446096A (en) A kind of intelligence contract adjustment method, device and its storage medium
CN111078563A (en) Coverage rate data processing method, terminal device and computer readable storage medium
CN110688315A (en) Interface code detection report generation method, electronic device, and storage medium
CN108038125B (en) Method, device, equipment and storage medium for automatically comparing fund system test values
CN113672504A (en) Intelligent equipment testing method, device, equipment and storage medium
CN111078562A (en) Interface test method, terminal device and computer readable storage medium
CN112925699A (en) LabVIEW-based test method
CN111710347B (en) Audio data analysis method, electronic device and storage medium
US8302045B2 (en) Electronic device and method for inspecting electrical rules of circuit boards
CN111143398B (en) Extra-large set query method and device based on extended SQL function
CN108595202A (en) Http request processing method and processing device
CN113987453A (en) Identity verification method, system, mobile terminal, storage medium and electronic equipment
CN112948264A (en) Test task execution method, device, system, storage medium and electronic device
CN112989752B (en) Simulation method, simulation device, terminal equipment and medium for power supply scheme
CN111125147B (en) Extra-large set analysis method and device based on extended pre-calculation model and SQL function
CN111381121A (en) Auxiliary analysis method and device for filter test result
CN109683883A (en) A kind of Flow Chart Design method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210608