Monroe L. Weber-Shirk S chool of Civil and Environmental Engineering Learning LabVIEW ä Learning ä LabVIEW ä Data Acquisition ä Control ä Learning ä LabVIEW.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Lesson 2 Navigating LabVIEW
Based on LabVIEW 2011 Student Edition
Chapter 8 Improving the User Interface
LabVIEW Introduction Alan Jennings.
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
Course contents 1.Labview basics – virtual instruments, data flow, palettes 2.Structures – for, while, case,... – editing techniques 3.Controls&Indicators.
Introduction to LabVIEW
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.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
Monroe L. Weber-Shirk S chool of Civil and Environmental Engineering Nutrient Removal Project Project rationale Sequencing Batch Reactor Software that.
Steven Bell Team 1519 Mechanical Mayhem Atlanta FIRST Conference 2005 Teaching To Students.
Department of Electrical and Computer Engineering Texas A&M University College Station, TX Abstract 4-Level Elevator Controller Lessons Learned.
Program Design and Development
Controlled Scanning of Microtiter Plates through the Use of LabVIEW® Erica Chin Anton Edmund Samir Laoui May 14, 2008.
1 Lecture-2 CS-120 Fall 2000 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
Introduction to LabVIEW Seth Price Department of Chemical Engineering New Mexico Tech Rev. 10/5/14.
ME 411/511Prof. Sailor Data Acquisition & LabView Lecture goals… –Learn the basics of how to use and modify LabView Virtual Instruments –Become familiar.
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 4 SubVIs  Read Bishop, Chapter 4.  Lab #4 and Homework #4 due next week.
Adding Automated Functionality to Office Applications.
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
Virtual Instrumentation With LabVIEW
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
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.
Course contents 1.Labview basics – virtual instruments, data flow, palettes 2.Structures – for, while, case,... – editing techniques 3.Controls&Indicators.
LabView Basics The Fighting Pi Controls Group. About LabView LabView is a highly adaptable programming GUI (Graphic User Interface) LabView compiles the.
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.
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.
Data Acquisition Data acquisition (DAQ) basics Connecting Signals Simple DAQ application Computer DAQ Device Terminal Block Cable Sensors.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Introduction to Robo Pro
LabVIEW in 3 Hours. What is Test & Measurement? Keypad Functionality Keypad Functionality LCD Testing LCD Testing Sound Quality Sound Quality Acoustic.
Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.
LabView instrumentoinnissa, 55492, 3op Labview in instrumentation Lecturer: Heikki Ojala, room C204a
EE 211 Lecture 4 T. H. Ortmeyer Spring This week’s labs Grounding Lab Labview Tutorial.
Samuel Alberg Thrysøe, PhD, PostDoc, Kontakt info: Tlf:
Forging new generations of engineers
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.
CONTENTS Processing structures and commands Control structures – Sequence Sequence – Selection Selection – Iteration Iteration Naming conventions – File.
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
An Overview of LabVIEW by: The Software User-Interface Group!
I Power Higher Computing Software Development High Level Language Constructs.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
LabVIEW Basics Dustin Cruise. Who is this guy? Graduate Student in Mechanical Engineering at Purdue University Specialty Areas: Combustion Control Systems.
Workshop 2 of 4 Welcome!. Survey While You Wait ni.com/duke >> Recent Documents >> LabVIEW Workshop Participation Survey.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
A Presentation on Mr. SAJID NAEEM M.SC – Electronics (UOP) PG-DEP (C-DAC)
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.
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
Introduction to LabVIEW
Lesson 2: Introduction to Control programming using Labview
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
Coding Concepts (Basics)
CST-115 Introduction to Computer Programming
Introduction to LabVIEW
Introduction to LabVIEW
EET 2259 Unit 5 Loops Read Bishop, Sections 5.1 and 5.2.
EET 2259 Unit 2 Virtual Instruments
Introduction to LabVIEW
Presentation transcript:

Monroe L. Weber-Shirk S chool of Civil and Environmental Engineering Learning LabVIEW ä Learning ä LabVIEW ä Data Acquisition ä Control ä Learning ä LabVIEW ä Data Acquisition ä Control

Learning ä How do you learn the best? ä What conditions make it easiest for you to learn? ä What factors make it difficult to learn? ä How do you learn the best? ä What conditions make it easiest for you to learn? ä What factors make it difficult to learn?

Play, Fun, Curiosity ä Children learn by exercising their curiosity and by playing ä Successful students will also think of learning as fun ä Children learn by exercising their curiosity and by playing ä Successful students will also think of learning as fun

What is the role of “The Educator” ä The sage on the stage (banking theory) ä Deposit the knowledge (lectures) ä Withdraw it later (exams) ä Learners are passive recipients of sage’s wisdom ä The guide by your side ä Learners are active participants ä The sage on the stage (banking theory) ä Deposit the knowledge (lectures) ä Withdraw it later (exams) ä Learners are passive recipients of sage’s wisdom ä The guide by your side ä Learners are active participants

Take Responsibility! ä Who takes the initiative to learn? ä Educator or student? ä It’s an attitude! ä Are the tasks set by the educator chores that you get through with as little work as possible? ä Are the tasks learning opportunities that you engage in fully because you are interested in learning? ä Allow yourself to go beyond the minimum ä Learn because YOU want to learn! ä Role of confidence ä Believe in your strengths ä Be comfortable with your weaknesses ä Use all of your resources ä Ask for help ä Who takes the initiative to learn? ä Educator or student? ä It’s an attitude! ä Are the tasks set by the educator chores that you get through with as little work as possible? ä Are the tasks learning opportunities that you engage in fully because you are interested in learning? ä Allow yourself to go beyond the minimum ä Learn because YOU want to learn! ä Role of confidence ä Believe in your strengths ä Be comfortable with your weaknesses ä Use all of your resources ä Ask for help

Life Long Learning ä How will you respond when your employer asks you to do something that you didn’t learn how to do at Cornell? ä Sorry, I wasn’t trained to do that. (banking theory) ä I know where some resources are that I could use to learn how to do that. ä How will you respond when your employer asks you to do something that you didn’t learn how to do at Cornell? ä Sorry, I wasn’t trained to do that. (banking theory) ä I know where some resources are that I could use to learn how to do that.

Why should you learn LabVIEW? ä LabVIEW is the best environment for developing computer interface with the real world ä Software development in LabVIEW is 4 to 10 times faster than in text based languages ä Graphical ä No syntax errors ä No need to memorize function calls ä Automation is everywhere: as engineers you should understand how computers make decisions ä LabVIEW is the best environment for developing computer interface with the real world ä Software development in LabVIEW is 4 to 10 times faster than in text based languages ä Graphical ä No syntax errors ä No need to memorize function calls ä Automation is everywhere: as engineers you should understand how computers make decisions

Learning Software ä Curiosity ä Explore the menus, toolbars, palettes ä Right click everywhere! ä Try to figure out what the different options do ä Explore the help and example files ä Play ä Give yourself permission to be “unproductive”! ä Give yourself a challenge ä If you can’t figure something out ask a friend (or a sage) ä Don’t allow yourself to get frustrated ä Curiosity ä Explore the menus, toolbars, palettes ä Right click everywhere! ä Try to figure out what the different options do ä Explore the help and example files ä Play ä Give yourself permission to be “unproductive”! ä Give yourself a challenge ä If you can’t figure something out ask a friend (or a sage) ä Don’t allow yourself to get frustrated

Learning LabVIEW ä Learning resources ä Help ä Example files ä Right click ä Control and Function palettes ä Don’t reinvent the wheel! ä Before writing any code ask: ä Is this code that someone else might have already written? ä Where might I find an example of this code? ä Learning resources ä Help ä Example files ä Right click ä Control and Function palettes ä Don’t reinvent the wheel! ä Before writing any code ask: ä Is this code that someone else might have already written? ä Where might I find an example of this code?

Programming Overview ä Virtual Instruments (VIs) ä Front panel (Graphical User Interface) ä Block diagram (code) ä SubVIs ä A Virtual Instrument that can be called by another Virtual Instrument ä Represented by an icon ä Modular code! ä Programming Structures ä Data Structures ä Virtual Instruments (VIs) ä Front panel (Graphical User Interface) ä Block diagram (code) ä SubVIs ä A Virtual Instrument that can be called by another Virtual Instrument ä Represented by an icon ä Modular code! ä Programming Structures ä Data Structures

Virtual Instruments ä Modular pieces of code that can easily be used wherever they are needed ä Input (______) → logic → output (_______) ä Ex. Peristaltic pump calculator ä Given tubing size and pump rpm calculate flow rate ä Or inverse problem: Given tubing size and flow rate calculate pump rpm ä Modular pieces of code that can easily be used wherever they are needed ä Input (______) → logic → output (_______) ä Ex. Peristaltic pump calculator ä Given tubing size and pump rpm calculate flow rate ä Or inverse problem: Given tubing size and flow rate calculate pump rpm control indicator

Programming Structures ä Loops ä For (n times) ä Execute a fixed number of times determined before the loop executes ä While (something is true) ä Executes until the exit condition is met ä Event ä Executes when a user changes something on the front panel (usually inside a _______ loop) ä Cases (more general than if-then statements) ä Select one option from a set of options ä Sequences ä Forces code to execute in a set order ä Loops ä For (n times) ä Execute a fixed number of times determined before the loop executes ä While (something is true) ä Executes until the exit condition is met ä Event ä Executes when a user changes something on the front panel (usually inside a _______ loop) ä Cases (more general than if-then statements) ä Select one option from a set of options ä Sequences ä Forces code to execute in a set order while

Data types: Standard Types ä Numbers ä Positive integers (U8, U16, U32) ä Integers (I8, I16, I32) ä Real numbers (SGL: 6 digit, DBL: 15 digit, EXT) ä Complex numbers ä Booleans (true or false) ä Strings (text) ä Enumerated ä Graphs ä Numbers ä Positive integers (U8, U16, U32) ä Integers (I8, I16, I32) ä Real numbers (SGL: 6 digit, DBL: 15 digit, EXT) ä Complex numbers ä Booleans (true or false) ä Strings (text) ä Enumerated ä Graphs

User Defined Data Types: Arrays and Clusters ä Array ä An ordered sequence of identical data types ä The number of elements can be changed while a program is running ä Cluster ä Contains a set of data types ä The number of elements is fixed while a program is running ä Array ä An ordered sequence of identical data types ä The number of elements can be changed while a program is running ä Cluster ä Contains a set of data types ä The number of elements is fixed while a program is running

Cluster with an array with a cluster Cluster Array Cluster Array index Note: The number of elements in the array is still variable!

How do you choose a data structure? ä A well defined data structure will make your programming easier ä Example: Sensor data and Control settings ä Data that is related should be kept together ä The data should be organized in a logical manner ä The data structures will likely evolve as you build your program ä User defined data structures can be saved as type definitions (makes revising the code easier) ä A well defined data structure will make your programming easier ä Example: Sensor data and Control settings ä Data that is related should be kept together ä The data should be organized in a logical manner ä The data structures will likely evolve as you build your program ä User defined data structures can be saved as type definitions (makes revising the code easier)

Data Flow ä Data flows in wires from one SubVI to the next ä SubVIs wait until all input wires contain the necessary data to execute ä The exact order in which SubVIs execute isn’t known ä Except when there is data dependency ä Data flows in wires from one SubVI to the next ä SubVIs wait until all input wires contain the necessary data to execute ä The exact order in which SubVIs execute isn’t known ä Except when there is data dependency

Student Exercises ä Water Treatment Plant Designer ä Peristaltic pump calculator ä Enumerated type, arrays, SubVIs ä Alum dose ä Case structure ä Plant control logic ä Complex data structures (clusters) ä Boolean logic ä HMI (Human – Machine Interface) ä Water Treatment Plant Designer ä Peristaltic pump calculator ä Enumerated type, arrays, SubVIs ä Alum dose ä Case structure ä Plant control logic ä Complex data structures (clusters) ä Boolean logic ä HMI (Human – Machine Interface)

Data acquisition using Web- based Data Server Technology ä A computer (the Data Server) in the environmental teaching lab continuously monitors 128 analog channels at 100 Hz. ä The computer “listens” for any computers (Clients) that connect to it and request data ä Four commands can be sent to the data server ä Idle ä Send data continuously ä Send single sample of requested channels (used repeatedly by WTP) ä Logoff ä In addition the Client sends the Data Server a data structure with information on which channels to send and how frequently to send the data ä A computer (the Data Server) in the environmental teaching lab continuously monitors 128 analog channels at 100 Hz. ä The computer “listens” for any computers (Clients) that connect to it and request data ä Four commands can be sent to the data server ä Idle ä Send data continuously ä Send single sample of requested channels (used repeatedly by WTP) ä Logoff ä In addition the Client sends the Data Server a data structure with information on which channels to send and how frequently to send the data

Data Server SubVIs ä Logon ä Read data (inside while loop) ä Logoff ä Calibrate ä Select ports ä Apply conversions from volts to physical units ä Conversion information is stored in a global variable that is also accessed by the read data subVI ä Logon ä Read data (inside while loop) ä Logoff ä Calibrate ä Select ports ä Apply conversions from volts to physical units ä Conversion information is stored in a global variable that is also accessed by the read data subVI

Digitization ä Analog: continuously variable ä Digital: finite number of values ä Analog to Digital converter maps voltage to numbers ä Analog: continuously variable ä Digital: finite number of values ä Analog to Digital converter maps voltage to numbers

Effect of Noise on Digitization

Techniques to reduce noise ä Increase the number of bins (buy a more expensive Analog to Digital converter) ä 12 bit (used in the lab) - _____ bins ä 16 bit - ______bins ä More precisely match the voltage range of the A/D converter to the signal voltage range (apply appropriate gain) ä Over sample and average ä Sample faster than your application requires ä Increase the number of bins (buy a more expensive Analog to Digital converter) ä 12 bit (used in the lab) - _____ bins ä 16 bit - ______bins ä More precisely match the voltage range of the A/D converter to the signal voltage range (apply appropriate gain) ä Over sample and average ä Sample faster than your application requires

Control with Stamp Microprocessor ä Three SubVIs use the Sensor data and Control settings to calculate the desired valve and pump settings ä The control settings are sent to the Stamp SubVI ä The Stamp SubVI codes the settings as a string of 2 ASCII characters (letters) and sends the string to the serial port ä The Stamp microprocessor ä Reads the codes from the serial port ä Turns the correct valves on ä Sets the pump rpm ä Three SubVIs use the Sensor data and Control settings to calculate the desired valve and pump settings ä The control settings are sent to the Stamp SubVI ä The Stamp SubVI codes the settings as a string of 2 ASCII characters (letters) and sends the string to the serial port ä The Stamp microprocessor ä Reads the codes from the serial port ä Turns the correct valves on ä Sets the pump rpm