Professional Documents
Culture Documents
JOB SHEET
TOOLS /
EQUIPMENTS / ITEM QTY
MATERIALS / LabView 2011 1
APPARATUS:
1
DPP C2
PROCEDURE:
STEPS WORKING DETAILS
PART A: Creating SubVI
1. Create a SubVI that computes the average of five numbers input.
2. Then, by using the SubVI, multiply the computed average by a random
number in the range [0, …,1].
3. Display both (a) the average, (b) the random number, and (c) the
multiplication of the random number and the average, respectively.
4. Test your VI and Print screen your result in the Result Section.
5. Print Screen the Block Diagram and the Front Panel
Figure 1
2
DPP C2
Programming hints
The Simulate Waveform express VI can be found on the functions palette
[Programming » Waveform » Analog Waveform » Waveform
Generation » Simulate Signal]. Set the signal type to DC, with an offset of
95. Click the "Add Noise" box, set the noise type to "Uniform White Noise,"
and set the noise amplitude to 5. The other settings can remain at the
default values.
The thermometer can be found in the controls palette [Modern » Numeric
» Thermometer].
Your answer should have:
1. Block diagram and front panel of the Temperature Converter
2. Block diagram and front panel of Kelvin (SubVI)
3. Block diagram and front panel of Fahrenheit (SubVI)
4. Properties of Simulate Waveform express VI
3
DPP C2
Figure 2
Programming hints
i. The most common repetitive loop structures are the For Loop (which
executes a defined number of times) and the While Loop (which
executes until a particular condition is true). Make sure you understand
how to use each. In this case, the While Loop is preferred.
ii. To set the colors of the LEDs. Simply click on the LED and change it
from its Off state to its On state. Then use the coloring tool to change
the color of the On state.
iii. For timing the execution of a loop, I like to use the Wait Until Next ms
Multiple function found on the Timing subpalette. You'll have to figure
out how to convert the number of measurements per second into a
millisecond value that tells the loop how long to wait between
successive executions of the loop.
RESULT:
Part A
4
DPP C2
Part B
Part C
DISCUSSION:
- While loop able make the VI to run continuously
- Simulate signal is to help user by giving input data from the waveform
- Measure rate is to make a time delay for each data input in milliseconds
CONCLUSION:
- Subvi can make the user work more compact and efficient
- Subvi is to reduce the number of component in block diagram by combining
them into one subvi
5
DPP C2