Example Code

XControl to display numeric with low bit first

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 example shows an XControl that works like a unsigned int32 numeric in Binary mode but with the low bit at the left and the high bit at the right.

 

 Description
When you create an XControl, you combine built-in LabVIEW controls and indicators to take advantage of the combined functionality of the built-in LabVIEW controls and indicators. Unlike custom controls, which you use to create custom user interface components that vary cosmetically from built-in LabVIEW controls and indicators, XControls have dynamic run-time and edit-time behavior that is defined by VIs that run in the background. When you use an XControl in a VI, the block diagram for that VI is simplified because the XControl includes the behavior of the control. An XControl that works like a unsigned int32 numeric in Binary mode but with the low bit at the left and the high bit at the right. Unzip the attachment, open the project and open Demo.vi to see the XControl in operation.

 

Requirements

Software:

  1. LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run the application
  2. Change the values of either of the controls. Watch the resulting value in the indicators

Additional Information or References

VI Snippet

 XControl to display numeric with low bit first 2012 NIVerified.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.