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

Introduction to MATLAB and Labview - Lab 1 | MEEN 364, Lab Reports of Mechanical Engineering

Material Type: Lab; Professor: Parlos; Class: DYNAMIC SYST AND CONTROL; Subject: MECHANICAL ENGINEERING; University: Texas A&M University; Term: Unknown 1989;

Typology: Lab Reports

Pre 2010

Uploaded on 02/13/2009

koofers-user-fu6-1
koofers-user-fu6-1 🇺🇸

10 documents

1 / 4

Toggle sidebar

Related documents


Partial preview of the text

Download Introduction to MATLAB and Labview - Lab 1 | MEEN 364 and more Lab Reports Mechanical Engineering in PDF only on Docsity! MEEN 364 Vijay Alladi, 2001. John Mangan, 2002. Andrew Rynn, 2002. Justin Mlcak, 2005. Last Update: 22 August 2006 1 Lab 1 – Introduction to MATLAB & LabVIEW Introduction Computers are increasingly important tools for mechanical engineers as they become more powerful and less expensive. They are often used to design and implement control systems because programming offers great flexibility. By simply changing the value of a parameter, or by just changing a few lines of code, the characteristics of the controller can be changed. The computer also offers tools for instant feedback of the results and means for storing the data. The use of computers and different software as tools for making measurements on dynamic systems and their control will be emphasized throughout the course. LabVIEW is a graphical programming language that uses icons instead of text to create applications. In contrast to text based programming languages, where instructions determine the program execution, LabVIEW uses dataflow programming where data determines execution In LabVIEW you build applications using a set of objects and tools. The user interface is known as the front panel. Using graphical representation of functions, the actual program is represented in the form of a flow chart. This makes program development and debugging much easier. LabVIEW has the capability to communicate with hardware such as Data Acquisition boards. LabVIEW contains libraries for data collection, analysis and storage. LabVIEW also has traditional program development tools. LabVIEW is designed to facilitate hardware instrumentation, data acquisition and control systems programming. Objective The objective of this lab session is 1. To become familiar with creating Virtual Instruments (VI’s) in LabVIEW and using it to build your own applications. 2. To learn how to solve a system of differential equations in MATLAB. PreLab Go through the handout on LabVIEW. Also, review the MATLAB tutorial. Lab Procedure for LabVIEW 1. Build a Virtual Instrument (VI) that will convert a temperature input in °C to °F. a. Add a numeric control to the Front Panel for the user to input the temperature in °C. b. Add a numeric indicator to the Front Panel to display the temperature in °F. c. Add two thermometer indicators to the Front Panel to display the input and output temperatures. d. To convert from °C to °F, use the relationship 32 5 9 +°=° CF . MEEN 364 Vijay Alladi, 2001. John Mangan, 2002. Andrew Rynn, 2002. Justin Mlcak, 2005. Last Update: 22 August 2006 2 e. Only allow the VI to work in the range of –200 °C to 2000 °C. i. Use an In Range and Coerce block in conjunction with a case structure. ii. Display an error message if the input temperature is out of range. Tip: The last values entered into LabVIEW controls are not automatically saved. Upon reopening a previously saved LabVIEW file, the default values for the controls appear rather than the values that appeared when the file was last saved. To prevent this from happening, select Operate»Make Current Values Default each time before saving. 2. Build a VI that generates a noisy sinusoid and displays it on a graph. a. Generate a 100 Hz sinusoidal waveform. b. Add Gaussian white noise with a standard deviation of 0.1 to the sine wave. c. Use sub VIs to calculate the mean value and the RMS value of the noisy sine wave. d. Display the mean and RMS values on the front panel using digital indicators. e. Use a while structure for the VI so that you will see a continuous display of the waveform. 3. Replace the sine waveform sub VI in the previous VI with a basic function generator VI. a. Modify the VI to rectify the signal (take the absolute value). b. Add an additional waveform graph to display the rectified signal along with the original signal. 4. Modify the waveform generated and note the changes on the waveform graphs and in the mean and RMS values. Compare observed values with the “exact” mean and RMS of the theoretical signals. Lab Procedure for Matlab The following is a slider crank mechanism. L2 L1 θ φ A B C Figure 1-1 - Slider Crank Mechanism (drawn by Christopher Cullum)
Docsity logo



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