1. Graphical software development platform LabVIEW
LabVIEW (Laboratory Virtual Instrument Engineering workbench) is a graphical program development environment, mainly used in data acquisition, data analysis, testing and instrument control. It has many similarities with traditional programming languages, such as similar data types, data flow control structures, program debugging tools, and hierarchical and modular programming features. However, the biggest difference between the two is that traditional programming languages use text languages for programming, while LabVIEW uses graphical languages (i.e. various icons, graphic symbols, connections, etc.) to write programs in the form of block diagrams. [2]
A LabVIEW program consists of three main parts: front panel, block diagram program, and icon route port. The front panel is an interactive graphical user interface of the LabVIEW program, which is used to set user input and display program output, with the purpose of simulating the front panel of a real instrument. The block diagram program uses graphical language to control the control and indication quantities on the front panel. The icon route port is used to define the LabVIEW program as a subroutine so that it can be called in other programs, which enables LabVIEW to achieve hierarchical and modular programming.
2. Design of Virtual Phase Difference Meter
1. System composition and functions
This virtual instrument uses the Lab-PC-1200 data acquisition card of the American NI company, which is directly inserted into the corresponding standard bus expansion slot of the computer to form a PC-DAQ (Data Acquisition) card-type virtual instrument. It mainly measures the amplitude, frequency, phase difference, etc. of two sinusoidal signals of the same frequency. The system composition block diagram is shown in Figure 1:
2. Panel design
The soft panel program provides users with a friendly graphical interface. All objects in the panel can basically be divided into control quantities and display quantities. Control quantities are used to simulate switches and knobs on traditional instruments; display quantities are used to display measurement and processing results.
LabVIEW provides a very rich interface control objects, which can quickly design a vivid, intuitive, and easy-to-operate user interface. The virtual phase difference meter soft panel designed in this paper is shown in Figure 2.
The left side of the soft panel is a real-time waveform display, which can display two waveforms sampled from channel 0 and channel 1 in real time; the right side is a Lissajous figure, and below it are waveform adjustment, waveform selection, and the measurement results of frequency, amplitude, phase, and phase difference. In addition, when running the virtual instrument, a storage window will pop up, which can save all historical measurement records before the end of the program in the specified file for observation, analysis, and further processing.
3. Program flowchart structure design
The block diagram of the virtual phase difference meter is shown in Figure 3. It uses a graphical programming language and is very intuitive. The block diagram includes four parts: waveform acquisition, waveform display and adjustment, waveform measurement, and data storage.
(1) Waveform acquisition: This virtual instrument uses the Lab-PC-1200 data acquisition card from the American NI company, with a maximum sampling frequency of 100KHz, an input signal range of -5V~+5V, and two sampling channels 1 and 0. This part consists of AIConfig, AI Start, AI Read, AI Single Scan and AI Clear. Max&Min and a shift register are used to control the reading speed of the sampled data. [page]
(2) Waveform display and adjustment: First, the two analog input signals (two-dimensional arrays) collected by the data acquisition subroutine are divided into two one-dimensional arrays according to the different acquisition channels using the Index Array function. Then, they are respectively formed into clusters with a starting point x0 = 0 and a time interval Δx = 0.001 using the Bundle function. Finally, the two clusters are formed into a cluster array using the Build Array function and sent to the waveform chart to observe two columns of real-time waveforms. If the two one-dimensional arrays are directly formed into a cluster using the Bundle function and sent to the waveform chart, two columns of Lissajous figures of sine waves can be observed. The three Case structures in the block diagram are used to control the amplitude adjustment, time base adjustment, and waveform selection on the soft panel. The display effect of the real-time waveform on the screen can be adjusted by adjusting these knobs and the vertical pointer slider with the mouse.
(3) Waveform measurement: mainly measure the frequency, amplitude and phase difference of two sine waves, and focus on the measurement method of phase difference. This paper adopts the spectrum analysis method to measure the phase. The principle is to obtain the frequency domain characteristics of two sine signals through the Amplitude and Phase Spectrum subroutine, take the phase value corresponding to each frequency component of the signal in the phase-frequency characteristic curve of the two signals, and then use the Index Array function to determine the phase of the main frequency components of the two signals according to the number of cycles of the sampled signal, and subtract them to get the phase difference [4]. The block diagram program is shown in Figure 4.
(4) Data storage: The data storage part consists of Open/Create/Replace File, Write File, Close File and Simple Error Handler. In addition, the Format into String function is used to define the data storage format, and the Get Data/Time String function is used to return the time of each measurement. The block diagram program is shown in Figure 5.
4. Discussion of measurement results
The "phase-shift bridge" circuit is used for testing. The measurement results obtained in a certain state are as follows, which are slightly different from the theoretical values of the parameters. The reason is that on the one hand, various noises and interferences will inevitably be generated during the data acquisition, transmission and conversion process, and external interference will also invade the system. Therefore, in the data processing process, digital measurement will cause certain errors; on the other hand, the frequency of the signal should be determined, but there will be frequency deviation in practice, which is also the reason for the inaccurate phase difference measurement. In addition, there are also errors between the parameter values marked on the device and the actual values, but continuous improvement of the measurement algorithm and the use of data acquisition cards with better performance will achieve better measurement results.
3. End
At present, NI and HP in the United States are in a leading position in the research of virtual instruments. Purchasing their virtual instrument products will definitely help our scientific research and teaching work, but the price is very expensive. Therefore, it is also feasible to research and develop virtual instruments according to one's own needs. The virtual phase difference meter introduced in this article combines the basic functions of oscilloscope and phase difference meter. It is flexible and convenient to use and effectively improves the teaching conditions of electrical engineering experiments in our college. It is believed that with the continuous development of computer technology and measurement and control technology, virtual instruments will become an important method and means of future teaching and scientific research, and will gradually replace traditional instruments to become the mainstream of test instruments.
Previous article:LabVIEW releases EXE containing shared variables and solves related problems
Next article:Labview FAQ Differences
Recommended ReadingLatest update time:2024-11-16 19:44
- 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
- [Zero-knowledge ESP8266 tutorial] Quick Start 8-Reading analog values
- Invitation | Visit the Avnet Artificial Intelligence Cloud Exhibition, read useful information online, and win gifts!
- In this circuit, why does the PMOS turn on as soon as it is powered on?
- !!! Help "Does anyone know how to solder SIM900A on the perf board?"
- Watch Shuige's video for a reward | How to save oscilloscope data and pictures to a remote PC
- LOTO virtual oscilloscope software function demonstration - FIR digital filtering
- How to compile the image for SINA33 development board
- CalcToolBox 2 based on micropython
- DIY handheld computer with ESP32 and Raspberry Pi
- How is the 64-bit MAC address of the CC2530 device selected?