From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Convert Temperature Units in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This code allows the user to Convert Temperature from Selected Unit to an Output Units.

 

Description

This VI uses a couple of nested For Loop to handle the three possible Input Units and Output Values (Kelvin, Celsius and Fahrenheit). Depending on the combination of Input Units Value and Output Units Value the Tempertature Value is converted applying the calculations.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Set Input Units, Output Units and Temperature
  2. Run VI

Additional Information or References

2114.png

 

 Check out LabVIEW FPGA Temperature Converter for a different look at temperature conversion.

 

**This document has been updated to meet the current required format for the NI Code Exchange.** 

Regards,
Dan King

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.