AOE 3054 LabView Programming

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

Basic Data Acquisition with LabVIEW

Linear Control Systems LABORATORY

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

2. The LabView Environment Two panes will open, one is the Front panel, and one is the Block Diagram

Getting Started with LabVIEW Virtual Instruments

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

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

ME 365 EXPERIMENT 3 INTRODUCTION TO LABVIEW

ENGR 1000, Introduction to Engineering Design

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

Homework Assignment 9 LabVIEW tutorial

Lab 1: Getting familiar with LabVIEW: Part I

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

Small rectangles (and sometimes squares like this

Read Temperature Data

Page 1 of 6. ME 3200 Mechatronics I Laboratory Lab 2: LabView Computer Systems. Introduction

Lesson 4 Implementing a VI

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

Tutorial: Getting Started with the LabVIEW Simulation Module

NAME EET 2259 Lab 3 The Boolean Data Type

Virtual Instruments with LabVIEW

Introduction to LabVIEW

OpenStax-CNX module: m Thermometer VI * National Instruments

Figure 1: Control & Simulation Loop

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

ECE 202 LAB 1 INTRODUCTION TO LABVIEW

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

The LabVIEW Programming Environment and Basic Operations

LabVIEW programming I

Computer Interfacing Using LabView

Above Threshold Warning of Temperature Data

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

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

Using LabVIEW to Send Commands via RS232 to Ontrack Control Systems ADR Interfaces

For additional information, please consult the Read-Me and Help documentation or contact Electro-Voice or Dynacord technical support.

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

Introduction to LabVIEW Exercise-1

Introduction to Excel 2013

2 Lab 2: LabVIEW and Control System Building Blocks

Introduction to National Instruments LabVIEW and Data Acquisition (DAQ)

Table 1. Inputs and Outputs

WELCOME TO LabVIEW 1

LABVIEW HANDOUT 3 CHAPTER 3: THE MATHSCRIPT NODE AND XY GRAPH

Exercise 5: Basic LabVIEW Programming

Introduction to Labview and Temperature Measurement

Automatic Operation: This is the simplest and quickest way to capture a signal, knowing little about what you are measuring.

Making Windows XP work for you

Lab 4 - Data Acquisition

A. Front Panel Design Lesson 4 Implementing a VI

Tech Memo # Software Engineering. Normal PRIORITY: DATE: April 17 th, 2015

ProPresenter #1: General Pro Setup Pt 1

Getting Started Guide

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

INTRODUCTION TO LABVIEW

Introduction to LabVIEW

3700 SERIES USER MANUAL

OVERVIEW GOALS KEY TERMS

Troubleshooting in Microsoft Excel 2002

PowerPoint Introduction

LabVIEW programming I

Basic Software Maintenance. Ham Station Ultra Software Package

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators:

Microsoft Outlook 2010 Hands On Guided Tour. Level 1

LabVIEW Express VI Development Toolkit User Guide

Developing Networked Data Acquisition Systems with NI-DAQ

How to set up an Amazon Work Profile for Windows 8

Compare and Merge Track Changes

Tips for working efficiently with Excel's fill handle

Basic Windows 95 Skills

Dice in Google SketchUp

igrafx Self-Paced Training Companion

At the shell prompt, enter idlde

Lumitester PD-30. Control Software. Instruction Manual. Table of Contents

Course Code: ServiceMaxx Overview and Snapshot Analysis Study Guide

Introduction to Word 2010

Kinesis LabView Guide

Getting Started with Milestones Professional

Section 4: Installing the ECC (Epilog Control Center)

Bridgeware Systems War Board Documentation

In this lab, you will build and execute a simple message flow. A message flow is like a program but is developed using a visual paradigm.

MICROSOFT OFFICE. Courseware: Exam: Sample Only EXCEL 2016 CORE. Certification Guide

2. Click New in the upper left corner of the standard toolbar (along the top) to open a new message box.

The Fundamentals. Document Basics

Full file at Programming in Visual Basic 2010

FLIR Tools+ and Report Studio

Links Menu (Blogroll) Contents: Links Widget

Welcome to the Microsoft Lync IM and Presence Training course. Lync is a software tool that allows you to find and connect with your coworkers.

Windows XP. A Quick Tour of Windows XP Features

Chapter 11 Programs and the Visual Programmer

Discovering Computers & Microsoft Office Office 2010 and Windows 7: Essential Concepts and Skills

Outline. Debugging. In Class Exercise Solution. Review If Else If. Immediate Program Errors. Function Test Example

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

Introduction. Slide Basics. PowerPoint 2010 Slide Basics. Video: Slide Basics in PowerPoint About Slides. Page 1

Setup support for RAMCHECK. Extensive, context-sensitive On-Line Help and Tutorials. HARD DISK INSTALLATION:

Basic Microsoft Excel 2007

Getting Results with CompactRIO and LabVIEW

TI-SmartView CE Emulator Software

New website Training:

Transcription:

AOE 3054 LabView Programming

Starting LabView Let s begin by opening LabView From the Start Menu, Locate and start LabView 8.2 If this is your first time running LabView you may get a Windows Security Alert dialog. If so, select the Unblock button. You may also get a Welcome to Labview dialog. In that case just select the Continue button.

LabView Programs National Instruments uses programs that are called VI s. This stands for Virtual Instrument. It considers each program a tool as one would use a meter or oscilloscope. To begin a new program (or VI) click the New Blank VI icon

Programming Environment What appears is the programming environment. It consists of two windows, the Front Panel and the Block diagram windows. The front panel is where we put the controls (buttons, knobs, etc) and indicators (Lights, displays or graphs). The Block Diagram is where the graphical program will be. The controls window will also appear which contains objects which can be moved to the front panel.

Programming-The C to F Converter Let s first do a simple program to convert Temperature from C to F. First we need to add a numerical control. To access the controls pallet you can either use the control pallet window, already open or open a new one by right clicking on the front panel. Right click on the Front Panel, Select Num Ctrls, Num Ctrl.

Select Numeric Control Controls Pallets hold all kinds of front panel objects. The express pallet is the third menu choice in the popup list. From it you can get to the commonly used controls. Clicking this will attach to the pointer a control outline and you can select where you want it placed on the Front Panel. Place one in the upper left portion of the panel

Rename the control Degrees C After you drop the control, it highlights the name ready for you to rename it. Just drop the control and start typing the name Degrees C. You can always go back and double click the name to change it. Changing the name as you place it will speed up programming time when you are doing large programs.

Rename the control Degrees C After you drop the control, it highlights the name ready for you to rename it. Just drop the control and start typing the name Degrees C. You can always go back and double click the name to change it. Changing the name as you place it will speed up programming time when you are doing large programs.

Observe the Block Diagram Notice the Block diagram has a terminal for the control you just placed on the front panel, and the controls pallet changes to the functions pallet.

Viewing options Block view Icon view By default Labview displaces objects on the block diagram as icons. By right clicking on an object you display the object as a smaller block which makes larger programs easier to see. Clicking the tack at the top of the express menu will allow you to keep this menu on the screen when in the block diagram

Add an indicator Similarly, place a numeric indicator using the same process only select it from the indicators pallet and label it Degrees F Be careful: An indicator is not the same as the control we just added, and is found in a different part of the pallet

Block Diagram Program Now go to the Block Diagram Page. Right clicking in LabView is the key to doing most anything. From the Diagram a right click will open a similar tool pallet, but specific to block diagram programming.

Right Click for function pallet to appear Block Diagram-Right Click

Click the tack on the express pallet to keep this pallet on the screen. Block Diagram-Right Click

Block Diagram-Right Click Like the express controls pallet, one exists for Functions. The common functions are accessed from this main pallet. Functions are grouped into categories. We will see more as we go.

Block Diagram-Right Click Search button Also try the search button on this menu as it allows you to search the vast toolbox.

Multiply Lets add a multiply function. First click the Arithmetic and Comparison button. Next click on the Numeric button. Now we can select the Multiply icon.

Multiply And place it near the Degrees C Terminal.

Add In the same manner place an addition function on the block diagram.

Constants Now hover over the lower terminal on the multiply function and right click.

Constants Hover over the menu item Create then select Constants.

Constants Then enter 1.8 for the constant value. Entering this now will save you having to select it again later.

Constants Now add a constant of 32 to the addition function.

Wiring Wiring the vi determines the flow of the data calculations. To wire the C to F converter, hover over the terminal on the right of the Degrees C Control. The cursor automatically will switch to the wiring tool that looks like a spool of wire. If it does not, select Auto from the tools pallet. Click and hover over the remaining terminal on the multiply function. Then click to set the wire in place. You can also clickdrag to connect the terminals.

Complete Wiring

Ready to Run Now, switch to the Front Panel, enter a temperature in C such as 23 in the Degrees C Control and click the run button. Check the answer produced by your code (should be 73.4)

Sub-VI s Any VI can be used by another VI. To transfer the information, we must set up a means to give the VI data and to get data from it. Terminals can be assigned to Front Panel objects. For inputs, use controls. For outputs, use indicators.

Add Terminals Right Click the Icon for the VI in the upper right corner.

Add Terminals Select Show Connector.

Set terminal pattern Depending on the number of inputs and outputs your VI will use you can select an appropriate terminal pattern by right clicking on the terminal again. Our VI has one input and one output so we select the appropriate terminal pattern from the list.

Add Terminals Click the terminal on the left.

Then click the control you want to associate it with Add Terminals

Add Terminals This control is now associated with the terminal on the left. Whatever you connect to that terminal in another vi will be used as the input data for this vi.

Add Terminals Click the right terminal. For program flow and consistency, always try to put inputs on the left and outputs on the right. So, now let s hook up the output.

Add Terminals Then select the indicator as the output.

Add Terminals This indicator is now associated with the terminal on the right. Data from this terminal is sent to the VI using this sub- VI.

Add Terminals

Save The VI From the file menu, select Save Appropriately name the VI and save in a convenient location. Close the VI. Closing the Front panel closes both windows. Closing the block diagram leaves the front panel and the VI open.

Open a new Blank VI from the File>New menu On the Block Diagram, open the functions pallet and choose a while loop (appears in the Express pallet under Exec Cntl group). Using the sub VI s

Place the While Loop Click in one corner Then click in the other corner.

Sub-VI s Right Click Add our sub-vi that we created before.

And Select Custom VI s. Custom VI s

Place the Sub-VI Right-Click over the Left terminal and select create control. Locate the vi inside the while loop and click to place it. Hover over the terminals on the left and right to see what is available.

Create Control

Add Indicator Do the same for the output on the right terminal, except select create Indicator.

Switch to the Front Panel. Complete wiring

Run the VI Run the VI as before. Notice, the VI keeps running. You can change the input control and the output will change as appropriate. Stop the VI with the Stop Button on the panel. Do not use the abort button to stop a normal while loop. The abort button is for when programming went wrong and the program will not respond otherwise.

Stopping VI s Preferred Stop button. Use this stop only when nothing else works! The abort button will halt execution immediately, which might not be good if the code needs to close com ports or save files before exiting.

What was learned about LabView? Create new VI s from the beginning. Use of numeric controls and indicators. Block Diagram Wiring and Data Flow. Creating and Using Sub-VI s. While loops.