Measure time in seconds everytime you run a VI

Dear Folks,
I am trying to measure speed of a wheel using a magnetic sensor and measure some other parameters in the vehicle. What I also need to document in my project is the amount of time elapsed (in seconds) everytime you run the program. Is there a way where you can measure the time elapsed in seconds in labview?
Any sort of suggestions or examples would be helpful.
Given below is an example of how I wanted my final output file to look.
Time(sec)    | Speed(mph) | Accleration  |
        0                    23                 5
        1                    24                 6
        2                    25                 7
Thank you in advance!
--Rahul
Solved!
Go to Solution.

Hello,
Are you just trying to get the time that has elapsed on the computer itself? If so, there is a Elapsed Time Express VI here: http://zone.ni.com/reference/en-XX/help/371361F-01/lvexpress/elapsed_time/ . You can also measure elapsed time by using the Get Date Time VI and subtracting it from an initial sime as shown below:
-Zach
Certified LabVIEW Developer

Similar Messages

  • HTML5/quicktime player plays and pauses several times a second

    We've been getting some weird entries in our statistics logging on our streaming media system, and I've managed to not-so-much recreate the problem as be around when it occurs.
    Playing about with the interface (scrubbing quickly, then playing/pausing repeatedly, etc) doesn't seem to trigger the problem - it just seems to happen occasionally after a few minutes of a player being open in full-screen mode.
    The actual symptoms are the the stream suddenly starts pausing and playing incredibly quickly - upwards of 10 times a second - and you can see the play and pause buttons swapping incredibly quickly. We're not getting this problem with any other of our players, and we're using the iPad's built-in player, not our own HTML5 player, although I'm still not entirely convinced it isn't a bug with our servers.
    The stream also seems to start looping, and as soon as it reaches the end of the stream it starts again, which is making me wonder if it's a bug with the UI itself, as if the play and pause buttons are getting triggered constantly, but changing the rotation doesn't stop it happening. I also wondered if it was something silly, like someone sneezing on the screen and the moisture triggering the touch screen, but that doesn't seem to be the problem either.
    Has anyone else seen this behaviour before? I don't seem to be able to directly trigger it - it just seems to happen occasionally.
    I'm trying to get a video of the symptoms, but it's not playing ball at the moment. If I can get it to do it again, I'll add a video example in a later post/edit.

    We've been getting some weird entries in our statistics logging on our streaming media system, and I've managed to not-so-much recreate the problem as be around when it occurs.
    Playing about with the interface (scrubbing quickly, then playing/pausing repeatedly, etc) doesn't seem to trigger the problem - it just seems to happen occasionally after a few minutes of a player being open in full-screen mode.
    The actual symptoms are the the stream suddenly starts pausing and playing incredibly quickly - upwards of 10 times a second - and you can see the play and pause buttons swapping incredibly quickly. We're not getting this problem with any other of our players, and we're using the iPad's built-in player, not our own HTML5 player, although I'm still not entirely convinced it isn't a bug with our servers.
    The stream also seems to start looping, and as soon as it reaches the end of the stream it starts again, which is making me wonder if it's a bug with the UI itself, as if the play and pause buttons are getting triggered constantly, but changing the rotation doesn't stop it happening. I also wondered if it was something silly, like someone sneezing on the screen and the moisture triggering the touch screen, but that doesn't seem to be the problem either.
    Has anyone else seen this behaviour before? I don't seem to be able to directly trigger it - it just seems to happen occasionally.
    I'm trying to get a video of the symptoms, but it's not playing ball at the moment. If I can get it to do it again, I'll add a video example in a later post/edit.

  • Measure time of an measurement and if measurement time is less than 90 second wait until 90 second and then proceed to next steps or stop.

    Hi
    I am trying to make a program
          During execute a measurement count the time.
          If  measurement time is more than 90 second proceed to the next steps (or stop the measurement)
          If measurement time is less than 90 second, wait until 90 second and then proceed to next steps or stop
    I appreciate deeply if some help me.

    What sort of measurement are you talking about? What affects the time of your measurement? The very basic description you have is of a state machine and there are numerous examples of that
    1. Actually I would like measure the time of "Alignment" function done by wafer test equipment name Prober ( the model is "UF3000" made by TOKYO SEIMITSU CO., LTD.
    2.. Right now  the "Alignment" function is started when a  GPIB command is written as "N" and wait for resposne 70 in polling.
    Please refer to the attachment for Alignement function if it help you.
    In the attahement
    For Alignment error delay we are using =600
    Alignment counter =30000
    align loop cnt = 30000
    This is a program wriiten by another person and he is not availabe any more. What I am trying to do is
    1.  During execute a "Alignment " function count the time.
    2. If  "Alignment " function time is more than 90 second proceed to the next steps
    3.  If "Alignment " function is less than 90 second, wait until 90 second and then proceed to next steps
    Attachments:
    Alignment function.xlsx ‏153 KB

  • My iPhone is getting stuck for a few seconds everytime I do something,  if i type a letter it will type it twice or a few times, if i click to close the browser it stucks there for a few seconds before closing, if i try to open some app it gets stuck ther

    My iPhone is getting stuck for a few seconds everytime I do something,  if i type a letter it will type it twice or a few times, if i click to close the browser it stucks there for a few seconds before closing, if i try to open some app it gets stuck there.
    I have restored it and loaded the backed up material again. But this problem doesnt seem to go away. Sometimes it is too much sometimes it is not noticeable, so what exactly could be wrong and what ALL should I do to get it fixed?  Please reply.

    Thank you. You are very kind. First I backed everything up, then restored as a new phone, and then i couldn't see the contacts, the contacts were not restored when i restored as a new phone. So in order to get the contacts I restored from the backup but then the same problem happened again.
    What I meant to saw was that the probelm disappeared when i restored as a new phone, but it reappeared when i restored from the backup. So is there a way to just somehow get the old contacts when the phone is restored as a new phone. All I need from the current phone is the contacts to be there when I retore as a new phone.
    I hope I am clear.
    Kindly help

  • My iPhone is getting stuck for a few seconds everytime I do something, if i type a letter it will type it twice or a few times, if i click to close the browser it stucks there for a few seconds before closing, if i try to open some app it gets stuck there

    My iPhone is getting stuck for a few seconds everytime I do something,  if i type a letter it will type it twice or a few times, if i click to close the browser it stucks there for a few seconds before closing, if i try to open some app it gets stuck there.
    I have restored it and loaded the backed up material again. But this problem doesnt seem to go away. Sometimes it is too much sometimes it is not noticeable, so what exactly could be wrong and what ALL should I do to get it fixed?  Please reply.

    I did that many times, I mean I do it everytime. But it doesnt seem to help. It is strange sometimes the phone is slow and stucks for a many seconds, sometimes it is just one or two seconds. Thank you for your help though, but is there something else that you could think of?

  • Since the last update of firefox, the time has been 25 to 35 seconds to enter bookmarks or even the time it takes to page down when it used to take a few seconds. can you check why it taking so long since the update on firefox.

    since the last update a few days ago of firefox, the time has been 25 to 35 seconds to enter bookmarks or even the time it takes to page down when it used to take a few seconds. can you tell me why it taking so long since the update on firefox. may another update is in order.

    I have now done pretty much every suggestion that even vaguely applies in the various helpful link provided. Thanks for the ongoing help. =)
    I have managed to get FireFox's start-up memory usage down to about 100,000K, however it appears that memory usage keeps creeping up the longer FireFox is open. (It seems to top out around 500,000K.) And I'm not talking open for many hours or days - but rather for minutes and possibly up to a couple hours. (Based on how long I've been fiddling with all this so far.)
    On the plus side, it does not appear GreaseMonkey is the culprit since with it active or disabled this memory creep still occurs. Although having GreaseMonkey enabled definitely increases the rate of memory creep. Though once it has creeped up to 150,000+K, disabling GM does not make it drop back down to the starting 100,000K.
    I should point out I run a MacBook Pro and use Bootcamp to partition the hard drive and run it as a Windows 7 PC about half the time. I am running it literally as a PC or, alternately, as a Mac depending on which hard drive I choose to load. (I'm not "windowing" it.) This problem exists regardless of whether I am using the PC or the Mac. These repairs have been made currently on the PC side, and I will attempt them all again on the Mac side. I find it odd that this enormous memory drain has occurred on 3 different computers at the same time. (The two "halves" of my home laptop as well as the PC at my work place.)

  • Thanks for responding to my question. The annwer for your questions are: Measurment time : 300seconds, Sampling Frequency : 2 Hertz, and Window Type : Hanning. Hope you could hint me on this soon.

    Thanks for responding to my question. The annwer for your questions are: Measurment time : 300seconds, Sampling Frequency : 2 Hertz, and Window Type : Hanning. Hope you could hint me on this soon.

    ok, I see you posted parts of your VI in a different location. There is a sub-VI missing though ( Spline Interpolate.vi). But I re-constructed your data and can see the following things:
    1 - Your signal has a significant DC-offset (approximatelly 1000) and this will result in a power value for DC of approximatelly 10E6 (though you wrote 10E8 in your first posting).
    2 - If you ignore that DC, you can see on the time signal that there is another signal at very low frequency (order of magnitude amplitude = 10, power spectrum around bin 1 = 100) and you are not capturing an entire period of that signal, so either a measurement time of 300 seconds is not enough or this is a signal caused by a drift that you want to ignore.
    But overall there is not much sign
    al left once you remove your DC and eventually the very low frequency signal. But given your input signal, the power spectrum looks right. Remember also that the DC component will be replicated (with 6 dB reduction) on bin 1 when you apply a Hanning window. Try eventually without the Hanning window (but you'll still have to ignore your DC bin). Alternatively subtract the dc value from your time signal before computing your power spectrum.

  • My 80gb doesn't boot up this morning. apple logo keeps coming up for a few seconds then you hear it "wind down" and got blank. Tried reseting multiple time - doesn't work. Ideas?

    my 80gb IPod doesn't boot up this morning. Worked great last nite. The apple logo keeps coming up for a few seconds then you hear it "wind down" and got blank. Tried reseting multiple time - doesn't work. Ideas?

    my 80gb IPod doesn't boot up this morning. Worked great last nite. The apple logo keeps coming up for a few seconds then you hear it "wind down" and got blank. Tried reseting multiple time - doesn't work. Ideas?

  • Can you run Embedded PL/SQL Gateway and Oracle HTTP Server at the same time

    Hi,
    I know this will sound a bit odd but their is a business case for asking this. Can you run APEX via the Embedded PL/SQL Gateway and the Oracle HTTP Server at the same time? Would their be any security/stability/etc issues I'd need to worry about? I know that I'll need to run them on different ports.
    Thank you,
    Martin Giffy D'Souza
    [http://apex-smb.blogspot.com/]

    I think I've done this in the past. Theres no technical reason why you can't do this as far as I know.
    I can't remember if I used different ports or same port.

  • Can you run apps that you have saved or backed up in airport time capsule?

    Can you run apps that you have saved or backed up in airport time capsule?

    Only by restoring them.

  • Run x times a second

    How do i make a loop only run x times a second. There is something with getting current time and dividing, and stuff with something and sleeping for that time. Kinda like max FPS, i have no idea how to dsecribe it, i've seen it done a thousand times before but i cant google something i dont know what its called.
    Sorry if htis makes no sense, but its really really simple, i jsut dont know how.
    thanks

    Thread t = new Thread();
    int amountPerSecond = 10;
    try {
        for (int i = 0; i < amountPerSecond; i++) {
            System.out.println("test");
            t.sleep(1000 / amountPerSecond);
    } catch (InterruptedException e) {}This'll make it loop amountPerSecond times per second.

  • The query just run the first time, the second doesnt run

    The query just run the first time, the second doesnt run, i checked it in the SM50 and appear this msg:
    CL_RSR_CACHE_BO_FF============CP
    its not a problem of indexes, i repaired it but its really weird cause the first time the query run ok, the second doesnt, it seems that the cache is confused or i dont know, help guys, i'll really appreciate it

    I was watching the notes, its really weird when i load the cube and execute the query for the first time, its ok, to the second stay in cache, but i was watching that the cube doesnt allow me activat the BD statistics, i dont know if this is necesary to improve the performance of the query, what i know is this:
    1- before i create a Hierarchy for an infoobject thta is in the cube ,  the query used to run ok. Now when i load the first time and execute its ok, but the second stay in cache.
    2- now i can activate the statistics for the cube, the indexes are ok, i checked for the RSRV and all is ok less the statistics.
    what can i do help friends...

  • Can you run programs from time capsule? IE can I run microsoft office from it?

    can you run programs from time capsule? IE can I run microsoft office from it?

    Yes, probably can.. but it won't be fast. You are better storing programs locally and data remotely.

  • Screen auto dims and after about one second, it sleeps. If you try to catch it and undid the screen during this time, it freezes and you have to hard reset.

    If you leave the laptop untouched, it will auto dim the screen.
    About one second after autodim, the screen will turn off.
    If during that one second duration, you try to undim the screen (by touching the touchpad, for example), the laptop will freeze and the only way to turn it back on is by holding the power button.

    1. System Preferences > Energy Saver
        Press the "Restore Defaults" button.
    2. Reset PRAM.  http://support.apple.com/kb/PH4405
    3. Reset SMC.     http://support.apple.com/kb/HT3964
        Choose the method for:
        "Resetting SMC on portables with a battery you should not remove on your own".

  • Measuring time between activation of two boolean

    Hello 
    I want to measure the time elapsed between activation of two boolean variables/indicators. In my code I have DAQ acquiring 2 digital signals which trigger corresponding 2 boolean indicators. Now I am trying to measure time between the event when my first boolean indicator gets the signal  and the event when my second boolean gets the signal. I am attaching my code. I checked DAQ and my indicators everything works fine, but just when I try running the code with the 'elapsed time' part, its not running. Any help will be appreciated.
    Thank You. 
    Attachments:
    Test Code.vi ‏45 KB

    So, feel free to give more detail. I'll just give you a couple thoughts:
    1) The primary issue with your code is that it probably doesn't do what you think it does. How this VI will run is that it will get one data from the DAQmx routine, then pretty much stay in the inner while loop since the event structure has an indefinite timeout. Worse, I don't think changing the value of the boolean controls would trigger the value changed event anyways. In the end, you don't even need the Event Structure to do what you want to do, nor do you need the inner while loop. Just check the values for each iteration of the outer while loop instead and do what you need to do with those.
    2) You are acquiring only one data point at a time. Which is OK if your events are particularly slow with respect to the effective sampling rate of the of loop (which might be able to pick up signals that change on the order of milliseconds or perhaps a bit less). If your signals are faster, you need to think about reading lots of samples at a time (arrays of booleans) and properly triggering your acquisition close to the event it needs to pick.
    3) If your signal is a pulse, make sure that the pulse width of the signal is much longer than than 1 / sampling rate. If it isn't, you could miss the pulse entirely doing this approach.
    4) The faster signals (as long as your have a quick enough sampling rate), the best thing is always to use a counters approach. In many of the DAQ cards and peripherals that NI offers, there are counters that can be driven with the sample clock (one of the fastest clocks on the device) or even a faster time base, and then the 'events' can be used to trigger acquisitions of the counters. Meaning you get exactly what you want: data points that correspond to times when events occur.

Maybe you are looking for

  • Color mode and resolution questions

    I'm going to work on a composition that will include made different photos. I'm not sure how it will be printed, CMYK or RGB. Without know for sure: 1. Should each individual photo file be set to RGB or CMYK? 2. How much of an affect will it have on

  • Integrating Oracle  Reports with Oracle Forms 10g Menus

    I just migrated from oracle developer 6.0 to oracle developer 10g....I have to call reports through Menus...in 6.0 I used the following code Declare      pl_id          paramlist; Begin      if :global.hlr is null then           message('Cannot run r

  • BAPI_NETWORK_COMP_ADD: add a material with purchase type

    Hi folks, Please, how can I add a material for a network activity with Purchase Type = "Purchase requisition for network"? When I add a material only Purchase Type = "Reservation for network" is possible. On solution can be fill out the fields Accoun

  • Flash Builder 4 classes (education)?

    I know it is early since Flash Builder 4 has not been released yet but I am still hoping to find some in depth classes available.  Not surprisingly I cannot find anything online (with the exception of the training on Adobe.com which I am going throug

  • Smartforms-print priview problem

    Dear All, I have developed a smartform and print program and assigned to a output type for VA02. when i use VA02 and issue output type , when i select print preview a popup will appearing ( output device screen). But i dont want that screen. how to a