Diego Torres LabVIEW Student Ambassador Fall 2011 ITESM CQ

Slides:



Advertisements
Similar presentations
A. Virtual Instruments (VIs)
Advertisements

Mike Scott University of Texas at Austin
Microsoft®.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Windows XP Project An Introduction to Microsoft Windows XP and Office 2003.
Creating a Dreamweaver Web Page and Local Site
LabVIEW Crash Course Presented by:.
1 IMDS Tutorial Integrated Microarray Database System.
Microsoft Office 2007 Integration Integrating Office 2007 Applications and the World Wide Web.
1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
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.
LabView Academy 5. óra. Témakörök SubVI Modularitás Icon Connector Pane.
Lesson 2 Navigating LabVIEW
Exercise 1: Install PC Software & NXT Firmware
Based on LabVIEW 2011 Student Edition
LabVIEW and G Graphical Programming Language By: Ramtin Raji Kermani.
DAQmx下多點(Multi-channels)訊號量測
INTRODUCTION Lesson 1 – Microsoft Word Word Basics
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Office 2003 Integration Integrating Office 2003 Applications and the World Wide Web.
 Copyright I/O International, 2013 Visit us at: A Feature Within from Item Class User Friendly Maintenance  Copyright.
Types of selection structures
1.step PMIT start + initial project data input Concept Concept.
Outlook 2013 Web App (OWA) User Guide Durham Technical Community College.
Jeff Beltramo NHTI-Concord’s Community College FRC Team 1922.
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
Workshop 1 of 7 Welcome!. Who am I? Dilim Nwobu Computer Engineering ‘12 Fall 2011 Software Developer for NI LabVIEW Student Ambassador for Texas A&M.
Introduction to LabVIEW
Introduction to LabVIEW 8.5
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.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
Virtual Instrumentation With LabVIEW
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.
V1: HMFR, V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus.
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.
Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.
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.
Introduction to LabVIEW 8.5
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.
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
LabVIEW Core 1 Key messages for the instructor:
Getting Started with LabVIEW Virtual Instruments
EET 2259 Unit 3 Editing and Debugging VIs
Introduction to LabVIEW
הודעות-שיעור1 שי שרעבי חדר 201
Chapter 1 LabVIEW Basics
Chapter 5 SubVIs.
Introduction to LabVIEW
EET 2259 Unit 2 Virtual Instruments
EET 2259 Unit 3 Editing and Debugging VIs
Presentation transcript:

Diego Torres LabVIEW Student Ambassador Fall 2011 ITESM CQ LabVIEW Workshop #1 Diego Torres LabVIEW Student Ambassador Fall 2011 ITESM CQ

Laboratory Virtual Instrumentation Engineering Workbench What is LabVIEW? Laboratory Virtual Instrumentation Engineering Workbench What is NI LabVIEW? LabVIEW is a highly productive graphical development environment with the performance and flexibility of a programming language, as well as high-level functionality and configuration utilities designed specifically for measurement and automation applications. In general-purpose programming languages, the code is as much of a concern as the application. You must pay close attention to the syntax (commas, periods, semicolons, square brackets, curly brackets, round brackets, etc.). In contrast, with LabVIEW you use icons to represent functions, and you wire them together to determine the flow of data through your program, similar to creating flowcharts. It has all the breadth and depth of a general-purpose programming language, but it is easy to use, increasing your productivity by decreasing the time required to develop your applications. You can easily divide measurement and automation application into three main parts: acquisition, analysis, and presentation of data. LabVIEW provides a seamless way to acquire your data, perform necessary analysis on that data, and present the information in a chosen format. Throughout the seminar, we touch upon each of these three components of a measurement and automation application. Each program in LabVIEW is called a virtual instrument, or VI. The VI serves as the primary building block of a LabVIEW application, and you can use it to modularize your code for efficient design, clear and concise documentation, and simplified maintenance. Each LabVIEW VI is made up of three main components: the Front Panel, Block Diagram, and the Palettes. In the coming slides, we continue our discussion of the actual development environment of LabVIEW. Compiled graphical development environment Development time reduction of four to ten times Tools to acquire, analyze, and present your data © National Instruments Corporation LabVIEW Graphical Development Hands-On Seminar

Navigating LabVIEW Virtual Instruments (VIs) Parts of a VI Starting a VI Project Explorer Front Panel Block Diagram Searching for Controls, VIs and Functions Selecting a Tool Dataflow Polymorphism ~2.5 hours spent on this lesson, including exercises. This lesson is an introduction to navigating LV; you will later cover implementation.

A. Virtual Instruments (VIs) Virtual Instrument (VI) – A LabVIEW program The appearance and operation of VIs imitate physical instruments, such as oscilloscopes and digital multimeters.

B. Parts of a VI LabVIEW VIs contain three main components: 1. Front Panel 2. Block Diagram 3. Icon/Connector Pane

B. Parts of a VI – Front Panel Front Panel – User interface for the VI You build the front panel with controls (inputs) and indicators (outputs)

B. Parts of a VI – Block Diagram Block Diagram – Contains the graphical source code Front panel objects appear as terminals on the block diagram

B. Parts of a VI – Icon/Connector Pane Icon: graphical representation of a VI Connector Pane: map of the inputs and outputs of a VI Icons and connector panes are necessary to use a VI as a subVI A subVI is a VI that is inside of another VI Similar to a function in a text-based programming language Icon Connector Pane

C. Starting a VI Demonstrate using the Getting Started dialog box and the New dialog box to start a VI.

D. Project Explorer Use LabVIEW Projects to: Group LabVIEW files and non-LabVIEW files Create build specifications Deploy or download files to targets LabVIEW project files (.lvproj) include: - references to files in the project - configuration information - build information - deployment information - etc Use the Project Explorer window to create and edit LabVIEW projects Select File»New Project to display the Project Explorer window You also can select Project»New Project or select Empty Project in the New dialog box to display the Project Explorer window

Using the Project Explorer Demonstrate creating a project, adding files, and removing files.

E. Front Panel – Controls Palette Contains the controls and indicators you use to create the front panel Access from the front panel by selecting View»Controls Palette

E. Front Panel – Front Panel Toolbar

E. Front Panel – Controls & Indicators Knobs, push buttons, dials, and other input devices Simulate instrument input devices and supply data to the block diagram of the VI Indicators Graphs, LEDs, and other displays Simulate instrument output devices and display data the block diagram acquires or generates

E. Front Panel – Numeric Controls/Indicators The numeric data type can represent numbers of various types, such as integer or real Numeric Control Increment/Decrement Buttons Numeric Indicator

E. Front Panel – Boolean Controls/Indicators The Boolean data type represents data that only has two parts, such as True and False or On and Off Use Boolean controls and indicators to enter and display Boolean (True or False) values Boolean objects simulate switches, push buttons, and LEDs Boolean Control Boolean Indicator

E. Front Panel – Strings The string data type is a sequence of ASCII characters Use string controls to receive text from the user such as a password or user name Use string indicators to display text to the user

LabVIEW Data Types – Terminals Terminals visually communicate information about the data type represented

LabVIEW Data Types – Numerics The numeric data type represents numbers of various types To change the representation of a numeric, right-click the control, indicator, or constant, and select Representation from the shortcut menu

LabVIEW Data Types – Boolean Behavior of Boolean controls is specified by the mechanical action In LabVIEW, the Boolean data type is represented with the color green

Mechanical Action of Booleans Use the Mechanical Action of Booleans VI located in the NI Example Finder to learn about the different switch and latch actions.

Data Types – String A sequence of displayable or non-displayable ASCII characters On the front panel, strings appear as tables, text entry boxes, and labels Change the display type from the short-cut menu: Normal, ‘\’ Codes, Password and Hex Edit and manipulate strings with the String functions on the block diagram In LabVIEW, the string data type is represented with the color pink

Data Types – Enum An enum represents a pair of values, a string and a numeric, where the enum can be one of a defined list of values

Data Types – Enum Enum: enumerated control, constant, or indicator Enums are useful because it is easier to manipulate numbers than strings on the block diagram

Data Types – Dynamic Stores the information generated or acquired by an Express VI Non-Express VIs do not accept the dynamic data type To use a built-in VI or function to analyze or process the dynamic data type, you must convert the data type Numeric, waveform, or Boolean data indicators or inputs automatically convert the dynamic data type when wired In LabVIEW, the dynamic data type is represented with the color dark blue

E. Front Panel – Shortcut Menus All LabVIEW objects have associated shortcut menus As you create a VI, use the shortcut menu items to change the look or behavior of front panel and block diagram objects To access the shortcut menu, right-click the object

E. Front Panel – Property Dialog Box Right-click a front panel object and select Properties to display The options available on the property dialog box are similar to the options available on the shortcut menu for that object

E. Front Panel – Configure Multiple Objects Select multiple objects to simultaneously configure shared properties

F. Block Diagram Terminals SubVIs Functions Constants Structures Wires Block diagram objects include the following: Terminals SubVIs Functions Constants Structures Wires

F. Block Diagram – Functions Palette Contains the VIs, functions, and constants you use to create the block diagram

F. Block Diagram – Block Diagram Toolbar

F. Block Diagram – Terminals Terminals are: Block diagram appearance of front panel objects Entry and exit ports that exchange information between the front panel and block diagram Analogous to parameters and constants in text-based programming languages Change the view type of a terminal by toggling the View as Icon selection from the context menu

F. Block Diagram Terminals

F. Block Diagram – Nodes Objects on the block diagram that have inputs and/or outputs and perform operations when a VI runs Analogous to statements, operators, functions, and subroutines in text-based programming languages Nodes can be functions, subVIs, or structures Nodes

F. Block Diagram – Function Nodes Fundamental operating elements of LabVIEW Do not have front panels or block diagrams, but do have connector panes Double-clicking a function only selects the function – does not open it like a VI Has a pale yellow background on its icon

F. Block Diagram – SubVI Nodes SubVI: VIs that you build to use inside of another VI Any VI has the potential to be used as a subVI When you double-click a subVI on the block diagram, you can view the front panel and block diagram of the subVI The upper right corner of the front panel and block diagram displays the icon for the current VI This is the icon that appears when you place the VI on a block diagram as a subVI

F. Block Diagram – SubVI Nodes Express VIs are a special type of subVI Require minimal wiring because you configure them with dialog boxes Save the configuration of an Express VI as a subVI Icons for Express VIs appear on the block diagram as icons surrounded by a blue field

F. Block Diagram – Icons/Expandable Nodes

F. Block Diagram – Wires Transfer data between block diagram objects through wires Wires are different colors, styles, and thicknesses, depending on their data types A broken wire appears as a dashed black line with a red X in the middle DBL Numeric Integer Numeric String Scalar 1D Array 2D Array

F. Block Diagram – Wiring Tips Press <Ctrl>-B to delete all broken wires Right-click and select Clean Up Wire to reroute the wire

F. Block Diagram – Wiring Tips Use the Clean Up Diagram tool to reroute multiple wires and objects to improve readability Select a section of your block diagram Click the Clean Up Diagram button on the block diagram toolbar

Exercise 2-1 Concept: Exploring a VI Identify the parts of an existing VI.

Exercise 2-1 Concept: Exploring a VI What are constants and when should you use them? What are free labels and when should you use them? What are constants and when should you use them? Constants are terminals on the block diagram that supply fixed data values to the block diagram. Use constants when your VI needs to use the same value every time the VI runs. What are the free labels and when should you use them? Free labels are not attached to any object, and you can create, move, rotate, or delete them independently. Use them to add comments to front panels and block diagrams. Free labels are useful for documenting code on the block diagram and for listing user instructions on the front panel. Double-click an open space or use the Labeling tool to create free labels or to edit either type of label. Note: Constants and free labels have not been discussed yet, so now is a good time to briefly describe them and their purposes.

G. Searching for Controls, VIs & Functions Find controls, functions, and VIs using the Search button on the Controls and Functions palette.

G. Global Search The Search bar in the top right of the Front Panel and Block Diagram windows can be used to search the palettes, help, and ni.com. New feature in LabVIEW 2010. Searches the local Help files and palettes as you type and if you press enter it will also search community and ni.com.

Exercise 2-2 Concept: Navigating Palettes Learn to use the palettes and search for controls, functions and VIs.

Exercise 2-2 Concept: Navigating Palettes Why would you want to add a function to the Favorites category in the Functions palette? Why would you want to add a function to the Favorites category in the Functions palette? You can put commonly-used functions in an easy-to-access category.

H. Selecting A Tool Create, modify, and debug VIs using the tools provided by LabVIEW A tool is a special operating mode of the mouse cursor The operating mode of the cursor corresponds to the icon of the tool selected When using the Automatic Tool Selection, LabVIEW chooses which tool to select based on the current location of the mouse

Exercise 2-3 Concept: Selecting A Tool Gain experience using the Automatic Tool Selection to select which tool to use.

Exercise 2-3 Concept: Selecting A Tool How do you enable automatic tool selection? How do you enable automatic tool selection? Make sure that the Automatic Tool Selection button is enabled on the Tools Palette. To view the Tools Palette, you can either select View»Tools Palette or hold Shift while right-clicking.

I. Dataflow LabVIEW follows a dataflow model for running VIs A node executes only when data are available at all of its input terminals A node supplies data to the output terminals only when the node finishes execution LabVIEW is NOT control flow. Visual Basic, C++, JAVA, and most other text-based programming languages follow a control flow model of program execution. Sequential order of program elements determines execution order. LabVIEW follows a dataflow model for running VIs. A block diagram node executes when it receives all required inputs. When a node executes, it produces output data and passes the data to the next node in the dataflow path. The movement of data through the nodes determines the execution order of the VIs and functions on the block diagram.

I. Dataflow – Quiz Which node executes first? Add Subtract Random Number Divide Sine There is no right answer to this quiz, but there are some wrong answers. This quiz is intended to encourage students to think about dataflow and its implications...

I. Dataflow – Quiz Answers NO CORRECT ANSWER Which node executes first? Add – possibly Subtract – definitely not Random Number – possibly Divide – possibly Sine – definitely not

Exercise 2-4 Concept: Dataflow Understand how dataflow determines the execution order in a VI.

Exercise 2-4 Concept: Dataflow Should a well-designed block diagram flow in a particular direction? Should a well-designed block diagram flow in a particular direction? Yes, a well-designed block diagram typically flows from left to right. This makes it easier to see the flow of data on the block diagram.

J. Polymorphism Definition: a programming language feature that allows values of different data types to be handled using a uniform interface. In LabVIEW: the ability of VIs and functions to automatically adapt to accept input data of different data types i.e. Numeric Functions Useful when performing the same operation on different data types In short, polymorphism is the ability of a node to accept/handle various data types.

Summary—Quiz Which function executes first: Add or Subtract? Add Unknown The answer is a.

Summary—Quiz Answer Which function executes first: Add or Subtract? Unknown The answer is a.

Summary—Quiz Which function executes first: Sine or Divide? Sine Unknown The answer is b.

Summary—Quiz Answer Which function executes first: Sine or Divide? Unknown The answer is b.

Summary—Quiz Which of the following functions executes first: Random Number, Add or Divide? Random Number Divide Add Unknown The answer is d.

Summary—Quiz Answer Which of the following functions executes first: Random Number, Add or Divide? Random Number Divide Add Unknown The answer is d.

Summary—Quiz Which of the following functions execute last: Random Number, Subtract or Add? Random Number Subtract Add Unknown The answer is b.

Summary—Quiz Answer Which of the following functions execute last: Random Number, Subtract or Add? Random Number Subtract Add Unknown The answer is b.

Summary—Quiz What are the three parts of a VI? Front Panel Block Diagram Project Icon/Connector Pane The answer is a, b, and d.

Summary—Quiz Answer What are the three parts of a VI? Front Panel Block Diagram Project Icon/Connector Pane The answer is a, b, and d.