0% found this document useful (0 votes)
22 views

LV Tutorial2

The document provides instructions and descriptions for four LabVIEW exercises of increasing difficulty: 1. A simple calculator program that allows users to input two numbers, select an operation, and display the result. 2. A sine wave generator program that allows users to input an amplitude and wavelength to generate and plot a sine wave. 3. A stopwatch program that counts elapsed time when the user clicks "run" and displays the time when the user clicks to stop. 4. A debugging exercise where the user downloads a program with syntax and runtime errors and uses LabVIEW tools to debug and correct the program.

Uploaded by

Alberto Cabral
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

LV Tutorial2

The document provides instructions and descriptions for four LabVIEW exercises of increasing difficulty: 1. A simple calculator program that allows users to input two numbers, select an operation, and display the result. 2. A sine wave generator program that allows users to input an amplitude and wavelength to generate and plot a sine wave. 3. A stopwatch program that counts elapsed time when the user clicks "run" and displays the time when the user clicks to stop. 4. A debugging exercise where the user downloads a program with syntax and runtime errors and uses LabVIEW tools to debug and correct the program.

Uploaded by

Alberto Cabral
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

TAMPL REU 99

LabVIEW Tutorial

LabVIEW Tutorial 2: Simple Programs Goal of this tutorial: To become more familiar with programming in LabVIEW by completing simple exercises. Each exercise is followed by a brief description of the programs function and the techniques needed to complete it. Asterisks following the exercise indicates its difficulty (* - easiest, *** most difficult). Exercise 1: Simple Calculator * Make a program which lets the user input two numbers, choose an operation (one of add, subtract, multiply, or divide), and display the result. This program includes arithmatic operations and case structure. For additional exercise, make this calculator into a sub-vi with three inputs (the two numbers and the operation) and one output, and demonstrate that it works by using it in another program. Exercise 2: Sine-Wave Generator ** This program should allow the user to input the amplitude and wavelength (period), generate the specified wave from x = 0 to 10, and plot it on a graph. Programming techniques used include arrays, arithmatic operations, for-loops, graphing. [Hint: The sin(x) in LabVIEW is at Functions Numeric Trignometric Sine.] For additional exercise, save the result in a 2-column spreadsheet file and plot it on Excel. Exercise 3: Stop Watch * Make a program that starts counting time when you click on run. It should have a switch that you can click on to stop the program, at which time the total elapsed time in displayed in seconds. You will need while loops and sequence structure with sequence locals for this program. Exercise 4: De-bugging Exercise *** Goto the website: www.tufts.edu/as/tampl/program99/, and follow the link to Tutorials page. Download the debugging exercise. There have been several syntax and runtime errors built into the program. Using error list, lightbulb, and probes, debug the program so that it performs the task it was meant to do. [Hint: first correct all the syntax errors so that the program can compile, then run the program to detect runtime errors.] The text box in the front panel explains what the program was meant to do. Check the web for solutions: www.tufts.edu/as/tampl/program99/ follow link to Tutorials

You might also like