Example Code

Calculator - XControl

Code and Documents

Attachment

Overview

This example VI demonstrates the use of XControl to build a simple calculator.

 

Description

This VI demonstrates how to use a LabVIEW XControl. The Calculator XControl can manipulate values similar to a handheld calculator. The value of the XControl is the current calculated value shown in <b>Output</b>.

Open the Calculator XControl Project included with this example to see the configuration of the XControl.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Open the project " Calculator XControl Project 2012 NIVerified.lvproj";
  2. Open the VI "Calculator Example.vi";
  3. Run the program;
  4. Press any button.

 

Additional Information or References
VI Snippet of "Calculator Example.vi"

BD.png

 

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

Regards
Prabhakant Patil

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

Comments
FeifanDu
NI Employee (retired)
on

All functions are prefect, but this Xcontrol only have one question,init. When I stop the process, not close the example VI.Then restart it, the output's value is not the initial one.

PS:My Xcontrol:Login, need to be called by main.vi many times, so it need to be init. But input control cannot be put into the state.ctl.

So, I need help


---------------------------------------------------------------
China RF AE Specialist