Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Automated Microwave Lab: Measuring & Saving Data with LabView & HP Instruments, Lab Reports of Electrical and Electronics Engineering

Instructions for conducting an experiment in the ece 451 automated microwave measurements laboratory at the university of illinois department of electrical and computer engineering. The experiment involves using national instruments labview software to automate measurements of a diode detector using hp8350b sweep oscillator and hp3457a digital multimeter. The procedure for saving data in labview format and communicating with the instruments using visa resource boxes.

Typology: Lab Reports

Pre 2010

Uploaded on 03/16/2009

koofers-user-jgw
koofers-user-jgw 🇺🇸

10 documents

1 / 28

Toggle sidebar

Related documents


Partial preview of the text

Download Automated Microwave Lab: Measuring & Saving Data with LabView & HP Instruments and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity! 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. Windows XP Workstation SOURCE HP 8350B 719 DVM HP 3457A 722 Figure 1. Automated Measuremen 1RF OUTDIODE DETECTOR ts of the Diode Detector DC OUTHPIB (IEEE-488) BUS 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 HP-IB PROGRAM CODES (2 of 2) CODE DESCRIPTION CODE DESCRIPTION RE First Extended Status Byte Service vR CW Vernier Request Mask RFm —_RF Power On/Off SHIFT KEY FUNCTIONS RM Service Request Mask RPm _RF Blanking On/Off SHCF — Coarse CW Resolution RS Reset Sweep SHCW Swept CW R2 Second Extended Status Byte Service SHDF Fine CW Resolution . SHFA Frequency Display Multiplier sc Seconds : SHFB Frequency Display Offset 6 Freauency Step Size SHM All Markers Off SH Shitt Function SHMO All Markers Off Sim Slope On/Off SHM1_— Marker Delta SM Mopwal Sweep SHM2 — Counter Interface Enable ss Step Size SHM3 — Counter Interface Disable st Sweep Time (Continuous Sweep) SHMP Permanent Marker Sweep svn Save Register SHPL Peak Output Power sx External Sweep SHPS Independent ALC Control SHSL__ Independent Attenuator Control Ts Take Sweep 11 Internal Sweep Trigger SHRC Save Unlock _ T2 Line Sweep Trigger SHSS Default Step Size B External Sweep Trigger SHSV Save Lock m4 Single Sweep SHVR Frequency Offset up Step Up/increment 0-9 + — Acceptable Numeric Data NOTES 1, Program codes of the form “XXm’ use “m’’ to turn the function On or Off (1 or 0). For the storage register functions the “n” is 1 through 9. 2. The 8350B ignores spaces, plus signs, negative signs (except for vernier, offset, and power values), and any unexpected characters. Program codes can be upper or lower case alpha characters. HP8350B Program Codes (2 of 2) 47 Reading the Before you can operate the HP 3457 from remote, you need to know its HP-IB Address HP-IB address. The address was displayed during the power-on sequence. If you cannot recall the address, press: ADRS A (i blue Changing the HP-IB Address blue A typical display is: ALIRESS =e oe a SO OS A ae AO tee wae AOR OR Oar The displayed response is the device address. When sending a remote command, you append this address to the HP-IB interface’s select code (normally 7). For example, if the select code is 7 and the device address is 22, the combination is 722. NOTE All examples in this manual assume an HP-IB address of 22. We recommend you retain address 22 to simplify programming. Every device on the HP-IB bus must have a unique address. If you need to change the HP 3457’s address, press: a NPLC + (2 The display shows: ADDRESS - SR te OU De Me a AF ee mu Fon OM BdPT Press: Cj: GI You can now enter the new address. For example, press: [1 5 ent You have now changed the address from 22 to 15. If you want to change the address back to 22, repeat the above procedure but use 22 instead of 15 in the last step. Figure 6. HP3457A Reading and Changing the HP-IB Address 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 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 9b: Write To Measurement File configuration This way, the data is saved in LabView’s proprietary text format1 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 text- based 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. CITIfile2 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 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 FEEDS Ex Ele Ede dew Diver: Fowat Took Table wirdon tek Tina tw Rowan +) 12 De dS BS | @ | too, Zhen SS lolx) Fie St Yew ert Nahe eye Sully Hew Fes Be Be|sle) bo] 5) 4 2 = at) oe) I SS) : Qala) /[ololo/OlAl ie Pe ees bel Figure 5. alexi se 210) x) aa Daren Het re2 hl tale] a =) a tla Pes ls le Set AL ales los! | rapetComponems 0 = 16 Fe nen oar phe Hp oe 5 ei] 81 a1 auule Se i 3 - a = repr, ii a Figure 6. eI) =o) x! TAT earl {5 =) 2 s)4)) 0) 6) >) 3) ERIE al I ua ic 2 J el f be a seve 3 me z a ots SSS ern Figure 7. age cepa Sle sls) ba) 9) a a iol sll sf Glee) #2 b al FE 0.0 e @ Ha -0.2 - a Fe] \ i EWS -o4 \ > . \ -0.6 \ \ O8 fi iii | ee 1 -40 30 -20 10 0 10 pwrsweep la ai oll Figure 8. (2) ES|FE ||| Bila | volt al m1 rh 4 pwrsweep=-2.000) \ Vvolt=-0.130 \ \ \ \ \ ri | hyper y raid -40 30 -20 10 0 10 pwrsweep b 4 al Figure 9.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved