Basic LabVIEW Programming Amit J Nimunkar, Sara Karle, Michele Lorenz, Emily Maslonkowski

Similar documents
ENGR 1000, Introduction to Engineering Design

ME EN 363 ELEMENTARY INSTRUMENTATION Lab: Basic Lab Instruments and Data Acquisition

Fig. 1. The Front Panel (Graphical User Interface)

Data Acquisition Using LabVIEW

Virtual instruments and introduction to LabView

Lab experience 1: Introduction to LabView

Analyzing and Saving a Signal

DSP Laboratory: Analog to Digital and Digital to Analog Conversion *

ENGR 1000, Introduction to Engineering Design

Laboratory 10. Required Components: Objectives. Introduction. Digital Circuits - Logic and Latching (modified from lab text by Alciatore)

BME 3512 Biomedical Laboratory Equipment List

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum

Introduction To LabVIEW and the DSP Board

Laboratory 7. Lab 7. Digital Circuits - Logic and Latching

Getting Started with the LabVIEW Sound and Vibration Toolkit

Experiment # 4 Counters and Logic Analyzer

Table of Contents Introduction

INTRODUCTION (EE2499_Introduction.doc revised 1/1/18)

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

Working with a Tektronix TDS 3012B Oscilloscope EE 310: ELECTRONIC CIRCUIT DESIGN I

Elvis Has Entered Digital Circuits!

LABORATORY # 1 LAB MANUAL. Digital Signals

Laboratory 8. Digital Circuits - Counter and LED Display

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Operating Instructions

Lab 2: A/D, D/A, and Sampling Theorem

"shell" digital storage oscilloscope (Beta)

Recording of Coincidence Signals in a Software Medium

EXPERIMENT #6 DIGITAL BASICS

HST Neural Coding and Perception of Sound. Spring Cochlear Nucleus Unit Classification from Spike Trains. M.

MIE 402: WORKSHOP ON DATA ACQUISITION AND SIGNAL PROCESSING Spring 2003

Experiment 9 Analog/Digital Conversion

imso-104 Manual Revised August 5, 2011

Agilent DSO5014A Oscilloscope Tutorial

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

Solutions to Embedded System Design Challenges Part II

Experiment 13 Sampling and reconstruction

DIGITAL ELECTRONICS: LOGIC AND CLOCKS

Automated Limit Testing

(Skip to step 11 if you are already familiar with connecting to the Tribot)

Burlington County College INSTRUCTION GUIDE. for the. Hewlett Packard. FUNCTION GENERATOR Model #33120A. and. Tektronix

Experiment 0: Hello, micro:bit!

E X P E R I M E N T 1

Introduction 1. Green status LED, controlled by output signal ST. Sounder, controlled by output signal Q6. Push switch on input D6

Spectrum Analyser Basics

PHY 351/651 LABORATORY 9 Digital Electronics The Basics

Viewing Serial Data on the Keysight Oscilloscopes

Introduction: Overview. EECE 2510 Circuits and Signals: Biomedical Applications. ECG Circuit 2 Analog Filtering and A/D Conversion

The Micropython Microcontroller

LabView Exercises: Part III

Application Note AN-708 Vibration Measurements with the Vibration Synchronization Module

Activity P27: Speed of Sound in Air (Sound Sensor)

4.9 BEAM BLANKING AND PULSING OPTIONS

Edge Connector Light Level Detector

Viewing Serial Data on the Keysight Oscilloscopes

ENGR 40M Project 3b: Programming the LED cube

Oscilloscope Guide Tektronix TDS3034B & TDS3052B

Exercise 5-1. Troubleshooting Techniques EXERCISE OBJECTIVE DISCUSSION OUTLINE DISCUSSION. Signal flow tracing

PHYS 3322 Modern Laboratory Methods I Digital Devices

The DataView PowerPad III Control Panel

Lab 1 Introduction to the Software Development Environment and Signal Sampling

Interactive Virtual Laboratory for Distance Education in Nuclear Engineering. Abstract

LabView Exercises: Part II

EECS145M 2000 Midterm #1 Page 1 Derenzo

Beginners How to Test DSO138mini

Rack-Mount Receiver Analyzer 101

ECE 2274 Pre-Lab for Experiment Timer Chip

TV Synchronism Generation with PIC Microcontroller

imso-104 Manual Revised July 19, 2012

Using different reference quantities in ArtemiS SUITE

ECE 372 Microcontroller Design

PB-507. Advanced Analog & Digital Electronic Design Workstation Instruction Manual. Revision: 2/2014

EE 367 Lab Part 1: Sequential Logic

Research of Intelligent Traffic Light Control System Design Based on the NI ELVIS II Platform Yuan Wang a, Mi Zhou b

NI-DAQmx Device Considerations

SigPlay User s Guide

Bell. Program of Study. Accelerated Digital Electronics. Dave Bell TJHSST

University of Illinois at Urbana-Champaign

successive approximation register (SAR) Q digital estimate

EECS 140 Laboratory Exercise 7 PLD Programming

EDL8 Race Dash Manual Engine Management Systems

Manual Supplement. This supplement contains information necessary to ensure the accuracy of the above manual.

Quick Start. RSHS1000 Series Handheld Digital Oscilloscope

The aim is to design a next generation real time karaoke device which would be a stereo type equalizer by efficient

ELECTRICAL ENGINEERING DEPARTMENT California Polytechnic State University

AMIQ-K2 Program for Transferring Various-Format I/Q Data to AMIQ. Products: AMIQ, SMIQ

Quick Reference Manual

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

CSE 352 Laboratory Assignment 3

Troubleshooting Your Design with Tektronix MSO and DPO Series Oscilloscopes

VISSIM TUTORIALS This document includes tutorials that provide help in using VISSIM to accomplish the six tasks listed in the table below.

KRAMER ELECTRONICS LTD. USER MANUAL

Exercise 2: D-Type Flip-Flop

Introduction to the oscilloscope and digital data acquisition

Lecture 14: Computer Peripherals

Instructions and answers for teachers

DT9857E. Key Features: Dynamic Signal Analyzer for Sound and Vibration Analysis Expandable to 64 Channels

S op o e p C on o t n rol o s L arni n n i g n g O bj b e j ctiv i e v s

SNG-2150C User s Guide

Physics 123 Hints and Tips

Transcription:

Introduction This lab familiarizes you with the software package LabVIEW from National Instruments for data acquisition and virtual instrumentation. The lab also introduces you to resistors, capacitors, and transistor circuits. You will have and opportunity to build and test electronic circuits and in the process get acquainted with the different laboratory equipments such as breadboard, oscilloscope, multimeter, ELVIS other systems you plan to use in your career as a biomedical engineer. Laboratory Equipment 1. Resistors, LED, TIP 41C transistor 2. Bread board 3. HP 33120A signal generator 4. HP 54600B oscilloscope 5. HP 34401A digital multimeter 6. HP E3630A dc power supply 7. ELVIS system Important Note: Always make sure the computer is turned ON before you turn ON the ELVIS Procedure A. Lab Equipment using ELVIS 1. We will mimic use of the digital multimeter using the National Instruments, Educational Laboratory Virtual Instrumentation Suite (ELVIS) system. 2. Important Note: Always make sure the computer is turned ON before you turn ON the ELVIS. 3. There are TWO power buttons you need to turn ON to use ELVIS. The power button at the back of the machine is the system power and the power button on the front side is the prototyping board power. 4. Go to Start All Program National Instruments NI ELVIS 3.0 Click on NI ELVIS 5. You will see the following NI ELVIS Instrument Launcher window pop up 6. Click on the first button Configure this will allow you to check and see if the communication between the DAQ card and the machine has been established properly. 7. The window NI ELVIS Configure Hardware will open click on Check you will see in the Status box the message Communication established successfully you are good to go click OK (in case of any error message, please contact the TA) 1

8. Go back to the NI ELVIS Instrument Launcher window you will see a bunch of different menus, these are provided by NI and will help you perform on computer screen the activities you did in procedure A using the individual machines (oscilloscope, DMM, power supply). 9. Click on menu Digital Multimeter you will see a pop up window with the message For maximum accuracy, use the DMM nulling feature Click OK you will see the following screen (right) 10. The DMM allows you to measure different quantities (current, resistance, etc) look at the Function palate Click Ω to measure the resistance 11. On the NI ELVIS prototyping board, identify on the left hand side of the board the labels CURRENT HI and CURRENT LOW Insert one leg of the resistor in CURRENT HI and the other in CURRENT LOW Take three different resistors and measure the resistances Take a screen shot of the resistance value you measure and include it in your lab report. 12. Go back to the NI ELVIS Instrument Launcher window Click on NI ELVIS Function Generator you will see a screen shown to the right 13. Check to see if the icon under MANUAL is bright green if it is bright green the system is in manual mode and it needs to be switched off Look at the front side of the machine in the section titled FUNCTION GENERATOR Locate the switch MANUAL Pull it down so that it is no longer in manual mode. 14. If the machine is not in manual mode Go back to the NI ELVIS Function Generator palate on the computer Click on the button ON Select the waveforms you want to generate by clicking on the button under the label Waveforms Set the Tuning Mode to simple Set the frequency you want to generate using the knobs Coarse and Fine under Frequency Set frequency to 100 Hz. 15. Go back to the NI ELVIS Instrument Launcher window Click on NI ELVIS Oscilloscope you will see a screen shown to the right 16. If the Display under CHANNEL A shows OFF Click on it to turn the Display ON Under CHANNEL A locate the Source From the drop down box select FGEN FUNC_OUT, which stands for output from the function generator Under VERTICAL you 2

can click on Autoscale to scale your waveform or use values from dropdown menu under Scale and TIMEBASE to scale your waveform. 17. Click on the icon Single on the left hand side you can observe a snap shot of the waveform; you can save the data using the icon Log besides it. 18. Go back to the ELVIS machine on the left hand side of the bread board, identify the label FUNC OUT under Function Generator Also on the left hand side of the board identify the label CH A+ under Oscilloscope connect a wire between FUNC OUT and CH A+. 19. Now go back to the NI ELVIS Oscilloscope function palate on the computer screen and under CHANNEL A change the Source from FGEN FUNC_OUT to BNC/BOARD CH A and you can observe the same waveform. 20. Go back to the ELVIS machine On the left hand side of the board identify the label ACHO+ under Analog Input Signals and connect a wire from FUNC OUT to ACHO+ 21. Now go back to the NI ELVIS Oscilloscope function palate on the computer screen and under CHANNEL A change the Source from BNC/BOARD CH A to ACHO and you can observe the same waveform. The last couple exercises tell you how you can acquire and observe waveform from the hardware. Take a screen shot of the waveforms you observed and include it in your lab report. B. Voltage Divider 1. If you are not sure how the rows and columns inside the breadboard of the ELVIS systems are organized, please ask your TA for help. 2. Construct the voltage divider circuit below, setting the input signal to 10 Hz and 1 V peak to peak. 3. Follow steps 12-14 from procedure B to set up the input signal. 4. Identify the FUNC OUT, GROUND, ACHO+ and ACHO- labels on the left hand side of the NI ELVIS breadboard and make the connections accordingly. FUNC OUT 10 k ACHO+ GROUND 30 k B Analog Input Signals Fig 1. Voltage Divider ACHO- 3

5. Calculate the voltage value you expect across resistor B. 6. Follow steps from procedure B and accordingly measure the output voltage across the resistor B on the oscilloscope. 7. Change the frequency to 50, 100, 500, 1000 Hz and record the voltage across resistor B each time. Does the voltage change with respect to frequency? Please note that the majority of the following section involves constructing the framework necessary to execute the desired task, and therefore will not require you to input or test what you have built until later. C. Programming using the block diagram 1. Go to Start All Programs National Instruments LabVIEW 8.2 Click on LabVIEW Click on Blank VI Click File Save As File name : filename.vi Save 2. You should see filename.vi Front Panel (this is the graphical interface to the program) Click Window from the toolbar Click Show Block Diagram or Ctrl+E, you should see filename.vi Block Diagram (this is the actual software itself). 3. We will start programming on the Block Diagram first. On the Block Diagram, right click to make a Function palette to come up. If you want this Function palette to stay, you can click on the upper left pushpin of this palette. Creating sequence structures 1. On the Block Diagram, open the Functions palette and select Programming>Structure>Stacked Sequence Structure. Click and drag to place appropriately-sized frame on block diagram. Note: Flat Sequence Structure will accomplish the same results, but takes up more space on the screen. 2. Right-click on filmstrip border of frame, select Add Frame After several times to create 3 distinct frames (see left image below). Note: To toggle between frames, click the left and right arrows at the top of the filmstrip. Frames will execute in order starting with #0. 3. Add a while loop to frame 0 on the Block Diagram by selecting Programming>Structures>While Loop (see right image below). Using computer time as trigger The next two sections will guide you in creating a time trigger that compares a user input to the computer s timestamp. When the two times are equal, the NI ELVIS variable power supply will change its output. This output voltage can be used in many applications to initiate, continue, or stop the activity of a circuit. 4

4. In the Functions Palette, select Programming>Timing>Get Date/Time in Seconds (red box) as well as Programming>Timing>Format Date/Time String (green box), drop both icons into the while loop. a) Format the incoming string to output ONLY hours, minutes, and seconds (HINT: Activate Context Help ). b) Display the output time on the Front Panel. c) Make the refresh rate of the while loop equal to 1 second: - Add the Wait icon from Programming>Timing (purple box) to the while loop. - Choose an appropriate value for the constant of Wait (so that the Front Panel display clock refreshes each second). d) Select Programming>Comparison>Equal? and drop icon into while loop, then: - Connect the output from the Format Date/Time String icon to one of the inputs of the Equal? - Right-click one of the inputs for Equal? and establish a setpoint time (create a Front Panel control). - Thus when your set-point is equal to the output of the Format Date/Time String icon, the result is a Boolean TRUE. Using case structures and controlling the NI ELVIS Variable Power Supply 5. Add a case structure to the while loop by selecting Programming>Structures>Case Structure, then connect the output of Equal? to the input of the case structure. 6. Note: Make sure the NI ELVIS is powered on before proceeding. Add the Variable Power Supply icon to the True frame of the case structure within the while loop: select Express>Input>Instrument Drivers>NI ELVIS>Variable Power Supply a) Make sure that the correct device number is selected (click Configure, then Check in the next window, make necessary adjustments under DAQ Device if necessary). b) Set the voltage output values using constants (1 V & 0 V) rather than making changes to the Properties window: Adjust Supply + (V) and Supply - (V) on this icon. 5

7. Add a Variable Power Supply icon to the False frame, then set both voltage output values to 0 V. 8. Add a control to the Loop Condition element within the while loop ( stop sign in lower right-hand corner) so that the user can stop execution of the while loop. 9. Connect digital multimeter to SUPPLY + and SUPPLY outputs on left-hand side of NI ELVIS prototyping board. 10. Switch to the Front Panel and enter a setpoint time: - This time should match the format you specified in Step 4a - If the current computer time is 4:11 PM (16:11:00), a good setpoint time for testing might be 4:12 PM 11. Once the setpoint time is entered, click the checkmark icon (if visible in the upper left-hand corner) first, and then click Run. Questions: What do you observe about the timing between the setpoint trigger and the change in voltage displayed on the multimeter? How long does the voltage spike last? Why does the voltage stay at its maximum for as long as it does? Powering a peripheral element (e.g. LED) using a transistor 12. Set up a TIP 41C transistor (see image) circuit as follows: T 1 = TIP 41C transistor E 1 = 5 V supply from NI ELVIS E 2 = SUPPLY (+) from NI ELVIS E 3 = SUPPLY (-) from NI ELVIS [grounded to NI ELVIS ground] R 1, D 1 = resistor/led combo TIP 41C transistor 13. Click the right arrow at the top of the stacked case structure frame to toggle to frame 1, then add: - While Loop - Variable Power Supply w/ Supply (+) and Supply ( ) set as constants (1 to 2 V, 0 V; respectively) - Wait icon set to refresh loop each second 14. Add an Equal? icon within the while loop and connect it to: - the Loop Iteration element (bottom left-hand corner of the loop), - a constant (to control how long the transistor will receive the voltage signal), and - the Loop Condition element (bottom right-hand corner of the loop) 6

(the while loop will therefore terminate after the iteration value equals the constant value) 15. Toggle to frame 2 of the stacked sequence structure, add a Variable Power Supply icon with voltage output values set to 0 V. This step is required to make sure the NI ELVIS variable power supply does not start at a non-zero value next time you run a program. Note: Make sure that the NI ELVIS system power as well as the prototyping board power are both on. 16. Reset setpoint time, run program. 7