Lab_1_Instructions

.docx

School

Vanderbilt University *

*We aren’t endorsed by this school

Course

2171

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

docx

Pages

8

Uploaded by SuperDinosaurMaster401

V ANDERBILT U NIVERSITY ME 2171 I NSTRUMENTATION L ABORATORY L AB 1: I NTRODUCTION TO L AB VIEW Overview This lab will introduce you to the LabVIEW program. For this lab you will do three things (during lab): 1. Install LabVIEW and associated software for the course (you can do this before the lab starts if you’d like) 2. Work through the LabVIEW Getting Started tutorial. 2. Work through the additional exercise that is part of this handout. As a result of doing these two things, you will create two “virtual instrument” files. One is called “Random Number Example,” and the other is called “Tank Simulator.” Additionally, please complete the following items (during lab or as homework): 1. Watch the first 10 LabVIEW tutorial videos on YouTube on the “Getting Started with LabVIEW” playlist at https://youtube.com/playlist?list=PLB968815D7BB78F9C 2. Complete the LabVIEW exercise in “LabVIEW Exercise” wherein you will build a calculator. Demonstrate a working calculator VI at your next lab session. 3. Complete the attached Memorandum Writing Guide quiz. All work, including lab report, quiz, and exercises, are due at the beginning of your next lab period. o Installed LabVIEW o LabVIEW Getting Started Tutorial o Additional Exercise o Watched Tutorial Videos on YouTube o Calculator Exercise o Writing Guide Quiz
Additional Exercise In the “Random Number Example” virtual instrument (vi), make the following modification: Replace the “Waveform Chart” with a “Tank” indicator. This is located in Controls >> Express >> Numeric Indicators of the “Controls” palette. Now run the vi and notice that the tank level fluctuates between 0 and 1. Next modify the vi so that each time the while loop executes, the new random number is added to the sum of the old random numbers. This simulates some “fluid” added to the tank, raising its level. To make this modification, go to the block diagram, right click on the while loop, and “Add Shift Register.” Here is what the block diagram should look like: The shift register holds the value of a wire from the previous while loop execution. Thus when the while loop executes the first time the value of the shift register is zero. After the first while loop execution the shift register value is the first random number generated. After the second while loop the shift register value is the second random number, etc. Next wire an “Add” icon (look for this in where you’d logically expect to find it in the Functions palette) to the shift register icons like so: Now run the .vi and notice that the tank fills up quick. Let’s add a “drain” to the tank. Add a “Toggle Switch” to the front panel ( Controls >> Express >> Buttons ). Go to the block diagram and insert a
Select ” icon from the “ Comparison ” sub-palette of the “ Functions >> Programming ” palette. This icon sends one of two values out based on a Boolean input. Have as these two values 0.75 and 0.0. Here is the block diagram: Now you figure out how to wire up the output from the “Select” icon so that its value is subtracted from the “Tank Level” sum. Run the vi to check out its operation. Now – in order to learn how to use a “ Case Structure ” – remove the “ Select ” icon and try to use a Case Structure ” to achieve the same functionality for the “drain” toggle switch. Finally, to add visual effects to your front panel: Insert an LED indicator that will indicate the “Tank Drain Valve” Boolean switch position. This indicator is obtained from Controls >> Express >> LEDs >> Round LED . Here is what the front panel should look like (the appearance of the “Power or Stop” switch is unimportant): Wire this new indicator to the “Tank Drain Valve.” Edit this indicator so that when the tank is draining, it is green, and when the valve is shut, it is red. The paintbrush tool will be helpful, and also right- clicking while using the paintbrush tool will bring up the color palette.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help