【正文】
程語言,如 Visual、 Basic、 Visual C++、 Delphi等, 另一類是 圖形化編程 語言,具有代表性的有 LabVIEW、 HP VEE 等[4]。 硬件結(jié)構(gòu)的基本框圖如圖 22 所示。 插入式 DAQ GPIB 儀器 VIX 儀器 RS232 信號(hào)處理 數(shù)字濾波 統(tǒng) 計(jì) 分 析 網(wǎng)絡(luò)傳輸 硬復(fù)制 文件 I/O 圖形用戶接口 數(shù)據(jù)采集 數(shù)據(jù)處理與分析 數(shù)據(jù)結(jié)果顯示 5 虛擬儀器的構(gòu)成 虛擬儀器通常由硬件和軟件兩部分組成,包括計(jì)算機(jī)、應(yīng)用軟件和儀器硬件,計(jì)算機(jī)及其測量儀器硬件模塊組成了虛擬儀器硬件平臺(tái)的基礎(chǔ)。從數(shù)據(jù)分析上看,虛擬儀器比傳統(tǒng)儀器具有更強(qiáng)大的數(shù)據(jù)分析能力。 (2)數(shù)據(jù)分析與處理 : 虛擬儀器充分利用計(jì)算機(jī)的存儲(chǔ)、運(yùn)算功能,并通過軟件實(shí)現(xiàn)對(duì)輸入數(shù)據(jù)信號(hào)的分析與處理。 4 虛擬儀器 系統(tǒng)的組成 虛擬儀器系統(tǒng)一般分為數(shù)據(jù)采集、數(shù)據(jù)分析處理、數(shù)據(jù)結(jié)果顯示三大功能,如圖 21 所示。 (2)軟件設(shè)計(jì) : 主要采用 LabVIEW 設(shè)計(jì) ,虛擬儀器的界面開發(fā)主要由 LabVIEW 軟件完成,其實(shí)現(xiàn)數(shù)據(jù)的采集、處理、分析等人機(jī)交互的界面設(shè)計(jì)。各模塊之間通過高層功能 VI 調(diào)用一個(gè)或多個(gè)底層的特殊功能的 VI,完成虛擬示波器系統(tǒng)的仿真。它的功能包括函數(shù)數(shù)值運(yùn)算、數(shù)據(jù)采集、數(shù)據(jù)分析、信號(hào)生成、信號(hào)處理、輸入和 輸出控制,以及圖像 3 獲取、處理和傳輸?shù)鹊?。因此,從引進(jìn)國外先進(jìn)的儀器技術(shù)和產(chǎn)品入手,大力 發(fā)展 虛擬儀器技術(shù) , 設(shè)計(jì)具有 我國 自主知識(shí)產(chǎn)權(quán)的產(chǎn)品,無論對(duì)加 快 發(fā)展電子儀器工業(yè),還是提高 工業(yè) 測試水平都是 大有裨益的 。 我國在虛擬儀器方面,起步較為緩慢,只是部分院校實(shí)驗(yàn)室引進(jìn)虛擬儀器系統(tǒng)。虛擬儀器是以計(jì)算機(jī)為核心,功能由用戶定義和設(shè)計(jì),具有虛擬面板,測試功能由測試軟件實(shí)現(xiàn)。因此,研制一種結(jié)構(gòu)簡單、操作方便、費(fèi)用低的虛擬示波器是非常必要的。 設(shè)計(jì)背景與意義 示波器是工程測量中重要測量工具之一, 由于大型數(shù)字示波器加工工藝復(fù)雜、制造水平要求高 ,目前我國大部分?jǐn)?shù)字示波器主要依賴進(jìn)口。 關(guān)鍵詞 虛擬儀器 , 虛擬示波器 , 頻域分析 ,數(shù)據(jù)采集 ABSTRACT In the contemporary world, information and puter technology develop rapidly with each passing day. The Software Development Technology is quite different, too. Compared with the traditional instrument technology, the virtual instrument technology based on puter has more advantages from the aspects of data acquisition, realtime analysis and processing, display and storage. Because of traditional instruments’ single function and high price for always and the continuous improvement of puters’ cost performance, the technology of virtual instrument is irreversible. The NI (National Instrument) took the lead in the technology of virtual instrument research and development, and established the LabVIEW software development platform. The technology of puterassisted virtual instrument promoted the traditional instruments to the direction of intelligent, digitizing, working, modular and userfriendly. This article, based on LabVIEW virtual instrument development platform, design virtual oscilloscope interface and realize the function of data acquisition, filtering process, time domain analysis, frequency domain analysis, waveform storage and recall, and debug program, illustrate design results, analyze the system performance. KeyWords: Virtual instrument, Virtual oscilloscope, Frequency domain analysis, Data acquisition 目 錄 1 緒論 .............................................................................................................................. 1 前言 .................................................................................................................... 1 設(shè)計(jì)背景與意義 ................................................................................................... 1 國內(nèi)外現(xiàn)狀 .......................................................................................................... 2 設(shè)計(jì)研究方案 ...................................................................................................... 2 ................................................................................................................ 3 虛擬儀器系統(tǒng)的組成 ............................................................................................ 4 虛擬儀器的構(gòu)成 ................................................................................................... 5 虛擬儀器的硬件系 ...................................................................................... 5 虛擬儀器的軟件系統(tǒng) .................................................................................. 5 虛擬儀器與傳統(tǒng)儀器優(yōu)缺點(diǎn)對(duì)比 .......................................................................... 6 的軟件概述 .................................................................................................... 7 軟件的特點(diǎn) ........................................................................................... 7 LabVIEW 程序的構(gòu)成 .......................................................................................... 8 LabVIEW 的操作選板 ........................................................................................ 10 4 傳統(tǒng)示波器與虛擬示波器 ............................................................................................ 12 傳統(tǒng)示波器 ........................................................................................................ 12 傳統(tǒng)示波器工作原理 ................................................................................ 13 傳統(tǒng)示波器的分類 .................................................................................... 14 虛擬示波器 ........................................................................................................ 14 虛擬示波器的組成結(jié)構(gòu) ............................................................................. 15 虛擬示波器的性能指標(biāo) ............................................................................. 15 傳統(tǒng)示波器與虛擬示波器對(duì)比 .................................................................. 16 ................................................................................................ 17 數(shù)據(jù)采集模塊 .................................................................................................... 18 數(shù)據(jù)采集系統(tǒng)的構(gòu)成 ................................................................................ 19 采樣原理 .................................................................................................. 20 用戶登陸界面 .................................................................................................... 21 虛擬示波器主界面 ............................................................................................. 23 濾波模塊 ........................................................................................................... 26 時(shí)域分析與參數(shù)測量模塊 ................................................................................... 28 頻譜分析模塊 ...................................................................