Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Decimal to Zero-Padded String

Overview

LabVIEW contains many functions for converting a numeric input to a string.  In certain cases, however, we would like to specify the number of digits by which the output string is represented.  This VI demonstrates how to convert a numeric to a string, and pad it with zeros until the desired number of digits is reached.

Description

This code takes a numeric input, and outputs it in string representation with the number of digits specified by the user.


FP.PNG

Decimal to String with Zero Padding VI.png

Steps to Implement or Execute Code

  1. Specify the Numeric Input to be converted.
  2. Specify the Number of Digits.
  3. Run the VI
  4. View the Output String

Requirements

Software: LabVIEW 2012 or later

Hardware: none

Andy G
Applications Engineering
National Instruments
Comments
ttxtry
Member
Member
on

2015-06-04_141952.png

Contributors