LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convering numeric into string with zero left

I have a numeric control when you write serial number.

Serial number's lenght is 9 of max. If you write a number of lenght 6 the system add zero to left until lenght 9.

For example,
You write: 12345
The system show: 000012345

I wish, you cannot write in numeric control a number greatest to 9 of lenght.

I wish too, when you press the ok button in a text box you read the number with zero left because now I dont know make it.

Thanks.
0 Kudos
Message 1 of 2
(2,597 Views)
you can padd your serial number with zeros using a "Format value" node (found in the string/string top number conversion subpalette). Use "%09d" as format string.
You can filter numbers greater than 999999999, with a simple comparison node.
If you want/need to use a single text field, then you will need to use a local variable.
See the attached example vi.
Chilly Charly    (aka CC)
Download All
0 Kudos
Message 2 of 2
(2,597 Views)