Lab No 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

LAB NO 2

OBJECT:
Follow instructions to design a virtual temperature converter using LabVIEW software.

THEORY:
Temperature Conversion in LabVIEW.
Temperature is measured with different units at different places across the world. However,
there are three basic standard units for measuring the temperature i.e., Celsius, Fahrenheit and
Kelvin. We can convert them into each other by performing some mathematical operations.
The standards of these scales with reference to the freezing and boiling point of water.
"Celsius" scale is basically the scale based on 0 degrees for the freezing point of water and 100
degrees for the boiling point of water. "Fahrenheit" scale is based on 32 for the freezing point
and 212 for the boiling point of water. Kelvin scale is based on 273 for the freezing point and
373 for the boiling point of the water. Fahrenheit, Celsius and Kelvin are denoted by "F", "C"
and "K" respectively. There are mathematical expressions to convert the temperature from one
scale to another scale.

Temperature Conversion Formulas


Here are the three formulas for temperature conversion.
Celsius To Fahrenheit Conversion
 To convert "Celsius" to "Fahrenheit" use the expression below.
F = 9/5 °C + 32
Fahrenheit To Celsius Conversion
 If you want to convert "Fahrenheit" to "Celsius" use the expression below.
C = 5/9 (F - 32)
Celsius To Kelvin Conversion
 You can convert "Celsius" to "Kelvin" by using the expression below.
K = C + 273
By using all the above expressions, it can convert easily one scale to another one.

STEPS OF CONSTRUCTION:
1. Select File» New to open a new front panel.
2. Create a numeric digital control. Use this control to enter the value for degree Celsius.

 Select the digital control on the Controls» Numeric Controls palette.


 Move the control to the front panel and click to place the control.
 Type Celsius inside the label and click outside the label or click the Enter button on the
toolbar.
3. Create a numeric digital indicator. You will use this indicator to display the value in degrees
Fahrenheit.

 Select the digital indicator on the Controls» Numeric Indicators palette.


 Move the indicator to the front panel and click to place the indicator.
 Type deg F inside the label and click outside the label or click the Enter button.
4. Display the block diagram by clicking it or by selecting Window» Show Diagram.
5. Select the Multiply and Add functions on the Functions» Numeric palette and place them on
the block diagram.
6. Select the numeric constant on the Functions» Numeric palette and place two of them on the
block diagram. When you first place the numeric constant, it is highlighted so you can type a
value.
7. Type 5,9 in one constant and 32.0 in the other.
8. Use the Wiring tool to wire the icons.

 To wire from one terminal to another, use the Wiring tool to click the first terminal,
move the tool to the second terminal, and click the second terminal.
9. Display the front panel by clicking it or by selecting Window» Show Panel.
10. Enter a number in the digital control and run the VI.

 Use the Operating tool or the Labeling tool to double-click the digital control and type a
new number.
 Click the Run button to run the VI.
 Try several different numbers and temperature converters and run the VI again.
11. Select File» Close to close the Convert Celsius to Fahrenheit VI.

RESULT:
CONCLUSION:
A LabVIEW temperature converter effectively converts temperatures between units, provides a
user-friendly real-time interface, error management, and precise formula-based conversions.

You might also like