01-19-2022 11:32 AM - edited 01-19-2022 11:37 AM
Hi Friends
I Make a simple program in which temperature is converted from Celsius from Fahrenheit.
In this program I use Slide bar for Celsius temperature that is multiply by 1.8 and sum with 32. The result temperature which is Fahrenheit; displayed on temperature gauge with three LED for temperature information
I'm Abdullah, Student of Electrical Engineer
01-19-2022 11:44 AM
H Abdullah,
@Abdullah2133 wrote:
I Make a simple program in which temperature is converted from Celsius from Fahrenheit.
Is there a specific problem with your VI?
Why don't you use the digital display of the gauge indicator (to avoid two indicators for the very same value)? (The same applies to the "T in °C" control...)
Why don't you use the InRangeAndCoerce function to test for a certain range?
Why don't you use an array approach to test for your 3 temperatur ranges instead of implementing 3 individual comparison checks?
01-19-2022 12:22 PM
(Sorry, I cannot open your VI because I don't have access to LabVIEW 2021. Consider "save for previous" to get a wider audience.)
Some questions and suggestions:
01-19-2022 12:50 PM - edited 01-19-2022 01:04 PM
Just to give you some ideas, here's my version. Arguably less complicated :D:
Note that there are a few tricks that you should learn how to do:
01-19-2022 02:05 PM
If you want it to be even "simpler", LabVIEW has built-in unit management. On a floating point numeric control or indicator, show the unit label:
Put in degrees C and degrees F, and your code is super simple, just a wire!
Note that this does make a wire with a different data type (the wire is natively in Kelvin), so if you want to convert it to a normal float wire, you need to use the Convert Unit function:
A lot of people don't like units because of the different data type wire issue, as it doesn't work well when trying to reuse subVIs across different unit wire types, but I find it pretty useful.