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

Similar Messages

  • 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 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

  • How can i compute the distance between every two strias

    how can i compute the distance between every two strias?The distances between every two strias in an image are almost equal .I have a picture for you in the accessory.there are many trias in all kinds of orientation in an image.fistly,i should find the most consious area,because it is simple to compute . Secondly,To improve precision,i should compute the distance of a group of trias,then conpute its average value.i dont know how to compute .pls teach me,thanks very much!
    Attachments:
    11.jpg ‏12 KB

    there is a typical image.
    Attachments:
    21.jpg ‏23 KB

  • 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

  • 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

  • How can I measure the phase difference of two input signal?

    Hello,
    I'm trying to measure the phase difference of two input sine waves with the
    same frequency.
    Is there anybody how I can do this with labview?
    Thanks,
    Dae-han

    This is my case! I have TDS3034 which can measure phase. However when I open Read Waveform Measurement vi that comes with tkds30xx.llb, I have a number of options under "measurement function" but not the phase measurement. May be I need another vi to do this?

  • How can I reduce the time between songs to zero for seemless mixing

    Hi, Ive only just got my 5th generation Ipod and was wondering if its possible to reduce the time gap between songs to zero. I.E a lot of Cd's and albums I have are mixed so it doesnt seem there is a pause between each song but when I put the cd's onto my ipod there is still a pause.
    For example I have a 2 many djs album which is heavily mixed with a new song every 30 seconds so it is a bit of a nuisance if there is a pause every 30 seconds.

    Your question gets asked on a daily basis, and has been answered many times. If you search for 'gapless playback' you'll see how just how many people inquire about this.
    In short... the iPod does not support gapless playback.
    If you want to eliminate the gaps, one workaround is to join the individual tracks together, and play them as one single track. You can do this by reimporting the CD into iTunes using the 'Join CD Tracks' feature.
    See Step 3 in this article:
    http://docs.info.apple.com/article.html?artnum=93079
    If you'd like to send feedback to Apple to ask that they include gapless playback as a feature in future revisions of the iPod firmware, you can do so on this feedback page.

  • How can I set the time between how long my phone plays a text msg ringtone if I don't respond the first time?

    If I don't respond the first time, how can I set how many times/seconds it plays the next time until I respond?

    Actually, there is!
    http://www.apple.com/feedback/iphone.html

  • How can I truncate the time zone from a Date object without using String?

    Does anyone know how to truncate the time zone portion of a Date object and maintain the object as Date, NOT String?
    I just need the date, i.e., 05/02/2008 as a Date.
    Thanks.
    JDev1

    Although you haven't said so, I expect you must be having some problem with that?
    My wild guess: the server is creating a Date object and setting its time component to zero (midnight). Of course since Date doesn't have a timezone, that would be midnight in the server's timezone. Then you are interpreting that date as if it were in your timezone, and since you are west of the server, it appears to be 11 PM or 9 PM or something on the day before.
    What we do is to send our timezone to the server and tell the server to use it when creating the Date object. Alternatively, when formatting the Date object you could use a SimpleDateFormat with the server's timezone applied. There are no doubt other solutions that could be provided if we had a description of your problem.

  • 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 Can I Restrict the times my BT Homehub 2.0 is ...

    How Can I Restrict the times my BT Homehub 2.0 is used?
    i want to make sure that the kids dont go back online on their wireless laptops after i have gone to bed!!!
    how can i restrict the useage times (say 11am - 11pm) for the hub/individual users - WITHOUT taking the plug out when I go to bed!!!
    thanks in advance
    Paul

    belial wrote:
    @meaga-byte: the second of those two options can be achieved by using the "BT Powersave" function. This does mean that *everyone* will lose wifi accessibility, so no watching iPlayer be for _you_ drift off! PowerSave will turn all your wifi off and back on between particular times.
    This seems a more user friendly option for thoes who are not ofay with IP addresses etc.
    Unless Paul wants to use wifi while in bed
    If I've helped, just click the Star - Every little bit helps
    If you can't fix it with a hammer, you've got an electrical problem.

  • How can i set the space between two button?

    Hello,
    I have
    <mx:HBox>
    <mx:Button label="one" />
    <mx:Button label="two" />
    </mx:HBox>
    how can i set the distance between this two compotents?
    Thanks

    quote:
    Originally posted by:
    robinbouc77
    Hi,
    you can use horizontalGap property on HBox to change the
    space between your buttons. I think the default value is 6. You can
    also use <mx:Spacer/>, but changing the gap on HBox is
    probably the cleanest way ;)
    C U
    perfect!!! works fine

  • How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    Okay, I haven't found a way to add an extra space using Find/replace, but you might be able to add some text wrap to the check boxes that will push the text away from them.
    Open Find/Replace and click the Object tab.
    Click the Specify attributes to find button to the right of the Find Object Format: field.
    Under Basic Attributes, choose Stroke and then the Black swatch (assuming the black swatch is applied to the strokes of your check boxes). If there are no other stand-alone objects in your form with a Black stroke, this should be all you need. (If there are Black strokes on your table cells, they will be ignored.)
    Click OK
    Click the Specify attributes to change button to the right of the Change Object Format: field.
    Under Basic Attributes, choose Text Wrap & Other > Text Wrap > Type: > Wrap around bounding box (2nd button from left)
    Under Offset, set a Right offset at the distance you'd like to add (I don't know what units you use, but the 3-5 points might work for your purposes...might take some trial-and-error to get it where you want)
    Click OK
    Click Change All

  • How can I measure the hertz in a wave form?

    How can I measure the hertz in a wave form?

    As an example, this is from BBC Technical Requirements for HD material:
    3.1.1 Stereo line-up tones
    All stereo tracks must use EBU 1KHz tone (left ident). All tones must be sinusoidal, free of distortion and phase coherent between channels.
    Digital Audio Reference level is defined as 18dB below the maximum coding value (-18dBFS) as per EBU recommended practice R68.
    See also:
    http://www.bbc.co.uk/guidelines/dq/pdf/tv/tv_delivery_to_network_programmes_v1.2-2011.pdf
    for full document.
    And for BBC Radio:
    Not every Network requires tone. Check the delivery requirements with the commissioning network or click here.
    Reference tone, where used, should be at -18dBFS or PPM 4 on A, B and/or M.
    If submitting material with reference tone, tone and programme material must be have been monitored and measured through the same technical chain. The level of the tone must be equivalent to 0dBu and no less than 8dB below peak audio level for the programme material.
    THE LEVEL OF TONE MUST HAVE A KNOWN RELATIONSHIP WITH THE LEVEL OF THE PROGRAMME MATERIAL AND THIS MUST BE STATED; for example: “Tone at 8dB below peak programme level”.
    As a newcomer to digital sound (my background is camera) I confess to being somewhat confused. We are normally told to record at the highest level possible. So for voice podcasts I tend to record at about -6dB below peak for maximum volume, distributeds on MP3 files.
    But I can underatand that televison and radio especially for analogue transmission) may have limited headroom, hence the requirement for -18dB peak = 0dBM.
    I remember when we first rented out Digital Betacam cameras, some recordists were recording almost everything OVER -18dBM.
    I suspect that until we have an all-digital world, these requiremnents will still be in place.
    Many thanks to all. It's a ghreat community!
    Brian Rose

Maybe you are looking for

  • Want a scroll bar for a table view

    Hi Experts, I am developing in NWDS 2004S. I have 2 groups in RootUIElement, in one group i have few labels & input box with a button, in other group I have a table. On click of button according to values in inputbox an RFC is called & Table is popul

  • How to i get 'apple id disabled' to be 'abled'?

    someone answered this questions once, but i thought i had done everything he suggested prior to posting. i opened my husbands own apple id. i still have my own. i cannot find where in the ipad i can change the apple id info to correlate with the appl

  • Cross platform mail madness

    Just to make my life easier (supposedly), I used the mail client in Windows over on my Boot Camp partition, to check my .Mac mail. No problem. As soon as I did this though, when I returned to OSX, all my old mail in Mail had disappeared. Is this simp

  • MeetingPlace/WebEx: AutoAccount Creation Failed

    We have a new MeetingPlace/WebEx node integration that went live yesterday. Most users are OK, however, this morning we have several users that are receiving an error message when trying to log in (for the first time: "Auto Account Creation Failed" m

  • Firefox lags/crashes/freeze All in One!

    I'd just reformatted my laptop and installed a fresh copy of the latest firefox. Then, I found that things weren't right as it keeps lagging/freezing and crashes from time to time especially when you're opening a few new tabs at once. Since the previ