LabVIEW and MatLab. E80 Teaching Team. February 5, 2008

Similar documents
Experiments #6. Convolution and Linear Time Invariant Systems

LabVIEW 8" Student Edition

EKT 314/4 LABORATORIES SHEET

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

ni.com Sensor Measurement Fundamentals Series

Development of 4/16-Channel Data Acquisition System Using Lab VIEW

Fourier Signal Analysis

Experiment 3 Topic: Dynamic System Response Week A Procedure

Advanced Lab LAB 6: Signal Acquisition & Spectrum Analysis Using VirtualBench DSA Equipment: Objectives:

LAB Week 7: Data Acquisition

Study of Analog Phase-Locked Loop (APLL)

HIL Simulation Lab Work

NI USRP Lab: DQPSK Transceiver Design

GENERATION OF SIGNALS USING LABVIEW FOR MAGNETIC COILS WITH POWER AMPLIFIERS

EET 438a Automatic Control Systems Technology Laboratory 1 Analog Sensor Signal Conditioning

4 Experiment 4: DC Motor Voltage to Speed Transfer Function Estimation by Step Response and Frequency Response (Part 2)

LAB #7: Digital Signal Processing

LAB II. INTRODUCTION TO LABVIEW

Lab VIEW Programming for Vibration Analysis

CHAPTER 7 HARDWARE IMPLEMENTATION

II. LAB. * Open the LabVIEW program (Start > All Programs > National Instruments > LabVIEW 2012 > LabVIEW 2012)

ME 365 EXPERIMENT 8 FREQUENCY ANALYSIS

Experiment 3 Topic: Dynamic System Response Week A Procedure

GE 320: Introduction to Control Systems

MEC751 Measurement Lab 2 Instrumented Cantilever Beam

Unprecedented wealth of signals for virtually any requirement

Data acquisition and instrumentation. Data acquisition

Auntie Spark s Guide to creating a Data Collection VI

Lab 0: Introduction to TIMS AND MATLAB

Faculty of Information Engineering & Technology. The Communications Department. Course: Advanced Communication Lab [COMM 1005] Lab 6.

An Introductory Guide to Circuit Simulation using NI Multisim 12

Physics 472, Graduate Laboratory DAQ with Matlab. Overview of data acquisition (DAQ) with GPIB

LV-Link 3.0 Software Interface for LabVIEW

Considerations for Analog Input and Output

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2017 Lecture #5

Using Signal Express to Automate Analog Electronics Experiments

PC-based controller for Mechatronics System

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

SonoLab Echo-I User Manual

EET 150 Lab Activity 13 On-Line Students Temperature Logging and Display Analog Discovery 2

IT.MLD900 SENSORS AND TRANSDUCERS TRAINER. Signal Conditioning

P a g e 1 ST985. TDR Cable Analyzer Instruction Manual. Analog Arts Inc.

CHAPTER 4 IMPLEMENTATION OF ADALINE IN MATLAB

AC : A LOW-COST LABORATORY EXPERIMENT TO GEN- ERATE THE I-V CHARACTERISTIC CURVES OF A SOLAR CELL

Measurement & Control of energy systems. Teppo Myllys National Instruments

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments

A Rapid Graphical Programming Approach to SDR Design and Prototyping with LabVIEW and the USRP

Emant Pte Ltd BRIDGE SENSOR APPLICATION ADAPTOR FOR EMANT300, EMANT380

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

EITN90 Radar and Remote Sensing Lab 2

PHY 351/651 LABORATORY 5 The Diode Basic Properties and Circuits

AC : THE UBIQUITOUS MICROCONTROLLER IN MECHANICAL ENGINEERING: MEASUREMENT SYSTEMS

sin(wt) y(t) Exciter Vibrating armature ENME599 1

ME 144L Prof. R.G. Longoria Dynamic Systems and Controls Laboratory. Department of Mechanical Engineering The University of Texas at Austin

ELEC3104: Digital Signal Processing Session 1, 2013

Multiple Instrument Station Module

Electronics Design Laboratory Lecture #1, Fall 2014

King Fahd University of Petroleum and Minerals. Department of Electrical Engineering

Dept. of Electrical, Computer and Biomedical Engineering. Data acquisition from a temperature sensor

ELECTRIC MACHINES (TRANSFORMERS)

ENGR 210 Lab 12: Sampling and Aliasing

EE 368 Electronics Lab. Experiment 10 Operational Amplifier Applications (2)

LabVIEW Based Instrumentation and Experimental Methods Course

Laboratory Experiment #1 Introduction to Spectral Analysis

ELG3336 Design of Mechatronics System

Theoretical 1 Bit A/D Converter

DC and AC Circuits. Objective. Theory. 1. Direct Current (DC) R-C Circuit

ANALOGUE AND DIGITAL COMMUNICATION

DATA CONVERSION AND LAB (17.368) Fall Class # 07. October 16, 2008

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

Basic Analog Circuits

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

Real-time Data Collections and Processing in Open-loop and Closed-loop Systems

EE 422G - Signals and Systems Laboratory

EET 223 RF COMMUNICATIONS LABORATORY EXPERIMENTS

Each individual is to report on the design, simulations, construction, and testing according to the reporting guidelines attached.

Application of Gain Scheduling Technique to a 6-Axis Articulated Robot using LabVIEW R

A SMART METHOD FOR AUTOMATIC TEMPERATURE CONTROL

Load Cells, LVDTs and Thermocouples

Laboratory Preliminaries and Data Acquisition Using LabVIEW

Sfwr Eng/TRON 3DX4, Lab 4 Introduction to Computer Based Control

DESIGNING A VIRTUAL MACHINE FOR IDENTIFICATION OF CARDIAC ARRHYTHMIAS USING LAB VIEW

DT 9818 Waveform-Generator. Hardware Trigger Version. Operating Manual. Version 2.0. May Page 1 of 21

Using the CODEC ReadMeFirst

Linear Motion Servo Plants: IP01 or IP02. Linear Experiment #0: Integration with WinCon. IP01 and IP02. Student Handout

Introduction to NI LabVIEW and Computer-Based Measurements. Elias Nicolas Applications Engineer National Instruments

Laboratory set-up for Real-Time study of Electric Drives with Integrated Interfaces for Test and Measurement

Lab 2: Introduction to NI ELVIS, Multisim, and LabVIEW

Revision: June 10, E Main Suite D Pullman, WA (509) Voice and Fax

This manual describes the Motion Sensor hardware and the locally written software that interfaces to it.

Electronics I. laboratory measurement guide

Data Conversion and Lab (17.368) Fall Lecture Outline

ENG 100 Lab #2 Passive First-Order Filter Circuits

Design of PID Control System Assisted using LabVIEW in Biomedical Application

EE354 Spring 2016 Lab 1: Introduction to Lab Equipment

DEPARTMENT OF INFORMATION ENGINEERING. Test No. 1. Introduction to Scope Measurements. 1. Correction. Term Correction. Term...

Lab 2A: Introduction to Sensing and Data Acquisition

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Test No. 1. Introduction to Scope Measurements. Report History. University of Applied Sciences Hamburg. Last chance!! EEL2 No 1

Dept. of Electrical, Computer and Biomedical Engineering. Inverting and non inverting amplifier

Transcription:

LabVIEW and MatLab E80 Teaching Team February 5, 2008

LabVIEW and MATLAB Objectives of this lecture Learn LabVIEW and LabVIEW s functions Understand, design, modify and use Virtual Instruments (VIs) Construct (modify) and use data acquisition applications for acquiring and processing digital and analog signals supplied by sensors, transmitters,

Outline Basics of LabVIEW Mathscript and LabVIEW Data Acquisition with LabVIEW MATLAB

What is LabVIEW? Laboratory Virtual Instrument Engineering Workbench A Graphical Program Development Environment Used in some of the most advanced R&D labs (JPL, Siemens Medical, ) Has been around since 1980 The best way to learn LabVIEW is to PRACTICE, PRACTICE, PRACTICE Highly Addictive!

What is the use of LabVIEW in E80? We will use LabVIEW to. Monitor and connect to sensors and measurement devices in an experiment Retrieve signals using data acquisition platforms controlled by LabVIEW Process data and represent them in a meaningful, efficient way Consolidate all the data obtained in the experiment to perform analysis Video: LabVIEW and Rubik Cube!

Where can I find LabVIEW? Your E80 laptops will have LabVIEW 8.2.1 installed on them You can install LabVIEW on your PC using the CD that comes with your you textbook There are lots of information about LabVIEW that you can find on the web and on National Instrument s web page: www.ni.com/labview/

The very first step? 3 1 This is what you see if you run LabVIEW On your PC 2

Basics LabVIEW programs are called Virtual Instruments (VIs) Front Panel Controls = Inputs Indicators = Outputs Tip: Every LabVIEW vi has a Front Panel and a Block Diagram Block Diagram Behind the scene Components wired

The Front Panel

The Block diagram Tip: Use Ctrl-E to switch between front panel and block diagram

Basic Functions

Tools Palette Activating Tools Palette

VIs and Functions

Example 1 : Simple Conversion R = V V V R ref ref Goal: Convert voltage to resistance 1) Have an input signal in volts coming from a thermistor 2) Know the conversion equation between the voltage received and the resistance desired 3) Need an interactive vi to show us the resistance for input value of voltage Input and Refs. Display

Example 1 : Simple Conversion R = V V V R ref ref Goal: Convert voltage to resistance 1) Have an input signal in volts coming from a thermistor 2) Know the conversion equation for the voltage read, and resistance 3) Need an interactive vi to show us the resistance for input value of voltage Input and Refs. Operations Output Tip: Use Ctrl-E to switch between front panel and block diagram

Demonstration I

Example 2 : Thermistor Calculation Goal: Calculate temperature from measured resistance 1) Know the conversion equation for the resistance read 2) Have constants in the equation 3) Calculate temperature in C 4) Convert temperature to K Input Constants Results

Example 2 : Thermistor Calculation o 1 T K = A + B ln + ( R) C[ ln( R) ] 3 o T K = T o C + 273.15 Input Constants Unbundled (see Ch. 7) Mathscript ( similar to MATLAB)

Demonstration II

Example 3 : Function Generator Goal: Make a function generator that 1) Allows choosing signal type, varying frequency, amplitude, offset, phase, 2) Displays the signal graphically 3) Addresses sampling rate and tracking of the signal Controls Controls Display

Example 3: Function Generator Method: Use available modules as building blocks and wires as connection tools for flow of data/commands to Tie elements to each other in an interactive, repetitive platform. Numerical Data While Loop (Ch. 6) Function Generator VI (Express) Tip: Use Ctrl-H and point on a component for a pop-up help window Display

Example 3: Function Generator

Example 3: Numeric Data Types

Demonstration III

LabVIEW Mathscript A LabVIEW tool for executing textual mathematical commands Matrix and vector based calculations (linear algebra) Visualization of data in plots Running scripts containing a number of commands written in a file A large number of mathematical functions. An overview is given later in this document. MathScript command are equal to MATLAB commands (some MATLAB commands may not be implemented).

LabVIEW Mathscript

How do I use Mathscript? MathScript can be used in two ways In a MathScript window as a desktop mathematical tool independent of LabVIEW In a MathScript node which appears as a frame inside the Block diagram of a VI (available on the Functions / Mathematics / Scripts & Formulas palette.)

Example 4: Plotting a sine wave Run Plot Script Editor t=[0:.1:100]'; x=-1+0.02*t; y=sin(0.2*t); figure(1) plot(t,y,'b-') %x(t) in dashed red. y(t) in solid blue. xmin=0;xmax=100;ymin=-2;ymax=2; axis([xmin xmax ymin ymax]) grid xlabel('t [sec]') ylabel('x (red, dashed) og y (blue, solid) [Volt]') title('data from Experiment 1')

Demonstration IV

Example 5: Embedded Mathscript o 1 T K = A + B ln + ( R) C[ ln( R) ] 3 T o C = T o K + 273.15 Tip: Get MathScript module from Functions tools, under Programming/Structures

Data Acquisition (DAQ) with LabVIEW This is where E59 and E80 merge! You saw sampling, aliasing, discrete and continuous signals, Bode plot and E59 Now you will acquire those signals in real experiments LabVIEW helps you as a tool collecting and displaying data

What is the use of data acquisition? Sensors or transducers as our sensing tools convert physical signal to an electrical signal. 1) Need DAQ devices to grab those signals and hand them to computer for display and processing 2) May need to control the flow of data from our transducers (triggering) 3) Will convert continuous time signals to digital which is suitable for computers Fig 9.1 DAQ devices can be internal (PCI cards) or external (USB)

Types Of Signals Fig 9.2 Fig 9.2 State Rate Level Shape Frequency Content Fig 9.4

Signal Conditioning Electrical signal from a transducer may not be very suitable for Analog-to-Digital converters.? Signal conditioning (filtering, amplifying, ) DAQ LabVIEW Fig 9.4 Note: Your DAQ may include built-in signal conditioning

BNC-2090 DAQ at Mudd Input Signals (Digital/Analog) To Laptop Timing and triggering BNC-2090 DAQ Digital Signals

LabView and DAQ in the lab Circuit or Sensor DAQ Laptop MeansCalcRes.vi RDASTelemCalcRes.vi RDASRawFileRead.vi BNC to ACH0 SHC68-68-EPM Cable DAQ Laptop Signal Generator Laptop RS232 to USB TestFuncGen.vi circuit 1 Signal Generator GenBodePlot.vi

Matlab Most of the concepts discussed for LabVIEW are valid for MATLAB Key differences: 1) MATLAB has it s own language and commands 2) Unlike LabVIEW, mainly commands and scripts are needed to run the code 3) To interface the DAQ and other instruments with MATLAB need MATLAB drivers

Summary Remember the following tools/skills/knowledge Knowing basic electrical measurement techniques Understanding the concept of sensors/transducers Acquiring data from sensors instrumentation Communicating with the PC using DAQ Analyzing and presenting the data