LabVIEW programming I

Similar documents
LabVIEW programming I

Lesson 1 Introduction to LabVIEW. TOPICS LabVIEW Environment Front Panel Block Diagram Dataflow Programming LabVIEW Help and Manuals Debugging a VI

NI LabView READ THIS DOCUMENT CAREFULLY AND FOLLOW THE INSTRIUCTIONS IN THE EXERCISES

LabVIEW. Table of Contents. Lesson 1. Pre-reqs/Technical Skills Basic computer use

Getting Started with LabVIEW Virtual Instruments

Virtual Instruments with LabVIEW

Linear Control Systems LABORATORY

LABVIEW LAB SKILLS ACTIVITY 1 PROGRAMING ENVIRONMENT

Concept: Debugging. Goal. Description. Implementation. Use the debugging tools built into LabVIEW.

BE/EE189 Design and Construction of Biodevices Lecture 1. BE/EE189 Design and Construction of Biodevices - Caltech

Exercise 5: Basic LabVIEW Programming

BE/EE189 Design and Construction of Biodevices Lecture 2. BE/EE189 Design and Construction of Biodevices - Caltech

CLAD Sample Exam 03. C. A control that output a cluster of the controls / indicators on the tabs.

Certified LabVIEW Associate Developer Exam. Test Booklet

Introduction to LabVIEW

Certified LabVIEW Associate Developer Examination

Dept. of Electrical, Computer and Biomedical Engineering. Data Acquisition Systems and the NI LabVIEW environment

Certified LabVIEW Associate Developer Examination

Basic Data Acquisition with LabVIEW

Small rectangles (and sometimes squares like this

Introduction to LabVIEW

Virtual Instrumentation With LabVIEW

Certified LabVIEW Associate Developer Exam. Test Booklet

University of Pennsylvania. Department of Electrical and Systems Engineering. ESE Undergraduate Laboratory. Introduction to LabView

LabVIEW basics. BME MIT János Hainzmann, Károly Molnár, Balázs Scherer, Csaba Tóth

ME 224: EXPERIMENTAL ENGINEERING. Lecture 2

CLAD Sample Exam 04. B. When you create an Array constant on the Block Diagram, it is not visible on the Front Panel.

CSA8000 & TDS8000 Instruments CSA8000B & TDS8000B Instruments Using National Instruments LabVIEW

Getting Started with the LabVIEW Real-Time Module

Today. 4/5/11 Physics 262 Lecture 10 Questions about Exams Homework. Lab: Continue project. Lecture. Review your exams and review practice exam again.

Step-by-Step Data Acquisition Part II Exercise 2: Generating an Analog Output Waveform

Virtual Instrumentation With LabVIEW

The LabVIEW Programming Environment and Basic Operations

Lab 1: Getting familiar with LabVIEW: Part I

Introduction to National Instruments LabVIEW and Data Acquisition (DAQ)

Syllabus: Mechatronics and Engineering 3

LabVIEW programming II

PHYC 500: Introduction to LabView. Exercise 1 (v 1.3) M.P. Hasselbeck, University of New Mexico

Analytical Instrumentation

LabView instrumentoinnissa, 55492, 3op Labview in instrumentation

LabVIEW TM Basics I Introduction Course Manual

Hands-On Introduction to. LabVIEW. for Scientists and Engineers. Second Edition. John Essick. Reed College OXFORD UNIVERSITY PRESS

Analytical Instrumentation

Introduction to Labview and Temperature Measurement

Computer Interfacing Using LabView

c01.qxd p /18/01 11:03 AM Page 1 Fundamentals

CLAD_80.questions.

Introduction to LabVIEW

Homework Assignment 9 LabVIEW tutorial

Introduction to LabVIEW. Modified Powerpoint file taken from ma/courses/es110/

Read Temperature Data

A. Front Panel Design Lesson 4 Implementing a VI

LabVIEW programming II

Engineering Innovation Center LabVIEW Basics

LabVIEW FPGA Module Release Notes

Learn the three palettes. Learn how data is passed in LabVIEW. Create a subvi using two different methods.

Lab Exercise 2: Data Acquisition with NI LabVIEW

ECE 463 Lab 1: Introduction to LabVIEW

ni.com Preparing for the CLAD Exam

PHY 351/651 LABORATORY 1 Introduction to LabVIEW

Tutorial: Getting Started with the LabVIEW Simulation Module

CLAD Exam Preparation Guide using LabVIEW NXG

Table 1. Inputs and Outputs

Training material. Introduction to LabVIEW

Experiment 1: Introduction to Labview 2010 (tbc 1/7/2007, 1/13/2009,1/9/2012, 1/10/2012)

AOE 3054 LabView Programming

Originally released in 1986, LabVIEW (short for Laboratory Virtual Instrumentation

Introduction to Electronics Workbench

Getting Started with the LabVIEW Robotics Module Version 2011

National Instruments Corporation 1 Introduction to LabVIEW Hands-On

Introduction to LabVIEW Exercise-1

LabVIEW TM Core 1 Course Manual

Measurement & Automation Explorer (MAX) View and control your devices and software

Release Notes. LabVIEW Application Builder for Macintosh. Contents

Experiment 1: Introduction to Labview 8.0 (tbc 1/7/2007, 1/13/2009,1/13/2011)

Lesson 4 Implementing a VI

Data Acquisition HANS-PETTER HALVORSEN,

Learn LabVIEW 2010 / 2011 Fast

OVERVIEW GOALS KEY TERMS

Data Acquisition Laboratory

Introduction to LabVIEW 6-Hour Hands-On

ECE 202 LAB 1 INTRODUCTION TO LABVIEW

ME 365 EXPERIMENT 3 INTRODUCTION TO LABVIEW

National Instruments Corporation 1 Introduction to LabVIEW Hands-On

CLAD Sample Exam 06. B. Panel Resize. C. Panel Close? D. Value Change

INTRODUCTION TO LABVIEW

ENGR 1000, Introduction to Engineering Design

OpenStax-CNX module: m Thermometer VI * National Instruments

Exercise 7-1 Preparing Files for Distribution

TOP Server Client Connectivity Guide for National Instruments' LabVIEW

Parallel Programming Multicore systems

PHYC 500: Introduction to LabView. Exercise 8 (v 1.3) M.P. Hasselbeck, University of New Mexico. Arrays, XY Graphs, Disk I/O

Hands-on Lab 1: LabVIEW NI-DAQ Basics 1

Hardware: Acquiring Data and Communicating with Instruments

LabVIEW: A Teaching Tool for the Engineering Courses

Faculty of Computing, Engineering and Technology. Real Time Systems 1 CE LabVIEW David D. Hodgkiss & Staffordshire University 1

Getting Started with the NI LabVIEW Embedded Module for ADI Blackfin Processors Version 8.6

B. Including the Event Structure within a loop. C. Configuring a Timeout case within the Event Structure

Lab 4 - Data Acquisition

Part 1. Summary of For Loops and While Loops

Transcription:

FYS3240 PC-based instrumentation and microcontrollers LabVIEW programming I LabVIEW basics Spring 2011 Lecture #2 Bekkeng 13.1.2011

Virtual Instruments LabVIEW programs are called virtual instruments, or VIs, because their appearance and operation imitate physical instruments, such as oscilloscopes and multimeters. A LabVIEW program has the file ending *.vi, e.g. test.vi LabVIEW contains a comprehensive set of tools for acquiring, analyzing, displaying, and storing data, as well as tools to help you troubleshoot code you write. In LabVIEW a VI is: A LabVIEW program when it is the top-file A SubVI when a VI is used in another VI A SubVI is similar to a function in other programming languages

LabVIEW Start up Click Blank VI or select File New VI

LabVIEW Blank VI (Untitled) Two windows appear Block Diagram & Front Panel The block diagram contains the graphical source code The front panel is the user interface (GUI) of a VI. You build the front panel by using controls and indicators Select window to show:

LabVIEW Front Panel (the GUI) Right mouse click to open important Controls palette:

LabVIEW Block Diagram Right mouse click to open Functions palette:

Relationship between Block Diagram and Front Panel The block diagram contains Icons (objects) and wires GUI (Front Panel)

Tools palette Used on Block Diagram & Front Panel Wiring tool to wire icons together on the block diagram Write Text

Express VI LabVIEW Express VIs LabVIEW includes configuration-based Express VIs With Express VIs for e.g. signal processing you can interactively explore the various analysis algorithms, while immediately seeing the results on the configuration dialog. The complexity associated with adding analysis and signal processing algorithms into your measurement and automation applications is significantly reduced by using Express VIs. You configure them with dialog boxes (instead of programming) The Express VIs encompass the most common functions However, there is some overhead involved when choosing to use ExpressVIs instead of using lower level VIs The Express VIs can degrade performance (speed). Specially the Write to Measurement File Express VI should not be used for high speed data streaming in DAQ applications

Standard VIs vs. Express VIs

LabVIEW Help I Select Help»Show Context Help from the front panel or the block diagram Move the cursor over to the graphical symbol to see the help information Very useful when looking at functions in the Functions palette:

Block diagram Express VIs

Example with Express VIs Tutorial Name: Generate, Analyze, and Display (from File New)

Example with Express VIs II Block Diagram:

Example with Express VIs III Front Panel: Indicators Control

LabVIEW - Indicators Front Panel Block Diagram Select the wiring tool Right-click the VIs I/O connections

LabVIEW - Controls Front Panel Block Diagram Right-click the While Loop s stop symbol

LabVIEW Data Types Color coding of terminals and block diagram wires Floating-point numbers Integer String Dynamic Boolean The dynamic data type is a special type for use with Express VIs. Because dynamic data undergoes an automatic conversion to match the indicator to which it is wired, Express VIs can slow down the block diagram execution speed Use the Convert from/to Dynamic Data Express VI to convert dynamic data to/from numeric, Boolean, waveform, and array data for use with other VIs and functions

LabVIEW Express VI Simulate Signal Double-click for properties

LabVIEW Express VI Amplitude and Level Measurements Double-click for properties

LabVIEW Express VI Write to File

LabVIEW FFT Express VI

LabVIEW Digital Filter Express VI

Loops While Loop: Functions Programming Structures: For Loop:

Program Start, Abort execution and Error indication Start (RUN) program button Aborting a VI that uses external resources, such as external hardware, might leave the resources in an unknown state by not resetting or releasing them properly. Design the VIs you create with a stop button and use it to avoid this problem. Program Running indicator Broken arrow error in program Abort Execution button

How VIs are compiled When you push the Run button, LabVIEW (the G- compiler) translates the block diagram into clumps of machine code for your platform LabVIEW will automatically compile your VI during load, run or save (if necessary). In general, any change that is non cosmetic will set a flag indicating that the VI needs to be recompiled. When this flag is set the VI will automatically compile when you run or save. Beginning with LabVIEW 2009 and continuing in LabVIEW 2010 many optimizations were added to the LabVIEW compiler to speed up run-time performance of both VIs and executables Start (RUN) program button

Standard LabVIEW VI Example I Right-click

Standard LabVIEW VIs Example II

LabVIEW debugging techniques Execution highlighting Single-stepping Probe Breakpoints Right-click wire

Projects in LabVIEW & Executables Projects in LabVIEW consist of VIs, files necessary for those VIs to run properly, and supplemental files such as documentation or related links. Use the Project Explorer window to manage projects in LabVIEW File New Project Adding files to the project: Right-click My Computer, and select Add File.. Create a stand-alone windows application (e.g. *.exe file) You must have a project open and saved to configure a build specification. The LabVIEW Run-Time Engine must be installed on any computer on which users run the application or shared library. You can distribute the LabVIEW Run-Time Engine with the application or shared library. You can also include the LabVIEW Run-Time Engine in an installer

LabVIEW Help II

NI Example Finder Search or browse through example programs Modify an existing example program to fit your application Copy and paste from an example into your own program

LabVIEW Help III - www.ni.com

Further introduction to LabVIEW Getting Started with LabVIEW pdf file LabVIEW Fundamentals pdf file