Professional Documents
Culture Documents
Y=(A*B*C)+(D*E)
The equation consists 5 variables and performs two functions.
Open LabVIEW and click on file and new vi.
Tile the two windows i.e., the front panel and the block panel using ctrl+t.
Y=mx+c
BLOCK DIAGRAM WINDOW:
Same like the previous equation , Create a Multiply and Add functions from the
Functions palette of block diagram.
Multiply m*x and give it as an input to the Add function and create a control as C and
connect to the other input of the Add function.
Create an indicator the Add block and rename it as Y.
Y = ( m∗x ) +C ;
Click on the frame of the formula script and add inputs and name them x,m,c and an
output y and them with their corresponding controls and indicators.
Select all Right clickOff the View as Icons
From the tools palette, click brush icon for minimizing the block diagram.
Case3: (A+B)/[(A+B)*2
A)
Aim: To create a VI that implements the given cases using stacked sequence structure.
Procedure:
1. Open blank VI.
2. Build front panel window
a. Place one control (inputs) from Controls palette -> Modern -> Numeric ->
Numeric control as A, B.
b. Place one Indicator (outputs) from Controls palette -> Modern -> Numeric ->
Numeric indicator as output.
Fig. Front panel window
3. Build block diagram window
a. Place flat sequence structure.
b. Convert the flat sequence structure to the stacked sequence structure for this
right click on the flat sequence structure -> click on replaced to stacked sequence structure.
c. Add the two frames by click on the stacked sequence structure.
d. For the case 1 Connect the input controls A, B and add function from function
palette -> Numeric -> Add.
e. Add the sequence local to the stacked sequence structure.
f. Connect the add output to sequence local.
g. For the case 2 connect the frame 1 sequence local and multiply function, add the
constant 2 from function palette -> Numeric ->Divide, controls -> Numeric -> Numeric
constant.
h. Add the sequence local to the stacked sequence structure.
i. Connect the divide output to sequence local
j. For the case 3 connect the frame 2,1 sequence locals and divide function, from
function palette -> Numeric ->Divide.
k. Connect the divide output to stacked sequence structure.
l. Make proper connections among controls, functions, and indicator.
m.
Results Analysis:
If the input A=8, B=5 then the output is 0.5 by using the cases Case1: A+B
Case2: (A+B)/2
Case3: (A+B)/[(A+B)*
3. Build a VI to execute the following expression using flat sequence structure.
(A+B)/[(A+B)*2] The three cases be:
Case1: A+B
Case2: (A+B)/2
Case3: (A+B)/[(A+B)*2]
A) Aim: To create a VI that implements the given cases using flat sequence structure.
Procedure:
1. Open blank VI.
2. Build front panel window
a. Place one control (inputs) from Controls palette -> Modern -> Numeric ->
Numeric control as A, B.
b. Place one Indicator (outputs) from Controls palette -> Modern -> Numeric ->
Numeric indicator as output.
4. Run the VI by entering the control values and observe the output in the indicator from
the front panel window.
Results Analysis:
If the input A=3, B=6 then the output is 0.5 by using the cases
Case1: A+B
Case2: (A+B)/2
Case3: (A+B)/[(A+B)*2