1 Overview
Laboratory Virtual Instrument Engineering Platform (LabVIEW) is a graphical software specifically used for data acquisition, analysis and instrument control. The virtual instruments it develops combine the powerful data processing capabilities of computers with the hardware test control capabilities of instruments.
The graphical development environment of LabVIEW is accurate, efficient, powerful, easy to develop, real-time, and user-friendly. It provides users with powerful functions and flexibility, and is very suitable for simulation, real-time detection, and control. At present, LabVIEW has become one of the most widely used and promising software development platforms in the field of testing, and is also one of the most widely used, fastest-growing, and most powerful graphical software development integrated environments.
Virtual instruments can use high-performance modular hardware and combine efficient and flexible software to complete various tests, measurements and automation applications. Compared with traditional measuring instruments, they have the advantages of low cost, powerful functions, high integration, reliable quality, and easy maintenance. They can easily build test systems to meet various measurement requirements. Therefore, it is of great significance to develop signal acquisition systems based on virtual instrument technology and using LabVIEW language.
LabVIEW virtual instruments mainly consist of three parts: front panel, block diagram and icon/interface components.
The front panel is the interactive user interface of the VI, that is, the window where the user interacts with the program code. The VI front panel is a combination of controls and indicators. The controls simulate the types of input and output devices on conventional instruments, such as knobs and switches, and provide a mechanism to transfer input from the front panel to the basic block diagram.
The signal acquisition and processing system mainly uses the A/D (analog/digital) conversion function of the data acquisition card. The analog electrical signal collected by the acquisition end is converted into a digital signal through the data acquisition card using a high-speed analog-to-digital conversion circuit. The signal is then cached on the data acquisition card and finally the computer program is used to continuously extract data from the cache, store it in the computer, and perform relevant processing to extract useful data for hard disk storage.
The driver of the data acquisition card is written using LabVIEW language, and the signal analysis, processing and storage process is shown in Figure 1.
Figure 1. Overall flow chart of the signal acquisition and processing system. [page]
2 PCI-1714 data acquisition cards
Advantech's PCI-1714 is a high-speed 4-channel synchronous data acquisition card with a PCI interface. It can be used for high-speed data acquisition applications with a high cost-performance ratio. It is suitable for instrument testing, image processing, video digitization processing, sound and vibration testing, and other fields.
PCI-1714 is a high-speed, high-resolution, high-capacity PCI data acquisition card equipped with 4 analog inputs and synchronous acquisition function. Its features can be summarized as follows: a) Contains 4 independent ADCs (Analog-to-Digital Converters), which can sample 4 channels synchronously. When 4 analog inputs are used simultaneously, the sampling frequency can theoretically reach up to 30 MS/s. b) Each ADC has a built-in 32K FIFO memory, which provides users with sufficient buffer for temporary storage during high-speed sampling to maintain data acquisition speed and integrity. c) Provides a variety of input ranges, including ±5 V, ±2.5 V, ±1 V, ±0.5 V, etc. Users can easily complete the settings through the tool program. d) Up to 6 trigger modes, including software trigger, Pacer, Post-Trigger, Pre-Trigger, Delay-Trigger and About-Trigger trigger modes, which are convenient for customers to set according to their needs.
The structure of the general high-speed data acquisition system based on PCI-1714 is shown in Figure 2.
Figure 2 Structural block diagram of the high-speed data acquisition system based on PCI-1714.
The field signal to be monitored is filtered and sent to the PCI-1714 card. The A/D converter on the card performs high-speed analog-to-digital conversion on the signal. The converted data is first temporarily stored in the 32K onboard FIFO (first in first out) of the card. When the FIFO is half full or full, a DMA request is sent to the DMA (dynamic memory access) controller. Using direct memory access, the data is output from the FIFO to the internal buffer via the PCI (Peripheral Component Interconnect) bus. The PCI bus has a wide transmission bandwidth and can meet the high-speed data transmission requirements brought about by 4-channel high-speed synchronous sampling.
The internal buffer is a massive cache of the high-speed data acquisition system. Like the user buffer, it is two memory areas dynamically allocated to the driver by the data acquisition program. The difference is that the internal buffer stores the original values taken from the FIFO, and the user buffer stores the converted voltage values.
When performing long-term high-speed data acquisition, PCI-1714 mostly uses a circular method. In this method, starting a collection process can perform countless A/D conversions. At this time, the internal buffer is divided into two equal halves, the front and back halves. When the front half is full, the data in this half is transferred to the user buffer, and the newly converted data is placed in the back half of the internal buffer. When the back half is full, the data in this half is transferred to the user buffer. At the same time, the newly converted data is automatically placed in the front half of the buffer that has already been transferred. The status of the FIFO buffer can be determined by querying the status of the status register, and the empty flag, half full flag, and full flag can be determined respectively.
The data in the internal buffer and user buffer can be saved in the computer in the form of files under program control, realizing permanent storage of collected data and facilitating later data analysis and processing. [page]
3 PCI-1714 acquisition card data acquisition program example based on LabVIEW language
The following is an introduction to the PCI-1714 acquisition card data acquisition driver written in LabVIEW language. This program can realize the continuous acquisition of external signal data of the sensor system and store useful data as needed.
Functionally, the program is mainly divided into three parts: a) Initialize the acquisition card and complete the setting of important working parameters of the acquisition card, such as user buffer, sampling rate (scan rate), input limit, etc. b) Perform data acquisition and storage of useful data, that is, put the data into the onboard buffer FIFO of the acquisition card first, then read the data in the onboard buffer by the computer, write it into the user buffer allocated from the computer's memory, and then store the useful data from the memory into the computer hard disk as needed. There can be many specific storage formats, and the subVIs included in this part include the data reading module, the data storage module, and the module for displaying the time domain graph of the acquired signal. c) Turn off the acquisition card after the acquisition is completed.
In order to use PCI-1714 for continuous high-speed data acquisition, it is necessary to reasonably set important parameters such as acquisition rate and user cache size. As mentioned above, the data acquisition card performs A/D conversion continuously, that is, the acquisition card puts data into the onboard cache continuously, and the computer reads data from the onboard cache FIFO and puts it into the user cache in batches when the FIFO is half full or full. At the same time, if data storage is to be performed, data is also written from the user cache to the hard disk in batches.
Since the size of the user cache is limited by the size of the computer's memory space and cannot be infinite, it can only be set as large as possible during use, generally about one-tenth of the memory. When maintaining a certain data sampling rate and the user cache is determined, if the data written to the hard disk in a single batch is too small during the storage process, the data cannot be read out from the user cache in time, resulting in an error of user cache overflow. When the data written to the hard disk in a single batch is too much, the data is read from the user cache too quickly, and an error of reading empty data may occur. Therefore, these parameters must be set in coordination with each other to enable the acquisition card to obtain good acquisition and data storage performance.
4 Data calling and processing based on LabVIEW
While completing signal acquisition using the above program, useful signals can be stored for subsequent analysis. The following example illustrates how to retrieve and analyze waveform data after storage.
This program can extract data stored in TXT format from a file and perform spectrum analysis. In the front panel of the program, the time domain waveform of the signal represented by a piece of data and the power spectrum waveform obtained by analyzing with the "FFT Power Spectrum" VI can be displayed at the same time.
Use LabVIEW language to write a program for calling out stored data and analyzing the characteristics of signal waveforms. This program can call out a monitoring signal with multiple channels from a storage file. The monitoring signals of different channels are different. According to the characteristics of the signal waveform, relevant methods can be selected for signal processing to analyze the changes in the monitoring environment corresponding to each signal. Using the "Call Library Function Node" module provided by LabVIEW, it is very convenient to embed the program written in C language into the LabVIEW program, and it can be encapsulated into a subVI for the main program to call. It is suitable for some applications where the programming efficiency of LabVIEW language is not high, and the subVI program is written using the "Call Library Function Node" module.
5 Conclusion
From the above analysis, it can be seen that the use of LabVIEW language can easily solve the relevant problems in the field of signal acquisition and processing. Whether it is the driver writing of the data acquisition card PCI1714, data storage, or the calling and analysis of data, the special VI provided by the language can be fully called, and a clear data flow can be obtained in the graphical language writing environment. Moreover, LabVIEW language also supports users' secondary development of VI, and can call programs written in other languages. It can also conveniently encapsulate the programs written by users into standard VIs for subsequent program calls, which greatly facilitates improving the efficiency of program writing and expanding program functions.
Previous article:Design and Application of Broadband Phase Measurement System Based on Microprocessor
Next article:Spinning Tension Monitoring System Based on LabVIEW and C8051F350
Recommended ReadingLatest update time:2024-11-16 21:02
- 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
- EEWORLD University ---- Micro bit introductory application video tutorial
- Electrical knowledge encyclopedia
- Exploring the Mystery of Millimeter Wave RADAR and LIDAR
- Controlling Hardware with Python - Measuring the Resonant Frequency of an Object Using the ADXL335 Accelerometer
- Useful Tips | Don’t throw away your old phone, here’s a step-by-step guide to DIY a server
- How to measure load impedance, current & voltage signals?
- The role and selection of input and output capacitors in power supplies
- Advanced Motor Control - PID Speed Control
- It's all here! TI mmWave radar product information and software download links
- Negative ion generator power supply modification cost less than 2 yuan