Measuring frequency with counter or analog input?

I have some frequencies which I need to measure. Some signals are digital and some are analog.
I have a PXI-6040E DAQ which has both counters and analog inputs. 
I heard that you can measure higher frequencies with the counters than with analog inputs.
What is the range of frequencies an analog input can determine versus a digital counter? 
Where is the cutoff that you must absolutely use a digital counter to determine the frequency?
Is the cutoff different for different DAQ cards? Or is generally the same.

Have you looked at the specs for the device? The max sample rate and the max counter input will be listed there. The max frequency for an analog input is based on nyquist sampling theory. Are you at all familiar with? It states your sampling frequency has to be at least twice the frequency you are measuring.
Since each device might have a different max sample rate, your last question is answered.

Similar Messages

  • Counter to measure frequency with multiple channels (Analog In/Out) in one vi

    Hi,
    I am using DAQ 6062E. I have multiple channels: an Analog In, Analog Out, Count Edges, and Count Frequencies. Without Count Frequency, the program works fine, I have defined a Sample Clock for each channel and then a common sampling rate. When I add Count frequency channel, I am not able anymore to use Sample Clock, since I get an error that Sample Clock can not be used, and if I change the Sample clock of the Count frequency to Implicit, then I can not connect different channels with a same sampling rate. In the attached file, if the Count Frequency is not connected to any Sample clock and sampling rate, the program works, but now I can not run the program for more than 5-10 Hz sampling rate, otherwise I get the error: 209802 “occurred at DAQmx wait for next sample clock, slow down the sample clock”. Does anybody know how to fix this problem?   
    Thanks a lot,
    Azadeh
    Attachments:
    multiple channel.jpg ‏117 KB

    Hi Otis,
    Thanks for looking at the problem. I ran just two counters in a same vi. I was not able to use the Sample Clock since I needed to define an external sample clock source. The vi is attached. I could run this vi fast (200Hz). So, I am not sure why when two counters are combined with AI/AO the rate is very slow. I have attached three vi(s). Just two counters, AI/AO/1 counter, and AI/AO/2 Counters vis. I am able to run the vis in 200 Hz except the vi with AI/AO/2 counters (maximum sampling rate 20Hz). I appreciate if you can look at it if I am missing something.
    Thanks,
    Azadeh
    Attachments:
    AI_AO_2 Counter.vi ‏153 KB
    2 Counter.vi ‏61 KB
    AI_AO_1 counter.vi ‏138 KB

  • How to measure frequency with PCI-4474 card

    Hi,
    I'm trying to measure frequency with PCI-4474 card.
    Any sample code available?
    Thanks.

    Hi,
    Thank you for posting the the NI forums.  There aren’t any example programs that ship with the DSA drivers.  Will you be using this with the Sound and Vibration Toolkit?  If so, there are numerous examples that install with this software package.  Check out the LabVIEW Example Finder >> Toolkits and Modules >> Sound and Vibration Toolkit. 
    In addition to this, you could also use the signal processing VIs that ship with LabVIEW.  There are also examples that ship with LabVIEW that use these VI in Example Finder >> Analyzing and Processing Signals FFT and Frequency Analysis.  There is an entire Signal Processing palette that should contain the functionality that you need.
    I hope this helps.  Post back if you have further questions. 
    Ed W.
    Applications Engineer
    National Instruments

  • Measure frequency with 2 counters

    Hello,
    I'm measuring a digital frequency signal using a PXI-6602 module using the 'high frequency with 2 counters' method.  From the examples I have found, it seems that you specify only the counter which is doing the measuring and the measurement time.  How does LabVIEW know which counter is used to generate the HF pulse reference train, for example:
    ctr 0 - measuring 200kHz signal
    ctr 1 - generating  50kHz signal
    Do I independently set up and start the ctr1 generation, and as log as it starts before the measurement commences, does LV then sort it all out without any other input?
    Thanks
    Dave

    You should connect the signal (whose frequency needs to be measured) to Ctr-1, and there gonna be an internal connection between the output of the first counter and the gate of the second counter (as described here).
    You may want to check this link as well.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Can I measure frequency with a SCXI-1120 module and SCXI-1320 terminal block?

    I am attempting to measure a square wave from a directional encoder to display RPM of a dynamometer. The waveform will have a frequency of 0-4KHz, with 3.6KHz being nominal, at about 5volts RMS. How can I measure the frequency of this waveform with the hardware I am currently using? In addition to what is listed above, I am using a PCI6034E GPIB card and LabView software.

    In order to measure frequency, I would not recommend to use the SCXI-1120, but the SCXI 1126, which is a programmable isolated F-to-V module.
    If by any reason you do not want to use SCXI-1126, then I would suggest to use the counter/timers of your board. The counter/timers are TTL compatible, and are the devices that we mostly recommend for doing precise frequency measurements.
    In order to have access to the counter/timers of your board through your SCXI chassis, you will need SCXI-1180, which is basically a feedtrhough panel for your DAQ board.
    Once we have access to the counter/timers through the SCXI chassis, we can proceed with the coding.
    I found a pretty good webpage that clearly explains how to perform frequency measurement with the DAQ-S
    TC counter/timers (DAQ-STC is the type of counter/timer chip that you DAQ device has). Here is the link to it:
    Pulse Width & Frequency Measurements
    As you will see, this link contains tutorials, application notes and example programs. I would recommend to pay special attention to the example program called: DAQ-STC: Measuring frequency.
    Good luck with your application!

  • Trying to measure frequency with the cFP-CTR-502. Can't get tutorial to work!

    Hello,
    I am trying to measure the frequency of a
    signal that I'm counting using the cFP-CTR-502. I can successfully
    count pulses but I what I really need to know is the RATE of counts
    (counts/s or the frequency). I have found some Labview programs that
    supposedly do this that I've downloaded from ni.com (link below). The
    concept makes sense of using a gate and output but the programming is
    crazy - at least the program in the link below is. 
    1. Is there an easier way to measure the frequency of counts?
    2. Why will the program from the link below ( frequency_measurement__ctr_.vi
    ) not work on my system? I get an error everytime I run it. Could I be
    missing some VI's necessary for it to run? Or is it from another
    LabView version that is not compatible?
          The
    entire error is:   -32810 occured at FieldPoint initialization failed.
    Possible causes, 1. Missing or corrupt configuration file; 2. Failed to
    create call backs. : FP Open.vi
          Link for program: http://sine.ni.com/devzone/cda/epd/p/id/4682
    Thanks in advance for all your help and time!
    Sam T

    Sam,
    Have you tried the example titled Frequency Measurement.vi that ships with LV?

  • How to write a VI to measure the difference between two analog inputs (voltage)

    I'd like to measure the difference voltage between two analog inputs.
    Could someone write me a VI for it, please?
    I'm new with Labview....
    Thanks a lot!!!

    On the numeric palette, there is a function called subtract. As the
    help for it says, it 'Computes the difference of the inputs.'.
     Since
    this is such a simple process, you need to provide some details on why
    you can't do this. You can wire just about any data type into the
    inputs. Post your code if you need further help.
    Message Edited by Dennis Knutson on 04-05-2009 08:23 AM
    Attachments:
    Subtract.PNG ‏1 KB

  • Measuring frequencies present in an analog signal

    Hello,
    I want to measure the frequencies present in an incoming analog pulse signal.
    I tried it as shown in the vi using ‘Extract single tone information.vi’ which was showing the value as ‘39m’ I dont understand what is this value. Can someone explain the right way of measuring the frequencies present in the signal so that I can feed them to my bandpass filter limits.
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    Measure_Frequency.vi ‏102 KB

    Hello,
    The acquired analog signal is pretty much filtered as shown in the attached image.
    Now I am collecting data for 5 seconds (collecting 2500 samples using collector.vi ) and finding the single tone frequency from it and plotting the measured frequency after 5secs in a waveform chart.
    But I am confused with these1)The original detected signal has an amplitude of above 1.6V but the measured amplitude only shows 0.6V and 2) how the waveform chart has a plot plotted over the duration of 5seconds  when the frequency is measured for every 5seconds data I mean shouldn’t  the chart has a plotted value of HeartRate plotted  for every 5 seconds.
    Can someone explain a bit about these.
    Thanks.
    Attachments:
    Freq.JPG ‏74 KB
    Frequencyplot.vi ‏94 KB

  • Measure HIGH frequency with counter

    I want to measure 1 Mhz range freq with lab PC 1200 board

    Hello;
    The maximum frequency that the source input of the counter can have a signal hooked up to is 8 MHz.
    To measure a 1MHz signal, just connect that signal to the source pin of the counter, and use one of the examples that both NI-DAQ and Labview have to start your application.
    Hope this helps.
    Filipe A.
    Applications Engineer
    Naional Instruments

  • Problem measuring frequency with PXI-4472 module

    Hi all,
    I am using PXI-4472 DSA Module to analyse the Frequency.
    I am using LAbVIEW 7 software.
    I am using the Spectral Measurement VI in Signal Analysis in Functions.
    Using that i am not bale to measure the frequency more than 500Hz.
    My card is able to measure upto 50KHz.
    why it is happening?
    what i need to do if i want to measure the frequency upto 50KHz?
    regards
    Preetam

    What happens when you try to measure a signal more than 500Hz? What does the time domain signal look like? How fast is the NI-4472 sampling? Are you using a sensor such as a microphone? Or are you just making voltage measurements?
    I would recommend starting on the acquisition side with a shipping DAQmx example such as "Cont Acq&Graph Voltage-Int Clk.vi" which can be found through the LabVIEW Example Finder under the DAQmx section. You will need to have at least NI-DAQ 7.1 to use DAQmx with the 4472, but it's always good to upgrade to the latest version. Here's a link which shows the latest versions of DAQ on a per device basis:
    http://www.ni.com/support/daq/versions.htm
    Once the time domain data looks good, then try to add the signal processing.
    Let me know how it goes.
    -Jack

  • Encoder edge counter using analog input

    I have using an 9215A USB (4AI).
    2 AI are logging data in to a txt-file and the other 2AI will be used for counting the edges from a quadrature encoder (A and B pulse train).
    Every edge falling or rising I will write a line in the txt-file also show a egde counter in the VI (total edges read).
    I'm a beginner so I need some help to find out how to do.
    BR
    Johan

    the 9215A do 20kSam/s  , that not too much, so .... your encoder should change state 10k/s max.
    first approach: continious read  (with max speed) with two buffers, while one buffer is filled by the DAQ, analyse the data of the other. Three independend loops : first wait for and read buffer-> send data via queue to second analyse loop -> send data via second queue to third loop that does the file handling.
    second approach: create a trigger so the second loop can be avoided. The DAQmx/Hardware does  might not support the trigger on both edges on two channels, but additional hardware like LS7084 o. HCTL2022 can help you to create the trigger signal. These little bugs are designed for incremental encoders and create a pulse for every change in the A B lines
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Problems with accessing my analog input from NIDAQ with MATLAB

    matlan fail with the analoginput command : AI = analoginput('nidaq',1);
    ??? Error using ==> analoginput/analoginput
    Error using ==> analoginput/analoginput
    Failure to open requested data acquisition device. Classe non enregistrée
    what i have to do ?

    It is hard to determine exaclty what is causing that error with the information provided. Have you verified that your NI DAQ device is working properly on your machine, either through another program or through Measurement & Automation Explorer (MAX)? What version of NI-DAQ do you have installed on your machine? The following websites contain informatoin and links so that you can determine what version of NI-DAQ will work with Matlab and other issues that might be occurring:
    http://digital.ni.com/public.nsf/websearch/1F8D330AA1DDC7448625699F000168D3?OpenDocument
    http://digital.ni.com/public.nsf/websearch/158EAFCCFA09DFC286256B05000A423A?OpenDocument
    You are probably using the MATLAB DAQ toolkit to perform these operations. The best bet is probably for you
    to contact Mathworks to see if they have some example m files you can use or if they have documentation on exactly what is causing that error.

  • Synchroniz​ing two counter frequency inputs with multiple analog inputs

    Hello all,
    I'm fairly new to LabVIEW and I'm trying to collec​t data from multiple sources with synchronized tim​ing on the acquisition but I'm having trouble figu​ring it out. My problem is that I've got two count​er frequency inputs, one optical tachometer readin​g one pulse per revolution, and a max machinery fl​ow meter with a k factor of 12000. I can't seem to​ figure out how to sync the timing with my multiple analog inputs. I've be​en attempting to get the tachometer  to sync with ​the analog inputs first by following the example l​inked here. (https://decibel.ni.com/content/docs/DOC-10785) So far each time I run it I either get a timeout e​rror on the DAQmx read or a "Multiple sample clock​ pulses were detected" error (see attached image).  It seems if I slow the sampling rate way down to ​say 10 hz and ensure that the tachometer signal is​ over 800-1000 RPM (13-17 Hz) before starting the VI then the program will run without errors until ​the RPM drops below that threshold then the "Multi​ple sample clock pulses" error occurs.  The code is attached below.
    Does anyone know of a more effective way of syncin​g counter frequency inputs with analog inputs?  I'd like to have a VI that can show 0 RPM (and ev​entually 0 flow as well, but I think I need to fig​ure out the timing of one counter before I add ano​ther as it seems I can't have two counters in the ​same task). Any help on this would be greatly appr​eciated.
    LabVIEW version 13.0
    cDAQ-9178 Chassis with NI 9401 for the two counter inputs and NI 9205 for the analog inputs.
    Thanks!
    Richard
    Solved!
    Go to Solution.
    Attachments:
    SimpleDAQ.vi ‏44 KB
    LV_Error.JPG ‏31 KB

    Maybe third times the charm? 
    So I've finally got a good handle on why the VI is having problems at low RPM though I'm somewhat embarassed how long it took me to do that
    Because I have the counter time synced to my Analog input task if it doesn't see at least two pulses between the two clock pulses set by the analog input task I get the -201314 "Multiple sample clock pulses" error. This seems fine at first as it just sets a minimum RPM that I can measure and it's well below the area I'm interested in so no problems there.  I tried a simple error handler that would clear the error when it happend assuming the loop would keep iterating until the RPM went above that minimum at which point I would get a signal again. This is not the case, the read function just continues to spit out the -201314 error even after the RPM is back in the readable range. So then I tried adding two case structures so that when the error occured it would stop the task, clear the error, and then start the task again on the next loop iteration (Code Attached). This also doesn't work as the error shows up again on the stop task and then AGAIN on the start task on the next loop iteration. It seems this error is not actually being cleared and once it happens it stays with the task regardless of what the error cluster is carrying. 
    Anyone have any ideas?  The only solution I can think of is to just clear all tasks and recreate them each loop iteration until the RPM is readable again but that strikes me as a horribly clunky solution.
    Richard 
    Attachments:
    SimpleDAQ_1_Start Stop.vi ‏48 KB

  • Time measurement between counter output my device and analog input

    Hello!
    I'm trying to measure the time to generate a digital pulse train on the counter output, that goes to a frequency converter that controls a motor.  So I think it'd be the best way to wire the output of the frequency converter with an analogue input and make a timestamp before I generate the pulse and a timestamp when I recognize the singal, but I think that wouldn't be a serious measurement ?
    What's the best way to measure the time?
    kind regards peter

    hi there
    well, there a several ways to do this. the problem with the software - timestamps is the minimal resolution of 1ms. i'd suggest:
    - wire a copy of the digital pulse train to an analog input channel
    - wire a copy of the frequency converter to another analog input channel
    - create an analog input task with the two channels (the sampling rate defines the timing resolution,make sure to acquire enough samples to see the response signal) 
    - start this task
    - send the digital pulse train
    to optimize your acquisition you can use another copy of the digital pulse train as a start trigger for your analog acquisition.
    -> then you'll see the digital pulse train on one of the analog channels and the frequency output on the other one. both channels have the same time axis with a resolution defined by your sampling rate (~us depending on your hardware). then you can analyze the data.
    search the example finder for examples of how to create tasks and triggers.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Can the analog inputs be daisy chained to measure higher voltages?

    Can the analog inputs of a PXI-6289 be connected in series to measure higher voltages than normally allowed at the analog inputs of the PXI-6289 (i.e. 10 VDC)?  For example, let's say I wanted to measure 18 VDC using an analog input channel of the PXI-6289.  I would then pick two AI channels and connect the positive of one to the negative of the other and then the two remaining leads would be placed across the 18 VDC.  Resistors could also be placed across the 18 VDC to form a votage divide.  One AI would measure the voltage across one resistor and the other AI would measure the voltage across the remaining resistor.  I have tried this and the voltage measurements appear to loose accuracy.  Thank you for your help.

    Hello Rafi,
    You may want to invest in a high voltage attenuator for signal conditioning prior to reading the signal.  The documents below may also be helpful:
    High Voltage and Isolated Measurements
    http://zone.ni.com/devzone/cda/tut/p/id/10693
    High-Voltage Measurements and Isolation
    http://zone.ni.com/devzone/cda/tut/p/id/3410
    Regards,
    Roman Sandoval | National Instruments | RF Systems Engineer

Maybe you are looking for