Ch En 475: Introduction to Instrumentation and Signal Processing with Labview

Similar documents
Ch En 475: Introduction to Instrumentation and Signal Processing with Labview

Determination of Drag Coefficient

Lab Exercise 2: Data Acquisition with NI LabVIEW

PHY 351/651 LABORATORY 1 Introduction to LabVIEW

STATE COLLEGE OF NEW YORK COLLEGE OF TECHNOLOGY CANTON, NEW YORK COURSE OUTLINE MFGT INSTRUMENTATION AND CONTROLS

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

Introduction to Labview and Temperature Measurement

Strain and Force Measurement

LabVIEW Tutorials. T.1 Temperature Measurement and Cold Junction Compensation (CJC) LUMS School of Science and Engineering

Version 1.1. COPYRIGHT 1999 Tufts University and Vernier Software. ISBN (Windows) ISBN (Macintosh)

Homework Assignment 9 LabVIEW tutorial

OpenStax-CNX module: m Thermometer VI * National Instruments

Data Acquisition Laboratory

Engineering Project-I. Module 1: Familiarization of LabVIEW and the Vernier Toolkit

Data acquisition hardware

Data Acquisition HANS-PETTER HALVORSEN,

ENGR 1000, Introduction to Engineering Design

Basic Data Acquisition with LabVIEW

Small rectangles (and sometimes squares like this

Introduction to National Instruments LabVIEW and Data Acquisition (DAQ)

To demonstrate wide range of experiments, applications and advanced control techniques using industry standard instrumentation and controls.

Industrial Wet/Wet Differential Pressure Transducer

Using DataQuest on a Handheld

Computer Interfacing Using LabView

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

Purpose of Today s Presentation

Computer Essentials Session 1 Lesson Plan

1. Learn about LabView software and its different components

Scanner 2000 microefm QuickStart. Installing the Scanner Remote Mount. Direct Mount NUFLO. Part No , Rev. A

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

Logger Pro Resource Sheet

Clamp-On Digital Multimeters

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

ENGR 1000, Introduction to Engineering Design

Data Acquisition in LabVIEW

User Manual Digi-Sense 12-Channel Benchtop Data Logging Thermocouple Thermometer

NI mydaq HANS-PETTER HALVORSEN, Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

University of Michigan Department of Aerospace Engineering 5ft 7ft Wind Tunnel Data Acquisition Bible

Using LabVIEW. with. BiPOM Boards. Quick Start Guide. Document Revision: Date: 18 September, 2009

Conductivity Transmitters

Appendix C. Vernier Tutorial

INTRODUCTION TO LABVIEW

Appendix E: Software

Create a worksheet that collects, displays and saves temperature data

Tutorial - Introduction to LabScribe and the IX-ELVIS

NAME EET 2259 Lab 3 The Boolean Data Type

Purpose of Today s Presentation

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

The LabVIEW Programming Environment and Basic Operations

Install the Software and Hardware

EDX-10 Series. Compact Recording System

Hardware: Acquiring Data and Communicating with Instruments

Digital Panel Meters

Read Temperature Data

Labview. Masood Ejaz

Physics 101, Lab 1: LINEAR KINEMATICS PREDICTION SHEET

Honeywell HC-900 with Acromag 967EN Modbus/TCP Module as Remote I/O

Datalogging in LabVIEW

Vernier SensorDAQ User s Manual

CONTENTS. 1- INTRODUCTION 1.1 Introduction 1.2 General Applications and Benefits 1.3 Identification 2- HARDWARE

Labview Lab 2. Vern Lindberg. April 16, 2012

TMA Standard Operating Procedure [Updated April 30, 2015]

CHAPTER IV Computerized Data-acquisition Systems

Above Threshold Warning of Temperature Data

Appendix 1: DataStudio with ScienceWorkshop Sensors Tech Tips

EDX-10 Series. Compact Recording System

Expandable Modular Data Acquisition System inet-400 Series

Standard Operating Procedure For The Kaye Validator 2000 Thermal Mapping System

LABVIEW LAB SKILLS ACTIVITY 1 PROGRAMING ENVIRONMENT

Using LoggerPro. Nothing is more terrible than to see ignorance in action. J. W. Goethe ( )

Quick Start Training Guide

The data acquisition components, and their relationship to each other, are shown below.

MadgeTech 4 Software User Guide:

TNG-3B derives its operating power from the serial port. The DTR, RTS, and both data lines are all used, and must be properly connected.

Advanced NI-DAQmx Programming Techniques with LabVIEW

Technical Note: Integrating a C-sense pco 2 Sensor to a Sea-Bird Electronics SBE 19 CTD

GEORGIA INSTITUTE OF TECHNOLOGY School of Electrical and Computer Engineering ECE 2020 Fall 2017 Lab #1: Digital Logic Module

Tutorial 3: Using the Waveform Viewer Introduces the basics of using the waveform viewer. Read Tutorial SIMPLIS Tutorials SIMPLIS provide a range of t

Lab 4 - Data Acquisition

Module 2, Add on lesson Introduction to the NXT and Mindstorms software. Student. 45 minutes

Kulite DAQ. Data Acquisition Software User s Manual. Version 3.2.0

2 Lab 2: LabVIEW and Control System Building Blocks

Level control with DeltaV using MPC

User Manual for Portable National Instruments Board, Bridge Amplifiers, and VI Logger Software

You will be prompted to start video or register now, exit out of this pop up to continue to the program

ME 365 EXPERIMENT 3 INTRODUCTION TO LABVIEW

Microsoft Word for Report-Writing (2016 Version)

LABORATORY USE OF A MICROCOMPUTER (Last Revision: August 27, 2000)

Fox Thermal Instruments, Inc.

ECE 451 Automated Microwave Measurements Laboratory. Experiment No. 2. Automated RF Power Detection Using LabVIEW

LABQUEST 2 DATA LOGGER

Spectroscopic Analysis: Peak Detector

5450 NW 33rd Ave, Suite 104 Fort Lauderdale, FL Fruitland Ave Los Angeles, CA UM Channel Monitor.

Notes on installing and using the OM-USB-5201 and OM-USB-5203 data logging devices

C100 Portable Multifunction

Operation Manual for Multifunctional Data Logger. HUATO Electronic Co., LTD.

Module 2, Add on lesson Introduction to the NXT and Mindstorms software. Teacher. 45 minutes

0 Graphical Analysis Use of Excel

Forston Labs LabNavigator

Linear Control Systems LABORATORY

Transcription:

Ch En 475: Introduction to Instrumentation and Signal Processing with Labview Measurement Instrumentation Rapid, on-line measurement of temperature, pressure, liquid level, flow rate and composition is extremely important in the chemical process industry. Electronic communication of that information from the measurement sensors to a computer interface for data analysis and process control is also essential for safe and effective operation of processes. The two components of a process transducer to make and transmit properties are shown here: measured process variable Sensing Element Transducer Transmitter output signal Most industrial analog now has a standard output range of 4 20 ma or 1 5 VDC. Some common sensors are shown in the table below. Generally the process variable is not measured directly but obtained from a relationship between the measurable property and the desired process variable. For example, RTDs measure resistance but the resistance of the sensing element directly changes with temperature. Orifice and Venturi flow meters measure a pressure drop across an obstruction to obtain the velocity from the Bernoulli relation. Temperature Flow Pressure Level Thermocouple Orifice Bourdon tube Float Thermister Venturi Diaphragm Head device Resistance Temperature Rotameter Bellows Electrical conductivity Detector (RTD) Turbine Strain gauge Vortex-shedding Piezoelectric Thermal mass Piezoresistive It is important to keep in mind the INPUT and OUTPUT characteristics of the transducer that you are using to make a measurement. Generally transducers come stamped or marked with a Zero (Z) value, which is the minimum detectable limit of the sensor, a span (S) which is the range or difference between the maximum and minimum input limits. The gain (K) for the transducer is given by KK = OOOOOOOOOOOO IIIIIIIIII = OOOOOOOOOOOO rrrrrrrrrr SSSSSSSS 1

As most transducers are designed to be linear, the gain represents the slope of a straight line when the output variable is plotted against the input variable. (Note: Labview uses a scaling factor to convert from the line signal that it receives to display information in the units of the measured variable. This scale factor is therefore the reciprocal of the transducer s gain.) A linear equation can be used to determine the output, y, from any input variable, x. Thus, yy = KK(xx ZZ) + OO where O is an offset or the value of y when the input value is at the lower limit Z. For example, suppose a temperature transducer has the following specifications: Z = 50ºC, S = 100 ºC (note that the maximum temperature for which this transducer can be used is 150 ºC) with a standard output of 4 20 ma. The gain for this transducer is KK = 20 ma 4 ma 100 = 0.16 mmmm/ and the output from the transducer for a measured temperature, T, would be Signal Processing yy = 0.16 ma (TT 50 ) + 4 ma Once an output signal has been transmitted from a sensor as an analog (or digital) signal, the information needs to be sampled, collected, converted to units of the process variable measured, and made available to you for further analysis and/or to a controller which can then output a response to the final control element, most often a control valve. In the past we have had a Bailey central control system that provided these functions. In the on-line documents for the various projects, you will likely still see instructions on using the Bailey with the apparatus in the UO Lab. However, beginning Fall Semester 2010, the UO Lab has been switched to a distributed control system with individual electronic devices supply the signal to a PC and Labview software provides the signal processing functions and control output mentioned above. This relationship is illustrated here: VI DEVICE A/D converter Front Panel Block Diagram Transducers Analog Input Channels, ai n Computer running Labview 2

Multiple transducers can be used to measure flow, temperature, etc., at various locations within the process and Labview controls through which channel of the device the data are received and at what sampling rate for each transducer. Labview then converts the data to the process variable units for that transducer and allows the user to visualize, analyze, store and manipulate the data collected for the measured process variables as well as to set up a control loop to provide both open- and closedloop control of the control variable. The projects you will do in ChEn 475 have been interfaced with Labview for you, but to work effectively with the control and measurement system in the lab, you should have a good understanding of how the interface and software work. In Labview, measurements are set up as Virtual Instruments (VI). The user interface consists of a Block Diagram area and a Front Panel area. You create the user interface that you will see in the Front Panel window. This window will contain all of the virtual buttons, meters, output displays, controls, etc., to provide the user with the measured information from the process and control of the process. The GUI interface in the Front Panel is created by dropping control and display objects from tool palettes. It is what will be seen when RUN is selected to initiate measurements and control. As the GUI is created in the Front Panel, icons of the controls and objects dropped into the interface are also displayed in the Block Diagram window. In addition to creating the user interface, you must also tell Labview where to get signals, how to process them, and where to send that information in the objects available in the GUI you created. The Block Diagram allows you to make interconnections between the objects and to define how the signal is treated by the objects. The remainder of this document is a simple, introductory tutorial illustrating how one can use Labview to connect two analog transducers for automated measurement of flow and pressure in a pumped system. It shows the steps of creating the VI, setting up the Front Panel, and making connections in the Block Diagram. At the end of the tutorial, you will have a working interface to sample and visualize the pressure and flow rate measurements made in a system pumping water. Configuring Pressure and Flow Rate Transducers (Analog Inputs) in Labview Set Up the Control Loop LabVIEW allows you to create a graphical user interface that has switches, gauges, and other devices. You essentially create a program which begins to run when you start it and shut it down when you stop it. This is accomplished by putting everything in a while loop. 1. Open a new, blank VI in LabVIEW and separate the front panel and block diagram (control T). 2. Right-click on the block diagram and expand the Functions window by clicking on the to expand the box. 3. Navigate to Express>>Exec Control and click on While Loop with button 4. Draw a loop on the block diagram. Your window should resemble the one shown here: 3

Note: This while loop comes with a stop button pre-attached (see front panel for the button), chosen for convenience, as opposed to the while loop found in Programming>>Structures, where a stop button would need to be manually added in the front panel and attached in the block diagram. A while loop tells Labview to do what is in the loop while the VI is running. The stop button tells it when to stop executing the command and is necessary for this type of application. Configure the Flowrate Sensor 1. Right-click on the block diagram and navigate to Functions>>Express>>Input>>DAQ Assistant. 2. Place the DAQ Assistant inside the while loop on the block diagram, you will see a configuration box. a. Choose Acquire Signals>>Analog Input>>Voltage. b. You will then see a page with the DAQ devices listed. Note: The DAQ Assistant represents the physical module that one uses to collect data or send signals. There can be input DAQs or output DAQs. An input DAQ collects information, while an output DAQ sends out signals, in this application to power devices. There needs to be one DAQ Assistant for every physical module attached to the computer. The NI-6008 comes pre-configured to read voltage signals (mostly 1-5 Volts), while the NI-9211 comes pre-configured to read thermocouples (other DAQs can read them but would require specific scaling parameters to have accurate temperature readings). For this tutorial, you will use only an input DAQ assistant. For the PBL you will you both input and output DAQs. On an output DAQ, one chooses generate signal >> digital output (note: the input DAQ is analog) and either line (for one channel) or port (for all channels on the module). Then timing setting are usually designated as 1 sample on demand. 4

3. This window allows you to configure what the analog signal from channel ai0 will do. 4. Change the name of the channel from Voltage to Flowrate. a. Right-click on the word Voltage and select Rename. b. Change the name to Flowrate. 5. The flow meter is made by the McMillian Company (model 13157) which has provided the following calibration data (Also available at http://uolab.groups.et.byu.net/files/labview/labhints.htm). 5

Figure 1 Calibration data for the flow meter. a. The flow meter outputs a voltage. b. At 5.0 volts, the flowrate is 1.0 L/min. At 0.50 volts, the flowrate is 0.1 L/min. Labview now needs to be told this information so that the output will read in L/min. 6. Under the Custom Scaling box, select Create New. 7. You have several options available to calibrate this signal. a. Linear: Allows you to specify a slope and intercept (gain and offset). The calibration data shown in Figure 1 are fairly linear so they could be fit to a straight line (in Excel or Mathcad) and the resulting slope and intercept could be used. b. Map Ranges: Allows you to input two points for the ranges of input and output. Labview then assumes a straight line model to obtain the gain. Two of the points in Figure 1 could be used with this option. c. Polynomial: Allows you to specify the coefficients in a polynomial. The coefficients are obtained by fitting the calibration data in Excel or Mathcad. 6

d. Table: If the calibration data don t seem to follow either a polynomial or a straight line, a table of data can be entered. LabView will then interpolate linearly between the table points. 8. Select Linear and rename the calibration Flow Meter Linear. a. Figure 2 contains a linear fit of the calibration data found in Figure 1. 1.2 Flowrate (L/min) 1.0 0.8 0.6 0.4 y = 0.20006x R² = 0.99999 0.2 0.0 0.00 1.00 2.00 3.00 4.00 5.00 6.00 Voltage (V) Figure 2 Fit of flowmeter calibration data to a straight line model. b. In the Scaling Parameters, change the slope to 0.20 and the intercept to 0. Note: Labview is doing the opposite of what the transducer does the input for Labview is the line signal (voltage in this case) and the output is the flow rate. The scale factor is therefore the inverse of the gain that the transducer uses to produce the line signal from the measured variable. c. In the Units, type L/min in the Scaled box. d. Click OK. This will return you to DAQ configuration window. e. Under Settings under the Voltage Input Setup, change the Signal Input Range to correspond to the min and the max of the calibration curve for the scaled output (L/min). i. Change the Max to 1 and the Min to 0. ii. Ensure that L/min is found in the Scaled Units box. 9. Set the timing settings. a. The timing settings affect how often LabVIEW the read the input from the channel. b. Select Continuous Samples from the Acquisition Mode box. 10. Once done, your window should look like this: 7

11. Click OK. Configure the Pressure Sensor 1. To configure the pressure sensor, begin in the DAQ window, click on the button under Channel Settings, and select Voltage. 2. Select channel ai1 on the device and click OK. This will cause another channel to appear in the Channel Settings box. 8

3. Rename this channel from Voltage to Pressure. 4. The pressure sensor is made by Cole Parmer. The label on the sensor indicates the voltage range to be 1 to 5 volts and the maximum pressure to be 30 psig. a. This means that at 5 volts, the pressure is 30 psig. b. Though not explicitly stated, you can assume the pressure is 0 psig at 1 volt. 5. Tell LabVIEW the scaling by selecting Create New under the Custom Scaling box. 6. Select Map Ranges a. Name the scale Pressure Calibration. b. Change the Pre-Scaled Maximum value to 5 and the Minimum value to 1. c. Change the Scaled Values to 30 and 0 for the maximum and minimum respectively. d. In the Units, type psig in the Scaled box. e. Click OK. This will return you to DAQ configuration window. f. Under Settings under the Voltage Input Setup, change the Signal Input Range to correspond to the min and the max of the calibration curve for the scaled output (psig). g. Set the timing settings by selecting Continuous Samples from the Acquisition Mode box. 7. Once done, your window should look like this. 9

8. Click OK and your block diagram should now look like the following: 10

Add the Gauges to Display the Measured Pressure and Flow Rates Now that LabVIEW knows how to interpret the signals sent to the board, you need to provide a convenient and useful display of the output results for the user in the GUI you are developing in the Front Panel window. 1. On the Front Panel, right-click and navigate to Numerical Indicators. 2. Select Gauge and place the gauge on the front panel. (This gauge will be used to output the pressure.) 3. Right-click on the gauge and select Properties. 4. On the Appearance tab, change the Label to Pressure psig. 5. On the Scale tab, change the Scale Range minimum to 0 and the maximum to 30. 6. Click OK and rescale the gauge to the desired size by dragging on the Front Panel. 7. Using a similar procedure, add a digital output (Right-click>>Num Inds>>Num Ind) for the pressure. Rename as appropriate. 8. Using a similar procedure, add a Meter and a Num Ind for the flowrate. (Don t forget to rename each gauge and change the range.) 9. Your window should now look like the following: Connect the Gauges to the DAQ All that remains is to connect the gauges to the DAQ and set up the interrelationships of the objects you have created in the user interface. 11

1. Right-click on the block diagram and select Sig Manip>>Split Signals. (Note: on some machines you may have to search a little for this, but you should be able to find it under Express > Signal Manipulation > Split Signals. 2. Place the signal split icon on the block diagram as shown: 3. Drag the signal split down just enough to create two signals. 4. Connect the top signal (ai0 - the analog input channels are numbered from ai0 down starting at the top of the icon) to one of the flowrate boxes. 5. Connect the bottom signal (ai1) to one of the pressure boxes. 12

6. Beginning at the unconnected flowrate box, drag a line to the middle of the line currently connecting the signal splitter and the first flowrate box. 7. Do the same thing for the unconnected pressure box. 13

8. Finally, connect the DAQ to the splitter by drawing a line from the arrow next to the word data to the signal splitter. 9. If your block diagram is somewhat unorganized and lines are hidden or blocked, you can clean the diagram up by dragging objects around to where you want them (and the lines will follow and change with the drag), by right clicking on the wire and selecting Clean up Wire or you can simply press CNTRL+U, which will organize the Block Diagram for you. 10. Now you are ready to go into the lab and connect up the actual equipment. Labview will help you make the right connections. a. Right click on the DAQ and select Properties. b. Select the Connection Diagram tab in the upper pane. c. Selecting the Flow Rate channel and Labview will show the pin out for connecting the flow transducer to the device; selecting the Pressure channel will show the pin out for the pressure transducer. You may see something like on the last page. Create Temperature DAQ This section will cover how to make a new DAQ assistant for the thermocouple. Most of the steps will be omitted to test what you have learned. 1. Create a new DAQ assistant to use a thermocouple input within the while loop 2. Specify the thermocouple type within the configuration tab (look at the connector to determine type) 3. Set the acquisition mode to match the pressure/flow DAQ 14

4. Create two read outs on the front panel Create Write to Measurement file loop Now you will learn how to write the flow, pressure and temperature data to a measurement file. At this point your block diagram should look something like what is shown on the next page: (It is not intended that you copy the front panel indicators. The indicators pictured here are not likely to be used for this application. They are intended to be place holders, allowing you to learn the idea and then apply it to your system.) 1. Add a case structure loop to the right of the temperature DAQ Programming >>Structures>>Case Structure 15

2. Right click the green question mark of the case structure and select Create Control. This will create an on/off Boolean switch in the front panel with a corresponding figure wired to the loop, which can be retitled as appropriate. 3. Place a write to measurement file inside the case structure Programming>>File I/O>>Write Meas F.. 4. Choose parameters for the file. The ones chosen as follows allow for new data to be appended or added each time data is written saved in an Excel file with one time column. It is recommended that the file be saved on the students J:\ drive. Click OK. The block diagram should look as on the next page. 16

17

5. Now connect the data channels from both DAQs to the signals input on the write to measurement file using a merge signals found in Express>>Sig Manip>> Merge Signals. The lines should be branched, meaning the wire spool cursor should be held over the wire until it is blinking and then clicked. On the flow/pressure DAQ the line should be taken before the split signal. It will look something like below: 18

Create Digital Output to Start/Stop Pump Labview allows one to send out a signal as well as process an incoming one. In this part you will configure a digital output that will allow you to start and stop the peristaltic pump. 1. Right-click on the block diagram and navigate to Functions>>Express>>Output>>DAQ Assistant Note: Like the Input DAQ, each output DAQ represents a physical module (or in this case a side of one the NI USB-6008). You can tell the difference between the input and output DAQ by the way the arrow points from data. 2. The DAQ will then process and open a dialogue box as shown below. Here you want to generate a signal that is a digital output. There are two options line or port output. Line means one channel. Port means every channel. Here choose line output. 3. Next you will be prompted to select the channel where the output will be attached. Take a moment to review the digital terminal assignments for the USB-6008, found on the UO Lab webpage under hints for the instrumentation and labview experiment (or follow the hyperlink). Note where the digital output are on the USB-6008. In this case select Port 0/line 0 and then click finish. 19

4. A dialogue will pop up that will ask you to invert the line and allow you to change the timing settings. Keep these on 1 sample on demand. 5. The last task is to create a control (on/off button) for the pump and wire it to the DAQ. The way it is wired, what is normally thought of as on (i.e. a lighted indicator) will be off. Keep switched as demonstrated below when the pump is off. 20

6. The system is now ready to be wired. Double click on either DAQ Assistant, click on the Connection Diagram in the upper left and a diagram like below will appear. 7. The positive and negative wires for the flow meter and pressure transducer are found in the hints folder on the UO Lab website under Transducer instructions and flow sensor instructions. The thermocouple wires are shown on the wiring diagram. All thermocouples are consistent in their color coding. The wiring for the pump can be found here. Use that with the digital terminal assignments (the ground is the negative end). You are now ready to connect to the flow meter, pressure transducer and thermocouple! Have Mike or John check your wiring before you plug the cart in or turn anything on. 21