6小時(shí)學(xué)會(huì)labVIew,
labVIew Six Hour Course – Instructor Notes
This zip file contains material designed to give students a working knowledge of labVIew in a 6 hour timeframe. The contents are:
Instructor Notes.doc – this document.
labVIewIntroduction-SixHour.ppt – a PowerPoint presentation containing screenshots and notes on the topics covered by the course.
Convert C to F (Ex1).vi – Exercise 1 solution VI.
Convert C to F (Ex2).vi – Exercise 2 solution subVI.
Thermometer-DAQ (Ex2).vi – Exercise 2 solution VI.
Temperature Monitor (Ex3).vi – Exercise 3 solution VI.
Thermometer (Ex4).vi – Exercise 4 solution subVI.
Convert C to F (Ex4).vi – Exercise 4 solution subVI.
Temperature Logger (Ex4).vi – Exercise 4 solution VI.
Multiplot Graph (Ex5).vi – Exercise 5 solution VI.
Square Root (Ex6).vi – Exercise 6 solution VI.
State Machine 1 (Ex7).vi – Exercise 7 solution VI.
The slides can be presented in two three hour labs, or six one hour lectures. Depending on the time and resources available in class, you can choose whether to assign the exercises as homework or to be done in class. If you decide to assign the exercises in class, it is best to assign them in order with the presentation. This way the students can create VI’s while the relevant information is still fresh. The notes associated with the exercise slide should be sufficient to guide the students to a solution. The solution files included are one possible solution, but by no means the only solution.
一篇長(zhǎng)90頁(yè)的PPT和10個(gè)左右的示例源程序,對(duì)于自學(xué)能力強(qiáng)且有一定計(jì)算機(jī)編程基礎(chǔ)的人來(lái)說(shuō)上手還是很快的。
•Understand the components of a Virtual Instrument
•Introduce labVIew and common labVIew functions
•Build a simple data acquisition application
•Create a subroutine in labVIew
虛擬儀器(virtual instrumention)是基于計(jì)算機(jī)的儀器。計(jì)算機(jī)和儀器的密切結(jié)合是目前儀器發(fā)展的一個(gè)重要方向。粗略地說(shuō)這種結(jié)合有兩種方式,一種是將計(jì)算機(jī)裝入儀器,其典型的例子就是所謂智能化的儀器。隨著計(jì)算機(jī)功能的日益強(qiáng)大以及其體積的日趨縮小,這類儀器功能也越來(lái)越強(qiáng)大,目前已經(jīng)出現(xiàn)含嵌入式系統(tǒng)的儀器。另一種方式是將儀器裝入計(jì)算機(jī)。以通用的計(jì)算機(jī)硬件及操作系統(tǒng)為依托,實(shí)現(xiàn)各種儀器功能。虛擬儀器主要是指這種方式。下面的框圖反映了常見的虛擬儀器方案。
虛擬儀器的主要特點(diǎn)有:
n 盡可能采用了通用的硬件,各種儀器的差異主要是軟件。
n 可充分發(fā)揮計(jì)算機(jī)的能力,有強(qiáng)大的數(shù)據(jù)處理功能,可以創(chuàng)造出功能更強(qiáng)的儀器。
n 用戶可以根據(jù)自己的需要定義和制造各種儀器。
虛擬儀器實(shí)際上是一個(gè)按照儀器需求組織的數(shù)據(jù)采集系統(tǒng)。虛擬儀器的研究中涉及的基礎(chǔ)理論主要有計(jì)算機(jī)數(shù)據(jù)采集和數(shù)字信號(hào)處理。目前在這一領(lǐng)域內(nèi),使用較為廣泛的計(jì)算機(jī)語(yǔ)言是美國(guó)NI公司的labVIew。
虛擬儀器的起源可以追朔到20世紀(jì)70年代,那時(shí)計(jì)算機(jī)測(cè)控系統(tǒng)在國(guó)防、航天等領(lǐng)域已經(jīng)有了相當(dāng)?shù)陌l(fā)展。PC機(jī)出現(xiàn)以后,儀器級(jí)的計(jì)算機(jī)化成為可能,甚至在Microsoft公司的Windows誕生之前,NI公司已經(jīng)在Macintosh計(jì)算機(jī)上推出了labVIew2.0以前的版本。對(duì)虛擬儀器和labVIew長(zhǎng)期、系統(tǒng)、有效的研究開發(fā)使得該公司成為業(yè)界公認(rèn)的權(quán)威。
普通的PC有一些不可避免的弱點(diǎn)。用它構(gòu)建的虛擬儀器或計(jì)算機(jī)測(cè)試系統(tǒng)性能不可能太高。目前作為計(jì)算機(jī)化儀器的一個(gè)重要發(fā)展方向是制定了VXI標(biāo)準(zhǔn),這是一種插卡式的儀器。每一種儀器是一個(gè)插卡,為了保證儀器的性能,又采用了較多的硬件,但這些卡式儀器本身都沒有面板,其面板仍然用虛擬的方式在計(jì)算機(jī)屏幕上出現(xiàn)。這些卡插入標(biāo)準(zhǔn)的VXI機(jī)箱,再與計(jì)算機(jī)相連,就組成了一個(gè)測(cè)試系統(tǒng)。VXI儀器價(jià)格昂貴,目前又推出了一種較為便宜的PXI標(biāo)準(zhǔn)儀器。
虛擬儀器研究的另一個(gè)問題是各種標(biāo)準(zhǔn)儀器的互連及與計(jì)算機(jī)的連接。目前使用較多的是IEEE 488或GPIB協(xié)議。未來(lái)的儀器也應(yīng)當(dāng)是網(wǎng)絡(luò)化的。