Measure the time of execution

Hi,
Is it possible to integrate one function similar Profile
(Tools>Advanced>Profile) in a VI to make statistics of execution times?
Thanks

Hi Xavier,
Ale914 was spot on with his reply, it really is as simple as that. To give you more of a visual aid if needed it would look like what you see below:
Regards
John McLaughlin
Insides Sales Engineer Team Leader
National Instruments UK & Ireland

Similar Messages

  • How can we measure the time of excecution of our Java program?

    i have a java application program which runs depend upon the user input.
    I want to analyze how my application works.
    So i want to measure the time of execution.How can i do it?

    makpandian wrote:
    ..i want to measure the time of execution.
    long startTime = System.currentTimeMillis()
    doTimeConsumingTask();
    long endTime = System.currentTimeMillis()
    System.out.println(  "The task took " + (startTime-endTime)/1000 + " seconds." ); Edit 1:
    I see I was 'too slow off the mark' by 5 minutes. ;)
    Edited by: AndrewThompson64 on Jul 19, 2009 10:58 PM

  • LabVIEW/SignalExpress: How can I automate measuring the time between two pulses?

    Hi everyone, bit of a newbie here so please bear with me.  
    I'm a student at a university conducting a muon decay experiment with an oscilloscope connected to some photomultipliers.  To summarize, if a muon enters the detector it will create a very small width pulse (a few ns).  Within a period of 10µs it may decay, creating a second pulse.  The oscilloscope triggers on the main pulse 5-15 times per second, and a decay event happens roughly 1-2 times per minute.  I am trying to collect 10 hours of data (roughly 1500-2000 decay events) and measure the time it takes for each decay.
    I've been able to set recording conditions in SignalExpress that starts recording on the first pulse and stops recording on the last.  The Tektronix TDS 1012 oscilloscope however feeds 2500 points of data from this snapshot into a text file (for use in excel or other software).  Even if I perfectly collected the data, I would have 100,000+ data points and it would be too much to handle.  I don't know how (or if it's possible) to reduce the sample size.
    To conclude, using Labview or SignalExpress, I would like to be able to have the software
    1.  Differentiate between the single pulse detections and double pulse decay events
    2.  Record only when two pulses appear on the oscilloscope
    3.  Measure the time between these two pulses and ONLY that to minimize the amount of data recorded.
    Any help would be GREATLY appreciated, thanks!

    Hi wdavis8,
    I am not that familiar with Tektronix, but there should be a place in the dialog that you go through when you create the action step to acquire date to specify a sampling rate. That would allow you to reduce the number of data points you are seeing, but may reduce the quality of the data.
    If it’s just a matter of that much data being hard to dig through when you have that many points, you could do some analysis on the data after the fact, and then create a new file with only the data you want to look at. For example, you could identify the peaks in the data, and based on the distance between them or the difference in magnitude, selectively write data to a new file.  
    Here is some information about peak detection in LabVIEW:
    http://www.ni.com/white-paper/3770/en/
    You could also do some downsampling on the data to get fewer data points:
    https://decibel.ni.com/content/docs/DOC-23952
    https://decibel.ni.com/content/docs/DOC-28976
    Those are just a few quick ideas. 
    Kelsey J
    Applications Engineer

  • How to measure the time a pulse is high for?

    I am using Pulse measure.vi to measure the output of a comparator. My comparator output feeds to an LED. The duty cycle is 50% so the LED just flashes on and off. I want to measure the time the output is high ('ON time') and I have been getting this by just multiplying the pulse width measure by the no. of pulses but I want to modify it to measure the 'ON time' of random signals with different duty cycles...
    The aim is that I am taking in a signal and need the LED to turn on when the signal 'ON time' reaches a certain specified time.
    But before I continue with the LED I am wondering how to add up the time the signal is high for?

    Hi PinkLady4218,
    You should be able to use one of the shipping examples to do what you need, please open LabVIEW and go to Help >> Find Examples.
    From the Example Finder please go to Hardware Input and Output >> DAQmx >> Counter Measurements >> Period or Pulse Width >> Meas Buffered Semi-Period-Continuous.vi
    You will then need to deinterleave the output array as it will show high time then low time then high time then ...
    You will need to confirm the order these values appear and then you can use a function from the arrays palette and use the function "Decimate 1D Array"
    Regards
    JamesC
    NIUK and Ireland
    It only takes a second to rate an answer

  • How to measure the time of evolution of a signal in a graph and to compare this time measured with a known value?

    For my application, I am obliged to measure the time of evolution of a signal acquired (from T1 to t2) by an analogical entry of a module NI 9203, and to compare this value with a value known in order to judge if this time of evolution is correct or not.
    PLEASE I prefer an example for better understanding.

    Greetings Jacob,
    I am not sure what you mean with 'time of evolution' but normally you acquire at a certain acquisition rate. How much time that has passed, you can calculate by checking how much points are between your two points of interest.
    If you are acquiring at 5Hz, the time between every point is 200ms. If there are let's say 10points between your two points of interest, 2s have passed.
    Regards,
    Wouter
    National Instruments

  • Error at the time of execution using weblogic10

    Hi All,
              i am new in the implementetion of weblogic10. anyhow i am able to deploy the message driven bean application successfully, but getting the following errors at the time of execution:
              Error 500--Internal Server Error
              java.lang.NullPointerException
                   at jsp_servlet.__calculator._jspService(__calculator.java:137)
                   at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
                   at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
                   at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
                   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
                   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3370)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                   at weblogic.security.service.SecurityManager.runAs(Unknown Source)
                   at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)
                   at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)
                   at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
              so requesting all members of bea to suggest me what to do?
              regards
              mina

    hi,
              in the total application i ve nt used calculator.java anywhere. my client file is as following:
              <%@ page import="example.*, javax.naming.*, javax.jms.Queue, java.text.*,javax.jms.*,java.sql.Timestamp"%>
              <%
              if ("send".equals(request.getParameter ("action"))) {
              QueueConnection cnn = null;
              QueueSender sender = null;
              QueueSession sess = null;
              Queue queue = null;
              try {
              InitialContext ctx = new InitialContext();
              queue = (Queue) ctx.lookup("java:comp/env/jms/testQueue");
              QueueConnectionFactory factory =
              (QueueConnectionFactory) ctx.lookup("java:comp/env/jms/connectionFactory");
              cnn = factory.createQueueConnection();
              sess = cnn.createQueueSession(false,
              QueueSession.AUTO_ACKNOWLEDGE);
              } catch (Exception e) {
              e.printStackTrace ();
              TextMessage msg = sess.createTextMessage(
              request.getParameter ("start") + "," +
              request.getParameter ("end") + "," +
              request.getParameter ("growthrate") + "," +
              request.getParameter ("saving")
              // The sent timestamp acts as the message's ID
              long sent = System.currentTimeMillis();
              msg.setLongProperty("sent", sent);
              sender = sess.createSender(queue);
              sender.send(msg);
              // sess.commit ();
              sess.close ();
              %>
              <html>
              <head><meta http-equiv="REFRESH" content="3;URL=check.jsp?sent=<%=sent%>"></head>
              <body>
              Please wait while I am checking whether the message has arrived.
              Go back to Calculator
              </body>
              </html>
              <%
              return;
              } else {
              int start = 25;
              int end = 65;
              double growthrate = 0.08;
              double saving = 300.0;
              %>
              <html>
              <body>
              <p>Investment calculator
              <form action="calculator.jsp" method="POST">
              <input type="hidden" name="action" value="send">
              <b> Start age = <input type="text" name="start" value="<%=start%>">
              End age = <input type="text" name="end" value="<%=end%>">
              Annual Growth Rate = <input type="text" name="growthrate" value="<%=growthrate%>">
              Montly Saving = <input type="text" name="saving" value="<%=saving%>"></b>
              <input type="submit" value="Calculate">
              <INPUT type="button" value="Close Window" onClick="window.close()">
              </form>
              </p>
              </body>
              </html>
              <%
              return;
              %>
              please check out my JNDI name in this program, and suggest me what to do.
              Thanks
              Minakshi

  • How can I measure the time difference between spikes (interspik​e intervals)

    I have used NI USB-6008 (DAQ) to sample a continous signal, after sampling I compared the amplitude of the resulted signal with a value. If the amplitude is greater than a specific value (threshold) then it can pass. Now I want to measure the time difference between the resulted samples. The samples look like spikes. (May be if I trigger a timer, then I can measuer the time difference, but I have not seen such a timer). 
    Thanks in advance,
    Saraydin

    Oops just occured to me that you are using a 6009 which is not very fast, 48ks/sec, this will not get you very much time resolution and you could have issues seeing much of a 50 us sample.  Another approach is to use the counter but you would have to preprocess the spikes to generate a trigger for the counter.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Measuring the time duration of a Java webdynpro event

    Hi everybody,
    I would like to know if there are a standart wy of measuring the time duration in seconds of a Java webdynpro event.
    We are developing a Java Webdynpro application and we need to improve the performance of our business logic associated to the events which are thrown by our java webdynpro views. We want to do this by a stardart way, and if it possible without coding any line. So, is there any kind of monitorization of this information? or is there a tool to do that?
    We would need this information:
    - Name of View
    - Name of event
    - Start time
    - End time  
    Thanks for all.

    Hi Antonio Sanz ,
    Did you do logging for your application?
    If so, you can go and get the information from the logs.(This includes the time in milli seconds)
    (Assuming that you have written the logs at starting and ending of each method.)
    If not, I think it is not possible with out code change.
    If you want to do the code change you can do like this:
    method start(){
    long startTime = System.currentTimeMillis();
    long endTime = System.currentTimeMillis();
    long timeTaken = endTime - startTime; // You can print the "timeTaken" on the screen or you can log the information.
    Regards,
    Jaya.

  • How to measure the time?

    i have two buttons. first the user has to press the first button, then he has to press the second one. I want to measure the time between the two clicks? How can I do this?
    thx Ingo

    The method with the timer will work fine in this case...I thinck that creating a timer with a period of 50-100 miliseconds will do the job(this depends of course on the amount of elapsed time that you generaly expect to pass )...the time error will be less than the period of the timer...Of course,this is in client server..
    In web,I thinck you need to use the JAva way...in fact,you can use the java class even in client-server with the java importer...
    If you use a java class even in c-s,the results will be very accurate

  • How can i measure the time between two successive rising edges ,using digital input ..

    Hello
    I'm trying to measure the time in seconds between each two successive rising edges on a digital input .
    Till now I have managed to detect the rising edge ,increment a counter with each rising edge ,and snap the time at which the rising edge happenned
    all I need now is to subtract the current rising edge time from the previous rising edge time in order to calculate (T) which can be 1/frequency and display it in realtime to the user.
    but I don't know how to do this
    Can somebody please help me !!!
    note: the time that I'm measuring ranges between 200 ms - 2 seconds
    Solved!
    Go to Solution.
    Attachments:
    Counter without time.vi ‏11 KB

    Cheers for that. It's always a good idea to post your SubVIs as well - the problem could be in one of those.
    To help you out:
    You already know how to use shift registers so why not use one again for time? Create a new shift register for  the time then simply compare the "rising edge time" to the the previous time stored in the shift register and then write the new time to the shift register.
    Just a few other pointers:
    1. You'll want to initialise your shift registers ie wire a constant to the left hand register outside of the loop. This will cause the register to be reset each time the program is run. This is so that your counter will start from zero each time you run your code.
    2. You don't need to use the "greater than?" compare function with boolean as they can only be true or false (1 or 0)! The "Equal?" function is what you should use here.
    3. Lastly, it's a small thing but you can use the same tunnel that feeds into a case structure in each of the cases - no need to create two tunnels for the true and false cases, use the same one.
    -CC
    "If anyone needs me, I'll be in the Angry Dome!"

  • How can I measure the time between each two successive rising edges ,using Digital Input ?

    Hello
    I'm trying two measure the time in seconds between each two successive rising edges on a digital input .
    Till now I have managed to detect the rising edge ,increment a counter with each rising edge ,and snap the time at which the rising edge happenned
    all I need now is to subtract the current rising edge time from the previous rising edge time in order to calculate (T) which can be 1/frequency and display it in realtime to the user.
    but I don't know how to do this
    Can somebody please help me !!!
    Solved!
    Go to Solution.
    Attachments:
    Counter without time.vi ‏11 KB

    Woah!  
    Sorry Apok, but your code is becoming way too complicated/messy. I don't think that all of those shift registers or boolean conversion/operators are needed at all.
    If you want to measure the timing between two button presses then this is a different (much less complicated) way. It simply records the timing of the button press into a shift register then compares the two.
    Spoiler (Highlight to read)
    Of course this is a very quick and basic solution just to show you that it can be much simpler than you are making it (remember to use the mechanical actions of the buttons to get the behaviour you want).
    A better way would be to use an event structure looking at value changes of the buttons to determine the timings between clicks.
    -CC
    "If anyone needs me, I'll be in the Angry Dome!"
    Attachments:
    Time between clicks.vi ‏9 KB

  • How to measure the time the cursor hovered over an hot spot

    Hi all,
    I have a task in which participants have to make a decision with two options. Therefore, I have created two hotspots, one for each option. What I want to measure is the time that the mousecursor 'hovers' over each option before a choice has been made (one of the two hotspots clicked). So for instance: if a user first hovers 2,5 seconds above option 1, then goes to option 2, hovers there for .45 seconds, then goes to option 1 again, hovering for .5 seconds before clicking, I want to save those two values (2.5 + .5 = 3.0 s for option 1 and .45 s for option 2) when either hotspot is clicked. I was thinking of using a conditional in my interaction icon using something similar to ObjecOver (which gives which display icon the cursor is currently over), but then have something like HotspotOver (which does not exist). Does anyone know how I can accomplish measuring these hovertimes?
    Regards,
    Frank

    The solution I came up with has five hotspots. First off a calculation icon: OptionTimes := [0,0]
    Then the interaction with the hotspots: single click option 1, cursor in area option 1, single click option 2, cursor in area option 2, finally a hotspot surrounding all others
    In the cursor in area type hotspot for option 1 I have the calculation:
    Option := 1
    OptionStartTime := SystemSeconds
    Hopefully you can see where this is going. There's a similar calc for option 2 in the cursor in area option 2. It just sets the Option number to 2. In the last hotspot that surrounds the others I have this:
    OptionTimes[Option] := OptionTimes[Option] + SystemSeconds - OptionStartTime
    When the user hovers over an option and then leaves, the hotspot surrounding the others catches them and records the time they spent. You also need that same calc in the response path for the two options to catch the time taken looking at the option just before clicking in their choice.
    Mike

  • Measure the time betw keyframes?

    Hi-
    This is basically a question about whether a feature exist in AE 7.0/Mac.
    I'd like to know if there is an easy (non-arithmetic) way to measure the number of frames between 2 keyframes.
    Can I select 2 keyframes on the same timeline layer and have AE just show me the number of frames (or the amount of time) apart they are?
    TIA an experienced response.
    jl

    FWIW, you can do this in After Effects CS4.
    from "View or edit a keyframe value":
    "Alt-click (Windows) or Option-click (Mac OS) two keyframes in layer bar mode to display the duration between them in the Info panel."

  • How can i measure the time between a pulse output and a pulse back on the input?

    Llo,
    I have a problem i use a ultrsonic sensor, and when i send a pulse out of 4V then a couple of ms i have a pulse back on the input, how can i exactly know how much time there is between the 2 ^pulse??

    Use the output pulse to trigger a counter in period measuring mode and stop the counter on the return signal (if the input return signal is large enough to reliably trigger a logic circuit). If the signal is not large enough to trigger the counter directly, an external comparator can be used to generate the stop signal.
    Another approach is to use two channels of analog input. Feed the output signal to one of them and the return signal to the other channel. The time between outgoing and return pulses can be determined from the sampling rate. If precise timing is required and your AI board does not have simultaneous sampling, you have to account for the inter-channel time as well.
    Lynn

  • Measure the time in a specific frame of a flat sequence

    Hi I have a labVIEW program with a flat sequence and I would like to stick in a small SubVI which measures how long it stays within an individual frame to confirm the delay I have used. Does anyone have any code or any tips on what I could add which sets a timer going when I enter the frame and spits out the answer to a numeric indicator when it goes to the next frame.
    Any help would be appreciated 

    srikrishnaNF wrote:
    hi mr_nice,
      Use time elapsed vi...
    Thanks and regards,
    srikrishnaNF
    Please add where you find this vi.
    Check out this video here. It might be useful for you when he talks about the flat sequence structure and how to get elapsed time from it. It starts at about 7 minutes into the movie. He's using Tick Count.
    Also here you can find useful information
    Regards,
    Even
    Certified LabVIEW Associate Developer
    Automated Test Developer
    Topro AS
    Norway

Maybe you are looking for

  • VO.xml blank on server

    Hi, I am unable to see any in the VO.xml files. Due to this i am unable to work on any. what might be the issue. Error(5,2): <Line 5, Column 2>: XML-20108: (Fatal Error) Start of root element expected. for all VO.xml files thanks

  • How to... Web Printing with Microsoft Excel

    Hi All,  I am working with a client that is trying to get "Web Printing with Microsoft Excel" to work in their specific scenario.  They are on 2004s and trying to get this "Web Printing with Microsoft Excel" to work with 3.5x Web Templates, but can't

  • InputBox

    I had a previous problem with apparently having no InputBox function.  At any rate, I took the cowards way out and uninstalled my Visual Studio and installed a new version with update 4 on it. So, I created a whole new project with a windows form tha

  • How to prepare logotype for web? help please

    Hi, I created a logotype in  Illustrator and would like to use it in  my website, in the highest  quality so that it looks crisp and perfect. This is what I did: 1.   I created outlines in illustrator of the logo in the size that I want   it to be on

  • Recovburncd.exe stopped working

    I have a brand new lenovo thinkpad and have been trying to do a product recovery disc, but it has been giving me the same problem: recovburncd stopped working with the following error list: Fault Module Name: PX.dll Fault Module Version: 3.6.36.500 F