LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display elapsed time on TPC-2006 (Pocket PC 2003) as mm:ss?

The small attached PDA vi is a simple "egg timer" that measures elapsed time in minutes and seconds.  I've tried every formatting trick I can think of, but cannot get my TPC-2006 to display the elapsed time as mm:ss.  It always displays single digit minutes and seconds using one digit instead of 2.  By this I mean that an elapsed time of 1 minute and 6 seconds will display as 1:6.  My customer expects that elapsed time to display as 01:06.
 
I tried attaching a %t constant to the "format string" input of the "format into string" sub-vi, but the deployed display showed %t instead of elapsed time.
 
The second question is, how do I get rid of the up/down icons in the strip display box?  They do not show in the virtual front panel, but always show up in the deployed application.
Jeff
Climbing the Labview learning curve!
Sanarus Medical
Pleasanton, CA
0 Kudos
Message 1 of 3
(2,662 Views)
Sorry to reply to my own post, but I didn't see a way to edit an existing post.  I wrote this:
 
"The second question is, how do I get rid of the up/down icons in the strip display box?"
 
but meant this:
 
"The second question is, how do I get rid of the up/down icons in the string display box?"
Jeff
Climbing the Labview learning curve!
Sanarus Medical
Pleasanton, CA
0 Kudos
Message 2 of 3
(2,654 Views)
Hi Jeff,

I solved your first problem. The format string you were looking for to wire into the Format Into String function is %02.0f. Honestly, I can never remember what the syntax is for format strings, but I've devised a method anyone can use to make it really easy. First of all, place a numeric constant on the block diagram. Right click the constant and select Format and Precision. From that dialog, make the changes you like. You can actually see the changes propogate to the constant in real-time if you can see the block diagram constant. In your case, the change you wanted to make was Zero Padding - 2 spaces - pad with zeros on the left. After you've configured your number to look like you want, click on the Advanced Editing Mode radio button at the bottom. This is where you can manually enter in Format Strings for numeric constants or controls. The trick is, whatever changes you currently have made in the default editing mode will show up as a format string that you can copy and paste and use as you like. Hope this helps!

Message Edited by Jarrod S. on 05-25-2006 11:02 AM

Jarrod S.
National Instruments
0 Kudos
Message 3 of 3
(2,648 Views)