Example Code

Simple Calculator Using Enum 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

Download All

Overview

This VI is a calculator that has 4 function add, subtract, divide, multiply 

 

Description

This VI use case structure to perform calculation. The calculator has 4 function add, subtract, divide, multiply.

 

Requirements

  • LabVIEW 2013 (or compatible)

 

Steps to Implement or Execute Code

  1. Download the attached VI.
  2. Select Input a, Input b, Operator to calculate
  3. Run Simple Calculator Using Enum 2013 NIVerified.vi
  4. You can see the result of the calculation

 

Additional Information or References

Front Panel and VI Block Diagram

 2-280.png

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

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

Comments
ankit700
Member
Member
on

Hello ashish012,

Seeing your example I also tried to make a similar calculator. After adding the cases(Add, multiply,etc.), they are still shown in red. I am unable to understand what the problem is. Can you please help? I am attaching a jpeg file of my vi and the error.

Thank youcalc1.png