You can build a user interface using Labview and the user interface is
known as Front pane
Labview programs are called virtual instruments, because their
appearance and operation imitate the physical instruments
Green
Blue
Orange
pink
Buttons
Text Ctrls
leds
Graph indicator
Use
Use to input a number
through knobs , dials ,
and slides
Use to insert a
pushbutton or toggle
switch and slide switch
User to inter a string or
to display a string or to
make a label to make to
code more realistic and
readable
Used as indicators
Used to display a graph
on the front panel
Output
Exec control
Arith & comp
Use
Use to create an input
like a simulated signal
and DAC input or voice
input
Use to create an output
like a DAC output
Use to create case
structure and loops
Use to make the
arithmetic operations
and comparison
operations
Example (1):Make a labview program that ask the user to enter(x,y) two numbers and the
program find :
X+y
X*y
X^y
x-y
x/y if y equal zero (answer equal infinity) a red led should light to
warn the user
solution:
The purpose of this program is to learn the arithmetic operations like (add ,
subtract , division , multiplication). The front panel should contain two input
for the two number and four output for the for operation and a warning led
as shown in figure 5
comment :
Note that Labview complete the division operator when the denumerator
equals zero
Y1=10x1 + 5
Y2=(x1*x2)2+20x3
Y3=sinx2+cosx3
Solution
The front panel should contain three inputs and three outputs as shown in
figure 7
Comment
Formula tool can be found at arithmetic and comparison and is used to
enter a formula in an easy way for the user
If the formula is
correct then this
led is green
Example 3
Make a labview program that takes the mark of a student. The program
contain five leds as following :
Led 1
Led 2
Led 3
Led 4
Led 5
Mark( 90-100)
Mark(80-89)
Mark (70-79)
Mark (60-69)
Fail
Solution :The purpose for this example is to learn the comparison operators. The front
panel should contain five led as output and one input for the mark as shown
in figure 9
Comment :
Simulated signal can be found on the function palette >> input
To choose
the signal
type
To add noise
to the signal
Example 5
Make a Labview program that plot two signals on the same graph and
control each signal amplitude and frequency and phase, the first signal is
sine and the second is triangle.
Solution
the program should contain six knobs (two signals) and one graph screen as
shown in figure 13
Example 6
Make a Labview program that plots a sine signal or a square according to a
toggle switch control by the user. If the switch is on then the plotted signal is
sine if the switch is off then the plotted signal is square and add noise to
each signal with the noise amplitude is control by the user
Solution
This example contain four knobs (frequency ,phase, amplitude, noise
amplitude ) as shown in figure 15
Report exercises:1- Make a Labview program that calculate the average of four number if
the average is bigger than 100 then a green led will be on and if equal
a yellow led will be on and if less a red led will be on.
2- Make a Labview program that execute the following formula
y x 1 x 2 20
y x1 *x 2 *x 3
y (x 1 ) 2
3- Make a Labview program that plot two signal (sine and saw tooth) on
the same graph and control the amplitude and phase and frequency of
each signal
4-
(bonus) make a Labview that select one signal out of four signal to
plot and the program contain only for knobs (amplitude, phase ,
frequency , noise amplitude) and two toggle switches and one graph
screen