CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.

Slides:



Advertisements
Similar presentations
A. Virtual Instruments (VIs)
Advertisements

LabVIEW Crash Course Presented by:.
LabVIEW is a graphical programming development environment for data acquisition and control, data analysis, and data presentation. With LabVIEW you can.
JustinMind: Dynamic Panels
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 2 Virtual Instruments Read Bishop, Chapter 2. Lab #2 and Homework #2 due next week. Quiz #1 next week.
Lesson 2 Navigating LabVIEW
Based on LabVIEW 2011 Student Edition
LabVIEW and G Graphical Programming Language By: Ramtin Raji Kermani.
Diego Torres LabVIEW Student Ambassador Fall 2011 ITESM CQ
Microsoft Office XP Microsoft Excel
Jeff Beltramo NHTI-Concord’s Community College FRC Team 1922.
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
Loops in LabVIEW (while,for and case)
Introduction to LabVIEW
Introduction to LabVIEW 8.5
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build.
Introduction to Spreadsheets Presented by Frank H. Osborne, Ph. D. © 2005 Bio 2900 Computer Applications in Biology.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
CS320n –Visual Programming LabVIEW Control Structures.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
Lecture 13LabVIEW and GPIB LabVIEW (National Instruments) –Graphical program language –Widely used in academia (lab) and industry (R&D) General Purpose.
Infinity-project.org Engineering education for today’s classroom The Infinity Project SM LabVIEW for The Infinity Project.
Design of Bio-Medical Virtual Instrumentation Tutorial 1.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Create.
MCEN 371 – Mechanical Engineering Lab Chapter 6: LabVIEW Part 1: Introduction.
Chapter 1 LabVIEW Basics. Features > Uses Graphic Symbols > Created by National Instruments > Virtual Instruments (VIs) > Extensive Library of VIs.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs LabVIEW Programs Are Called Virtual Instruments (VIs) Block Diagram.
LabVIEW an Introduction
Introduction to LabVIEW
Biomedical Measurements & Analysis using LabVIEW
Each VI has 2 Windows Front Panel User Interface (UI) –Controls = Inputs –Indicators = Outputs Block Diagram Graphical Code –Data travels on wires from.
Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.
LabView instrumentoinnissa, 55492, 3op Labview in instrumentation Lecturer: Heikki Ojala, room C204a
CS320n –Visual Programming More LabVIEW Control Structures.
EET 2259 Unit 7 Case Structures; Sequence Structures  Read Bishop, Sections 5.4 and 5.5.  Lab #7 and Homework #7 due next week.  Quiz #3 next week.
1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.
Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Chapter 2 – Introduction to the Visual Studio .NET IDE
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Introduction to LabVIEW 8.5
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
CS320n –Visual Programming
Microsoft Access 2000 Presentation 3 Creating Databases Part II (Creating Forms)
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
CS320n –Visual Programming More LabVIEW Foundations.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 9 Arrays  Read Bishop, Sections 6.1 to 6.3.  Homework #9 and Lab #9 due next week.  Quiz #5 next.
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
Week 3 Data Structures and Common Tools. Common Tools in Labview Automatic Tool Selector Using the Operating Tool Using the Positioning Tool to Select.
Week 3 Labview exercises
Chapter 2: The Visual Studio .NET Development Environment
LabVIEW Core 1 Key messages for the instructor:
Chapter 2 – Introduction to the Visual Studio .NET IDE
3.01 Apply Controls Associated With Visual Studio Form
EET 2259 Unit 3 Editing and Debugging VIs
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
Introduction to LabVIEW
Doing some Boolean: On/Off
Chapter 1 LabVIEW Basics
LabVIEW 7.1 寒假短期教學課程 歐陽丞修 2006/02/06.
Structures- case, sequence, formula node
EET 2259 Unit 9 Arrays Read Bishop, Sections 6.1 to 6.3.
Introduction to LabVIEW
EET 2259 Unit 7 Case Structures; Sequence Structures
EET 2259 Unit 2 Virtual Instruments
EET 2259 Unit 3 Editing and Debugging VIs
Presentation transcript:

CS320n –Visual Programming LabVIEW Foundations

Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at the basic tools in the LabVIEW programming environment

Visual ProgrammingLabVIEW Foundations3 LabVIEW Programming Elements Controls and Indicators arranged on palettes according to function Controls = inputs (from user or other devices) = source terminals Indicators = outputs = destinations or sinks They are not interchangeable

Visual ProgrammingLabVIEW Foundations4 Controls On front panel –White background –values may be typed in –Increment / decrement control can hide by right clicking, selecting visible items, and unchecking On Block Diagram –thick border –arrow on right hand side, going out of icon

Visual ProgrammingLabVIEW Foundations5 Indicators On front panel –background is gray –no way to type in value On block diagram –thin border –arrow on left hand side, going into icon DBL indicates data type is a double, a number with a fractional component

Visual ProgrammingLabVIEW Foundations6 Adding Components on Front Panel Express view of palette Change to advanced view by clicking options button and selecting Advanced from pull down menu for Palette View

Visual ProgrammingLabVIEW Foundations7 Selecting Advanced View Advanced View of front panel palette When mouse rolls over button title of sub palette shown

Visual ProgrammingLabVIEW Foundations8 Adding Components Clicking on a button for a sub palette brings up that sub palette Get back to the previous palette using the up arrow right clicking on a palette button brings up the sub palette while keeping the original palette visible

Visual ProgrammingLabVIEW Foundations9 Adding Components Once correct component found click on it and drag to front panel Adding to front panel places corresponding terminal on the block diagram can alter characteristics of component by right clicking on it or alter font by selecting text and change Text Settings –can change label and value in control / indicator

Visual ProgrammingLabVIEW Foundations10 Making Things Pretty Components on front Panel can be aligned and distributed Select components by clicking mouse and dragging box around them align objects distribute objects resize objects

Visual ProgrammingLabVIEW Foundations11 Wires Data is moved around a LabVIEW program via wires Wires are placed on the block diagram Wires take information from controls to nodes and indicators Wires are color coded based on the type of data they carry

Visual ProgrammingLabVIEW Foundations12 Wire Color Scheme Wires have a color and a width based on data type and data structure data types –floating point numbers, integer numbers, Booleans, Strings data structures –scalar (single value), array (list of values), 2D array (table of values)

Visual ProgrammingLabVIEW Foundations13 Wire Color Scheme I nteger Floating Point Boolean String Scalar Array 2D Array

Visual ProgrammingLabVIEW Foundations14 Wiring Components LabVIEW has an automatic tool selection option. (Selected by default) Cursor turns into tool necessary based on position of cursor When cursor moved over terminal it becomes a spool of wire click to start wiring drag wire from one terminal to another

Visual ProgrammingLabVIEW Foundations15 Adding Wires Wire Icon Wire from output of control to input of indicator

Visual ProgrammingLabVIEW Foundations16 Broken Wires Errors in wiring are shown graphically –loose ends –incorrect data types –too many wires

Visual ProgrammingLabVIEW Foundations17 Help Context Help is a feature of LabVIEW to provide help based on the situation you are in enable context help by pressing control and H or by selecting the “Help” menu and selecting “Show Context Help” –Tries to explain errors –shows information about icons / controls / indicators / data type of wire / sub VIs

Visual ProgrammingLabVIEW Foundations18 Nodes Nodes are program execution elements Like actions in Alice or statements in text based languages Nodes exist for all sorts of operations, from simple to complex add transpose the elements of a table

Visual ProgrammingLabVIEW Foundations19 Data flow LabVIEW programs are driven by data flow operations are not performed until the data to perform them is available Alice (and most text based languages) use sequential flow of control –statements executed in the order they appear in the program

Visual ProgrammingLabVIEW Foundations20 Example of Data Flow Which gets executed first the add operation or the divide operation? The answer is, it depends. –On which operation has the data to perform the operation first –Sometimes when the program is run the add could be performed first and other times it could be the multiplication

Visual ProgrammingLabVIEW Foundations21 Cascading Data Flow Outputs of nodes can be feed to other nodes (x + y) x y2 multiplication not performed until addition complete

Visual ProgrammingLabVIEW Foundations22 Multiple Inputs and Outputs Operations (nodes) in LabVIEW can have more than input and more than one output multiple outputs are like multiple parameters in an Alice method or function Alice functions had no equivalent to the multiple outputs

Visual ProgrammingLabVIEW Foundations23 Example of Multiple Inputs and Outputs In Range and Coerce 3 inputs, 2 outputs explanation of inputs and outputs available on context help

Visual ProgrammingLabVIEW Foundations24 sub VIs As virtual instruments are created they can be used like the built in components packaged into a sub program create an icon with inputs and outputs –analogous to class level methods in Alice –code reuse LabVIEW contains a large library of sub VIs

Visual ProgrammingLabVIEW Foundations25 Example Temperature conversion Celsius to Fahrenheit Degrees Fahrenheit = (1.8 * Degrees Celsius) + 32 Input -> degrees Celsius Output -> degrees Fahrenheit

Visual ProgrammingLabVIEW Foundations26 Conversion Formula Two ways to handle formula 1.Use the primitive nodes and numerical constants 2.Use the formula express option

Visual ProgrammingLabVIEW Foundations27 First Option

Visual ProgrammingLabVIEW Foundations28 Bad Wires If a wire connection is bad the wire will not be solid, but a dashed line

Visual ProgrammingLabVIEW Foundations29 Incorrect Programs A LabVIEW program that has wiring (or other format errors) cannot be run Clicking on the broken arrow brings up a list of errors Clicking on an error displays more information about the error Edit menu has “Remove Broken Wires” option or

Visual ProgrammingLabVIEW Foundations30 Adding Components Automatically Some components can be added automatically instead of from a palette In the temperature example –after adding the multiplication node right click on one input –from the pop up menu select “Create” and then “Constant”

Visual ProgrammingLabVIEW Foundations31 Changing Labels When component added to front panel it is given a default name change name to be more descriptive After entering text click off of control or press to finish Changes label on corresponding componen

Visual ProgrammingLabVIEW Foundations32 Free Labels Not attached to a component For describing things about a program

Visual ProgrammingLabVIEW Foundations33 Second Option

Visual ProgrammingLabVIEW Foundations34 Formula Editor

Visual ProgrammingLabVIEW Foundations35 Result of Second Option

Visual ProgrammingLabVIEW Foundations36 Another Exercise Simulate rolling a pair of dice

Visual ProgrammingLabVIEW Foundations37 Expected Output? What next?

Visual ProgrammingLabVIEW Foundations38 Expected Output?

Visual ProgrammingLabVIEW Foundations39 Rounding

Visual ProgrammingLabVIEW Foundations40 Making Two Dice Copy and paste many components

Visual ProgrammingLabVIEW Foundations41 Finished Product

Visual ProgrammingLabVIEW Foundations42 Always Another Way

Visual ProgrammingLabVIEW Foundations43 Both Methods