Measure time until I get a signal?

Hello,
I'm quite new here, and I feel stupid about asking this question, but  I have been trying now for a couple of days to make a VI that measure times until I get a signal in. I'm testing a timers accuracy, so when it turns on the power the VI should show me the time elapsed.
I'm just fighting with different kind of loops, but can't get any sense from it.
/gusse

Hi.
What kind of a signal is available? Since you post in 'counter/timers', let's assume it is some kind of 5V logical signal, which you can set to high als long as your timer runs.
Then, what you need is a simple tick count which is controlled by a gate. Use MAX to set-up a counting task. When choosing the counter, you will be shown which lines to hook up to. Measurment then is
'When Gate is high, count ticks till gate is low.'
Accuracy and time depends on the tick source. On a dedicated counter card such as 6602, 80 Mhz is available, hence 1/80 000 000 s is duration of one tick. Uncertainty in counting results mostly from the gate not knowing, when a tick comes by as it opens and shuts. So this gives a max error of 2 ticks. Other (probably main) source is signal quality, i.e. slew rate of your logical gate signal.
Does that help already? If not, please ask further.
Michael 

Similar Messages

  • Using to Time machine to get file that was saved over by same named file

    I accidentally deleted a file by naming a file the same name. Is it possible to go back and get one file using Time Machine? If so how do I do that?
    Thanks,
    Pat

    Enter Time Machine -> Browse back in time until you get to a date where the file would still exist and then browse through the Finder window until you find the file you want -> Highlight it with a single click -> Click 'Restore' in the bottom right.
    I would suggest moving/deleting the file you renamed over it before doing so just to keep away from any complications.

  • How do I measure the period of one TTL signal and the delay until a second TTL signal?

    Hi,
    I have a PCI 6024E board, the SCB-68 terminal box and am running LabView 6.1.  If needed I could install 7.1.
    I have two Honeywell sensors (HOA7720) which each consist of an infrared transmitter and a infrared reciever.  When the beam is broken they output 5V, when the beam is open it outputs 0V.  These are sensing the presence of a hole in two discs passing thru the sensors.  
    So as disc 1 rotates the signal is 5V until the hole passes thru sensor 1, then it drops to 0V until the hole passes.  Then it jumps back to 5 V. 
    Disc 2 is rotating at exactly the same RPM as disc 1 because they are coupled with a spring loaded coupling.  There is a delay between the first hole passing thru sensor 1 and the second hole passing thru sensor 2.  The delay increases with torque. 
    Using the oscilliscope function and connecting Signal1 and Signal2 to AIn0 and AIn1, I have verified that the TTL signals are there.  So electrically everything is working.  I just need to know how to measure the period and delay.  I'm familiar with A/D, but not with counters/gates etc and I think that's what is required here. 
    The first measurement needed is RPM.   Somehow I need to measure the period of the TTL signal. 
    The second measurement needed is the delay between the 1st falling edge and the 2nd falling edge.  
    I don't think it's possible to use the millisecond timer for anything, because the accuracy wouldn't be good enough.  At 3600RPM the disc will spin 60 revs per second, or one every 17ms.  A resolution of 17 samples per revolution is not good enough.    
    Help please!

    It worked!
    I ended up figuring it out today.  It's really simple.  I went analog in to AIn14 and AIn15 which were free. Then the program does a multichannel scan of the signals (collects array of 2 waveforms), Signal 1 and Signal 2 at some scan rate.  I used 100,000 S/s for 10,000 samples. Then I split the array into two separate waveforms.  Then I did an edge detect on each one and it returns the position in the array where the falling edge occurs.  The difference is the delay (after correcting for the scan rate), unless Sig2 comes first in which case the delay is the period - (or +) the difference
    To find the period I used a subset of the Signal 1 waveform from the first falling edge on to the end of the waveform, then did the same edge detect except set the reset setting to true instead of false so it wouldn't detect the low signal which was now at the position 0 in the waveform.  So it would ignore the initial low value, wait for it to go high, then detect the falling edge position.
    Anyway, it works awesome, seems very accurate and gives very stable readings.  3600rpm no problem.  It detects changes of one or two degrees in angular position, with a range from ~145 degrees to ~280 degrees

  • I am using Vodafone at Delhi India with my Iphone 5S, 3g is activated with my number but i am not getting 3G signals iphone is also activated with vodafone but still waiting for 3G signals contacted vodafone but wasted my time pls help using APN www

    I am using Vodafone at Delhi India with my Iphone 5S, 3g is activated with my number but i am not getting 3G signals iphone is also activated with vodafone but still waiting for 3G signals contacted vodafone but wasted my time pls help using APN www

    Keep on talking to Vodafone and keep pestering them until you get a satisfactory answer.  Whether you get a 3G signal or not, is entirely the responsibility of Vodafone India because they are your carrier/phone company and nobody here can help you with that on a public user to user technical support forum.
    Contact Vodafone as they are the only ones who can help you.

  • 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

  • [svn:osmf:] 10991: Fix bug FM-119, where the playhead time doesn' t get updated until after the seek has completed.

    Revision: 10991
    Author:   [email protected]
    Date:     2009-10-17 22:52:28 -0700 (Sat, 17 Oct 2009)
    Log Message:
    Fix bug FM-119, where the playhead time doesn't get updated until after the seek has completed.  The bug is actually in Flash Player (FP-1705), and the workaround is to wait until NetStream.time gets updated before dispatching the seek completion event.  This changelist also updates the unit tests and NetMocker to verify the fix.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-119
        http://bugs.adobe.com/jira/browse/FP-1705
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/net/NetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/SeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/audio/TestAudioSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayer.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/net/TestNetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestISeekable.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestSeekableTrait.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockNetStream.as
        osmf/trunk/libs/adobe/NetMockerTest/org/osmf/netmocker/TestMockNetStream.as

    Revision: 10991
    Author:   [email protected]
    Date:     2009-10-17 22:52:28 -0700 (Sat, 17 Oct 2009)
    Log Message:
    Fix bug FM-119, where the playhead time doesn't get updated until after the seek has completed.  The bug is actually in Flash Player (FP-1705), and the workaround is to wait until NetStream.time gets updated before dispatching the seek completion event.  This changelist also updates the unit tests and NetMocker to verify the fix.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-119
        http://bugs.adobe.com/jira/browse/FP-1705
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/net/NetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/SeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/audio/TestAudioSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayer.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/net/TestNetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestISeekable.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestSeekableTrait.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockNetStream.as
        osmf/trunk/libs/adobe/NetMockerTest/org/osmf/netmocker/TestMockNetStream.as

  • 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

  • How to fix the signal with the microphone to the computer when recording through an interface? every time i record and play back i get poor signal and a lot of fuzz

    How to fix the signal from the microphone to the computer when recording through an interface in logic pro? Every time i record and playback i get poor signal and a lot of fuzz.. how can i fix this problem?

    Which model computer?
    What operating system?

  • I can't download the latest update 5.0.1 I've tried several times and it gets to the end of about 70 minutes of downloading and then says the server timed out. Had the ohone for a year and no trouble until now. Please advise what to do. Thanks.

    I can't download the latest update 5.0.1 I've tried several times and it gets to the end of about 70 minutes of downloading and then says the server timed out. Had the ohone for a year and no trouble until now. Please advise what to do. Thanks.

    DIsable your antivirus and firewall.

  • I bought me and my wife a iPhone 4 32G and it turns out that she gets better signal then me mine keeps going in and out of service most of the time i only get one bar how can i fix this?

    I bought me and my wife a iPhone 4 32G and it turns out that she gets better signal then me mine keeps going in and out of service most of the time i only get get one bar how can i fix this?

    Restore as new in itunes and try again.

  • I am using Firefox v 8.0 on Vista. Lately it is opening really slowly until I get so frustrated I keep clicking on the desktop icon, Then it finally opens 3 times! How can I correct his?

    Question
    I am using Firefox v 8.0 on Vista. Lately it is opening really slowly until I get so frustrated I keep clicking on the desktop icon, Then it finally opens 3 times! How can I correct this? e

    This is a user to user forum.
    I have noted herein a number for Apple Customer Relations for you to try.
    Apple Computer Customer Relations: (800) 767-2775
    Avoid the rude language when dealing with them. It will get you better results.
    Good luck!

  • Why doesn't mini iPad have such a hard time keeping and getting a wireless signal?

    Why doesn't mini iPad have such a hard time keeping and getting a wireless signal? It's model PD531LL/A  Version 6.1.3

    Hi there,
    You may find the troubleshooting steps found in the article below helpful.
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    -Griff W.

  • How to measure the phase of a sinusoidal signal?

    I need to measure the frequency and the phase of a sinusoidal signal. I tried to use the Advanced Single Tone Measurements.vi but the phase measured in each iteration (each second) keeps changing (the measured frequency is not in integral Hz, so the first point of the next iteration is at a location different from the location of the first point of the current iteration...I guess this is the reason). How can really measure the phase of a signal (not always changing with time)? When I change the phase of the input sinusoidal signal, the measured phase should be changed though.
    I'm using LabVIEW 7.1 and PCI-6110.
    Thank you very much!
    Marlon

    Marlon,
    Without DAQ hardware I cannot run your VI. DAQmx is not supported on my platform (Mac OS X), so I cannot examine your VI in detail.
    1. The AI VI will wait until it has the amount of data specified. So if you are collecting one second's worth of data at a time, it will wait one second before completing. The 50 ms Wait will run in parallel, so it has no effect on the timing in this case.
    2. Continuous AO is possible, depending on the hardware you have. However, I have no experience with implementing it. Since your frequency is such that you do not end the AO data segment at the end of a signal cycle, you need to be careful to avoid discontinuities in the signal sent to the AO.
    3. There is no data dependency between the AI and the AO. It is possible that the AO could run after the AI in any given iteration of the loop.
    4. Your phase reference should be the excitation signal. The best method of evaluating the response of the beam would be to use two sensors, one at the shaker and one at the tip. Then measure the phase shift of the signal at the tip with respect to the shaker signal. If two sensors cannot be used, either measure the voltage sent to the shaker or use the simulated signal that you send to the AO as the reference. In either case you would need to compensate for the response of the shaker.
    5. Consider the phase shift in the filter. The steady state phase shift is about 14 degrees. The initial transient lasts about 5 cycles of the input waveform.
    6. Your simulation sampling rate is 1000 samples/second. While this satisfies the Nyquist criterion for a 379 Hz signal, it does not give you much data to work with for the phase information. If the hardware will handle it, I would go to 10000 samples/second.
    Lynn

  • Best way to measure time?

    I have labview 7.0 and SC-2345 with several digital inputs. I have to measure time between digital input(rise or fall)and stop signal comes in my program with compare etc.
    I have tried to measure time with 4 sequences and "get date/time in seconds" and i have also tried to use loop with shift register.
    It seems not to work or accuracy is not enough. so how to do that?

    I am very sorry If you feel I came across unfriendly in any way, my intentions were sincere and I wanted to help you improve your code by pointing out some common mistakes. Believe me, some of my early labVIEW diagrams from 10 years ago are much worse. In the meantime I have accumulated some experience with daily use, but am still learning every day.
    By the way, I an not affiliated with National instruments. This is mostly a peer help forum where LabVIEW users from all over the world help each other improve their coding skills. (Only users with blue names are employed by NI!)
    Certain things are not obvious looking at your code and once the desired functionality is clear we can help you to a more optimized version that actually works. Whatever you are feeding to the "elapsed time" indicator has nothing to do with elapsed time, but counts the iterations of the middle while loop. It is either 1 or 2, depending on the inputs. There has to be a more interesting output (see my next post!).
    For example, let's just look at your inner while loop (see attached image). (1) The number of iterations is known when the loop starts, thus a FOR loop is more appropriate. (2) You are comparing a DBL with an integer using "equal". If by chance the operator would enter a fractional time (e.g. 1000.5), the comparison would never become true and this loop would go on forever. Your program will never finish! Not good!
    An alternative, but safe code is shown below in the image. For integer times, it has exactly the same functionality.
    Apparently, you want to measure elapsed time, and I am guessing elapsed time used by the code in your middle loop. I will attach a simplified example based on your program in the next message here.
    LabVIEW Champion . Do more with less code and in less time .

  • 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

  • Why parser error

    Hi guys, I am using DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); xml = builder.parse(DocuContent.getInputStream()); But I got com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.

  • Vendor rebate and stock value

    hi Guru's Can anyone has an idea on this : i'm using SAP End-Of-Period Rebate's in order to have rebate at the end of the year from a vendor. When good receipt is donne <b>i don't want to update the value of the stock </b>(stock is valuated as Moving

  • IPhone connection to imac iphoto

    I have an imac running Snow Leopard.  I also have an iphone 5 with ios 7.0.3. Previously I could connect the phone to the mac and it would be available as a device in iphoto.  No longer! Any tips to get this going agin please?  Very frustrating havin

  • Problem with Indian Languges

    hello every body Iam mohan.Iam a developing a tool using which databse application can be developed in any Indian languages. all the GUI and resource bundles part is over. the problem is with the orcale databse.Iam using orcale 9i.when I store Hindi

  • Database grow report

    Hi What does "database grow report" means and how it is possible to be collected? Thanks Jonny ...