LabView入门级学习材料.ppt_第1页
LabView入门级学习材料.ppt_第2页
LabView入门级学习材料.ppt_第3页
LabView入门级学习材料.ppt_第4页
LabView入门级学习材料.ppt_第5页
已阅读5页,还剩85页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Virtual Instrumentation With LabVIEW,Course Goals,Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build a simple data acquisition application Create a subroutine in LabVIEW,Section I,LabVIEW terms Components of a LabVIEW application LabVIEW programmin

2、g tools Creating an application in LabVIEW,Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components “wired” together,LabVIEW Programs Are Called Virtual Instruments (VIs),Boolean Control,Double Indicator,Waveform Graph,Panel Toolbar,VI Front

3、Panel,VI Block Diagram,Numeric Constant,Thermometer Terminal,Call to subVI,While Loop,Knob Terminal,Stop Button Terminal,Stop Loop Terminal,Temperature Graph,Controls and Functions Palettes,Graphical, floating palettes Used to place controls data flow is animated using bubbles. Values are displayed

4、on wires.,Right-click on wire to display probe and it shows data as it flows through wire segment You can also select Probe tool from Tools palette and click on wire,Section II SubVIs,What is a subVI? Making an icon and connector for a subVI Using a VI as a subVI,SubVIs,A SubVI is a VI that can be u

5、sed within another VI Advantages Modular Easier to debug Dont have to recreate code Require less memory,Icon and Connector,An icon represents a VI in other block diagrams A connector shows available terminals for data transfer,SubVIs,SubVIs,Steps to Create a SubVI,Create the Icon Create the Connecto

6、r Assign Terminals Save the VI Insert the VI into a Top Level VI,Create the Icon,Right-click on the icon in the diagram or front panel,Create the Connector,Right click on the icon pane (front panel only),Assign Terminals,Save The VI,Choose an Easy to Remember Location Organize by Functionality Save

7、Similar VIs into one directory (e.g. Math Utilities) Organize by Application Save all VIs Used for a Specific Application into one directory or library file (e.g. Lab 1 Frequency Response) Library Files (.llbs) combine many VIs into a single file, ideal for transferring entire applications across co

8、mputers,Insert the SubVI into a Top Level VI,Accessing user-made subVIs Functions Select a VI Or Drag icon onto target diagram,Tips for Working in LabVIEW,Keystroke Shortcuts Activate/Deactivate Context Help Window Remove Broken Wires From Block Diagram Toggle Between Front Panel and Block Diagram U

9、ndo (Also in Edit Menu) Tab Key Toggle Through Tools on Toolbar Tools Options Set Preferences in LabVIEW VI Properties Configure VI Appearance, Documentation, etc.,Section III Data Acquisition,Data acquisition (DAQ) basics Connecting Signals Simple DAQ application,Sensors,DAQ Data Acquisition,Plug-i

10、n board for a computer with: Analog input channels Analog output channels Counters Digital I/O Controlled by a suite of LabVIEW VIs FunctionsData Acquisition,DAQ Data Acquisition,Simple Temperature Acquisition Example Two parameters Device = 1 Channel = 0,Data Acquisition Terminology,Resolution - De

11、termines How Many Different Voltage Changes Can Be Measured Larger Resolution More Precise Representation of Signal Range - Minimum and Maximum Voltages Smaller range More Precise Representation of Signal Gain - Amplifies or Attenuates Signal for Best Fit in Range,Do Not Delete This Slide,Hardware C

12、onnections,BNC-2120,SCB-68,SC-2075,Exercise 2 Simple Data Acquisition,Complete Convert C to F.vi, then create Thermometer.vi.,Do Not Delete This Slide,Section IV Loops and Charts,For Loop While Loop Charts Multiplots,Loops,While Loops Have Iteration Terminal Always Run Once Run According to Continue

13、 Terminal,For Loops Have Iteration Terminal Run According to input N,Loops (cont.),For Loop,Select the loop Enclose Code to Repeat,Charts,Waveform chart special numeric indicator that can display a history of values Controls Graphs Waveform Chart,Wiring Data into Charts,Single Plot Charts,Multiplot

14、Charts,Exercise 3 Monitoring Temperature,Students build Temperature Monitor.vi.,Section V Arrays ) Context Help Window shows available functions,Note semicolon,Section IX Printing & Documentation,Print From File Menu to Printer, HTML, Rich Text File Programmatically Print Graphs or Front Panel Image

15、s Document VIs in VI Properties Documentation Dialog Add Comments Using Free Labels on Front Panel & Block Diagram,Printing,File Print Gives Many Printing Options Choose to Print Icon, Front Panel, Block Diagram, VI Hierarchy, Included SubVIs, VI History Print Panel.vi (Functions Application Control

16、) Programmatically Prints a Front Panel Generate & Print Reports (Functions Report Generation) Search in Find Examples for Report Generation,Documenting VIs,VI Properties Documentation Provide a Description and Help Information for a VI VI Properties Revision History Track Changes Between Versions o

17、f a VI Individual Controls Description and Tip Right Click to Provide Description and Tip Strip Use Labeling Tool to Document Front Panels & Block Diagrams,Section X Basic Programming Architecture,Simple VI Architecture General VI Architecture State Machine Architecture,Simple VI Architecture,Functi

18、onal VI that produces results when run No “start” or “stop” options Suitable for lab tests, calculations Example: Convert C to F.vi,General VI Architecture,Three Main Steps Startup Main Application Shutdown,State Machine Architecture,Advantages Can go from any state from any other Easy to modify and

19、 debug Disadvantages Can lose events if two occur at the same time,States: 0: Startup 1: Idle 2: Event 1 3: Event 2 4: Shutdown,Exercise 7 Simple State Machine,Do Not Delete This Slide,Section XI Remote Front Panels,View & Control LabVIEW Front Panels from a Web Browser Requires no programming Remote clients see “live” front panel updates Multiple clients can view the same panel simultaneously Only one client can control the front panel at a time,Remote Panel Web Publishing Tool,Tools Web Publishing Tool,Click

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论