How to measure time in labview?

Hello,
I am using PCI-DAS card for Analog Input and Digital Output.
In the Analog Input for the voltage measurement labview takes near
about 1 second.But i want to reduce that time...means it has to take
one reading only in some miliseconds and there is no loops nothing
complicated just simple functions r there and as i run the vi it shows
one voltage reading.
I dont know how to reduce time period in this case.
And another thing is that i am saying this 1 second as per my
watch.but i want Labview itself shows the total time taken for the
execution.
Anybody knows about it please mail me and post the answer.
Thanking You
Safdar...

In general AI, attached example should work (i.e. 6025E).
This is however, an example for your reference only.
Best regards
ian
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
example_AI_20041110.vi ‏51 KB

Similar Messages

  • How to Measure time taken for a some lines of code in a program?

    Hi
    I have one requirement to measure time taken for executing a  block of code in report . How we can find it ?
    Is there any way to code something in report to caluculate it ?
    Please send solution as early as possible
    thank u

    Ok.. try this code...
    DATA : t1 TYPE i,
    t2 TYPE i,
    delta(16) TYPE p.
    GET RUN TIME FIELD t1.
    PERFORM get_data. "your block of code
    GET RUN TIME FIELD t2.
    delta = t2 - t1.
    delta = delta / 1000000.
    WRITE :/ 'Time elapsed : ', delta , 'Secs'. "time in secs.

  • How to measure time delayed measurement

    Hi All:
    I am using TDS3064 scope to measure time delay betwwen two channels (using IVI driver
    complience package 2.2 for scope IVI driver). I look through drivers, but not able to find
    delayed measurement function. Is there any alternate way to measure time delay betwwen two
    channels. If possible please provide me example. I am new to LV programming.
    Thanks
    DBhagat

    You have to understand something about IVI class drivers. To support portability, those functions that are common to a class are what you see in the driver. Some scopes might have the ability to measure time delay between trigger points on different waveforms but many don't. If there is such a function supported by your scope, then you can make a call to the instrument specific driver or a VISA Write/Read. Of course, you then loose the portability feature of IVI which, imho, is about the only reason to use IVI class drivers. What I would recomend is that you do a capture of both traces and then do an analysis of the raw data in LabVIEW. One way to do this is with Trigger Detection for 1 Channel (Analyze>Waveform Monitoring palette). Wire each channels data to the function and obtain the time for each trigger event. The function will return the time for each event that you can use to calculate the difference.

  • How to measure time intervals

    Hello!
    I am sorry to bother this forum, but I haven't
    found any faq for this group at faqs.org. Here is
    my problem:
    I have received a computer with LabView installed
    and 2 DAQ cards (unfortunatelly, with no books).
    I have built a program wich does few simple
    tasks - it measures temerature from 4 different
    channels at 100 measures/sec, plots it and writes
    it to a file. I use 4 "AI aquire wavform"
    instruments and not 1 multiple instrument. Now, I
    would like to measure somehow the actual
    intervals between the measures, if possible,
    relative to the time that I press the start
    button. I was not able to find how to do it, and
    I would appreciate any help. Thank you
    P.S. I would be very thankful if the cc of the
    answer (if there
    is one) will be sent to my e-
    mail - I do not always have access to the
    usegroups.
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    Ok.. try this code...
    DATA : t1 TYPE i,
    t2 TYPE i,
    delta(16) TYPE p.
    GET RUN TIME FIELD t1.
    PERFORM get_data. "your block of code
    GET RUN TIME FIELD t2.
    delta = t2 - t1.
    delta = delta / 1000000.
    WRITE :/ 'Time elapsed : ', delta , 'Secs'. "time in secs.

  • How to measure time difference between zero crossing of a sine wave and rise time of a pulse on a same graph?

    I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
    Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
    The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
    I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
    I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
    Cheers
    Awais 
    Message Edited by awais.h on 03-30-2010 11:20 PM
    Message Edited by awais.h on 03-30-2010 11:21 PM
    Solved!
    Go to Solution.

    Hi
    Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
    But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
    Here is what I get using that code.
    As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
    I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
    Here is the the code modified.
    As you can see, it wasn't that big of a modification and it still is your code.
    I will keep trying.
    Thanks for the help
    Attachments:
    FinalShockSpeed.vi ‏55 KB

  • How to measure time spent on socket read() method ?

    Hi,
    I have a socket waiting for input stream from a remote host :
    // method blocks until some input is available
    int count = socket_host.getInputStream().read(bytes);
    I want to know how much time it took to receive "count" bytes from remote host.
              t1 = System.nanoTime();
              int count = socket_host.getInputStream().read(bytes);
              t2 = System.nanoTime();
    (t2-t1) of course is not the answer, because t1 needs to start when read method actually stop waiting..
    I need some kind of call back, in order to know when input starts coming..
    how would you do that accuratly ?
    thanks for help !!

    thanks ejp , I followed your idea :
         count1=socket_host.getInputStream().read(bytes,0,1);
         t1 = System.nanoTime();
         count2=socket_host.getInputStream().read(bytes,1,bytes.length-1);
         t2 = System.nanoTime();
         if (count1==1 && count2>0)
              count=count2+1;
         else if (count1==-1 || count2==-1)
              count=-1;After I compute speed (with t2-t1 and count given to that method)
         public static double computeSpeed(double nanosec,double nbbytes){
              if (nanosec==0)
                   return 0;
              double speedkilobytespersec=nbbytes/nanosec*1000000;
              return speedkilobytespersec;
         }But speed results are very erratic and sometimes superior to 100 MBytes /sec , which is not possible with my connection.
    Somehow, I have the feeling that when t1 is triggered, it is already too late, many bytes are already arrived, and results is not accurate.
    It would need a lower level trigger, wouldn't it ?
    thanks

  • How to measure time difference between two continous encoder pulse (PULSE A & PULSE B)

    im trying to figure out the time difference between two square
    wave pulse (PULSE A and PULSE B) from an encoder. I tried to modify many code but fail to capture thephase difference  for each pulse. the
    pulse only rise to 5V and fall to 0V like normal square wave pulse
    can you and all of experts here help me out with this?
    my problem
    1) Encoder pulse are continous (pulse A and pulse B)
    2) Square wave pulse have "0V" and "5V" please rapidly
    if possible someone show me correct method , Im using LABVIEW 7.1 and Hardware NI SCOPE (PCI 5102)
    your advice are highly appreciated
    among my idea as in attachment , but I failed to get it
    Attachments:
    Need to Get this wave.JPG ‏34 KB

    Hi Amirul,
    Check the attached JPG file. i think this will be use full to you
    Regards,
    Santhosh M

  • How to measure time?

    how can i mesaure the time that took to execute a function?
    thanks

    how can i mesaure the time that took to execute a
    function?
    thanks
    Usually the end time minus the start time. How do you think? This probably won't tell you much though.

  • How to measure PLL lock time using LabView?

    Hi.
    I have to measure PLL, especially PLL lock time, using LabView.
    How can I do it?
    Is there is some dedicated LabView Toolkit that can do PLL lock time measurement?
    Thanks :-)

    Hi Igor,
    you want to measure the time it takes the PLL to lock in to a change in the source frequency?
    So you need to measure the frequency and you need to know the state of the PLL. Then you can calculate the time the PLL needs to work.
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to measure required time(tic-toc) in a vi?

    how to measure required time(like tic-toc in matlab) in a vi?

    There is the Profile>Performance and Memory option under the tools menu. I'm not sure if this is available with other than the professional version of LabVIEW. And, as I already mentioned, you have all of the time functions on the Timing palette. Call Tick Count or Get Date/Time in Seconds before you function and then again after the function is called. Subtract.
    Attachments:
    Yet another elapsed time.PNG ‏4 KB

  • How can I measure time between transitions at digital input

    I am using LabVIEW 6.0 to measure the time duration between 2 transitions in a digital input port. I have a set up including an HP 34970A Data Acquisition unit with the 34907A Multifunction Module plug-in. The LabVIEW program is trying to poll the digital input for level changes and then using the Time function(Tick Count) to check the times at the transitions. However this method doesn't work reliably as I have to measure time periods of 500ms.
    Is there any good way of mesuring time period with the above setup. I don't have a module which connects to the internal multimeter in the 34970A. The other stuff I have are a HP 34903A(Actuator Module) and a HP 33120A(Function/Waveform Generator).
    Any method for m
    ore accurate time measurement with the above setup will be appreciated. If not, what else do I need to make accurate time measurements.

    Frankly I doubt that you're going to be able to measure time interval with much accuracy. You're periidically polling a static digital input and how often you poll is going to vary. You could try polling as fast as possible and eliminate as many background tasks as you can. If your tolerance for the measurement is plus or minus 100 msce, then maybe you'll get a decent measurement most of the time. If it's plus or minus 5/10 msec, then it will never happen. The pc's clock is just not that accurate and a software timed loop on Windows is not deterministic enough. Get a counter/timer board for something really accurate or use a scope to capture the waveform.

  • How to measure query run time and mnitor performance

    Hai All,
                   A simple question. How to measure query run time and mnitor performance? I want to see the parameters like how long it took to execute, how much space it took etc.
    Thank you.

    hi,
    some ways
    1. use transaction st03, expert mode.
    2. tables rsddstat*
    3. install bw statistics (technical content)
    there are docs on this, also bi knowledge performance center.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
    BW Performance Tuning Knowledge Center - SAP Developer Network (SDN)
    Business Intelligence Performance Tuning [original link is broken]
    also take a look
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/31b6b490-0201-0010-e4b6-a1523327025e
    Prakash's weblog on this topic..
    /people/prakash.darji/blog/2006/01/27/query-creation-checklist
    /people/prakash.darji/blog/2006/01/26/query-optimization
    oss note
    557870 'FAQ BW Query Performance'
    and 567746 'Composite note BW 3.x performance Query and Web'.

  • How do I turn a Labview measurement file into waveform data

    How do I turn a Labview measurement file into waveform data, I have done this recreating the waveform out of an array with build waveform vi, is there another way?

    OK I am sorted, sorry for such a stupid question!!!!!

  • How to measure the shift between two resembling images using LabVIEW?

    I am running an experiment in which I use a microscope to map the surface of a laboratory sample and due to some small drift consecutive image appear displaced. In order to correct for the drift I need to first measure it, which I can do by recording two images and finding the shift between. Because of some small random noise which adds to each image, the features in two consecutive images are not completely identical, but they do resemble each other very well. Do you have any suggestions on how to measure this image shift (in both x and y) using LabVIEW (I have version 8.20)?

    Hi, thanks for the answer, I´ll try to see if a 2D cross-correlation will work. I also attached two typical images with a small shift between them (there is also some change in background between them, but I belive the shift should still be measurable).
    Attachments:
    Image1.png ‏285 KB
    Image2.png ‏267 KB

  • How to measure/estimate Bias of the signal

    Dear Sir
    I am performing the FFT of the signal which collect in real time from the hall effect current tranceducer SCT-013-005. I need to measure/estimate bias of this signal. Can you please guide me how can I do that. (Attached is my vi which is developed in LabVIEW 2012)
    I shall be thankful to you for your attention and consideration.
    Kind Regards
    Urfee
    Solved!
    Go to Solution.
    Attachments:
    How to measure Biase of the signal.vi ‏930 KB

    Hi tronoh,
    what about using the "Basic Averaged DC&RMS" function on your periodic signal?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • Parse xml in inputstreamobject and decode base64

    Hello I have got a http-package with content-type text/xml, from a HttpURLConnection object. From the HttpURLConnection object i get an InputStreamObject. Now i'm looking for the easiest to parse the xml, that is in the Inputstream object. The xml ju

  • Most recent date

    hi guys, I have a few tables which I want to query, basically one table with customer information lets call it customer and one table with appointment information, lets call it appointment(this table has an appointment_date field). Now, one customer

  • Having trouble with quicktime

    I was wondering if anyone had any solutions to not being able to access internet files requiring quicktime, but still being able to play files off the hard drive?

  • InputDate Component issue in JDeveloper11g Preview3

    Hi All, We have developed an Application in JDeveloper11g Preview1 and Migrated this Application to JDeveloper11g Preview3 . During Migration we have removed the .adf folder from the application. The InputDate Component is not working Properly. The P

  • My ipod marks an error -50 how can i fix this is an emergency!

    Hi, mac i need to know please how to fix this error my itunes puts em an error -50 what is that? how can i fix it? because i cant sync or restore the ipod because of this error and i want to sync and use my ipod! os please reply me soon! Message was