University of Illinois Department of Electrical and Computer Engineering ECE 451 Automated Microwave Measurements Laboratory

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

Section 1 Establishing an Instrument Connection

Virtual Instrumentation With LabVIEW

Certified LabVIEW Associate Developer Exam. Test Booklet

Exercise 5: Basic LabVIEW Programming

Introduction to LabVIEW Exercise-1

Virtual Instrumentation With LabVIEW

Introduction to National Instruments LabVIEW and Data Acquisition (DAQ)

INTRODUCTION TO LABVIEW

Certified LabVIEW Associate Developer Examination

Arrays are lists of elements of the same data type. They are analogous to arrays in traditional languages.

ME 365 EXPERIMENT 3 INTRODUCTION TO LABVIEW

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

Certified LabVIEW Associate Developer Examination

LabVIEW Experiment 1 Light Sensor Calibration Using Arduino Data Acquisition (Arduino DAQ)

Computer Interfacing Using LabView

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

ENGR 1000, Introduction to Engineering Design

Lab Exercise 2: Data Acquisition with NI LabVIEW

Lesson 4 Implementing a VI

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

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

LAB EXERCISE 3 Harmonic Balance Techniques

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

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

Small rectangles (and sometimes squares like this

Introduction to LabVIEW

Linear Control Systems LABORATORY

Start ADS and Create an Empty Project

ME 224: EXPERIMENTAL ENGINEERING. Lecture 2

Read Temperature Data

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

Certified LabVIEW Associate Developer Exam. Test Booklet

Strain and Force Measurement

Advanced Programming Features

UNIVERSITY OF CALIFORNIA BERKELEY Department of Electrical Engineering and Computer Sciences. B. E. BOSER Oscilloscopes EECS 100

Quick Start Guide Agilent Technologies 14565A Device Characterization Software for Windows 98, Windows NT 4.0, Windows 2000 and Windows XP

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

UNIVERSITY OF CENTRAL FLORIDA DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE HEC 406 NANO/MEMS LABORATORY

Homework Assignment 9 LabVIEW tutorial

How to Get Started. Figure 3

Learn LabVIEW 2010 / 2011 Fast

Table 1. Inputs and Outputs

Lab 4 - Data Acquisition

LabVIEW Express VI Development Toolkit User Guide

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

Experiment 1 Electrical Circuits Simulation using Multisim Electronics Workbench: An Introduction

METRICS WIN4145. How Win4145 Stores Information. Project Files. The Win4145 Initialization File. Data and Plot Windows.

USB Instruments EasyLogger for PS40M10 "Swordfish" Help

Lab 1: Getting familiar with LabVIEW: Part I

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

Labview. Masood Ejaz

SOUTHERN POLYTECHNIC S. U.

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

Labview Lab 2. Vern Lindberg. April 16, 2012

GETTING STARTED WITH ADS

Tutorial: Getting Started with the LabVIEW Simulation Module

Determination of Drag Coefficient

Arrays. Collection of data elements that are of same type

Exercise 0 - Open and Run a Virtual Instrument (Slide 12)

Getting Started with the LabVIEW Real-Time Module

PHYS 5061 Lab 6 Programmable Instruments

2 Lab 2: LabVIEW and Control System Building Blocks

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16

OpenStax-CNX module: m Thermometer VI * National Instruments

Pre-Lab Excel Problem

Labview for Everyone (National Instruments Virtual Instrumentation Series) Jeffrey Travis

EKT 314/4 LABORATORIES SHEET

Advanced Design System 1.5. Data Display

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

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

VME Data Acquisition System, ADC Read

Hardware: Acquiring Data and Communicating with Instruments

Getting Results with CompactRIO and LabVIEW

SCHEMATIC DESIGN IN QUARTUS

PSpice Tutorial. Physics 160 Spring 2006

Figure 1: ADE Test Editor

NI PXI Contents CALIBRATION PROCEDURE

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

DC Circuit Simulation

Getting Started with LabVIEW Virtual Instruments

Workshop 5-1: Dynamic Link

ni.com Preparing for the CLAD Exam

CLAD Exam Preparation Guide using LabVIEW NXG

CLAD_80.questions.

LabVIEW programming I

Getting Started: Creating and Executing a Test Setup. Step 1: Cable the Hardware Connections. Step 2: Connect the HP4145 Instrument Driver

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

Basic Data Acquisition with LabVIEW

Introduction to LabVIEW

Virtual Instruments with LabVIEW

Part 1. Creating an Array of Controls or Indicators

USING THE VENABLE RLC WINDOWS SOFTWARE VERSION 4.5

Introduction to LabVIEW

UNIVERSITI MALAYSIA PERLIS

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

Cadence Tutorial A: Schematic Entry and Functional Simulation Created for the MSU VLSI program by Andrew Mason and the AMSaC lab group.

Xilinx Tutorial Basic Walk-through

Revision Notes: July2004 Generate tutorial for single transistor analysis. Based on existing schematic entry tutorial developed for ECE410

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

Transcription:

University of Illinois Department of Electrical and Computer Engineering ECE 451 Automated Microwave Measurements Laboratory Experiment No. 4 Introduction to the Windows XP Workstation using National Instruments LabView with Automated Detector Measurements Introduction Computers have been used extensively to automate data gathering and to facilitate data processing and displaying. This experiment will introduce the student to computer automation by performing the measurement of a detector output voltage as a function of source power. The commands to control the HP8350B Sweep Oscillator and the HP3457A Digital Multimeter are sent from the program and listings of data are retrieved, displayed and saved in a meaningful way with the LabView program. HPIB (IEEE-488) BUS Windows XP Workstation SOURCE HP 8350B 719 DVM HP 3457A 722 RF OUT DIODE DETECTOR DC OUT Figure 1. Automated Measurements of the Diode Detector 1

Procedure Computer Language used: National Instruments LabView. To use: 1) Sign on Windows XP Workstation. In general do not write to C:\ for two reasons: (1) Try to keep system orderly so that crashes are minimized. (2) Your data will not be there later. C:\ is cleaned periodically by the Network Administrator. For the first time use ONLY Go to Your Personal Directory W:\ Make a director, LabView, under W:\ Change a directory to LabView Make a directory, Lab4, under LabView W:\ tree would look like W:\LabView\Lab4 Later you may add Lab5 and other content to your personal directory 2) Follow the LabView tutorial #1; write a program which will get inputs such as source power sweeping from 40dBm to 10dBm at the fixed frequency of 650 MHz. The program will communicate with the instruments and collect the detector output voltages and convert them to the logarithmic voltage format, and display them on the computer screen. Save the data in LVM file format (which is easy to use within LabView, but not compatible with other applications such as Agilent ADS). Finally, modify the program to save the data in a format called CITIfile (which can later be imported into ADS). Suggested program flow chart is shown in Figure 2. 3) Obtain the detector output voltage and logarithmic voltage plots from the first program. Submit the CITIfile printout along with your lab notebook. 4) Follow the LabView tutorial #2; write a second program that will read the LVM file you have created with the first program and display the contents, which are the normal detector output voltage and logarithmic voltage. 5) Follow the short ADS tutorial; read the CITIfile data and obtain the plot of detector output voltage, and logarithmic voltage. 6) Obtain the plots from ADS dataset window. 2

Frequency, Power Initialize Sweep Oscillator 8350B Store frequency point Initialize DVM Number of frequency points Calculate power step For-loop (number of power points) Current loop value Start Power Calculate power Set the current power of 8350B voltage Stop Power Read DVM Store powers End of for-loop Convert into log volt voltage Set Source to safe state Log Voltage Set DVM to local Saving Data Log Voltage Figure 2. Suggested Program Flow Chart For Measuring and Saving Measured Values Appendix List (1) HP-IB Program Codes (2) HP3457A Reading and Changing the HP-IB Address (3) LabView tutorial 1 (measuring, saving data) (4) LabView tutorial 2 (reading saved data) (5) ADS tutorial 3

HP8350B Program Codes (1 of 2) 4-6

HP8350B Program Codes (2 of 2) 4-7

4-8

LabView Tutorial No. 1 for Lab 4 (measuring and saving data) Objective The goal of this tutorial is to be able to write a short program that accepts the input (frequency, power level etc.) from the user, processes them, communicates with the measurement equipment, retrieves the measured raw data from the equipment, analyzes it and presents it to the user in a meaningful form. Using this program, a student should also be able to save the data into a file for later usage. The concept of LabView programming resembles that of a program flow chart. A box represents each instruction or I/O operation. Boxes are in turn connected with data flow paths (wires). Before starting the program, all instruments should be turned on and connected through the HPIB (IEEE-488) bus. Starting LabView Select Programs>National Instruments>LabView 8.0>LabView from the Start Menu to load the program. Then select Blank VI. You will see the blank Front Panel window and Block Diagram of your new program, as shown in Figure 1. You can switch between Front Panel and Block Diagram windows by pressing Ctrl-E. 1

Figure 1: LabView Front Panel and Block Diagram windows Communicating with the instruments VISA resource box must be created on the Front Panel to communicate with each instrument. To do that, right-click on any blank space of the Front Panel and select Modern>I/O>VISA Resource. A combo box titled VISA Resource Name will appear. Place it anywhere on the front panel. Change its title to represent a device you want to communicate with, e.g. Source, or DVM (for Digital Voltmeter). From the drop-down listbox, you will be able to select the desired HPIB address that corresponds to the actual device, as shown in Figure 2. LabView automatically detects all the devices connected to HPIB bus, and offers them in the drop-down listbox. Figure 2: Selecting the HPIB address using VISA Resource box 2

Simultaneously with creating the VISA Resource box on the Front Panel, an equivalently named box was created on the Block Diagram. This box will be used to provide the identifier of the device to all the other device control boxes on the Block Diagram (used to Open and Close communication, Init the device, Set parameters, Assert trigger and Read values), as will be seen shortly. Add two VISA Resource boxes to the Front Panel, label them DVM Address and Source Address, and on the Block Diagram connect each to its own Open box (found in Instrument I/O>VISA>VISA Advanced menu). The output of VISA Resource box should be connected to the VISA Resource Name input of the Open box (uppermost input on the left-hand side of the box). Next, add two Write boxes (found in Instrument I/O>VISA submenu), and connect the corresponding resource name inputs with outputs. You can also change the labels of Open and Write boxes to remind you of their functions, as shown in Figure 3. Figure 3: Open and Write boxes that will be used to initialize the devices In order to actually initialize the devices, we need to send them appropriate strings. For initializing the DVM, create on the Block Diagram a String Constant (found in Programming>String palette), fill it with appropriate text for initializing the DVM (as shown in Figure 4), create an End Of Line constant (in the same palette), append it to the String Constant using the Concatenate Strings box (again in the String palette), and connect the appended string as an input to write buffer terminal of our Init DVM box (as shown in Figure 4). Initializing the source is a slightly different procedure, since we want to be able to define the sweeping frequency at runtime. To do that, we first create a String Control on the Front Panel (found in Modern>String & Path menu) and label it Frequency. Next, by double-clicking on it, we find its corresponding box on the Block Diagram; its output will be used as an input to the Build Text VI that we will also insert (from Express>Output menu). By double-clicking the Build Text icon, we can define its functionality, as shown in Figure 4. We now connect the output of Frequency box to the freq input of Build Text VI, and its output, in turn, to the write buffer input of Init Source box. 3

We now want to add a time delay of, say, 300 ms, in order for our source to have time to stabilize its output. We do that by inserting the Time Delay VI (from Express>Exec Control menu), as shown in Figure 4, and creating the time constant (a quick way to do that is to right-click its Delay Time terminal, and to select Create>Constant from the shortcut menu). To conserve screen real estate, we can right-click on two Express VIs we just added and select View as Icon option. Since we don t want our Time Delay to be executed before we send the initialization data to the source, we need to be able to control the flow of our program. One handy way to do that is by using the error out and error in terminals, as shown in Figure 4. Error data flow is indicated by a thick pink wire. Figure 4: Completed block diagram for initializing the devices Now we re ready to move on to measuring the data. On the Front Panel, add three Numeric inputs (Numeric>Numeric Control), and label them as shown in Figure 5. These will serve as inputs to our for loop that will be doing the measurements. To have the data represented as integers (as opposed to default of double-precision real numbers), right-click each of the boxes on Block Diagram, select Representation>I32 (actually, in this case, any integer type would do). Apply several math operations, as shown in Figure 5, to obtain the step size for our sweep. Add a large for box (Programming>Structures>For Loop), and connect Start Power, Step, Number of Points, and the two instrument addresses to the left-hand side of the for box those will serve as its inputs. A nice programming practice is to set the cursor to busy during measurements; this is done by inserting the Set Busy box (Programming>Dialog & User Interface>Cursor). 4

Figure 5: Inputs to the for loop The for loop has two significant objects automatically created: N holds the total number of repeats, and i holds the current iteration of the loop (ranging from 0 to N-1). We use i to calculate the current value of power to be sent to the source. In each iteration, we first build the string to be sent to the source, by using Build Text VI (labeled Build Power ) whose behavior is depicted in Figure 6. Next, we write the string to the source, wait 300 ms for the output to stabilize, trigger the DVM by using Assert Trigger (found in Instrument I/O>VISA), read up to 16 digits of voltage by using VISA Read (again found in Instrument I/O>VISA), and convert the string that was read to a number by using Fract/Exp String To Number (found in Programming>String>String/Number Conversion). This process is shown in Figure 6. 5

Figure 6: Measuring data in the for loop If we want to follow our measurements in real time, one possible solution is to insert plots of read data into the for loop. To do that, first insert two Express XY Graph objects (found in Express>Graph Indicators menu) to the Front Panel, as shown in Figure 10. Corresponding Build XY Graph VIs will automatically be added to the Block Diagram. Make sure (by double-clicking on them) that Clear data on each call is turned off, since we want graphs of complete measurements, not just single points. Both graphs should have the current value of power connected to their X inputs. The linear graph will have just the read value of voltage as its Y input, while we would need to calculate the log value of voltage (in units of dbm) as shown in Figure 7. 6

Figure 7: Plotting the measurements in real time After reading the data and finishing with for loop, we would first want to unset the Busy cursor, power down our source (e.g. to -75dBm) and close communication with the instruments, as depicted in Figure 8. Figure 8: Cleaning up after measuring Finally, we want to save our measured data to a file, in order to be able to analyze it later. LabView s for loop automatically collects all the data coming out of the loop, and creates arrays out of it; the process is called auto-indexing (if needed, this behavior could be changed by right-clicking the point where the data leaves the loop - in our case 7

we would want to uncheck auto-indexing for the DVM Address, Source Address and Error wires). To make use of LabView s full potentials in working with files, one easy way is to convert the three arrays of data (power, voltage and logvolt) to Waveform data types, by using the Build Waveform box (found in Programming>Waveform palette), as illustrated in Figure 9a. Next, we set the array names to represent the type of data measured, by using Set Waveform Attribute (found in Programming>Waveform) to set the NI_ChannelName attributes of the waveforms, also depicted in Figure 9a. Figure 9a: Formatting and saving the data We then aggregate the three waveforms, by using the Merge Signals box (found in Express>Signal Manipulation), and feed them to the Write To Measurement File VI (found in Express>Output), the settings of which are visible in Figure 9b. 8

Figure 9b: Write To Measurement File configuration This way, the data is saved in LabView s proprietary text format 1 with the extension LVM, viewable in a text editor, but not directly importable into other programs, such as 1 Note: The LabVIEW Measurement (.lvm) format is a text-based file format for one-dimensional data that you want to use with the Read LabVIEW Measurement File and Write LabVIEW Measurement File Express VIs. The.lvm file is designed so it is easy to parse and easy to read when imported into a spreadsheet program, such as Microsoft Excel, or a text editor, such as Notepad. It supports multiple data sets, grouping of data sets, and the addition of data sets to existing files. The file format is not designed for high-performance or for very large data sets, as is the case with all textbased formats. Use the binary file format, such as HDF5, for very large data sets. Specification for the LabVIEW Measurement File (.lvm) is available at: http://zone.ni.com/devzone/conceptd.nsf/webmain/041828bc369ee1a686256d33005303fd 9

Agilent ADS. In order to communicate with ADS, we would need to write a separate subroutine for saving the data into e.g. CITIfile 2 format, which falls out of the scope of this course because of the relative complexity of that subroutine (compared to the simple Write to Measurement File Express VI). However, for the purpose of demonstrating how to export data measured in LabView to ADS, a complete subroutine for saving the data in CITIfile format will be provided to you. Its usage is straightforward, as shown in Figure 9c. Figure 9c: SubVI for Saving the Data in CITIfile Format We finally insert a File Path Indicator to the Front Panel (from Modern>String & Path) to be able to observe the actual location of the saved file, as shown in Figure 10, and end the dataflow with Simple Error Handler (from Programming>Dialog & User Interface). Figures 9 a, b, and c show the saving part of our program, and Figure 10 depicts the final appearance of our Front Panel. 2 Note: Hewlett-Packard Co. (now Agilent Technologies) developed the CITIfile (Common Instrumentation Transfer and Interchange) format for computer/instrumentation data exchange and subsequently adopted it to the MDS and ADS EDA tools. CITIfile is suited for load-pull data since it can support an arbitrary number of dependent and independent variables. One requirement is that the independent variables must be methodically swept that is, the same inner values of the sweep must be identical. 10

Figure 10: The final look of our Front Panel To sum it all up, our program Block Diagram should look close to what s depicted in Figure 11. 11

Figure 11: The final look of our Block Diagram 12

LabView Tutorial No. 2 for Lab 4 (reading saved data) Objective The goal of this tutorial is to write a program that will read the LVM file you have created with the first program and display the contents, which are the normal detector output voltage and logarithmic voltage Before starting the program, all instruments should be turned on and connected through the HPIB (IEEE-488) bus. Reading the data One of the advantages of LabView s LVM format is the ease with which we can retrieve saved data, as shown in Figure 1. We simply insert an Express VI named Read From Measurement File, and error handling and optionally display the path and filename from which user opted to read the data. Figure 1. Reading data from LVM file. Plotting The Read Data Plotting the data is done in very much the same fashion as in Tutorial 1 we simply break down the set of signals into individual arrays, using Split Signals (found in 1

Express>Signal Manipulation), and then plot two graphs using standard Build XY Graph Express VI, as depicted in Figure 2. Figure 2. Plotting the voltage and logvolt measurements. Creating A Table Of Read Values Creating a table of array values is also done using an Express VI, as shown in Figure 3. Figure 3. Displaying arrays of measured values in a table. Unfortunately, extracting array names and labeling table columns is not as straightforward. We need to directly manipulate the Property Node of the table which contains column headers. 2

One possible way of achieving this, as suggested on the NI website, would be to add the ex_getallexpressattribs.vi box (found on C: drive, in the subfolder LabView8\vi.lib\express\express shared\transition.llb ) and feed it with the set of signals we have read. Then, we would unbundle the signal names and group them into an array, with which we would feed the Strings[] Property Node of the table (created by right-clicking on Table object and then selecting Create>Property Node>Column Header Strings. The entire process is depicted in Figure 4. Figure 4. Adding column headers to the table. Front Panel Figure 5. The suggested look of the Front Panel. 3

ADS tutorial (Reading Citifile) To start Agilent Advanced Design System, select Start > Programs > Advanced Design System 1.5 to load the program. 1. You will see the main screen window where you can start creating a project. Then, from the top menu, choose New Project under File. Browse to see select your network directory under W: drive as seen in figure 1. Once you hit OK, the schematic window will appear automatically. This is the window where you can draw circuit and do the simulation. We are not interested in design and simulation for this lab. Figure 1. 2. However, you need to choose Window from the menu appears in the schematic window. Then, you must select File/Instrument Server to do the set up for reading citifile as shown in figure 2. 3. You will see a third window pops up in figure 3. Check READ radio button. Select File in Read From. Then, browse to where you save your citifile. Give Dataset Name as detector or an appropriate name. Next, click on Read File. This will read the data from the specified citifile into the dataset file. 1

Figure 2. Figure 3. 2

4. In order to observe the data stored in the dataset, click on New Data Display window under Window on the top menu panel as shown in figure 4. 5. Once the data display window popped up, click on the second button with a yellow rectangular box with grid inside in order to observe the plot as seen in figure 5. Another window will then pop up as in figure 6. You can select more than one independent variable to display in a single graph. However, you might want to choose the voltage for one graph and logarithmic voltage for another graph since they have different scaling. Then, add the variable (for example in the figure 6) and click OK. Detector output voltage vs. power plot as in figure 7 will be resulted. 6. In order to get a full view of the plot as in the figure 8, press Ctrl+F or select View All under View. 7. To place a marker, select New under Marker menu, and place the market on the trace as shown in the figure 9. Figure 4. 3

Figure 5. Figure 6. 4

Figure 7. Figure 8. 5

Figure 9. 6

7