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

LabVIEW Basics: VIs, Case Structures, and While Loops in MEM 351 Lab 1, Lab Reports of Mechanical Engineering

Instructions for creating virtual instruments (vis) in labview, including front panels and block diagrams, using case structures for branching, and implementing while loops for repetition. Students will learn how to create simple programs for various tasks such as converting temperatures and finding averages and maximums. This lab is a crucial step towards the course's objective of position regulation using computer-controlled state feedback.

Typology: Lab Reports

Pre 2010

Uploaded on 08/18/2009

koofers-user-f5o-1
koofers-user-f5o-1 🇺🇸

10 documents

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download LabVIEW Basics: VIs, Case Structures, and While Loops in MEM 351 Lab 1 and more Lab Reports Mechanical Engineering in PDF only on Docsity! MEM 351 Dynamic Systems Lab 1 Hands-on Lab 1: LabVIEW – NI-DAQ Basics 1 This lab reviews LabVIEW concepts needed towards the course’s final objective of position regulation using computer-controlled state feedback. Specific LabVIEW concepts include: creating a VI (front panel and block diagram), case structures, while loops and shift registers. Concept 1: Creating your first VI: Front Panels and Block Diagrams (reference: Bishop p. 66) LabVIEW stands for Laboratory Virtual Instrument Engineering Workbench. In LabVIEW, a virtual instrument has two parts, namely a front panel (the visual front-end) and a block diagram (underlying high-level graphics-based code). One creates the front panel and block diagram by clicking and dragging icons (called controls). The objective in this exercise is to create a simple program that adds displays the sum and product of two numbers. Step 1: Launch LabVIEW to create the following front panel (Figure 1A below). Right-clicking the mouse will bring up a menu of graphical elements (NI calls them controls). One can then click and drag the desired control into the front panel (gray area). Num Ctrls Num Inds Figure 1A: Front Panel Right Click - All Functions - Numeric Figure 1B: Block Diagram Step 2: Create the block diagram. The block diagram (Figure 1B above) is invoked by clicking Window – Show Block Diagram from the panel’s menu bar. Again, one right clicks the mouse to bring up a menu of block element functions. Step 3: Click the play button (arrow icon) on the front panel’s menu bar. Contrast this with clicking the Continuous Play button (arrows in a circle icon) Experiment by clicking on the rocker switches or typing numbers (e.g. integers and reals) in the text box. Exercise 1: In LabVIEW create programs for the following: 1-1. Accepts temperatures in Celsius and displays its Fahrenheit equivalent (try pointer slides) 1-2. Accepts 3 numbers and displays the average 1-3. Accepts 2 numbers and displays which is the maximum © Copyright Paul Oh MEM 351 Dynamic Systems Lab 1 Concept 2: Case Structures (reference: Bishop p. 204) Branch statements are those that test a condition (true or false) and execute commands based on those conditions. LabVIEW has several controls for branching. In the block diagram programming, the Case Structure control is invoked under the Executive Control category. Step 1: Create the following LabVIEW front end – Note that toggle switch by default is FALSE by with a “Switch When Pressed” mechanical action. Num Control Num Control Toggle Switch Step 2: Create the Block Diagram (True Case: adds the two numbers). Note: clicking the down arrow in the Condition Terminal sets the True condition. Exec Ctrl - Case Structure All Functions - Numeric Edit Text comments © Copyright Paul Oh
Docsity logo



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