Example Code

Gray Code Converter

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 demonstrates how to convert a Gray Code to its corresponding Binary, Decimal and Degrees representation.

 

Description

This is intended to be used with a 12-bit Gray code.

 

Requirements

LabVIEW 2015 (or compatible)

 

Steps to Implement or Execute Code

  1. Use the LED Controls to put in your Gray Code.
  2. Run the Program.
  3. The corresponding converted values will be displayed in the indicators.

 

Additional Information or Resources

VI Block Diagram

 

capture.JPG

**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.