LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting from Iteration loop

I am currently using the iteration loop to provide a number to be used in the filename.  I need to format this number to start with 001 and continue to count  in this fashion: 002, 003, 004 etc .  But most important once I get into double digits I still need it to keep a 3 digit code so, 10 would be displayed as 010 and 11, 011.   Any help would be much appreciated!!
0 Kudos
Message 1 of 7
(3,174 Views)
Use the Format into String function with format string %03d
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 7
(3,168 Views)

Just use Fornat Into String with %03d as your format string.

Daviid

0 Kudos
Message 3 of 7
(3,167 Views)
Snap! (http://en.wikipedia.org/wiki/Snap_%28game%29)

Message Edited by David Crawford on 10-20-2006 12:42 PM

0 Kudos
Message 4 of 7
(3,165 Views)
Thank you for your quick response, I am still having  a problem which I am sure is very simple.  I am not sure what to put in the input 1..n connection of the  Format to String Vi connection. I am assuming this is the problem since I have put the %03d in the The format  string connector but  my number count is now 0000, 1000, 2000  rather than 000, 002,003

Thanks again for your help!!



0 Kudos
Message 5 of 7
(3,157 Views)

It's really just that simple:

Message Edited by becktho on 10-20-2006 02:19 PM

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 7
(3,153 Views)
You only need to wire the index number to input 1. Your actual outcomes have no explanation, unless you are reversing the string and concatenating a trailing '0'.
Post a picture of your code if you don't succeed.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 7 of 7
(3,147 Views)