Instrumentation Lab # 01: Introduction To Labview (General)
Instrumentation Lab # 01: Introduction To Labview (General)
Name: -
Roll #:-
Section: -
Date:-
Task # 01:
Make a VI which will take two Strings as an input; your First
Name and Last Name, Find out the length of each string,
concatenate them and also calculate the length of your
complete Name.
Solution:
Case Structures:
It is used for IF else statement in a LabView or used as a Switch.
For example, we make a program that will perform Addition when Boolean Switch is ON, and perform
Subtraction when Switch in OFF.
Task # 02:
In the above program, we just have 2 options, True and False, Amend the above program for four cases
and replace the Boolean Switch with a Numeric Switch. When user enters 0, it will perform Addition, for
1, Subtraction, for 2, Multiplication and for 3, Division.
Solution:-
Loops:
There are 2 types of Loops in LabView; For Loop and While Loop
For loop is used to iterate the program up to a specific number, for example if you want to run the
program for 5 times, you can fix the value of iterations up to 5 as follows.
In LabView, a while loop acts as do while. The program runs always one time and then depends on the
condition. For example, we make a while loop that should stop when i = 5 as follows.
Task # 03:
Make a VI that will display Odd Numbers starting from 3 and waits for 2 seconds after each next output.
The program should stop until a STOP Button is pressed by the User.
Solution: - Since Odd numbers can be written as 2x+1, so following program will perform the required
task.