TTL signal Frequency

I am measuring the number of edges (per second)of a TTL signal to calculate the RPM of 2 gear drives. I get a random error due to software timing. I cannot use hardware timing as my PCI6014 card has just 2 counters. I have tried all other methods(period,pulse mesurement)using counters.
I have now connected my TTL signal to my AI channel0 and I am scaning it 10000 scans/ sec. I am then passing this waveform to single tone extraction vi to find out the frequency of my input TTL signal. But I get a totally different reading as my frequency. I get some frequency value even when my shaft does not rotate.I also tried the period,duty cycle using another VI available in waveform analysis palatte.
I eliminated all noise in the input signal by representin
g my input signal as an integer. So my input signal would be either 0 or 5V.
Is this the right approach? Or am I messing up.Please suggest the best way to measure frequency of a TTL pulse without using a counter.

Hi Balaji:
Please look at the example I am attaching with this post. Please keep in mind that you have to sample at least 10 times the frequency of your incoming signal.
Try connecting a simple square wave to analog input channel from a function generator and see if you can measure its frequency.
Regards,
Bharat Sandhu
Applications Engineer
National Instruments
Penny
Attachments:
freqMeasure.vi ‏38 KB

Similar Messages

  • What is the max. cable length that the Differential TTL signals can run in both at high and low frequencies?

    Hello,
                I want to now the max. cable length that the Differential TTL signals can run in both at high and low frequencies.

    That is very dependant on the type of cable, its construction, and inherent impedance and capacitance. This may be of use:
    http://beiied.com/PDFs2/SSI_14-15-bit-encoder_addendum.pdf
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • How I can measure frequency of TTL signal without external clock?

    Hello,
    I want to measure frequency of TTL signal using PXI-6254 or PXI-6713, without using external clock.
    Frequency will be up to 100kHz. How I can use internal counter of 20MHz or 80MHz?

    Hi Yuta K,
    You have not stated what software you want to use for this measurement, but in case you're using LabVIEW, please go to the Example Finder (in LabVIEW go to "Help >> Find Examples"). 
    In the Example Finder, you make sure the "Browse" tab is stil selected, and than you go to:
    Hardware Input and Output >> DAQmx >> Counter Measurements >> Digital Frequency
    Here you will find some good examples of measuring a digital frequency with 1 or 2 onboard counters.
    If you need additional information, please let us know!
    Best regards,
    Peter S

  • How to send a ttl signal with a good exactitude less than 10ms?

    i have a pci 6013 (8 input channel) and pci 6711 (4 outpout channel).Then i need to send a ttl signal to a camera ccd to take a photo when a waveform sinus is equal at zero (rising), but when i send this TTl signal with dasylab using generator pulse or combi trigger and readind this signal, i have difference between dasylab pulse(that is exactly) and measurement pulse that is approximate 40ms after.But i need to have less than 10ms is it possible?
    Frequence rate =1000hz and block size=512 the waveform sinus is 0.2Hz.i have already try to increase the sampling rate but nothing happens.Thank for your help.

    Yes, it's possible.
    You just have to reduce your block size to 10 !
    For more informations, visit Forum Dasylab en français at http://forum.aceboard.net/?login=128657
    Frédéric Miqueau
    MD Electronic, France
    http://www.mdelectronic.fr
    French Dasylab Forum : http://www.dasylab-forum.de/forum/index.php?showforum=43

  • NI 7330 TTL Signal

    Hi,
    I just want to create a 5V TTL signal with a NI 7330 card. If I have this, I want to change the frequency. How can I manage this with LabView?
    Thank you very much
    Phil

    Phil,
    this is not a typical usecase for a NI 7330 motion contol card, but anyway. For your task you could use the step signal of an axis configured as open loop stepper. Then run a simple 1-axis example and you will see a 0 - 5 V output signal at the step output. You can vary the frequency of this signal by changing the velocity on the fly or by using the Load Velocity Override function.
    If you need better control over your output signal (e. g. control the pulse width), you better should use a board with clocked general purpose digital I/Os like a PCI-6220. 
    Another option is using the PWM outputs of the 7330 (Configure PWM Output and Load PWM Duty Cycle). The drawback of this solution is the limited number of discrete frequencies that are available. Here is the list of output frequencies for your board:
    If this list meets your needs, this could be an option for you.
    Regards,
    Jochen

  • Fast speed TTL signal sampling

    Hi,
    I am a beginner of Labview. Currently we are facing a new project that i believe fast data acquisition is the key point. If someone could give some guidance I would be greatly appreciated.
    Board: AT-MIO-16E1
    Signals: A series of TTL signals generated by an avalanche photodiode, 30 nanoseconds in width, the frequency of the occurence of signals could be as high as 10MHz.
    Objective: Counting the number of TTL signals during a certain period of time, (form microseconds to milliseconds) store it somewhere, and repeat the counting and storing precedure for lots of cycles as many as the hardware allows.
    Questions:
    1. Is this a project for the board and Labview software?
    2. As we imaging, there will be some deadtime tween th
    e periods that the signals are being counted. Could we minimize the deadtime to a insignifcant value? (like 5% of the counting time?)
    3. If it could be done by Labview, is there any additioal hardware we need to purchase? E.g. a board that provides gating signals.
    4. Is there any exsisting examples we can copy?
    Thank you,
    Gufeng

    Being a long time user of the E1 boards myself, I would say that you MAY be able to do this. As I don't have the specs handy right now, I can suggest a means by which to come up with the solution for yourself:
    Check the specs of the board. You are looking for the specs for the DAQ STC timer portion, as you want to do counting operations, not data acquisition. I don't remember if the DAQ STC on the E1 can handle 10MHz. If it doesn't, stop there, and get your NI Catalog and look for one of the newer boards with the advanced timing chips, I believe these can handle it. If the E1 can handle it, go on from there. Create a timing diagram for yourself, to get a visual picture of what you need. Then determine what gating and triggering you need. There are numerous
    examples in the sample programs database in LabVIEW for counting. These should point you in the right direction.
    Good luck

  • TTL signal vs TCP-IP, parctical and timing considerations

    We have just purchased a BioPac MP1 50 physiological recording system (www.biopac.com). We would like to start/stop an acquisition from another computer system and/or to add annotations and markers.
    To this end it seems there are two routes to consider. We could either use the built-in Trigger in/out capability with TTL signal of (0 and +5V square pulse) or use TCP-IP client-server to control it remotely (i.e. using VIs such as TCP-IP Listen). In the later case, I�d use the Beta LabView API libraries that BioPac is about to release for the MP150, instead of the dedicated AcqKnowledge 3.8.1 software, which is really good.
    Because we need to correlate event during the physiological recording of our experim
    ent, it would be ideal if the resolution were of ms accuracy (i.e. latency less than 1ms) and we need to manage up to 16 trigger channels.
    I have very little technical background knowledge on this. Thus, in order to help me evaluate a solution, I would appreciate any comments and suggestions.
    1) I would like to know first if anyone could recommend an easy solution to generate TTL signal (0 � 5V logical pulse) on both Windows and LINUX PC?
    For instance I read about using the 25-pin parallel port, but I am curious to learn about other possible alternative such as USB, USB2 with or without adapter but also a very cheap card (a couple $100 max). I am already ruling out serial connection, because I am told it is very slow and has horrendous latency.
    2) What are the latencies in read and writing/issuing TTL signals com? How does it compare with a dedicated byte stream through TCP-IP, on a dedicated cable and on a network cable?
    3) Are they any VI application that you c
    ould share to show how LabView 7.0 can talk through the respective ports to generate a pulse forming the trigger information being written or read in?
    I look forward to hearing your feedback and suggestions. Many thanks in advance.
    Donat-Pierre LUIGI

    Use TTL. It is likely that the TCP/IP messages will get there fast enough
    and that the software will respond in a timely manner but there is no way to
    be sure. It is the fastest way to get from your LV application to your
    other device. You may need to check the response time that the BioPac will
    give to the TTL input verses a TCP/IP message.
    You should also consider the level of programming needed to accomplish your
    tasks. I would strongly suggest that you get a seasoned LV programmer on
    the job or you will be wasting a lot of time and enduring needless
    frustration.
    The parallel port will respond is sub-millisecond. You should be able to
    toggle it several hundred times in a millisecond. I've had LV applications
    use the printer port for this type of communications before. I don't
    remember the bandwidth but it's more than adequate for this application.
    TCP/IP will sometimes get delayed by the OS (either Windows or Linux) due to
    other things that are happening at the time which you don't have control of.
    The message should go out in very short order (again sub-millisecond) but
    there is no control over this.
    Good luck,
    Chuck
    "Donat-Pierre" wrote in message
    news:[email protected]...
    We have just purchased a BioPac MP1 50 physiological recording system
    (www.biopac.com). We would like to start/stop an acquisition from
    another computer system and/or to add annotations and markers.
    To this end it seems there are two routes to consider. We could
    either use the built-in Trigger in/out capability with TTL signal of
    (0 and +5V square pulse) or use TCP-IP client-server to control it
    remotely (i.e. using VIs such as TCP-IP Listen). In the later case,
    I'd use the Beta LabView API libraries that BioPac is about to release
    for the MP150, instead of the dedicated AcqKnowledge 3.8.1 software,
    which is really good.
    Because we need to correlate event during the physiological recording
    of our experiment, it would be ideal if the resolution were of ms
    accuracy (i.e. latency less than 1ms) and we need to manage up to 16
    trigger channels.
    I have very little technical background knowledge on this. Thus, in
    order to help me evaluate a solution, I would appreciate any comments
    and suggestions.
    1) I would like to know first if anyone could recommend an easy
    solution to generate TTL signal (0 - 5V logical pulse) on both Windows
    and LINUX PC?
    For instance I read about using the 25-pin parallel port, but I am
    curious to learn about other possible alternative such as USB, USB2
    with or without adapter but also a very cheap card (a couple $100
    max). I am already ruling out serial connection, because I am told it
    is very slow and has horrendous latency.
    2) What are the latencies in read and writing/issuing TTL signals
    com? How does it compare with a dedicated byte stream through TCP-IP,
    on a dedicated cable and on a network cable?
    3) Are they any VI application that you could share to show how
    LabView 7.0 can talk through the respective ports to generate a pulse
    forming the trigger information being written or read in?
    I look forward to hearing your feedback and suggestions. Many thanks
    in advance.
    Donat-Pierre LUIGI

  • Mic mini to IIyama ProLite E431S: signal frequency out of range

    Hi, I've just got a problem with the display (despite everything worked well together for more than a year): the screen is black, with only the following message:
    Attention signal frequency out of range
    H: 05.2 KHz V: 05.2 Hz
    Please change signal timing
    It suddenly happened yesterday, but everything was OK since I bought it, except some quick shutdown of the display from times to times
    I don't know what to do, since I've got only one display so I can't modify the parameters of the mac mini
    Thank goodness I also have a laptop to write this message.

    Try starting in Safe mode. To do this, hold down the shift key during a restart. Hopefully you will get a working screen back. Then change the display settings to what you had before and restart normally.

  • Can you tell me how to measure audio signal frequency in measurement studio with visual basic 6.0?

    I'd like to measure two differential input signal(I.e. A+ and A-),below is two test projects,
    1.connect A+/A- to PCI 6052E card's ACH0/ACH8 ,and refer to GND for testing
    2.connect respectively A+/A- to PCI 6052E card's ACH0/ACH8 for testing
    Could you tell me the details of the second project?and give me a illustration in measurement studio with visual basic 6. 0 about the second?
    In addition,I would like to measure the audio signal frequency,could you give me a illustration in measurement studio with visual basic 6.0?
    Wait for your reply!

    Dear kelven,
    Thank you for contacting National Instruments.
    To address your question, there are Analog Input shipping examples that demonstrate how to measure an analog input differentially, as you specify in (2).
    As for measuring the audio signal frequency, you may want to check out the following KnowledgeBase. The link is:
    http://digital.ni.com/public.nsf/websearch/4b08380530d72d3b86256340004c3005
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments

  • 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

  • Analysis of the microphone signal-frequency band

    Hi
    I made a program to analyze the signal from the microphone (FFT, STFT) but I have one thing to do. I have a graph amplitude-time
    I need to change the signal frequency for example 50 Hz for example by moving the slider that on the chart were waveforms amplitudes in certain frequency bands.
    How to choose the frequency of the signal to change the band on the graph?
    Thank for help.

    In your analysis results, what is the delta frequency between datapoints? Just increment through the array of amplitude values. For example, if your datapoints are 5Hz apart, simply index out every 10th value in the amplitudes. If the increment is a non-integer value, you will need to do some interpolation, but other than that the process is basically the same.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • GiGe camera waits till there is a TTL signal takes a picture and then waits again for another TTL signal (IMAQdx)

    Hello , I have a problem with a GIgE AVT camera.
    All I want to do is make the camera wait and each time there is a TTL signal snap a picture and save it to the disk.
    I have spent hours and hours trying to make this work but I had no luck !
    Could someone with knowledge of the IMAQdx drivers help me please !?
    I really can't find a solution to this problem!

    Hello LaThoS, 
    thanks for your reply .
    What i am trying to do is use an AVT GS660 which actually has a hardware trigger input and all i am trying to do is put it in a while loop and make it wait untill there is an external ttl signal, then take a picture , save it and then wait for another ttl signal !
    I 've seen the examples but i cannot see how they are going to be usefull to me since there is no hardaware ttl signal on the cam( https://decibel.ni.com/content/docs/DOC-15346)
    I am attaching my sample code.
    Could you please help me figure it out ?
    Thanks in advance,
    yannis.
    ps:the problems that i am facing is that on ttl the camera starts saving the same image continisously till i stop the loop !
    Attachments:
    AVT_v5_NI.vi ‏75 KB
    enum.ctl ‏4 KB

  • TTL signals from motor outputs

    I'm currently using a stepper motor with a MID-7604 drive and a PCI-7344 controller. I would like to output TTL signals from the drive at certain motor positions, but do not have an encoder (which is required for breakpoint signals). Is it possible to `construct' a TTL type signal using the low-level motion functions in LabView, and then output them through a motor axis that is not currently being used?

    Hello,
    Depending on the type of output that you want to generate (single pulse or pulse train) you could use the Digital IO port of the motion controller with the Set IO Port MOMO.flx function to toggle DIO lines or you could use the Configure PWM Output.flx function to generate a pulse train.  The downside is that this will be software timed based on the current position as determined by the controller.
    There is not any way to manually modify the motion control signals that are generated by the controller.  That is all handled by the FPGA of the controller.
    Regards,
    Scott R.
    Applications Engineer
    National Instruments

  • Recording quadrature encoder and AI signals simultaneo​usly and generating output TTL signals in one VI

    I want to record simultaneously encoder, pressure and other AI signals and output a TTL signal for every other pressure signal. I have two VIs: One is to record all signals and the other is to generate TTL signals.
    1. Since I'm new to Labview, I would like to double check with experts that if my VI (attachment 1) did what I expect. I would like to have DAQ box read and write encoder signals and pressure signals at the same time so I can plot PV diagram.
    2. During acquisition, some data points are usually missed, shown in attachment 2. Is there any way to solve it?
    3. I tried to combine two VIs but it never work (attachment 3). Can anyone give me any suggestions?
    PS. Labview 9.0 and NI USB-6216 are used.
    Dummy signals are 30Hz sine waves for pressure and 2 TTL signals for encoder A and B at 5kHz.
    Thank you!

    Thank you for your help, Peter!
    I attached the wrong file for attachment 1. The initial code for measurement is attached here.
    The sampling rate is 20000 and the sample mode is continuous.
    For missing data points, it improved when I add "wait until next ms multiple" in while loop.
    Follow the example you gave me, I'm able to generate TTL signals in one vi, attachment 2. Could you please check if it's correct?
    It looked fine with simulated signals and hope it will go well with real engine tests.
    I have two more questions:
    1. Does the input number for wait until next ms multiple should always be the same as "samples per channel" in sample clock?
    2. How will the value of "samples per channel" in sample clock affect data acquisition? I tried 1000 and 10 but didn't see any difference between these two.
    Thanks a lot.
    Attachments:
    recording VI.png ‏332 KB
    AI+CI+CO.png ‏72 KB

  • Counting rising edge during 50ms for a TTL signal

    Hello, I'm using Labwindows 6 and a traditionnal DAQ. I've injected a TTL signal on my card and I would like to count the number of rising edge each 50 ms without using an internal timer in labwindows so that the counting pace cannot be disturbed by Windows.
    Do someone know how to process or which functions should I use?
    Thanks

    Hi it's still me with still some troubles
    I've generated with my counter0 a square wave of 50 ms pulse width from an internal source but then, I don't know how to specify that this signal will also be the  pin gate (ND_PFI_4) of my counter1 which will count the rising edge.
    Moreover I also don't know how to specify my counter1 just to count rising edge while  my gate is at high state; here 's mys code :
        //Generation of an internal 100 KHZ square wave
        GPCTR_Control(1, ND_COUNTER_0, ND_RESET);
        GPCTR_Set_Application(1, ND_COUNTER_0,ND_PULSE_TRAIN_GNR);
        GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_SOURCE,ND_INTERNAL_100_KHZ);
        //Generation of a 100 ms gate
        //50 ms => low state
        //50 ms => high state
        GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_COUNT_1,5000);
        GPCTR_Change_Parameter(1, ND_COUNTER_0, ND_COUNT_2,5000);
         //output the counter pulse, you must call Select_Signal.
        Select_Signal(1, ND_GPCTR0_OUTPUT, ND_GPCTR0_OUTPUT,ND_LOW_TO_HIGH);
        GPCTR_Control(1, ND_COUNTER_0, ND_PROGRAM);  
        //configuration CPTR1 that will count each rising edge while the gate is at high state
        GPCTR_Control (1, ND_COUNTER_1, ND_RESET);
        GPCTR_Set_Application(1, ND_COUNTER_1,ND_SIMPLE_EVENT_CNT);
        GPCTR_Change_Parameter(1, ND_COUNTER_1, ND_SOURCE, ND_PFI_3);
        GPCTR_Change_Parameter (1, ND_COUNTER_1, ND_SOURCE_POLARITY,ND_LOW_TO_HIGH);
        GPCTR_Change_Parameter (1, ND_COUNTER_1, ND_INITIAL_COUNT, 0);
        GPCTR_Control(1,ND_COUNTER_1, ND_PROGRAM);
        GPCTR_Watch (1, ND_COUNTER_1, ND_ARMED, &compteur);
        printf("%d\n",compteur);
    And the value of compteur is not the value expected at all.
    thanks.
    (ps : can you speak french?)

Maybe you are looking for