Design and implementation of data acquisition card based on PCI bus

Publisher:QingfangLatest update time:2013-07-30 Source: 电子设计工程 Keywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
    Labview is an innovative product of NI Corporation of the United States. It is also the most widely used, fastest growing and most powerful graphical software development integrated environment.
    Data acquisition card is an important component of virtual instrument. Its performance index directly affects the main indexes of virtual oscilloscope, such as sampling rate and accuracy.
    PCI bus is a bus with multiplexed address/data and command/byte selection signals. It uses the master-slave signal two-way handshake to control data transmission. PCI bus has the characteristics of plug-and-play and strong compatibility. It can provide 32/64-bit and 33/66MHz DMA (direct memory access) data transmission mode, so that it is not affected by the size of computer memory when working. The transmission rate can reach up to 133Mb/s. These characteristics make it widely used. It can be applied to various architectures and various working platforms. It is also easy to upgrade, leaving enough space for future development. The above excellent characteristics are the reasons why PCI interface bus is selected in this design.

1 Hardware design of data acquisition card
   
The overall design of this system mainly includes: acquisition module design, signal conditioning module design, PCI bus interface design, FIFO data cache design and other parts. The system block diagram is shown in Figure 1 below.

a.jpg


1.1 Design of signal conditioning module
   
The signal conditioning module realizes signal amplification, analog channel selection and differential conversion. This part of the circuit is crucial to the entire system. During the design process, attention should be paid to reducing signal distortion and system noise.
1.2 Design of acquisition module
   
Analog-to-digital conversion is the core of the acquisition board. The system requires a sampling speed of at least 250kHz, a sampling accuracy of 16 bits, and a sufficiently wide dynamic range. Considering various factors, the ADS 8412 chip was selected.
    ADS8412 uses an external reference voltage to work, and the principle of the PCI bus interface is shown in Figure 2.

b.jpg


    In this paper, 8 acquisition channels are set up, and the timing control 8/1 analog switch is used to select one of the signals in turn. The differential conversion circuit converts the single-ended signal into a differential signal and sends it to ADS8412. ADS8412 has its own conversion clock and does not need an external clock. Multi-channel data acquisition is based on time-sharing sampling, that is, 8 channels are sampled in turn, and only one A/D is used. [page]

1.3 PCI bus interface design
    PCI 9054 is connected to the computer through the PCI bus. The PCI protocol and timing are completed by the PCI 9054 interface chip. Here, only the PCI9054 interface needs to be designed. There is no need to understand the complex bus protocol, which simplifies the design process. This is the advantage of using a dedicated chip to implement the bus interface. The
    PCI interface circuit should complete the following functions: address decoding and command decoding; address generation; control signal generation.
    There are generally two ways to implement the PCI bus controller: using programmable devices and dedicated interface chips. The advantage of using programmable logic devices such as EPLD and FPGA is its flexible programmability. Dedicated chips can realize the complete PCI master module and target module interface functions, and convert complex PCI bus interfaces into relatively simple interfaces. Users can focus on application design instead of debugging the PCI bus interface, which significantly shortens the development time. This design uses PLX's PCI 9054 to implement the bus controller. The
    PCI interface schematic diagram is shown in Figure 3. After starting the sampling, PCI 9054 acts as the master device and uses its DMA channel for data transmission. When the dual-port SRAM is full of 1kB data, a local bus interrupt is generated by controlling the timing. After PCI 9054 obtains control of the local bus, it reads 1kB of data into the dedicated FIFO for DMA transmission according to the start bit of DMA. PCI 9054 applies to occupy the PCI bus, obtains control of the PCI bus, and writes the data into the PCI bus storage space, thereby realizing one-time sampling and transmission.

c.jpg


    In Figure 3, the interrupt request is made by the control timing circuit to determine the FIFO full flag. During the response to the interrupt, the PCI bus transmits data to the host computer in DMA mode so that the application program can call the data for analysis and processing. 93S66 is the configuration memory used for PCI device card identification. Figure 4 is a flowchart of the PCI interface controller.

[page]

2 Implementation of the data acquisition process
2.1 Design of dynamic link library
    LabVIEW software itself provides port operation functions, which can read and write the ports of peripherals, while other real-time control of peripherals needs to be realized through DLL technology.
    In this system, the data acquisition card is designed by applying hardware chips. To realize the communication between each hardware in the system and the computer, the corresponding dynamic link library must be designed. The design of the DLL library here mainly includes: device initialization; determining the device name; creating a device handle; obtaining channel information; waiting for client software information.
2.2 Data acquisition process
   
First, set the sampling parameters related to the data acquisition card; when sampling starts, the multi-way switch scans the sampling channel once, and each channel samples one point; then start A/D conversion, and the converted digital signal is stored in the data buffer. Repeat the above process until the required number of samples is collected, and all data is sequentially stored in the buffer. When necessary, read the data from the cache of the data acquisition card to the computer's memory for processing. The acquisition process is shown in Figure 5.

d.jpg


2.3 Dynamic link library call in LabviEW
   
In the programming state of LabVIEW, open the "Call dynamic link library function" in the Function Palette toolbox to convert the data acquisition card driver into an icon/connector. Then you can call the module in the block diagram program. By setting the corresponding parameters at its input end, when the program is running, the driver module starts the work of the data acquisition card and returns the collected data. Figure 6 is an example of a dynamic link library call.

e.jpg


    In Figure 6, the I/O data type of the CLF node is determined by the external input. The input control "channel" for the number of acquisition channels and the input control "times" for the number of acquisition times are both 32-bit unsigned long integers. The output of the 0-5V voltage after acquisition is a double-precision floating-point discrete value, which is first sent to the buffer for storage and standby.

4 Conclusion
   
This paper adopts a data acquisition system designed by hardware chips. When the crystal oscillator frequency of the local bus is 20MHz, it can stably reach an acquisition rate of 160Mb/s; when the crystal oscillator frequency is 40MHz, it can stably reach an acquisition rate of 200Mb/s.
    Combining virtual instrument technology with the acquisition, analysis and result display of various physical signals provides a good direction for the development of new instruments. Combining advanced instrument development software LabVIEW with ordinary data acquisition systems will make virtual instrument technology more widely used in various fields.

Keywords:LabVIEW Reference address:Design and implementation of data acquisition card based on PCI bus

Previous article:Design of Material Buffering Performance Test System
Next article:Development of a Dual Dynamometer Road Load Simulator for Heavy Tracked Vehicles

Recommended ReadingLatest update time:2024-11-16 15:41

Introduction to Power Amplifier Features Using LabVIEW Software and PXI Modular Instruments
challenge: Reduce characterization time for increasingly complex wireless power amplifiers (PAs) without sacrificing measurement accuracy or increasing equipment cost. Solution: Developing a power amplifier characterization system using NI LabVIEW software and NI PXI modular instrume
[Test Measurement]
Introduction to Power Amplifier Features Using LabVIEW Software and PXI Modular Instruments
My understanding of virtual instrument technology
  I have been engaged in virtual instrument technology for many years. Although I have been engaged in other work in the past two years, I have always been paying attention to the changes in this field. I have been engaged in virtual instrument work since I was a graduate student. I mainly work on hardware, but I have
[Test Measurement]
LabVIEW and Automatic Test System
Automatic test system (ATS) is not unfamiliar to engineers in the field of testing, and is also considered a trend in the development of test systems. As for the specific concept, you can look it up on relevant websites or books, and we will not go into these academic definitions too much here. Thanks to the developmen
[Test Measurement]
LabVIEW and Automatic Test System
LabVIEW Data Logging and Storage (IV)—XML Files
XML (eXtensible Markup Language) is a widely used data transmission and storage format. It is essentially a text file that can be opened and modified using any text editing tool. Similar to HTML, XML is designed to be self-descriptive and also uses tags to define the structure and meaning of the document. This article
[Test Measurement]
LabVIEW Data Logging and Storage (IV)—XML Files
Building a Transformer Monitoring System Using CompactRIO and LabVIEW Real-Time Module
  challenge: A transformer monitoring system ( TMS )   is designed and developed to collect, process, analyze key parameters and communicate with the data center, thereby analyzing, processing and visually monitoring the widely distributed distribution transformers in the power network.   solution: The data coll
[Test Measurement]
LabVIEW Creates a DLL
1. LabVIEW can also create DLLs . 2. Calling specification description: When using the C calling specification, the caller is responsible for clearing the stack. When using the standard calling specification, the called function is responsible for clearing the stack. So make sure you select the same calling specific
[Test Measurement]
XY Graph in LabVIEW
 
[Test Measurement]
Design and improvement of correlation filters based on Labview
1 Introduction In the current testing field, correlation detection methods are increasingly used for filtering. Correlation filtering can be used to easily detect complex signals under test (including useful signals, DC offsets, random noise and harmonic frequency components). etc.), after the rapid development of di
[Analog Electronics]
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号