MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.

Slides:



Advertisements
Similar presentations
Previously… We created a simulated temperature reader which alerts if too hot or too cold… Download the solved practice to keep in sync: Thermostat.vi.
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.
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.
Jeff Beltramo NHTI-Concord’s Community College FRC Team 1922.
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
Course contents 1.Labview basics – virtual instruments, data flow, palettes 2.Structures – for, while, case,... – editing techniques 3.Controls&Indicators.
Loops in LabVIEW (while,for and case)
De la Rosa-Pohl ECE 1100 Introduction to Engineering Intro to LabVIEW: Programming for Symon University of Houston Diana de la Rosa-Pohl Len Trombetta.
Introduction to LabVIEW
Introduction to LabVIEW 8.5
Hands-On Material From National Instruments Introduction to LabVIEW Electrical Wiring Feng-Ju Hsieh ENGR 100 Section C.
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build.
PC Applications Course LabVIEW: Laboratory Virtual Instrument Engineering Workbench Graphical Programming Easy to use Faster Development Time.
Loops A.About While Loops B.About For Loops C.About Case structures D.Sequence Structures E.Formula Node You Will Learn:
Dan O. Popa, Intro to EE – Practicum, Spring 2015 EE 1106 : Introduction to EE Freshman Practicum Lecture 2: Signals, Systems and Circuits with Introduction.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
EG1003: Introduction to Engineering and Design Introduction to LabVIEW.
Virtual Instrumentation With LabVIEW
Course contents 1.Labview basics – virtual instruments, data flow, palettes 2.Structures – for, while, case,... – editing techniques 3.Controls&Indicators.
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.
How to use LabVIEW Ihor Korolov February 2011.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Build.
Get Real About Teaching with LabVIEW and myDAQ National Instruments Confidential2 STEM Education  Science, Technology, Engineering and Math Education.
Workshop 3 of 7 Welcome!. Today's Topics Review of Workshop 2 Loops While For Auto-indexing Shift registers Case Structure.
V1: HMFR, V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus.
Course contents 1.Labview basics – virtual instruments, data flow, palettes 2.Structures – for, while, case,... – editing techniques 3.Controls&Indicators.
Virtual Instrumentation With LabVIEW. Section I LabVIEW terms Components of a LabVIEW application LabVIEW programming tools Creating an application in.
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
Each VI has 2 Windows Front Panel User Interface (UI) –Controls = Inputs –Indicators = Outputs Block Diagram Graphical Code –Data travels on wires from.
Design of Bio-Medical Virtual Instrumentation Tutorial 3.
LabVIEW in 3 Hours. What is Test & Measurement? Keypad Functionality Keypad Functionality LCD Testing LCD Testing Sound Quality Sound Quality Acoustic.
Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.
LabView instrumentoinnissa, 55492, 3op Labview in instrumentation Lecturer: Heikki Ojala, room C204a
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:
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Introduction to LabVIEW 8.5
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
Workshop 2 of 4 Welcome!. Survey While You Wait ni.com/duke >> Recent Documents >> LabVIEW Workshop Participation Survey.
Programming in LabVIEW
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
Introduction to LabVIEW
LabVIEW Course Course 2.
Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report/Presentation Closing.
EG1003: Introduction to Engineering and Design Introduction to LabVIEW.
Introduction to LabVIEW
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
Introduction to LabVIEW
Lab 2 : Structures Muhammad Zaigham Abbas Shah DIGITAL INSTRUMENTATION SYSTEMS.
Lesson 2: Introduction to Control programming using Labview
הודעות ריענון מהיר והרחבות כתיבה לקובץ Low-Level דגימת אות Low-Level
LabVIEW 7.1 寒假短期教學課程 歐陽丞修 2006/02/06.
Introduction to LabVIEW
Introduction to LabVIEW
Structures- case, sequence, formula node
EET 2259 Unit 9 Arrays Read Bishop, Sections 6.1 to 6.3.
Introduction to LabVIEW
EET 2259 Unit 2 Virtual Instruments
Presentation transcript:

MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering

Introduction LabVIEW - Laboratory Virtual Instrument Engineering Workbench Product of National Instruments (ni.com)!

Learn LabVIEW : Web Courses 1. LabVIEW Environment Learn how to navigate LabVIEW and use the block diagram, front panel, and Functions and Controls palettes. Then explore how to use graphs and charts and build a user interface. 2. Loops and Execution Structures See how to loop code and conditionally execute code in LabVIEW using For Loops, While Loops, and Case structures. 3. Data Types and Structures Explore the different data types and methods to organize and group data, controls, and indicators in LabVIEW. 4. Graphical Programming Examine the basics of graphical programming and methods to determine data flow and order of execution in the LabVIEW environment. 5. Programming Tools Discover how to use important tools in LabVIEW that can save you time.

Why do we use LabVIEW? Allowing “easy” automated data acquisition, instrument control, and industrial automation! Allow people with limited coding experience to write programs develop automated experiments much faster than with conventional programming environments! Another key benefit of LabVIEW over conventional programming environments is the extensive support for accessing instrumentation hardware Writing instrument drivers by hand requires a hardware and operating system expert along with thousands of lines of code

LabVIEW Basics LabVIEW relies on graphical symbols rather than textual language to describe programming actions LabVIEW programs are called Virtual Instruments (VIs)! This is because their appearance (like a circuit schematic) and operation imitate actual instruments/circuit blocks! Execution of a program is based on the principle of dataflow, in which functions execute only after receiving the necessary data!

Usage of LabVIEW Help ! +H, or “Show Context Help” from the Help pull-down menu toggles the Context Help on and off Move the cursor over the Block diagram object you are interested in Make yourself familiar with LabVIEW help!

Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components “wired” together LabVIEW Programs Are Called Virtual Instruments (VIs)

LabVIEW Front Panel All user interface goes here! Used to display Controls or Indicators Highly customizable

Control? or Indicator? Controls = Inputs from the user = Source Terminals Indicators = Outputs to the user = Destinations

LabVIEW Block Diagram Actual program Invisible to user Read left to right, like a book Where the MAGIC happens!

Terminals When you place a control (or indicator) on the FRONT PANEL LabVIEW automatically creates a corresponding control (or indicator) terminal on the BLOCK DIAGRAM

Manipulating Controls and Indicators Right click on an indicator to Change to control Change format or precision Right click on a control to Change to indicator Change mechanical action (whether to latch open or closed, and what to use as default…)

Wiring Connections Wires transport data through the block diagram Wire color indicates variable type A red “X” means something is wrong!

Wires A LabVIEW VI is held together by wires connecting nodes and terminals; they deliver data from one source terminal to one or more destination terminals.

Broken wires If you connect more than one source or no source at all to a wire, LabVIEW DISAGREES with what you’re doing, and the wire will appear broken

Messy vs. Clean Wiring CLEAN: Easy to troubleshoot MESSY: What is going on?

Basic wires used in block diagrams and corresponding types Each wire has different style or color, depending on the data type that flows through the wire: Scalar1D array2D arrayColor Floating-point number orange Integer numberblue Booleangreen Stringpink

Running LabVIEW Programs ALMOST ALWAYS put your program in some sort of loop that can be stopped with a control AVOID using the red “x” to stop your program

Insert a digital indicator or control Insert a boolean control (button or switch)

Add a structure such as for, while, and case statements Add a numeric operator (+,-,…) File I/O Add a boolean operator (and, or…) Data Acquisition Signal analysis Comparison Mathematical Functions Timing/dialog

Control Terminals Block Diagram Window Front Panel Window Indicator Terminals Creating a VI

Example 1: Craps From the functions – numeric panel insert a pair of dice From the Controls panel insert a numeric digital indicator (on the front panel) Use the wiring tool to connect the two (in the wiring diagram) and click the “run” button repeatedly. Numbers from 0.00 to 1.00 should be displayed in the front panel

Example 1: Craps (continued) Delete the wire Add a multiplication node and a numeric constant to allow multiplication by 5 Add an addition node and numeric constant to allow addition of 1 Add a mathematical “Round to Nearest” node. Make a second copy of this structure to represent a second die and wire them together through an addition node with an output to a numeric constant This wiring diagram simulates the rolling of 2 dice and their addition to form a number from 2 through 12.

Section II – Elements of Typical Programs A. Loops While Loop For Loop B. Functions and SubVIs Types of Functions Creating Custom Functions (SubVI) Functions Palette & Searching C. Decision Making and File IO Case Structure Select (simple If statement) File I/O

Loops While Loops i terminal counts iteration Always runs at least once Runs until stop condition is met For Loops –i terminal counts iterations –Run according to input N of count terminal While Loop For Loop

Drawing a Loop 1. Select the structure 2. Enclose code to be repeated 3. Drop or drag additional nodes and then wire

What Types of Functions are Available? Input and Output Signal and Data Simulation Acquire and Generate Real Signals with DAQ Instrument I/O Assistant (Serial & GPIB) Analysis Signal Processing Statistics Advanced Math and Formulas Continuous Time Solver Storage File I/O Express Functions Palette

Create SubVI Enclose area to be converted into a subVI. Select Edit»Create SubVI from the Edit Menu.

LabVIEW Functions and SubVIs operate like Functions in other languages Function Pseudo Code function average (in1, in2, out) { out = (in1 + in2)/2.0; } SubVI Block Diagram Calling Program Pseudo Code main { average (in1, in2, pointavg) } Calling VI Block Diagram

How Do I Make Decisions in LabVIEW? 1. Case Structures 2. Select (a)(b) (c)

Loops can accumulate arrays at their boundaries with auto- indexing For Loops auto-index by default While Loops output only the final value by default Right-click tunnel and enable/disable auto-indexing Building Arrays with Loops (Auto-Indexing) Wire becomes thicker Wire remains the same size Auto-Indexing Disabled Auto-Indexing Enabled Only one value (last iteration) is passed out of the loop 1D Array

Shift Register – Access Previous Loop Data Available at left or right border of loop structures Right-click the border and select Add Shift Register Right terminal stores data on completion of iteration Left terminal provides stored data at beginning of next iteration Before Loop Begins First Iteration Second Iteration Last Iteration Value 3 Initial Value