Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS320n –Visual Programming Introduction to LabVIEW.

Similar presentations


Presentation on theme: "CS320n –Visual Programming Introduction to LabVIEW."— Presentation transcript:

1 CS320n –Visual Programming Introduction to LabVIEW

2 Visual ProgrammingIntroduction to LabVIEW2 What We Will Do Today Look at the LabVIEW programming environment Tests handed back next time and go over in class Assignment 7 on web today

3 Visual ProgrammingIntroduction to LabVIEW3 What is LabVIEW A product of National Instruments Designed to provide a programming tool for scientists and engineers to write programs to analyze data gathered by instrumentation Like Alice it is a graphical programming language Unlike Alice it can be used to build a much greater variety of programs

4 Visual ProgrammingIntroduction to LabVIEW4 What is LabVIEW LabVIEW = Laboratory Virtual Instrument Engineering Workbench Loaded on the Painter Hall lab computers Can be downloaded from engineering department web page

5 Visual ProgrammingIntroduction to LabVIEW5 Creating a LabVIEW program start LabVIEW Select the arrow on “New” On the menu that pops up select “Blank VI”

6 Visual ProgrammingIntroduction to LabVIEW6 Virtual Instruments LabVIEW programs are called “VIs” which stands for Virtual Instruments They consist of two parts –a front panel –a block diagram The front panel is a graphical user interface –this is how a the user of a program will interact with it The block diagram is the implementation of the program, the code

7 Visual ProgrammingIntroduction to LabVIEW7 Working with a Program I find it best to set up the front panel and block diagram side by side –Select this choosing “Window” and “Tile Left and Right” or by pressing the control key and T at the same time

8 Visual ProgrammingIntroduction to LabVIEW8 Front Panel and Block Diagram

9 Visual ProgrammingIntroduction to LabVIEW9 Working with the Front Panel and Block Diagram In LabVIEW the programmer can add things to either the front panel or the block diagram right click in either window to select the programming elements (commands, primitives) available

10 Visual ProgrammingIntroduction to LabVIEW10 Controls and Functions When you right click in the front panel a pop up menu appears These are the controls for the front panel click on the pin to make the pop up menu permanent the menu on the block diagram contains functions

11 Visual ProgrammingIntroduction to LabVIEW11 Quick Demonstration of LabVIEW Write a program in LabVIEW to convert kilometers to miles. –The Milan - San Remo bicycle race was 294 kilometers this year Add controls and indicators to front panel Connect controls and indicators in block diagram

12 Visual ProgrammingIntroduction to LabVIEW12 More Complicated Program LabVIEW comes with a large number of example programs Open an existing LabVIEW program by selecting “File” -> “Open” or by pressing the control key and O Get to National Instruments Folder (probably under Program Files) –LabVIEW 7.0 examples –express »Moonlanding.vi

13 Visual ProgrammingIntroduction to LabVIEW13 Moon Landing Simulator – Front Panel

14 Visual ProgrammingIntroduction to LabVIEW14 Moon Landing Simulator – Block Diagram


Download ppt "CS320n –Visual Programming Introduction to LabVIEW."

Similar presentations


Ads by Google