Hi friends, today we are going to learn a simple program using LabVIEW. This might be your first program using LabVIEW. Here we are going to convert temperature readings from degree Celsius into degree Fahrenheit. Without wasting too much time let us start programming with LabVIEW for our first program.
LabVIEW Program for degree Celsius to Fahrenheit Conversion
Step 1: Open the LabVIEW and click on Blank VI
Step 2: Now you will see two windows on your computer screen. One is ‘front panel’ and other is ‘block diagram’. To properly adjust both of them on your screen press “Ctrl+t” from your keyboard.
Step 3: Now you will see both the windows are adjusted on single screen. Move your cursor on block diagram window and right click on empty space. Available function will appear. Click on structures and then click on while loop. Now draw the while loop (box) by dragging your mouse on block diagram window.
Step 4: In this first LabVIEW program we are converting temperature readings from degree Celsius to degree Fahrenheit. So in short we are implementing the formula to convert C>F as shown below.
Step 5: First of all we have to take a slider to vary the Celsius readings. To bring a slider, right click on front panel. Available controls will appear. Move cursor on “Numeric” and click on “vertical fill slide”. You can give name to slider. Here we are using this slider for degree Celsius readings therefore I have name as “Deg C”. In this way we have completed “C”. Now we have to multiply this “C” with “9/5” as shown in formula.
Step 6: To multiply “C” with “9/5”, we will first multiply it with 9 and then divide it by 5. To multiply “C” with 9 we have to take “multiplier”. Right click on block diagram > numeric > multiply. Same steps will be needed for taking divider and for addition with 32 as from formula.
Step 7: for taking “9” i.e. constant right click on block diagram > numeric > numeric constant.
Step 8: Similarly take divider and divide by 5. Take addition and add 32. Now your block diagram will look like this:
Step 9: Now we have show this converted temperature readings (which are now in Fahrenheit) on numeric indicator. Right click on front panel > numeric > numeric indicator. I have given name as “Deg F” to this numeric indicator.
Step 10: Finally we have to create a control for the while loop to stop the program at any time. To create a control right click on red button i.e. “loop condition” and select “create control”.
Step 11: Save the program by pressing “Ctrl+S”.
Step 12: Click on run button available in block diagram window.
Step 13: Now vary the slider you will see corresponding change in degree Fahrenheit output.
If you are having any problems while doing your first LabVIEW program feel free to ask in comments. I am also providing a LabVIEW program file for converting Celsius to Fahrenheit which you can download here.
Download
Click here to download the LabVIEW program.
If you like this article, please share it with your friends and like or facebook page for future updates. Subscribe to our newsletter to get notifications about our updates via email. If you have any queries, feel free to ask in the comments section below. Have a nice day!
The post LabVIEW Program for Degree Celsius to Fahrenheit Conversion appeared first on MyClassBook.