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

Linear Control Systems LABORATORY

Dept. of Electrical, Computer and Biomedical Engineering. Data Acquisition Systems and the NI LabVIEW 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

Basic Data Acquisition with LabVIEW

Introduction to LabVIEW

Small rectangles (and sometimes squares like this

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

Getting Started with LabVIEW Virtual Instruments

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

Introduction to LabVIEW

LABVIEW LAB SKILLS ACTIVITY 1 PROGRAMING ENVIRONMENT

Certified LabVIEW Associate Developer Exam. Test Booklet

ME 224: EXPERIMENTAL ENGINEERING. Lecture 2

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

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

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

ECE 463 Lab 1: Introduction to LabVIEW

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

Introduction to LabVIEW

LabVIEW FPGA Module Release Notes

Virtual Instrumentation With LabVIEW

Certified LabVIEW Associate Developer Exam. Test Booklet

Certified LabVIEW Associate Developer Examination

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

Virtual Instruments with LabVIEW

Lab 1: Getting familiar with LabVIEW: Part I

Certified LabVIEW Associate Developer Examination

Tutorial: Getting Started with the LabVIEW Simulation Module

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

Table 1. Inputs and Outputs

Getting Started with the LabVIEW Robotics Module Version 2011

Analytical Instrumentation

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

LabVIEW programming II

A. Front Panel Design Lesson 4 Implementing a VI

Analytical Instrumentation

Virtual Instrumentation With LabVIEW

National Instruments Corporation 1 Introduction to LabVIEW Hands-On

LabVIEW Real-Time Module for Mac OS X User Manual Addendum

Exercise 5: Basic LabVIEW Programming

Lab Exercise 2: Data Acquisition with NI LabVIEW

Introduction to National Instruments LabVIEW and Data Acquisition (DAQ)

PHY 351/651 LABORATORY 1 Introduction to LabVIEW

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

LabVIEW TM Basics I Introduction Course Manual

TOP Server Client Connectivity Guide for National Instruments' LabVIEW

Getting Started with the LabVIEW Real-Time Module

LabView instrumentoinnissa, 55492, 3op Labview in instrumentation

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

2 Lab 2: LabVIEW and Control System Building Blocks

Homework Assignment 9 LabVIEW tutorial

Introduction to Labview and Temperature Measurement

OVERVIEW GOALS KEY TERMS

PC-based data acquisition I

Parallel Programming Multicore systems

Programming for the LabVIEW Real-Time Module Using LabWindows/CVI

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

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

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

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

ME 365 EXPERIMENT 3 INTRODUCTION TO LABVIEW

Lesson 4 Implementing a VI

Hardware: Acquiring Data and Communicating with Instruments

National Instruments Corporation 1 Introduction to LabVIEW Hands-On

Introduction to LabVIEW Exercise-1

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

CLAD_80.questions.

Introduction to LabVIEW 6-Hour Hands-On

Computer Interfacing Using LabView

Syllabus: Mechatronics and Engineering 3

LabVIEW FPGA Module Release and Upgrade Notes

Read Temperature Data

Data Acquisition Laboratory

LabVIEW Express VI Development Toolkit User Guide

LabVIEW FPGA Module Release and Upgrade Notes

CHAPTER 3 LabVIEW REAL TIME APPLICATION DEVELOPMENT REFERENCES: [1] NI, Real Time LabVIEW. [2] R. Bishop, LabVIEW 2009.

LabVIEW programming II

Kepware Technologies KEPServerEX Client Connectivity Guide for National Instruments' LabVIEW

ni.com Preparing for the CLAD Exam

Exercise 7-1 Preparing Files for Distribution

INTRODUCTION TO LABVIEW

ENGR 1000, Introduction to Engineering Design

Faster Time to Measurement Advances in LabVIEW Instrument Control

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

DSP First Lab 02: Introduction to Complex Exponentials

Engineering Innovation Center LabVIEW Basics

Improving the Performance of your LabVIEW Applications

ECE 202 LAB 1 INTRODUCTION TO LABVIEW

The LabVIEW Programming Environment and Basic Operations

1. Learn about LabView software and its different components

Training material. Introduction to LabVIEW

ENGR 1000, Introduction to Engineering Design

AOE 3054 LabView Programming

UNIVERSITI MALAYSIA PERLIS

JRA1 Telescope: NI Flex RIO DAQ Labview Telescope DAQ demonstration software overview

Introduction to LabVIEW and NI Hardware Platform

Transcription:

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

What is LabVIEW LabVIEW is a graphical programming environment G programming language LabVIEW contains the same programming concepts found in most traditional languages data types, loops, event handling, variables, recursion, and object-oriented programming LabVIEW is a de facto standard for measurement, test, and control systems (both in industry and academia) Graphical icons and wires resemble a flowchart Provides easy integration with thousands of hardware devices Contains large built-in libraries Available for multiple targets and OS (Windows, Mac, Linux and RTOS) http://www.ni.com/labview/whatis/

LabVIEW Hardware targets Standard PC Real-time PC Embedded controller (in a PXI system) FPGA 8-, 16-, and 32-bit microprocessors ARM Microcontrollers ARM = Advanced RISC Machine

LabVIEW Start up 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) LabVIEW demo: open new file, Controls and Functions Palette, Tools palette

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

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

Example with Express VIs II Block Diagram:

Indicators and controls Front Panel: Indicators Control

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

LabVIEW - Controls Front Panel 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 Right-click 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 LabVIEW demo - Signal generation, filtering, FFT, and Write to file

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 Help Right-click

Standard LabVIEW VIs - Example LabVIEW demo: sum of squares, help and debugging, and show context help

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

Projects in LabVIEW 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..

Creating Executables (EXE-file) Create a stand-alone windows application (e.g. a *.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 include the LabVIEW Run-Time Engine in an installer Create the EXE-file first Then, add the EXE file to the installer

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:

LabVIEW Help II Can use existing Examples as a starting point!

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