Lab View
Lab View
INTRODUCTION LABVIEW
AIM:
(1) Convert temperature in Celsius scale to Fahrenheit scale
(2) Generate random numbers from 0 to 100 and stop the program if a number greater than
90 comes.
(3) Write generated values in notepad
(4) Stop the above program after 10 seconds or if a number greater than 90 comes(
whichever comes first)
(5) Add two numbers A and B if A is greater than or equal to B, IF A less than B multiply
those numbers
(6) Generate a sinusoidal signal and obtain its spectrum
Front panel
PROCEDURE
1. Open new vi
2. Right click on front panel >> Numeric>>Numeric control >> rename it as Celsius
3. Right click on block diagram>>Numeric>>select MULTIPLY block
4. Connect output of Celsius block to input terminal of MULTIPLY block
5. Right click on other input terminal and create constant write 1.8 as constant
6. Right click on block diagram>>Numeric>>select ADD block
7. Connect output of MULTIPLY block to input one terminal of ADD block and Right
click on other input terminal of ADD block and create constant write 32 as constant
Right click on output terminal of ADD block and create numeric indicator
8. Add a Celsius value and press run button
9. To run the above program continuously create a while loop and enclose the above
program in while loop
10. Right click on condition terminal and create control
11. Give a delay of some milliseconds
Right click on block diagram>>timing>>wait(ms)
12. Run the program
2.
front panel
PROCEDURE
1. Open new vi
2. Select random number generator
Right click on block diagram >> Numeric>> random number (0-1)
3. Multiply the random numbers (0-1) by 100 and convert them to nearest integer values
Right click on block diagram >> Numeric>> Round to nearest
4. Compare with 90 and connect the output of comparison block to condition terminal
make condition as stop if true
3. Write operation
Procedure
1. Select write to measurement file
Right click on block diagram >> file I/O>> write to measurement file
2. Select required conditions in write measurement file properties like where to write file
format etc.
3. Run the program
4. Generated values can be obtained in corresponding place mentioned
Observation
4. Stop timer
,
Procedure
1. Generate elapsed time block and mention time required for the program to run
2. Right click on block diagram>>timing>> elapsed time
5. Case structure
Add two numbers A and B if A is greater than or equal to B, IF A less than B multiply
those numbers
Procedure
1. Generate control inputs and rename them as A and B
2. Generate case structure
3. Right click on block diagram>>structure>> case structure
7. Select spectrum
Right click on block diagram >> express>> spectral analysis >>spectral
8. Connect simulate signal output to spectral input and create graph indicator at
spectral output
9. Run the program.