From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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

LabVIEW Calculator

Code and Documents

Attachment

Overview


This is an example of a fully-funcitonal calculator built in LabVIEW.

This LabVIEW Calculator program has the following features and more:

- Add/Subtract/Multiply/Divide
- Decimal Point
- Negate/Square Root/Square/Invert
- Memory - Clear/Recall/Store/Add
- Backspace/Clear Entry/Clear All

The buttons are tied to the keys on the numpad as well. The program has complete documentation and is event-driven.


This program also demonstrates the following concepts taught in the LabVIEW Basics course.

- Dataflow Programming
- Modular Programming
- While Loops
- Shift Registers
- Case Structures
- Functional Global Variables
- Event-Driven Programming
- VI Documentation
- Control/Indicator Documentation
- Custom Controls/Type Definitions
- Passing References
- Property Nodes
- LabVIEW Project and Application Builder

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

Contributors