O Introduction
Virtual instrument is a new type of instrument developed with the development of computer technology, electronic measurement technology and communication technology. It makes full use of the powerful data processing and display capabilities of computer systems, uses software to complete data acquisition, control, data analysis and processing, and display of test results, etc. Through the coordination of software and hardware, it realizes various functions of traditional instruments, truly realizing the concept of "software is instrument", and users can easily maintain and expand the instrument.
Voltage is a common electrical signal in circuits. Other parameters can be derived from voltage measurements using basic formulas. Therefore, voltage measurement is the basis for many other electrical and non-electrical parameters. A very popular measuring instrument for measuring voltage is the voltmeter, but the commonly used one is the analog voltmeter. Analog voltmeters are divided into peak voltmeters, mean voltmeters, and average voltmeters according to different detection methods. They are all made into independent instruments. In this way, when using an analog voltmeter to measure AC voltage, the instrument must be selected according to the measurement requirements. In addition, the meter heads of most voltmeters are scaled according to the sinusoidal AC effective value, and when measuring non-sinusoidal waves, they must be converted to obtain the correct measurement results, which brings inconvenience to actual work.
By using a virtual voltmeter, the peak value, average value and effective value that characterize the AC voltage characteristics can be displayed on a panel . When measuring, the instrument can be selected on the panel according to the waveform. The user can analyze and compare the measurement results only through the panel indication value, which greatly simplifies the measurement steps.
1 Design idea of virtual voltmeter
The engineering technology of LabVIEW 8.2 is richer than any previous version. It uses a Chinese interface, and the functions of each control are clear at a glance. With its new user interface objects and functions, you can develop a professional and fully customizable front panel. LabVIEW 8.2 also makes significant additions and improvements to mathematics, signal processing and analysis. Signal processing analysis and mathematics have more comprehensive and powerful libraries, including more than 500 functions. Therefore, it is more convenient to design a virtual voltmeter under LabVIEW 8.2.
The virtual voltmeter is a modular system based on computer and standard bus technology. It is usually composed of control modules, instrument modules and software, and the functions of the instrument are realized by software programming. In the virtual instrument, the computer 显示器\'); companyAdEvent.show(this,\'companyAdDiv\',[5,18])"> display is the only interactive interface. Physical switches, buttons, knobs, digital tubes and other display devices are replaced by graphic controls similar to the physical appearance. The operator can define the function of the instrument according to his needs by operating the knobs, switches, buttons and other parameters on the virtual instrument panel through the mouse or keyboard. In the design of the virtual voltmeter, considering that the instrument is mainly used for teaching and experiments and the users are students, the three detection methods mentioned in the introduction are integrated into one, which simplifies the panel operation and facilitates direct comparison.
The voltmeter is mainly used as a teaching and measuring instrument for experimental courses such as circuit analysis and analog electronic technology, which enables learners to understand and master the measurement of voltage and the different responses of the voltmeter to various waveforms. Therefore, the virtual voltmeter should have the functions of power switch control, waveform selection, display of three results: peak value, effective value and average value, and adjustable input signal size. The virtual voltmeter consists of hardware devices and interfaces, device driver software and virtual instrument panel. Among them, the hardware devices and interfaces include instrument interface devices and computers, the device driver software is the driver that directly controls various hardware interfaces, and the virtual instrument communicates with the real instrument system through the underlying device driver software, and displays various controls corresponding to the real instrument panel operation on the computer screen in the form of a virtual instrument panel. Here, a signal generator is virtualized by software. The signal generator can generate sine waves, square waves and triangle waves, and can also input formulas to generate arbitrary waveforms. According to needs, the controls on the panel can be adjusted to change the adjustable parameters such as the frequency and amplitude of the signal, and then the operation of the voltmeter can be detected. Therefore, the virtual voltmeter designed in the LabVIEW graphical language environment is mainly divided into two parts: the first part is the design of the virtual voltmeter front panel; the second part is the design of the virtual voltmeter flow chart.
2 Front panel design
The front panel simulates the front panel of a real voltmeter, which is used to set input values and observe output quantities. Since the virtual panel is directly facing the user, it is the core of the virtual voltmeter control software. When designing this part, the main considerations are beautiful interface and simple operation. Users can control the virtual voltmeter to perform measurements through various buttons, switches and other controls on the panel. According to the functions of the traditional voltmeter panel control, the control template in LabVIEW is used to place data input controls, displays, data output controls, switches and selectors that simulate actual voltmeter controls on the design panel. The display is used to display the input signal waveform; the data input control is mainly used to input the signal frequency, sampling frequency, number of samples, amplitude and phase of the measured signal; the data output control is used to output the peak value, average value and effective value obtained after the measured signal is processed and the effective display of the standard frequency. Open the editing window of the LabVIEW front panel, click the right button of the mouse to display the control template, and select the graph-waveform graph as the display of the voltmeter. Click the right button of the mouse on the display template to set its properties. For example, according to the changes in the frequency and amplitude values of the oscilloscope, use the text tool in the tool template to reset the scale of the horizontal (time) and vertical (amplitude) coordinates of the oscilloscope. The oscilloscope designed with Graph control is fully synchronized and the waveform is stable. [page]
Select Control → Numeric → Numeric Input Control/Numeric Display Control to display the input and test results in the voltmeter parameter settings.
Select Controls → Drop-down List and Enumeration → Menu Drop-down List, place the input waveform selection switch, right-click in the drop-down list, and select "Edit Item" to edit it.
Select Classic → Classic Boolean → Square Button for the " Power Switch " control. When the switch is pressed, the virtual voltmeter starts running and the indicator light of the power switch turns on. Similarly, when the switch is released, the virtual voltmeter stops running. Front Panel As shown in Figure 1.
3. Flowchart design
Each front panel corresponds to a flowchart program. After the design of the front panel is completed, the flowchart program can be designed. Open the window in the LabVIEW design environment → Display the program flowchart, enter the flowchart editing window, and the port icons corresponding to the front panel controls automatically appear in the flowchart editing window. Using the functional modules in LabVIEW, according to the functions and connections of the virtual oscilloscope front panel controls, and the control of the data flow after the virtual oscilloscope is operated, place each functional module in the flowchart design panel respectively. After reasonable placement, use the connection tool to connect them in sequence to realize the function of the virtual oscilloscope. The editing of data flow is mainly the connection of port icons. When connecting with the connection tool, if the port flashes, it means that the connected data type matches, otherwise it cannot be connected.
3.1 Implementation of Virtual Signal Generator
Since the virtual voltmeter is mainly used for demonstration, for convenience, LabVIEW software can be used to directly generate simulation signals. In this design, sine waves, square waves, triangle waves, and arbitrary waveforms determined by formulas are set. In the program design block diagram, a Case (selection) statement is used to select four waveforms. In the Case statement, each number (0, 1, 2, 3, 4) represents a waveform, corresponding to the five states in the front panel control. As for the production of the Case statement, just frame one of the four icons, such as the sine wave generator, with a Case frame, and then write the corresponding number in the blank space above, such as 1; then click the arrow to set the second icon. If you want to add a Case, you can right-click the mouse, add it directly, and edit the corresponding node in the corresponding basic signal generator VI. When adding a formula wave, the basic signal generator VI should be replaced with a formula waveform VI. 0 represents the default state, indicating that there is no waveform input. This article gives a branch of the Case structure, and the flow chart of the formula waveform is shown in Figure 2. This sub-VI can generate a function waveform using a formula string of a specified time function. It requires that the independent variable of the formula must be t, and it supports operators and commonly used functions.
In addition, in the analog state, the signal frequency is measured in Hertz or cycles per second. However, in digital systems, digital frequency is usually used, which is the ratio of the signal frequency to the sampling frequency, called the standard frequency. Therefore, in the block diagram program, a divider should be loaded between the signal frequency and the sampling frequency.
After the waveform generator generates the waveform according to the specified parameters, it would be wrong to input the waveform directly into the waveform display control. Because the waveform display control does not only require one or one set of data like the data display control, whether the waveform can be displayed as required depends on the input of several different and decisive data, such as period, phase, etc. In this design, the z-axis starting coordinate, period, and waveform are bundled into an array and input into the waveform display control at the same time.
3.2 Data processing part
The function of the data processing part is to obtain different specified results by detecting and calculating the generated signal in different forms. In this design, the AC effective value, peak value and average value are displayed at the same time. For a pure AC voltage, the positive half-cycle signal is symmetrical with the negative half-cycle signal, and the average value of U is equal to zero, so the average value is generally not measured directly. When designing, press Function → Value → Absolute Value to take the absolute value of the AC voltage, then calculate the average value and take the full-wave average value. The maximum value in the AC voltage is the peak value. The maximum value can be obtained by comparing the data, which requires the use of the waveform maximum and minimum sub-virtual instruments to process the block diagram. Effective value display: Select the basic average DC RMS in Function → Signal Processing → Waveform Measurement. Its block diagram symbol is shown in Figure 3.
[page]
In Figure 3, DC value is the measured DC component; RMS is the effective value of value measurement; reset is used to restart the time signal and average measurement parameters recorded in the past; averaging type is the average type in the measurement. In a single module VI, the average time can be automatically set according to the input record length; Window is the window used to record time before DC/RMS calculation; error in is to describe the error environment before the VI runs, and the default value is no error. If an error has occurred, the VI returns an error code at the errorout end, and the subVI runs normally only when there is no error.
3.3 Switch part
The entire block diagram program is designed using a while conditional statement. When the analog voltage switch is "1", the virtual voltage meter works and the program in the conditional statement starts running; when the analog switch is "0" or off, the program in the conditional statement stops running and the virtual voltage meter does not work. The designed flowchart is shown in Figure 4.
4 Conclusion
After actual use, all the control keys and functions of the virtual voltmeter are normal and meet the use requirements. It should be pointed out that when designing the virtual voltmeter, for the purpose of teaching use, only the function was considered, and the technical indicators of the virtual voltmeter were not studied in depth. In fact, the peak value is the maximum value of the sampling value, and it is impossible to obtain too many sampling points, otherwise the running speed will be too slow. Therefore, the displayed peak value is different from the theoretical value. Attention should be paid to the reasonable selection of parameters during design.
The virtual instrument designed in the LabVIEW graphical language environment is simple and fast. Users can call software modules with different functions to build their own instruments according to the needs of the test functions. This is very convenient for measurement personnel, especially laboratories in colleges and universities. Different grades of instruments can be designed for teaching according to different teaching levels on the same computer . How to design the hardware driver part, virtual panel part, and signal post-processing part partially or completely for different teaching purposes? The signal post-processing program can be designed as an independent functional module, which can perform non-real-time on-site and offline analysis of the sampled signal, which not only meets the requirements of students, but also avoids the repeated purchase of equipment.
Previous article:Research on Memory Detection System Based on LabVIEW
Next article:Developing a Part Finishing and Inspection System Using NI Smart Cameras and LabVIEW
Recommended ReadingLatest update time:2024-11-16 16:33
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Arduino Nano collects temperature and humidity data through LabVIEW and DHT11
- Modern Testing Technology and System Integration (Liu Junhua)
- Computer Control System Analysis, Design and Implementation Technology (Edited by Li Dongsheng, Zhu Wenxing, Gao Rui)
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Matrix keyboard problem
- [Raspberry Pi Pico Review] 5. Pico drives LCD1602
- DIY Extended WiFi Antenna
- Characteristics and Applications of Voltage Monitoring Chip TPS383X
- 5G signal improvements could save $193 million per US fixed-access O-RAN network
- How to analyze which solution is better when two rectifier bridges are connected together?
- [RVB2601 Creative Application Development] Introduction and use of RVB2601 WiFi networking to obtain weather information
- IGBT Driver
- Renesas Electronics RL78/G11 target board free application, participate in the application can also win a JD card!
- Faster CircuitPython LED animation with ulab