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
Attachments:
MinSecTimer.vi ‏12 KB

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
Attachments:
double_digit_MinSecTimer-2.vi ‏12 KB
Default_edit.JPG ‏41 KB
Advanced_edit.JPG ‏43 KB

Similar Messages

  • How to display the time 00:00:00 as blank?

    Dear Friends,
    I have created a new field GDF_9000_CREATED_AT in the normal screen (dynpro), the format is TIMS, however, when there is no value for it, is always display like "00:00:00" on the screen.
    So how to display the time 00:00:00 as blank in the normal screen (dynpro) when there is no value for it?
    Thanks a lot!!

    In screen PBO module:
            LOOP AT SCREEN.
              if screen-name EQ 'my_time' AND my_time EQ time_zero.
                screen-invisible = 'X'.
                screen-active = 0.
                MODIFY SCREEN.
              endif.
            ENDLOOP.
    I don't try this, but i think is true...
    Edited by: Marco Modenese on May 7, 2009 10:36 AM
    Edited by: Marco Modenese on May 7, 2009 10:36 AM

  • How to display the time length of video (current time/ total time) ?

    Hi,everyone. I would like to ask how to display the time length of the video which show only in system example: it show the current time and total time? using AS 3.0.
    It there any information or solution to solve it? .
    I appreciate it any of you able to answer it. ^^
    Thank you.

    Hi,
    Actually I have this requirement for MAC OS 10.5. With the code you provided, I got the output as "6289375". When I changed the URL to point to my file (file:///Users/VPKVL/Desktop/MyRecord/tempAudio.wav), I am getting the below mentioned Exception:
    Exception in thread "main" javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.
         at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:561)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:165)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:256)
         at TestWavLength.main(TestWavLength.java:13)The "tempAudio.wav" file is created by using java sound API. I am using the SSB USB Headphone Set to record the audio with the following settings for AudioFormat object:
    AudioFormat audioFormat = new AudioFormat(
              AudioFormat.Encoding.PCM_SIGNED, // the audio encoding
                                                            // technique
              48000.0F,// sampleRate the number of samples per second
              16, // sampleSizeInBits the number of bits in each sample
              2, // channels the number of channels (1 for mono, 2 for
                            // stereo, and so on)
              4, // frameSize the number of bytes in each frame
              48000.0F,// frameRate the number of frames per second
              false); // bigEndian indicates whether the data for a single
                            // sample is stored in big-endian byte order
                            // (false means little-endian)Can you please suggest where I am going wrong ?

  • How to display the time & battery % in home screen

    How to display the time & battery % in home screen

    Try resetting your device.
    Hold down the Home and Sleep/Power Buttons until the Apple Logo shows up.
    Ignore the red slider if it appears.
    This will reboot the phone, no data should be lost.

  • Flash video: display elapsed time

    I am using the FLVPlayback component and one of the video
    templates from this site that uses screens. I want to display
    elapsed time/total time. I can't find a script to do that although
    i do find some if you don't use the FLVPlayback component.
    any help would be much appreciated.

    Hey Pat, I'm using something like this. You need to place the
    time() function on frame 1 and place the bottom code in an event or
    on a frame loop (while the video plays)
    // assumes the FLV Playback component with an instance name -
    VideoPlayer
    // time fiunction converts seconds to actual time
    function time($seconds) {
    if ($seconds !="Z") {
    var $time:Number = $seconds;
    var $min:Number = Math.floor($time/60);
    //var $hrs:Number = Math.floor($min % 60);
    var $sec:Number = $time % 60;
    if ($sec <10 ) {
    var $sec:String = "0"+$sec;
    if ($min < 1 ) {
    var $min:String = "";
    var $timing:String = $min + ":" + $sec;
    } else {
    var $timing:String="";
    return $timing;
    // displays in a textfield- VidTime
    VidTime.text = time(Math.floor(VideoPlayer.playheadTime))+"
    of "+time(Math.floor(VideoPlayer.totalTime));

  • How to display elapsed/current time of a song in Actionscript.

    Hi I have a question on how I can make my code display a total time for a song from a media player I created with Actionscript 3.0, using XML to load the song track.
    This is my current function which I have done and I am unsure on what the problem is that is not allowing the elapsed time to display in a textfield on my stage.
    stage.addEventListener(Event.ENTER_FRAME, timeElapsed);
    function timeElapsed(e:Event):void
                        var minutesCurr:Number = Math.floor((my_channel.position /1000) /60);
                        var secondsCurr = Math.floor((my_channel.position /1000) % 60);
            if (secondsCurr < 10)
                secondsCurr = "0" + secondsCurr;
            var minutesTot:Number = Math.floor((my_sound.length /1000) /60);
            var secondsTot = Math.floor((my_sound.length /1000) % 60);
            if (secondsTot < 10)
                secondsTot = "0" + secondsTot;
            completeText_txt.text = minutesCurr + ":" + secondsCurr + "/" + minutesTot + ":" + secondsTot;
    I tried adding to the stage and I am getting a null object reference.
    Thanks Casey

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is declared but not instantiated
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • How to calculate elapsed time based on user input

    I'm not sure what to do next in this program. Basically, I'm not sure exactly how to get the time to output accurately, as in what forumla I should be using.
    This is the question:
    What comes 13 hours after 4 o'clock? Create an ElaspedTimeCalculator application that prompts the user for a starting hour, whether it is am or pm, and the number of elapsed hours. The application then displays the time after that many hours have passed. Application output should look similar to:
    Enter the starting hour: 7
    Enter am or pm: pm
    Enter the number of elapsed hours: 10
    The time is: 5:00 amHere's the code I have so far:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              int elasped_minutes;
              int time_hours;
              int time_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextDouble();
              System.out.print("Enter the starting minutes: ");
              starting_minutes = input.nextDouble();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.nextString();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextDouble();
              input.close();
              time_hours =
              time_minutes = 
              if(am_or_pm = "am" || am_or_pm = "a.m." || am_or_pm = "AM" || am_or_pm = "A.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "am");
              if(am_or_pm = "pm" || am_or_pm = "p.m." || am_or_pm = "PM" || am_or_pm = "P.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "pm");
    }To calculate time_hours should I just calculate this by adding the elapsed hour to the starting hour? I doubt it will be accurate for all situations.
    Same for the time_minutes For example, if the starting minutes and the elapsed minutes were 50, it would be greater than 60. Also, not sure if it makes sense to separate hours and minutes like this, it's not required to in the question. I initally thought it would be easier to approach like this instead of allowing the user to input a double for the starting hour. ex. 5.7
    I get the feeling that this is extremely simple, but nonetheless, I'm stuck, so any help would be appreciated.

    Well thanks to both of you. I did a little reading up on the modulus operator and coupled it with some logic (although, truthfully, I'm not really using to there actually being an application for the remainder of a division operation, since it's never really used very much in any of my Math courses) and the hours portion works perfectly now:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              //int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              //int elasped_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextInt();
              //System.out.print("Enter the starting minutes: ");
              //starting_minutes = input.nextInt();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.next();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextInt();
              input.close();
              int time_hours = 0;
              //int time_minutes;
              String meridien;
              if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("AM"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("A.M."))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("pm"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("p.m."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("PM"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("P.M."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              if(time_hours < 12)
                   meridien = "A.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
              else if(time_hours > 12)
                   meridien = "P.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
    }Now the only thing is the minutes. My teacher did say she wants the user to have the option to input minutes also if he/she desires, so I do need it. However, the only problem is that if say the user inputs a "starting minute" of 14 for example, and 66 minutes elapsing, then (14 + 66) int/ 60 = 1r20 but using the modulus operator would only give me 20. So how will I be able to add any extra hours if it is necessary?

  • COGI : how to display the time of  a goods movement?

    Hello,
    through COGI, I get the good movements with error per material.
    When I open the errors list for a material, I get the posting date for each good movements but not the time! 
    Could you please let me know how to do for displaying error time or posting time in this screen?
    Thank you for your help!
    François

    Deleted

  • How to display system time

    in sql we use sysdate in dual to display the system date like wise how to display the system time since i am a beginner i need ur help please.

    In Oracle Date Data Type save time information, all you need to do is using to_char function or NLS_DATE_FORMAT to display it,
    SELECT TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SS') FROM DUAL;
    or
    alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
    select sysdate from dual;

  • How to display different Time Statement forms in ITS service PZ04

    Hi all,
    I am working on a underlyinge R/3 4.7 system and are working with standalone ITS and ESS 50.4. I am posting this question to find out if any of you has experience with my problem.
    The business wishes to use the ITS transation PZ04 standard and wish to be able to display different Time Statement forms in the transaction through customized variants for the report(RPTEDT00) that the PZ04 transaction executes. In the IMG it is posted that one variant has to be created called HRESS_TEDT00 and this works, but restricts the PZ04 transaction to always be called with this variant and therebye the same Time Statement form every time.
    I then by debugging found that the underlying ABAP code processed from SAP standard has a variable VARIANT that is hardcode to = HRESS_TEDT00.
    The question is: Is there anyway to setup the PZ04 transaction so that it can be dynamic decided which variant should be used, f.ex. from persons subarea from infotype 0001?
    Looking forward to here if anybody can help.
    Regards,
    Allan Brauer

    hi allan,
    cud u plz help me how to sort out this problem actually in mu company the same scenario is here need to be display pe51 form instead of standard hrforms.....
    plz help me how will i replace this "hrforms with pe51"..

  • How to get elapsed time of the query in form 6i

    hi
    I used to use " set timing on " in sql to get the elapsed time
    set timing on
    elapsed time :XX:XX:XX ,
    but i dont know how to get it in fom
    its really imporant to measure the time elapsed for me cuz i am student an need to get the time
    thanx alot

    regarding to point 1 : u know there are three modes for system ; query, enter_qeury,and normal. when the system is not noraml so it is either query or enter_query , and both are query processing ( as i think) so it the elapsed time . it also by using timer stpos when system finish query ( normal)
    why you dont prefer timers ..... ( it important please to explain )
    thank you very much Navnit Punj
    Edited by: user8652693 on 22/07/2009 07:33 ص

  • How to display 10 times ' linktoaction '  text in view ?

    HI,
    Experts,
    I want to display 10 times " LinktoAction " ui element in a view for that how to write the code and in which method we have to write the code.
    thanks in advance,
    Shabeer ahmed.

    hi,
    To display LinkToAction :
    One option would be to create 10 LinktoAction UI in the layout. All would have differeent actions available to which you can write the logic as per required.
    If you want to dynamically add LinkToAction on a button event or so , then you can use RowRepeater UI and inside this place LinkToAction. On every action of button , add one more LinkToACtion. This would be good if you dont know the number of UI at design time but as you know that you want 10 LinkToAction, create UI and make them invisible by default . When required , make the LinkToAction Visible.
    Refer SAP Online help on LinkToAction UI : http://help.sap.com/saphelp_nw2004s/helpdata/en/0f/e8884118aa1709e10000000a155106/content.htm

  • How to calculate elapsed time(including time and date)?

    Hi all,
    I want to realize a function that can calculate the elapsed time which include time and date.Below is my thought:get the current time and date and store it to a .txt file then using the latest time and date subtract the time and date stored in the .txt file.how can realize it using the simplest way?I'm using LV7.1.

    Hi Idragon,
    you can do it like this.
    Mike
    Attachments:
    DateTime.PNG ‏12 KB

  • How to get elapsed time in case struture?

    I'm trying to get Elapsed Time VI to work but couldn't figure out how to use it properly.
    I have a subVI with state machine structure to decode data stream from serial port.
    State1 uses VISA read to read a byte and check if it is the Start of Frame. If TRUE, goes to State2. If FALSE, loop back to State1 and try again.
    If the State1 keeps getting FALSE for certain time (e.g. 5 seconds), stop the subVI and insert custom error code.
    So I have to calculate the elapsed time since State1 starts to be FALSE and keeps to be FALSE.
    I tried to use Elapsed Time VI but have problem of understanding it well.
    Is there any other better solution than using Elapsed Time VI? Also, how long is the execution time of Elapsed Time VI?
    Any suggestion will be very much appreciated.

    Hi,
    The Boolean output (Time Elapsed) in Elapse Time VI should give True when time got elapsed.
    Else we can simulate using "Tick Count (ms)", which counts the ticks in milisecond. You can move on to state 2 when count reaches to reauired duration.
    We can give you better idea if you post the code VI.
    Regards
    Haneef

  • How to input elapsed time

    I am setting up a database in AppleWorks and am trying to input elapsed time rather than time of day so 1:15:20 is 1 hour, 15 minutes, 20 seconds not a time of day. I'd then like to use this field to calculate an average speed among other things. Is an elapsed time possible in apple works or just a time of day?
    Thanks,
    Chris
    Powerbook G4   Mac OS X (10.4.7)  

    Hello
    Databases allow you to define a field as a Time.
    It works in the range 0 thru 23h 59m 59s.
    1 hour is represented by the number 1/24 .
    You may define the format used by time fields using the Format > Number menu and yes, ou may make arithmetics with time values.
    CAUTION the results may seems to be odd when calculations give a negative result as, I already write about that, time's values are in the range 0 thru 23h59m59s.
    Yvan KOENIG (from FRANCE dimanche 27 août 2006 19:11:16)

Maybe you are looking for