Emi Practical Notes
Emi Practical Notes
PRACTICAL NOTES
EXPERIMENT-1
Theory : :- LabVIEW offers a graphical programming approach that helps you visualize every aspect
of your application, including hardware configuration, measurement data, and debugging. This
visualization makes it simple to integrate measurement hardware from any vendor, represent
complex logic on the diagram, develop data analysis algorithms, and design custom engineering user
interfaces.
A LabVIEW program consists of one or more virtual instruments (VIs). Virtual instruments are called
such because their appearance and operation often imitate actual physical instruments. However,
behind the scenes, they are analogous to main programs, functions, and subroutines from popular
programming languages like C or Basic. Hereafter, we will refer to a LabVIEW program as a "VI"
(pronounced "vee eye," NOT the Roman numeral six). Also, be aware that a LabVIEW program is
always called a VI, whether its appearance or function relates to an actual instrument or not.
A VI has three main parts: a front panel, a block diagram, and an icon.
LabVIEW offers more flexibility than standard laboratory instruments because it is software-based.
You, not the instrument manufacturer, define instrument functionality. Your computer, plug-in
hardware, and LabVIEW comprise a completely configurable virtual instrument to accomplish your
tasks. Using LabVIEW, you can create exactly the type.of virtual instrument you need, when you
need it, at a fraction of the cost of traditional instruments.
7. Now, go to the Controls -> Modern -> Numeric -> Numeric Indicator.
8. Change its name to “Celsius”
9. Now, go to Controls -> Modern -> Numeric -> Numeric Indicator
10. Name it as a Fahrenheit. Change its upper limit from “100” to “200” in order to observe the
results more accurately.
11. Now let’s move to the block diagram and design our small algorithm.
12. Go to Functions -> Express -> Arithmetic & Comparison -> Formula.
13. As you place this block on the “Front Panel” , you will see the figure.
14. Now Change the formula according to your requirements.
18. Now, the “Celsius” scale is converted into the “Fahrenheit ” scale.
19. Run the Program and you can see by changing the values of the “Celsius” the change occurs
in the values of the “Fahrenheit”.
(2) Degree to Radians:
1. Start the Lab view and select the blank VI.
10. As you place this block on the “Front Panel” , you will see the figure.
11. Now Change the formula according to your requirements.
15. Now, the “Degree” scale is converted into the “Radians” scale.
16. Run the Program and you can see by changing the values of the “Degree” the change occurs
in the values of the “Radians”.
8. Now, go to the Controls -> Modern -> Numeric -> Numeric Indicator.
9. Change its name to “Celsius”
10. Now, go to Controls -> Modern -> Numeric -> Numeric Indicator
11. Name it as a Fahrenheit. Change its upper limit from “100” to “200” in order to observe
the results more accurately.
12. Now let’s move to the block diagram and design our small algorithm.
13. Go to Functions -> Express -> Arithmetic & Comparison -> Formula.
14. As you place this block on the “Front Panel” , you will see the figure.
15. Now Change the formula according to your requirements.
19. Now, the “Celsius” scale is converted into the “Fahrenheit ” scale.
20. Run the Program and you can see by changing the values of the “Celsius” the change
occurs in the values of the “Fahrenheit”.
21. Now go to Controls -> Boolean -> Vertical Toggle Switch.
22. Select Vertical Toggle Switch and place it on the “Front Panel”.
23. Now let’s move to the block diagram and design our small algorithm.
24. Go to Functions -> Structures -> Case Structures.
25. Select the Formula Area.
26. The value passed into the Case Selector terminal determines which case executes.
27. By default the case selector is a boolean data type and two cases exist True and False.
28. Connecting another data type to the case selector will automatically change it's data type.
31. When You turn of the “Switch” the farenheit scale will show same value as that of Celsius.
(4) 4 Bit BCD to Gray Code:
1. Start Labview and chose Blank VI.
7. Connect BCD2 to EXOR gate 1, the EXOR gate to Gray 2 and BCD2 to EXOR gate 2.
8. Connect BCD 3 to EXOR gate 2, the output of EXOR gate 2 to Gray 3 and BCD 3 to EXOR gate 3.
9. Connect BCD4 to EXOR gate 3 and the output of EXOR gate 3 to Gray4.
10. Run the program and see that on changing BCD input we get corresponding gray output.
3. Rename the Switches as Bit 1 and Bit 2 and the LED 1 as Sum and LED 2 as carry.
4. In Block diagram, add one EXOR gate and one and gate.
7. Run the program and the program will add two bits.
(6) Use subVI of half adder to create full adder:-
1.Run LabVIEW and choose blank VI.
6. A subVI is created.
7. Now create another VI by copying the orginal VI.
Theory:- LabVIEW offers a graphical programming approach that helps you visualize every aspect of
your application, including hardware configuration, measurement data, and debugging. This
visualization makes it simple to integrate measurement hardware from any vendor, represent
complex logic on the diagram, develop data analysis algorithms, and design custom engineering user
interfaces.
A LabVIEW program consists of one or more virtual instruments (VIs). Virtual instruments are called
such because their appearance and operation often imitate actual physical instruments. However,
behind the scenes, they are analogous to main programs, functions, and subroutines from popular
programming languages like C or Basic. Hereafter, we will refer to a LabVIEW program as a "VI"
(pronounced "vee eye," NOT the Roman numeral six). Also, be aware that a LabVIEW program is
always called a VI, whether its appearance or function relates to an actual instrument or not.
A VI has three main parts: a front panel, a block diagram, and an icon.
LabVIEW offers more flexibility than standard laboratory instruments because it is software-based.
You, not the instrument manufacturer, define instrument functionality. Your computer, plug-in
hardware, and LabVIEW comprise a completely configurable virtual instrument to accomplish your
tasks. Using LabVIEW, you can create exactly the type.of virtual instrument you need, when you
need it, at a fraction of the cost of traditional instruments.
PROCEDURE:- (7) Factorial of a number using FOR loop and Shift Register:
(1) Open LabVIEW 2018 and choose Blank VI.
(2) Add a NUMERIC CONTROL and NUMERIC INDICATOR.
(3) Now in Block Diagram, add a FOR LOOP from FUNCTIONS –> PROGRAMMING-> STRUCTURES->
FOR LOOP.
(4) Join NUMERIC CONTROL to LOOP COUNT.
(5) Now in the loop, Add a MULTIPICATOR and add SHIFT REGISTER .
(4) Now create a constant having value “1” and join it to left shift register.
(5) Now add an INCREMENT operator and join its Input to Loop Iteration and its output to one of the
inputs of MULTIPICATION.
(6) Now add a FEEDBACK NODE.
(7) Join FEEDBACK NODE to output and other input of MULTIPIER.
(8) Create a constant ‘1’ and join it to initialize terminal of FEEDBACK NODE.
(9) Now run theVI and the VI will give Factorial of a number.
(10) Now add a Greater than or Equal to Operator and connect its output to Loop Condition.
(11) Join the NUMERIC CONTROL to the greater than equal to Operator.
(12) Now join the other input of the greater than equal to operator to the output of increment
operator.
(13) Run the VI and observe that the VI gives sum of n numbers.
Aim:- To create :
(11) A 1D Array and Multiply is elements with a scaling factor and find the resultant array
(12) A 2D Array and find its Transpose
Theory:- LabVIEW offers a graphical programming approach that helps you visualize every aspect
of your application, including hardware configuration, measurement data, and debugging. This
visualization makes it simple to integrate measurement hardware from any vendor, represent
complex logic on the diagram, develop data analysis algorithms, and design custom engineering user
interfaces.
A LabVIEW program consists of one or more virtual instruments (VIs). Virtual instruments are called
such because their appearance and operation often imitate actual physical instruments. However,
behind the scenes, they are analogous to main programs, functions, and subroutines from popular
programming languages like C or Basic. Hereafter, we will refer to a LabVIEW program as a "VI"
(pronounced "vee eye," NOT the Roman numeral six). Also, be aware that a LabVIEW program is
always called a VI, whether its appearance or function relates to an actual instrument or not.
A VI has three main parts: a front panel, a block diagram, and an icon.
LabVIEW offers more flexibility than standard laboratory instruments because it is software-based.
You, not the instrument manufacturer, define instrument functionality. Your computer, plug-in
hardware, and LabVIEW comprise a completely configurable virtual instrument to accomplish your
tasks. Using LabVIEW, you can create exactly the type.of virtual instrument you need, when you
need it, at a fraction of the cost of traditional instruments.
(2) Now add Array from CONTROLS-> MODERN-> ARRAY, CLUSTER AND MATRIX.
(5) Now add a MULTIPLICATION OPERATOR and connect its one input to first Array and its output to
second array.
(6) Now create a constant and connect it to other terminal of MULTIPLICATION OPERATOR.
(7) Now run the VI and see that the elements of first matrix gets scaled by the scaling factor and the
output is shown in the second matrix.
(4) Now right Click on First array and select ‘ADD DIMENSION’.
(5) Make both the Arrays 5x5 form.
(8) You can run the program and observe that second matrix is the transpose of first matrix.