Introduction to LabVIEW

Slides:



Advertisements
Similar presentations
A. Virtual Instruments (VIs)
Advertisements

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.
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.
Diego Torres LabVIEW Student Ambassador Fall 2011 ITESM CQ
TE Sessions Supported by: Basic Concepts of Programming November 3, 2012.
Jeff Beltramo NHTI-Concord’s Community College FRC Team 1922.
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
Welcome! Workshop 2 of 7.
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.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 5 Loops  Read Bishop, Sections 5.1 and 5.2.  Lab #5 and Homework #5 due next week.  Exam #1 next.
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
Loops A.About While Loops B.About For Loops C.About Case structures D.Sequence Structures E.Formula Node You Will Learn:
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.
Workshop 3 of 7 Welcome!. Today's Topics Review of Workshop 2 Loops While For Auto-indexing Shift registers Case Structure.
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.
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
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.
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.
LabVIEW – 2 Windows ► Front Panel- User Interface ► Block Diagram- Programming View.
Samuel Alberg Thrysøe, PhD, PostDoc, Kontakt info: Tlf:
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.
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Lab 1 : Introduction to LabView 1 Southern Methodist University Bryan Rodriguez.
CS320n –Visual Programming
Design of Bio-Medical Virtual Instrumentation Tutorial 2.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
CS320n –Visual Programming More LabVIEW Foundations.
Workshop 2 of 4 Welcome!. Survey While You Wait ni.com/duke >> Recent Documents >> LabVIEW Workshop Participation Survey.
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
Week 3 Data Structures and Common Tools. Common Tools in Labview Automatic Tool Selector Using the Operating Tool Using the Positioning Tool to Select.
Workshop 5 of 7 Welcome!. Today's Topics Review from Workshop 4 Modularity & subVIs Documentation File Input/Output Introduction.
Week 3 Labview exercises
Introduction to LabVIEW
Quiz Which types of folders are available in a LabVIEW Project?
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
EE 200 Design Tools Laboratory 14
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
Course Learning Map Lesson # Lesson Title Lesson 3 Lesson 2 Lesson 1
הודעות-שיעור1 שי שרעבי חדר 201
Lab 2 : Structures Muhammad Zaigham Abbas Shah DIGITAL INSTRUMENTATION SYSTEMS.
Chapter 5 Structures.
Lesson 2: Introduction to Control programming using Labview
Chapter 1 LabVIEW Basics
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
LabVIEW 7.1 寒假短期教學課程 歐陽丞修 2006/02/06.
Introduction to LabVIEW
LabVIEW.
Introduction to LabVIEW
Structures- case, sequence, formula node
CST-115 Introduction to Computer Programming
Introduction to LabVIEW
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 5 Loops Read Bishop, Sections 5.1 and 5.2.
EET 2259 Unit 2 Virtual Instruments
Presentation transcript:

Introduction to LabVIEW Chris Thompson

Introduction What is LabVIEW? Project Explorer VI Front Panel Block Diagram Icon and Connector Pane Data Types While Loops For Loops Case Structures Arrays Clusters Polymorphism

What is LabVIEW? LabVIEW is a graphical programming language. LabVIEW programs are called Virtual Instruments; VI’s. The user interface is the Front Panel. The Block Diagram contains the graphical programming code. LabVIEW uses graphical dataflow programming. originally created to control scientific instrumentation and simplify data collection. A VI can be a stand alone program or a sub-program used inside of another VI. The user interface allows interaction between the program user and the software. Also known as the source code. data flows through nodes on the block diagram determining execution order

Project Explorer The Project Explorer is a container for all of the VI’s and other resources required for a LabVIEW application. The default project for the FIRST control system has the Main.VI which has a basic program pre-built that can be modified to perform all of the functionality required for the robot. Any new VI’s created can be added to the project.

VI Front Panel The Front Panel contains controls and indicators to operate the program and provide a display of data or information generated by the program. Controls can be numerical inputs, switches, string inputs, etc. Indicators are graphs, LED’s, gauges, etc.

VI Block Diagram The Block Diagram is the code that executes when the program runs. The block diagram contains a terminal for each control and indicator on the front panel plus any functions or operators in the code that interact with the front panel objects. The terminals, functions, and operators are connected with wires that the programmer adds to define the sequence of operations.

Exercise 1 Lets create a simple VI to create and display a random number between 0 and 10. Start a new VI: FILE>NEW VI… Place a Numeric Indicator on the Front Panel On the Block Diagram, add a Random Number and a Multiply function from the Numeric Palette. Right click on one input of the Multiply function and select CREATE>CONSTANT, and type 10 to set the value. Wire the rest of the diagram and run the program. Controls palette Functions palette Help window

Icon and Connector Pane The VI Icon can be customized for your application. The Connector Pane allows you to connect your VI to other VI’s. These are located in the upper right corner of the front panel The Icon Editor within LabVIEW permits you to customize the icon. Open it by double clicking on the icon. The Connector Pane terminals are wired to controls and indicators on the front panel to provide connections externally to the VI.

Commonly Used LabVIEW Data Types Numeric Floating Point Single, Double, Extended precision Signed Integer Byte (8 bit), Word (16 bit), Long (32 bit) Unsigned Integer Byte (8 bit), Word (16 bit), Long (32 bit) Boolean – True or False String – one or more ASCII characters Enums – Enumerated preset list

While Loops A While Loop is a code structure that executes repeatedly until a condition is met. The Iteration Terminal provides a count of the number of times the loop has executed. A While Loop always executes at least one time. The code for the condition terminal must be inside the loop.

Exercise 2 Let’s modify our Random Number program to generate a number once every second. On the Block Diagram, place While Loop enclosing all of the previously added functions. Right click Condition Terminal input and select CREATE>CONTROL. Place a Wait function inside the While Loop from the Timing Palette. Right click the input terminal to the Wait function and select CREATE>CONSTANT. Type 1000 to set the value of the constant to 1000 milliseconds. The VI will now generate a new random number every second until stop is pressed.

For Loops A For Loop is a code structure that executes a defined number of times. The Count Terminal determines how many times the loop executes.

Exercise 3 Let’s make a VI that averages 10 random numbers. Start a new VI, place a Numeric Indicator on the Front Panel. Create a For Loop and wire a constant to the Count Terminal set to 10. Place a Random Number, Multiply, and Add functions inside the loop. Add a Shift Register by right clicking on the For Loop border and selecting ADD SHIFT REGISTER. Wire everything to generate a number between 0 and 10 every time the loop runs and add it to the previous iteration. Add functions outside the loop to divide by 10 and display on the Front Panel Indicator. Show diagram to let them complete wiring Demonstrate execution highlighting on the block diagram Mention probes as well

Case Structures A Case Structure contains two or more sub-diagrams. The Case Selector label contains the name of case. The selector terminal can be wired with a Boolean, integer, string, or enum data type A default case should be set to deal with out of range values that may be input to the selector terminal.

Arrays An Array is a data structure consisting of elements and dimensions. Elements are the data that make up the array. Dimensions are length, height, or depth of the array. An Array can have one or more dimensions. Example of a 1 dimensional and 2 dimensional array. There is a complete palette of functions specifically for processing arrays.

Clusters A Cluster is a data structure that contains data elements of mixed types. The Error Cluster is commonly used in most VI’s for error handling. This cluster contains a Boolean (status), a numeric (code), and a string (source).

Polymorphism A VI can be designed to do different functions depending on the data that is wired to them. The FRC has a number of these types of VI’s, so in most cases you will need to select the correct variation for your application.

What to do Next Practice Coding!! Download LabVIEW from the FRC site, activate it with the team code. Purchase a LabVIEW Home license from Digilent for $50. Use LabVIEW to write programs for Arduino or Raspberry Pi. Go to LabVIEW MakerSpace and download the LINX toolkit. LabVIEW Physical Computing kit from Digilent has license and a Pi, USB, and SD card for $89.