Design of Data Acquisition System Based on LabVIEW and PCI-5124

Publisher:EtherealJourneyLatest update time:2011-08-02 Keywords:Digitizer Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Traditional data acquisition systems are generally composed of a single-chip microcomputer and a hardware acquisition circuit or a data acquisition card configured with a computer. This type of data acquisition system has the disadvantages of high development difficulty, poor portability, low data acquisition efficiency, and small real-time storage capacity. Its storage capacity depends on the size of the onboard memory of the data acquisition card, which is generally only 8 MB or 12 MB. However, the data acquisition system used in modern engineering applications needs to have a very high sampling rate to complete the real-time storage of massive data. In view of the shortcomings of traditional data acquisition systems, a data acquisition system that can continuously acquire data for a long time and store data in real time is designed using virtual instruments (LabVIEW) and high-speed digitizer NI PCI-5124.
This system only uses PCs, data acquisition cards, and programming languages ​​to realize data acquisition, storage, and processing under the Windows operating system. It has low development costs, strong communication capabilities, and is easy to use. The system improves the shortcomings of traditional data acquisition systems such as small storage and low acquisition efficiency, and can realize functions such as long-term real-time acquisition, storage, playback, analysis, and report printing of signals.

1 Introduction to system hardware equipment
The system hardware design structure principle block diagram is shown in Figure 1.


The system hardware design mainly includes PC control machine and high-speed data acquisition card. Since many plug-in data acquisition DAQ (Data Acquisition) devices are not only limited by the sampling rate, but also by the on-board memory and the data transfer rate to the PC memory.
In view of the above problems, this design uses the NI PCI-5124 high-speed digitizer with low price, high speed and high precision among the plug-in DAQ products. It can be directly inserted into the PC capture slot of the computer, plug and play, easy to use, with 200 MS/s real-time sampling to 4.0 GS/s equivalent time sampling; standard 8-256 MB large-capacity onboard memory; dual synchronous sampling channels with 12-bit resolution based on the PCI bus; use new technology to achieve synchronous sampling in 2 150 MHz bandwidth input channels with de-noising and anti-aliasing filters; up to 75 dBc spurious-free dynamic range SFDR (Spufious-Free Dynamic Range); based on the NI synchronization and storage core SMC (Synchronization and Memory Core) architecture, with 512 MB onboard memory per channel, fast data transmission and tight synchronization functions. Engineers can synchronize SMC-based modular instruments within tens of picoseconds (ps), mainly with edge, window, hysteresis, video and digital triggering methods, mainly used for high-channel and mixed signal applications.
The drive mode of the dedicated data acquisition head is divided into two types: external drive and built-in drive. For various special data acquisition cards produced by NI, you can use the DAQ library in LabVIEW to directly perform various operations on the port, that is, built-in driver. NI data acquisition cards provide rich and complete support for LabVIEW. The driver function is highly encapsulated on the underlying basic function. Users do not need to have a deep understanding of the specific work of the acquisition card. As long as they understand the meaning of the input/output port of the driver function, they can carry out data acquisition development. Therefore, when users use NI PCI-5124, they only need to call the required interface directly from the program to the system development environment to realize functions such as acquisition, storage, and playback. [page]

2 Data Acquisition System Design
2.1 Programming
LabVIEW is a visual software development platform based on graphical language programming. Compared with other visual programming languages ​​such as VC and VB, it has a rich function library, convenient debugging, simple development interface, and an interface style similar to traditional instruments. LabVIEW is a program development environment that can imitate actual instruments in both appearance and operation, similar to programming languages ​​such as C and BASIC. However, the characteristic of LabVIEW is that it uses graphical programming language G to create source programs in flow charts instead of using text-based languages ​​to generate source program codes. Unlike traditional programming languages ​​such as C and C++, LabVIEW uses powerful graphical language programming, which is aimed at test engineers rather than professional programmers. It is easy to program, the human-computer interaction interface is intuitive and friendly, and it has powerful data visualization analysis and instrument control capabilities.
This experimental system is mainly composed of data acquisition, storage and data processing. Among them, data acquisition includes acquisition settings and data acquisition waveform display; data processing includes signal time and frequency domain parameter measurement, signal-to-noise ratio measurement, and report printing. The system workflow is shown in Figure 2.


The basic working process of this system is: after running the LabVIEW program, first set the channel, sampling mode, sampling frequency, trigger type, trigger level, etc. of the high-speed data acquisition card PCI-5124, then start the acquisition, perform long-term continuous data acquisition and use streaming technology to store the collected information in real time on the computer hard disk. Since the amount of information collected is large, the collected data is processed offline to reduce the burden on the computer CPU and improve the data processing speed.
2.2 Data acquisition module
Data acquisition is the process of automatically collecting various parameter (physical, chemical, biomass, etc.) information from analog and digital units such as sensors and other devices under test. The results of the data acquisition operation directly affect the subsequent data processing and analysis. The data acquisition function module uses the NI-Scope function for data acquisition. In order to allow the data acquisition device to continuously collect data in the background and send it to the cache area, first, after the NI PCI-5124 data acquisition card and driver are installed for the first time, the computer will automatically set its I/O address and interrupt number, allocate memory resources, and open the channel between the LabVIEW program and the underlying driver NI-Scope. Secondly, set the sampling frequency, acquisition channel, data storage method in the program interface and start the program real-time acquisition. Since the acquisition needs to be triggered after a certain event (for example, click the "Run Acquisition" button), this design uses programmable scanning and current software trigger acquisition mode: after the acquisition is started, the lower-level NI-Scope driver independently controls the hardware high-speed digitizer PCI-5124 for data acquisition, and uses the streaming storage method to skip the acquisition card buffer and directly read the acquisition results to the computer hard disk of the application software to process the data. The data acquisition waveform is shown in Figure 3. The module completes continuous data acquisition, displays the signal in real time and refreshes it.

[page]

2.3 Data storage and playback module
The data storage function module consists of the file type cluster, data file storage path, TDMS Dialog function, open TDMS function, write TDMS function, close TDMS function and error function. In this program, the openTDMS function is called to open the TDMS file. When running to this point, the data will be continuously written into the specified computer file according to the originally set storage path and type. Since this design needs to store massive amounts of data, a storage method based on streaming technology is adopted. Streaming is a technology that keeps a file open during multiple write operations, that is, continuously transfers data from or to memory. The memory can be the onboard cache of the device, the RAM on the controller, or the hard disk on the computer. This design uses the "file I/O function" to design a reasonable streaming storage basic architecture.
Playback is to enable users to store real-time acquisition storage and data analysis. After the measurement is completed, they can also re-observe and deeply analyze the collected data when needed. When the data playback function program runs to the open TDMS function, connect the run to open (read-only), and the corresponding data storage file can be opened. The collected waveform data is stored in the computer hard disk in the form of a binary TDMS file with an index. When selecting waveform playback, the background program must first determine the sampling time corresponding to the array element in the waveform data. When the co-play button is selected, the given initial running time will be compared with the time corresponding to the first element of the waveform data to be co-played, so as to determine the time of the first data element of the data to be played back, and then play back the data waveform until the user issues a stop command. The entire file is completely a Windows system file, which greatly improves the storage and release rate and speeds up data processing. The playback waveform is shown in Figure 4.


2.4 Data Analysis Module
Data analysis mainly includes measuring signal parameters, amplitude phase spectrum and power spectrum. Time domain analysis is a method of analyzing the system directly in the time domain. It has the advantages of being intuitive and accurate, and can provide all the information required for the time response of the data acquisition system. This system mainly calibrates the period, average value, cycle root mean square, effective value and frequency of the acquired signal, and understands various signal parameters in real time.
Data report printing mainly transfers the original waveform and playback waveform of the acquired signal in picture format to the print style subVI, and sets the subVI so that when the program needs to be printed, the acquisition waveform and playback waveform of the front panel can be opened by calling the subVI, the report content can be displayed and print preview can be performed.

3 Conclusions
When conducting system experimental tests, a PC with a main frequency of 1.81 GHz, a 64-bit processor, and 512 M memory was used; a high-speed digitizer PCI-5124 with a sampling rate of 20 MByte/s was used to achieve continuous data acquisition and massive data storage for up to 30 minutes. The long-term continuous acquisition and storage system developed using the virtual instrument LabVIEW and the high-speed digitizer PCI-5124 completed the functions of real-time signal acquisition, display, storage, and playback of historical data acquisition.
Compared with traditional data acquisition instruments, this system has the advantages of high cost performance, short development time, strong versatility, accurate and simple data processing, strong portability (VC, C, MATLAB and other programs can be recursively called), humanized interface design, and easy operation. LabVIEW's simple writing language and easy-to-write controls simplify the programming process. Users do not need to master the hardware knowledge of the data acquisition card, but only need to understand and master the functions of its driver program to use LabVIEW to develop and use data programs. This will become the trend of future data acquisition development.

Keywords:Digitizer Reference address:Design of Data Acquisition System Based on LabVIEW and PCI-5124

Previous article:Using NI LabVIEW and DAQ to Create a Microgrid Energy Management System (MEMS)
Next article:Thermal Comfort Testing System Based on LabVIEW

Recommended ReadingLatest update time:2024-11-16 22:52

Application of LabVIEW in Intelligent Virtual Instrument Simulation
  1 Introduction   In electronic courses, experiments are one of the important teaching methods. Through experiments, students can deepen their understanding of the knowledge they have learned.   However, due to the increasing number of students in recent years, the laboratory equipment and scale are difficult to
[Test Measurement]
Application of LabVIEW in Intelligent Virtual Instrument Simulation
Using LabVIEW to build an ultrasonic nondestructive testing system for the U.S. military
" Labview provided the necessary connectivity to multiple devices, including pulsers/receivers and switches from third parties."       Modifying Ultrasonic Nondestructive Pipeline Testing to Suit Gun Barrel Testing     FBS has developed its core expertise in ultrasonic testing and system integration for the pipe
[Test Measurement]
Using LabVIEW to build an ultrasonic nondestructive testing system for the U.S. military
Design of Multi-channel Sequential Control Pulse Generator Based on LabVIEW
0 Introduction In process control and automatic measurement, some timing control pulses are often needed to trigger and shut down the work of different control units and functional components. The generation of timing pulse signals is generally implemented in hardware. In the early days, counters and regist
[Test Measurement]
Design of Multi-channel Sequential Control Pulse Generator Based on LabVIEW
LabVIEW programming skills: how to selectively display multiple waveforms 
In engineering applications, we often encounter the problem of selectively displaying multiple curves or waveforms. For example, we need to detect 10 analog inputs at the same time, but we do not need to display 10 waveforms at the same time. We need to display one or more curves according to user specifications. Th
[Test Measurement]
LabVIEW programming skills: how to selectively display multiple waveforms 
Creating a swept sine function in LabView using only one virtual instrument
Swept sine waves are useful when you need to test a product over a wide range of frequencies. For example, a large research project to determine how waves propagate in the open ocean would require the generation of a swept sine wave to drive an acoustic transducer. Although many waveform generators have built-in fun
[Test Measurement]
Creating a swept sine function in LabView using only one virtual instrument
Research on Virtual Spectrum Analyzer Based on LabVIEW
In experimental teaching in colleges and universities, traditional spectrum analyzers are commonly used to perform frequency domain analysis and measurement of signals. Traditional spectrum analyzers are generally composed of three functional modules: signal acquisition and control, analysis and processing, and result
[Test Measurement]
Research on Virtual Spectrum Analyzer Based on LabVIEW
Labview programming skills-----Opening conditional index array
For the array filtering problem mentioned in the previous blog, OPENG provides another very useful node, which is very flexible. Let's take a look at an example . This example is to extract all elements in the array that meet the condition less than 0.7 and greater than 0.2, that is, array filtering. Let's t
[Test Measurement]
Labview programming skills-----Opening conditional index array
Development of portable automobile instrument tester based on LabVIEW ---- Scheme and structure 2
  3.1.2 Data Communication (Bus)   Data communication is a form of communication that combines data processing and transmission into one, realizes the reception, storage, processing and transmission of digital information, and controls, verifies and manages the information flow.   Computers are combined with commu
[Test Measurement]
Development of portable automobile instrument tester based on LabVIEW ---- Scheme and structure 2
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号