Professional Documents
Culture Documents
20331A0449 Week1
20331A0449 Week1
20331A0449 Week1
Open NI LABVIEW
Click Ctrl+N to open new VI
Use Ctrl+T to make both front panel and block diagram to appear side by side on the screen
Procedure:
FRONT PANEL:
Steps:
1. Right click on the front panel select numeric-control and its corresponding node is created on the block
diagram.
2. Again right click on the front panel to select numeric-indicator and its corresponding node is appear on the
block diagram.
BLOCK DIAGRAM:
Steps:
1. Right click on the block diagram panel,select numeric and then click the function quotient and remainder.
2. Right click on the function(quotient and remainder) then select create constant,then type the number ‘2’
in the box.
3. Right click on the block diagram panel,select comparison and then click the function “equal”,right click on
the function “equal” go to create constant and then type ‘0’ in it,connect the another input terminal of
function “equal” to the function quotient and remainder.
4. Right click on the block diagram panel,select comparison and then click the function “selector”.
5. Right click on the front panel and then select strings and constants and then select string and place it on the
panel of block diagram.
6. Select the same step and place it on the block diagram.
7. Connect the two strings to the two input terminals of the selector and then type “even” and “odd” in them.
8. Connect the selector and the function “equal”.
9. Connect the indicator and output terminal of selector.
10. Click the run option in the menu bar of block diagram and give the input in the control that is placed in the
front panel and observe the corresponding output as “even” or “odd”.
Result analysis:
When the input in the control is taken as 2 the output given number is even.
3)Implement a Boolean expression
Aim: To implement the Boolean expression Y = ab+cd+(ac)’
Procedure:
Open NI LABVIEW
Click Ctrl+N to open new VI
Use Ctrl+T to make both front panel and block diagram to appear side by side on the screen
Procedure:
FRONT PANEL:
Steps:
1. Right click on the front panel and select Boolean controls which are push buttons.
2. Name the push buttons as a,b,c,d. by double clicking on them.
3. Right click on the front panel and then select Boolean indicator which is LED.
BLOCK DIAGRAM:
Steps:
1. In the given Boolean expression there are three and gates and one or gate
2. Right click on the block diagram panel select Boolean and click “and” gate then connect the two input
terminals of and gate to the two Boolean controls “a” and ”b”
3. Similarly select again an “and” gate then connect the two input terminals of this and gate to the two
Boolean controls of “c” and “d”.
4. Similarly select an “and” gate then connect the two input terminals of this “and” gate to the two Boolean
controls of “a” and “c”.
5. Right click on the block diagram panel select Boolean and select the “not” gate then connect the output
terminal of 3rd “and” gate to the input terminal of the “not” gate so that the output of the “not” gate is the
inversion of (ac) which is (ac)’
6. Select “or” gate which is in Boolean and connect the two input terminals of this”or” gate to the outputs of
1st and 2nd gate,so that the output of this gate is (ab+cd)
7. Similarly select the 2nd “or” gate,and connect the two input terminals of this “or” gate to the outputs of the
1st “or” gate and the 3rd “and” gate.
8. Select the run option in the menu bar of block diagram
9. Give inputs for the Boolean values in the front panel and observe the corresponding output.
Fig2 block diagram window
Result analysis:
When a, b, c, d are taken as 0, 0, 1,0 the output obtained is y=1
4) The salary of x is input. His dearness allowance is 40% of basic salary and house rent allowance is 20%
of basic salary. Build a VI to calculate his gross salary.
Procedure:
1)Open blank VI
2)Go to file and click on new project
3)Enter CTRL+T so that you will get the front panel and block diagram side by side.
4)In the front panel window, place control (inputs) from control palette - > Modern - > Numeric - > Numeric Control , and
label it as Salary(x).
5) In the front panel window, place Indicator (output) from control palette - > Modern - > Numeric - > Numeric Indicator ,
and label it as Gross Salary.
Result analysis:
When salary(x) is taken 9000 as control(input) , the output value in indicator is observed as 14400.