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

Report
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
Now run the vi, trying to keep the tank level between 0 and 1. Notice how difficult it is to do this manually. Thus for the remainder of your lab assignment you will make the valve operation automatic. Save this vi (call it “Tank Simulator”) on each student’s computer, because each student must do the next part individually. Individual assignment (can be done in lab or at home): Take the “Tank Simulator” virtual instrument that you created in this week’s lab, and make these modifications to it: 1. Make the “valve,” that takes away some of the fluid contained in the tank, operate automatically. This means that the valve, if the fluid level is above 0.5, should open to allow fluid to leave, at the rate of 0.75 per while-loop-step. Also if the fluid level is below 0.5, the valve should shut to prevent loss of fluid. Thus the fluid level should fluctuate in the tank, but most of the time will be between 0 and 1. Hint: Making the valve act automatically will involve a comparison of the current tank level to the number 0.5, and then sending a “Yes” or “No” to the valve for it to open or close. 2. Modify the Boolean Indicator onto the front panel so that, if the tank level is below 1.0, the indicator will be green and will display the message: “Tank is OK.” If the tank level is above 1.0 the indicator will turn red and will display the message: “Tank is overfull.” 3. Insert a Boolean control onto the front panel, and then wire it in the block diagram so that it can switch the Tank level control from automatic back to manual control, or vice versa. This will be helpful in a real-life situation where the automatic control of the tank may suddenly not work properly and it would be necessary to regain manual control of the tank level. Here is a front panel picture of the modified “Tank Simulator” virtual instrument. Notice the Boolean indicator for “Drain Valve Status.” Once you have successfully modified and run your program, save it as “Your Name’s Tank Simulator.” (For example Ima Student’s Tank Simulator.) Print out the front panel and block diagram. (Note : Cutting and Pasting these into Word does not work well as some of the lines and blocks will disappear. A failsafe way to grab images of the front panel or block diagrams is to use the printscreen button on the keyboard, or use the snipping tool built into windows .) You will turn this in as part of your Technical
Memo. Be sure to arrange the blocks and wires inside the block diagram so it can be viewed easily by the grader. Your lab report for this lab should follow the professional tone of the “Memo Report” format (posted on Brightspace, see sections 1.5 and 1.6 in Jeter and Donnell regarding short narrative reports in memorandum format). Please type your report and make it have a professional appearance – once you do this, it will be easy to use it as a template for subsequent memos. Use the template on the next page for the format of the report. The lab report will be graded on format and professionalism, in addition to technical content. Please note that it should be written in the third person. For our reports, we will use the specific headings specified in each lab instruction document (the document you are currently reading). Please be sure to include the section and subsection numbers indicated. Final note: Be sure to bring your laptop to lab each week.
Lab Formatting Advice (relates to all lab reports) Labs must be formatted in a professional manner: 1) Plots: Clear and comprehensible figures are critical to a good lab report. Plots should have a title, x/y axes labels (with units when appropriate), a legend when there is more than one dataset, and axes numbering with readable font. Axes should be scaled so that the relevant and interesting portion of the dataset is centered and clearly visible, and that behavior of interest can be seen by the reader. It is ok to use color to distinguish different datasets, but only when you actually print the report out in color (or submit it online); if you are printing in B&W, use something besides color to distinguish between data. 2) Tables: Tables should contain the quantitative data in a row/column format that is easily understood by the reader. If the table spans multiple pages, the top row (containing the column headers) should be reproduced at the top of a new page so the reader doesn’t have to turn to previous pages to recall what everything is. Data should be written with appropriate significant digits. 3) Captions: Figures and tables must have captions that are referenced in the report. Captions should be below a figure, and above a table. The caption should have a sentence or two that describes what is in the Figure/Table with enough information so that if someone were just scanning the document looking at the captions, they’d get a rough understanding of what was done. 4) Conclusions: A conclusion section is not simply a summary of what you have done, it should contain some conclusions that you have formed from doing the lab. What have you learned? What information will you use in the future? 5) Page numbers: Please use them 6) General: Use only one font for the entire report. You may use bold/italic/underline as needed. Only refer to items in color when you actually print the report in color; otherwise use something else to distinguish items in the report. 7) Examples: On Brightspace, an example of a good report and a not-so-good report are posted.
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
TO: ME 2171 Instrumentation Lab Instructional Staff January xx, 202x FROM: Your Name, Section <Day of the Week> SUBJECT: Lab 1, Introduction to LabVIEW 1.0 Statement of Purpose (5 pts) One or two sentences communicating the objective of the lab. 2.0 Background (10 pts) About one paragraph describing LabVIEW in general terms (not specific to this lab) – what it is, what it does, and how. Describe its capabilities. Please take care not to plagiarize by cutting and pasting – use your own phrasing. In future labs, this section will be where general textbook theory pertinent to the lab, as well as general procedures regarding the lab, will be presented. 3.0 Discussion (60 pts) In this section, present specific information requested. Please arrange this information in subsections as specified below. 3.1 Random Number Example.vi 3.1.1 Block Diagram Include a figure of the block diagram, appropriately captioned. (8 pts) Describe the functionality of the block diagram of the Random Number Example.vi that you ended up with at the end of the “LabVIEW Getting Started” tutorial. Describe, within a paragraph, the function of each block and the flow of information among the blocks inside the block diagram (refer to your figure at some place within this paragraph). Also discuss the different wiretypes within the block diagram. (8 pts) 3.1.2 Front Panel Very briefly (one or two sentences) describe the front panel. (5 pts) Include a figure of the front panel, appropriately captioned. (7 pts) 3.2 Tank Simulator 3.2.1 General Description (2 pts) In a few sentences, describe your Tank Simulator (that you ended up with at the end of the “Individual Assignment” section). Not how it works, but what it does. 3.2.2 vi Include a figure of the block diagram, appropriately captioned (10 pts) Include a figure of the front panel, appropriately captioned (10 pts) Describe in detail what your vi does and how it does it. Refer to your block diagram and front panel figures within this description. (10 pts) 4.0 Conclusions (5 pts) For this lab, the conclusion section should just mention that your vi has been tested and runs successfully. In future labs, the conclusion section will be used to summarize quantitative results and other specific findings of fact. 5.0 Quiz (10 pts) and Additional Exercise (10 pts) Append your memorandum quiz to your report. Demonstrate the VI to your TA.
(10 pts for writing style across the entire report)