Frequency measurement error using DAQSTC

I have modfied the example listed to measure up to 9 frequencies continuosly in the vi as attached.
When I use the same approach combined with analogue & digital input/output I get a small error in frequency.
(Input line PF10 reads 6.8Hz for a 6.7Hz input.)
Attachments:
measure_9_frequencies.zip ‏50 KB
Rig_13-2_Monitor-1.llb ‏196 KB

Hello,
The code that you are using to take the frequency measurement could be done with lower level VIs that will more than likely resolve this issue. I modified one of the LabVIEW shipping examples: Measure Period (DAQ STC).vi Please take a look at the VI that I have attached.
Attachments:
Measure_Multiple_Freqs.vi ‏98 KB

Similar Messages

  • Frequency measurement using Labview 8 and Fieldpoint FP-CTR-502 - wind speed measure

    All the information regarding this kind of application seems to be outdated, I did not find no solution or example to construct frequency measurement VIs using Labview 8
    The examples at "NI Discussion Forums :
    Most Active Hardware Boards :
    FieldPoint Family :
    Low-Frequency measurements using counter/timer" is very strange and so far the steps given seems to be usefull only do old Fieldpoint Explorer.
    I was trying to find a way to learn how to make an anemometer send its signal to a FP-CTR-502 but I have no sucess.
    I am realy very new on this Labview stuff, any help would be welcome.

    (similar thread here)
    Message Edité par Mathieu R. le 12-23-2005 02:28 PM
    .mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
    Mathieu R.  
      CTD - Certified TestStand Developer / Développeur TestStand Certifié  
      CLAD - Certified LabVIEW Associate Developer  

  • Simultaneous frequency measuring

    I have to measure for frequency signals simultaneously, so that I'm able to associate one measured value to the others. How do I synchronize this? Is this possible with the four counters on a 6601 board? Two of the signals have frequencies up to 15 KHz, two of them go up around 4kHz. I also have a 6014 board with an additional counter available, maybe I could use it somehow...I also have to synchronize the analog acquisition that I perform with the 6014 with the one of the frequency signals, namely a continuous TTL pulse.
    Thanks in advance for any help!

    Hi Achim,
    Typically, frequency measurements are made using two counters for increased accuracy. However, you can measure frequency using 1 counter and taking the inverse of the period measurement. You would just need to apply this to 4 counters. There should be a shipping example with the NI-DAQ driver that performs this. Here is a link to an excellent tutorial on frequency measurement.
    Making Accurate Frequency Measurements
    http://zone.ni.com/devzone/conceptd.nsf/webmain/CD2C8AAED8FA59A486256C230078FE75?opendocument
    This being said, what I suggest in your case is to use a 6602 counter/timer board with 8 counters, 2 for each frequency measurement. Using a 660x board, you can also use triggering to simultaneously start all counters. This can be
    done by routing a signal from the PFI line to the counter trigger using Route Signal.vi in LabVIEW or Select_Signal() in C function calls. Then you would setup a trigger and reference the common trigger signal that you routed the PFI line to. The following discussion thread might be useful:
    Counter/Timer Triggering 660x
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=506500000008000000B2300000&ECategory=Measurement+Hardware.Counter%2FTimer
    Anyway, I hope that helps. Have a good day.
    Ron

  • DAQmx Error 89137 When trying to make a high frequency measurement.

    I am using a PCI-6602 Timer/Counter for multiple measurements on a serial interface...
    I have the clock line connected to Gate0, the enable line to Aux0 because I need to make a two-Edge seperation measurement between the two later...
    But I also want to make a "Period/Frequency Measurement (High Frequency with Two Counters)" measurement...
    This requires that the signal to be measured is on Source0...
    I implimented the following Code:
    void meas_FP_Freq(float64 *Freq0, float64 *Freq1)
    TaskHandle CLK0_Freq, CLK1_Freq;
    DAQmxCreateTask ("FP_CLK0_Freq", &CLK0_Freq);
    DAQmxCreateTask ("FP_CLK1_Freq", &CLK1_Freq);
    DAQmxConnectTerms ("/Dev3/PFI38", "/Dev3/Ctr0Source", DAQmx_Val_DoNotInvertPolarity); // Gate0 to Source0, No Error....
    DAQmxConnectTerms ("/Dev3/80MHzTimebase", "/Dev3/Ctr1Source", DAQmx_Val_DoNotInvertPolarity);
    DAQmxCreateCIFreqChan (CLK0_Freq, "Dev3/ctr0", "", 6000000, 6500000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_HighFreq2Ctr, 0.001, 4, "");  // High freq measurement
    DAQmxCreateCIFreqChan (CLK1_Freq, "Dev3/ctr1", "", 6000000, 6500000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr, 0.001, 4, "");
    DAQmxReadCounterScalarF64 (CLK0_Freq, 3.0, Freq0, 0); // Run-Time Error -89137 Specified Route cannot be satisfied..etc
    DAQmxReadCounterScalarF64 (CLK1_Freq, 3.0, Freq1, 0);
    DAQmxDisconnectTerms ("/Dev3/80MHzTimebase", "/Dev3/Ctr0Source");
    DAQmxDisconnectTerms ("/Dev3/80MHzTimebase", "/Dev3/Ctr1Source");
    DAQmxClearTask (CLK0_Freq);
    DAQmxClearTask (CLK1_Freq);
    The "Low Frequency" method works fine, but the resolution is too low...
    Every help file I've read indicates I can use different PFI inputs for measurements... What am I missing?

    Hi,
    The reason that you are getting the error is the PFI lines are being reserved twice. You don't need the DAQmx Connect Terms functions in your code because the DAQmx driver does this for you automatically. If you still receive an error after doing this, try to changing the low frequency counter number.  I hope this helps you with your application.
    Regards,
    Hal L.

  • How to use a photogate for frequency measurement using a NI USB-6211

    Hello, I am extremely new to LabView and am having trouble using the counter feature (or if this is even what I should be doing). I am trying to use a photogate as a frequency counter when a voltage spike is created by blocking the sensor. This will then be put into RPM and used to evaluate a small motor dyno I am creating. If anyone has any help or previous vi's they dont mind sharing it would be greatly appreciated. The photogate specifications are for an optek opb930l55. Thanks 

    Configuring a counter input task will be a little different depending on the type of DAQ card that you are using to read the digital pulses.  You just need to wire the voltage from the photogate to one of the counter pins on the card.  Then follow one of the many examples for measuring the frequency of pulses.  If your card allows it, I would suggest choosing the Counter Input >> Frequency measurement from the DAQmx Create Channel VI.  If you have questions about how to do this with your specific DAQ device, please provide more information
    Zach C.
    Field Engineer
    Greater Los Angeles

  • DAQ frequency measurement using anolog input channel

    Hello,
    I try to develop a DAQ application which run on a real time target.
    I want to measure frequency using anolo inpur channel of my DAQ card. I have a problem.
    Let me first try to explain what i trying to do. In the first loop i do sampling and show the result as double array.
    I need to show samples as double array so i can not read sample as waveform. With a shared variable i sent these samples to second loop.
    First loop reriod is msec and second loops period is 20 msec.So when the second loop run, 20 samples were alraady ready, frequency measurement is done.
    The problem is that i need to show frequency measurement as far as possible. Say frequency of my signal is about 100 hz, then this
    configuration gives correct frequency measurement. But if frequency of the signal is about 10 hz, this configuration fails since period of second loop is 10 msec and it is not enough time to measure a 10 hz signal. But if i adjust period of the second loop as 100msec,
    then i can measure 10 hz signal but then i can give measurement of a 100 hz signal  +90msec late. What can i do so i can measure frequency af signals ranges 0-100hz and give measurement result as far as possible?
    Attachments:
    measure_amp_freq.GIF ‏35 KB

    eesen,
    What you are doing doesn't make any sense to me. First of all, you should take multiple samples with the DAQmx Read and not one sample at time with the timed loop. Your frequency measurement will then actually be more accurate. You also should return a waveform. That includes timing information that the Freq & Amp function needs to determine the frequency. It cannot do it with a dbl array. If you have to display a dbl, then just use the Get Waveform Components to extract the y array. You can get rid of the second timed loop and use a regular loop for the DAQmx Read. If you just set the rate to be twice the highest input frequency and acquire enough samples for a couple of cycles, you should have a pretty accurate reading.

  • Is it possible to make a Frequency Domain Reflectometer using LabView? For waveguide frequency measurement?

    Hi everyone
    I have a tricky question that I have looking around for the answer but couldn't find it!
    I want to know if I can build a Frequency Domain Reflectometer (FDR) to measure frequency return in waveguide. Telecommunication engineers would understand what I mean! It a bit like TDRs but its frequency instead of time. 
    I would like to build a Frequency Domain Reflectometer using labview application, how can I do that? What sort of code do I need and what equipment do I need to operate with the NI code?
    Please give me the chance to thank you all very very much for your help and support and for looking here,
    regards
    Fezz

    Hi Fezz,
    I am not familiar with using FDR systems but know there is a good example of producing a TDR in LabVIEW available on the community. This might provide you with a base and a grasp of the architecture you could use to create the functionality.
    Time-Domain Reflectometer (TDR) Example
    Regarding the equipment you would require to achieve this I strongly recommend contacting your local NI office who will be able to adviser you fully as this will depend upon your desired specification.
    Kind Regards,
    Aaron. E
    Applications Engineer Team Lead
    National Instruments
    ni.com/support

  • How replace FP Advise.vi using FP read for the example "Frequency Measurement.vi"?

    I have a Labview 8.5 system and a hardware FP-CTR-500, and I tried to modify the NI example (Find example ----> Frequency Measurement.vi) to measure the signal frequency. 
    But the example FP Write.vi and FP Advise.vi have some problems. 
    Could you please show me how to correct it? 
    Thanks!
    JL
    Attachments:
    Frequency Measurement.vi ‏47 KB

    Hi JeffLi,
    Could you please be more specific about the error you're seeing?  
    Thanks,
    Bobby Breyer
    Applications Engineer
    National Instruments

  • 6602: How to use 8 counters simultaneously in C++ using traditional Daq for frequency measurement

    Hi Everybody;
    I'm new to Ni-DAQ cards and working on NI PCI-6602 Card in Borland C++, I should use Traditional DAQ for my project. Now I want to use all the 8 counters simultaneously for frequency measurement.
    1.Where should I connect my External signal, to source or gate, at present I have connected to source.
    2. How to set parameters and start the counters simultaneously, what are the parameters to be set for frequency measurement.
    3.How to start counting.(parameter settings)
    4.Should I set any PFI Lines or by default are they set to counters.
    status = GPCTR_Set_Application (1, gpctrNum, ND_SIMPLE_EVENT_CNT)
    status = GPCTR_Change_Parameter (1, gpctrNum, paramID, paramValue)
    iStatus = GPCTR_Watch(1, gpctrNum, ND_ARMED, entityValue);
    status = GPCTR_Watch (deviceNumber, gpctrNum,ND_COUNT, entityValue)
    what is the paramID in my case, Clear and appropriate answers would be very helpful and thanks in advance.
    Message Edited by Pavan K on 07-11-2009 12:38 AM

      I have made a program with LabVIEW 5.1 based on NI 6602, in which four counters were used.
      Counter 3 is used to generate pulses, which are directed to the gates of counter 0, 1 and 2. 
      The source terminals of counter 0,1 and 2 receive pulses, individually, to count how many pulses appear during the time interval of each gate pulse.
      The results are stored in a data file.
      In order to test its performance, only one signal of ramdom pulses is sent to counter 0,1 and 2.
      But I find that at the beginning the counts for the three counters are the same, but the following counts are totally different!
      What's wrong? And how to solve such a problem? Does it have something related with synchronization?
      Thank you very much!

  • Low-Frequency measurements using counter/timer

    I am trying to measure speed, and am using the FP-502 counter timer module to count the pulses from my sensor. The field point example that uses a fixed width gate pulse will not work for my appliation because I need a gate pulse so big that it updates way to slow.
    Does anybody have any sugestions on how to measure a low frequency signal using a counter/timer?
    Thanks
    Dan

    Hello guys
    Thanks for all your sugestions I have the final results. I got it to work but I would like to add some comments for anybody who is trying to attempt this.
    Triggeing on the gate is a must for low frequency measurements. I used the divide by sugestion however using a factor of 3 only gets you about 60 Hz after that you can't sample fast enough. My application required me to measure from 0 to 150 Hz. I added a "gear shifter" routine where the terminal count was set to 3 on frequencies lower then 45 Hz and 15 for frequiencies greater than 45 Hz. Using a terminal count of 15 for all measurements made the udate rate on really low frequencies way to slow i.e. .5 seconds for 20Hz (check the math on this).
    I a
    lso needed to cascade the counters. At low frequencies the count went higher than 6550. Using the previos channel function of the fieldpoint module enable me to get 32 bit worth of terminal count data.
    Finally I needed to add a timeout condition for 0 Hz. If there are no pulses coming from the senser the program displays the last value read. That won't be 0. So I added a time out routine that if I didn't see a pule in a certian amout of time, output 0 and reset the gate count.
    Thank you for you help you relly saved me. I hope my comments made sense.
    Dan

  • Coding error using measurement studio

    hello..
    can somebody tell me where can i get help on coding the measurement studio using VB.i'm doing an interface programing with a dc servo motor.i'm using a fuzzy logic controller(FLC) to make the output of the servomotor to follow the input, which i'm using a square wave input.i'm having coding problems on linking the FLC with the harware.i'm not quite good in visual basic, so can anybody help me with the coding?i can send the vb coding of the FLC and the hardware interface coding. i've successfully implement PID controller.. but i can't seem to make the FLC work. i think there's something wrong with the coding.
    and how can i make the graph go more faster? output from the graph is very slow, compared if i probe the output from the servomotor harware using a digital oscilloscope.

    Hi,
    I recommend the Measurement Studio Reference as a resource. This reference is installed with Measurement Studio and can be found on your computer from Start>>Programs>>National Instruments>>Measurement Studio>>Help. The Measurement Studio Reference includes information on the Measurement Studio ActiveX controls and tutorials.
    Next, is the FLC you are using part of a Measurement Studio Add On? Are you using the PID Toolset for VB?
    Then, if the graph you are using is a CWGraph, you can access the properties of the graph by right-clicking and selecting Properties…. Click on the Graph Tab of the Property Pages window and check that Control Refresh is set to Immediate. This has the graph redrawn as soon as new data is available.
    Regards,
    Eric M

  • #UNAVAILABLE error in measures when using substr() in BO XI 3.1 SP3

    Hi All,
    I'm using BO XI 3.1 SP3 with Essabse 11 for OLAP Connection.
    I got #UNAVAILABLE value for database delegated measures when using substr() on the dimension.
    The aggregation function have to be database delegated because the measure need to be calculated again in aggregation level, such as MOM (month on month) and YOY (year on year) etc.
    Can someone help to solve this problem?
    Regards
    Sofian

    Hi, Sofian!
    We also are trying to work in XI 3.1 SP3 with Essbase as data source.
    As I understand there is no support for any essbase mdx/xmla calculations or functions in universe.
    In document called "OLAP universes - best practice" are given some examples for SAP BW and MSAS only.
    With Essbase OLAP source I can't even make simple measure like Measure1+Measure2, @Select doesn't work too.
    All I've reached in this field - creating filters, prompts and LOV-dimensions with restricted number of levels in hierarchy (by filter in Where part.
    But the main problem for us is - YTD calculations.
    In our Essbase it is dynamic calculated objects, so I need to use Y-T-D function to use it.
    Also we want to use Level-based, not Gen-based, ordering dimensions, but I didn't find any information about it
    Did you find some examples, documents or reviews in this area?
    Now, it seems like there is no any big project BOE+Essbase in the world...

  • PXI-6624 Pulse Frequency measurement

    Hi.  I'm working with a PXI-6624 and am interested in doing pulse frequency measurements to get both frequency and duty cycle on its inputs using DAQmx.  
    Whenever I go to create the virtual channel however, I get error -200431:
    "Selected physical channel does not support the measurement type required by the virtual channel you are creating."
    "Requested Value: Pulse Frequency"
    "You Can Select: Frequency, Period, Pulse Width, Semi Period, Two Edge Seperation, Position:..."
    Is this card really not capable of doing these pulse frequency measurements?  
    Solved!
    Go to Solution.

    Yes, the "Pulse" (not to be confused with "Pulse Width") measurement was introduced with NI's STC3 devices including X Series and CompactDAQ.  
    Pulse Measurement:
    However, you should still be able to measure frequency and duty cycle on your card with a semi-period measurement:
    Semi-Period Measurement:
    Images are from the X Series User Manual.
    The difference between the two modes comes down to how the data is stored and buffered on the card--with the semi-period method the hardware doesn't distinguish between high and low samples and puts everything into a single buffer.  However, if you start the counter off the appropriate edge (see below property node), then you would know in software the order of high and low samples and can pretty easily calculate frequency and duty cycle from this.
    Best Regards,
    John Passiak

  • PCIe-6321 frequency measurements

    I am trying to use a PCIe-6321 to perform a simple frequency measurement (800-2500hz).  Are there daqmx functions for frequency measurments?  I tried some of the CVI examples but they throw error messages.  Is there an example were I can measure frequency on one of the analog inputs?

    Your card have both analog inputs and counter inputs; they behave differently and for each of them there is a set of examples that explain the basic measurement types together with cabling.
    Search with the example finder (Help >> Find examples... menu item) with "counter/timer" keyword and you'll find the examples you are looking for. Also looking for "frequency" drives you to the same examples.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Unstable Frequency Measurement USB6210

    Hi All, 
    I'm struggling to get a stable frequency measurement, to measure the RPM of a motor, using a single counter on a USB6210 board. 
    I'm using the +5V TTL signal to power an opto-transistor, and reading that signal back through Ctr0 (PFI1). See attached wiring schematic.
    I've put a scope in line (between PFI1 and DGND), and at the PFI1 terminal get a square wave, about 50Hz, peaks at about 2.5V. Do I need to be linking this signal to DGND, and how?
    I've set up a task in MAX, and readings fluctuate from 45Hz to 900Hz.
    I've also tried to read this in LabVIEW using the example VI - Meas Dig Frequency-Low Freq 1 Ctr.vi. I then get even more random results of +100,000 (full scale).
    Many Thanks,
    Martin 
    Attachments:
    Counter Wiring.jpg ‏63 KB
    24022010044.jpg ‏397 KB

    thanks a lot John P, i'll try it this vi config.
    well, my flow transmiter should give an 0-5 volts signal with frequency between 0 and 100 hz (datasheet here), and the data i need is codified in pulse frequency, the measured voltaje is wrong but frequency on oscilloscope is ok. i attached pics of my signal on oscilloscope measured on transmitter output, measures at daq card input are the same, i connected my transmitter ground to digital ground (im working on ni pci 6221).
    i tried the  Minimum Pulse Width option with 2.56 ms but now i realized why did'nt worked (voltaje level issues ), but now my typical noise is 3% of my signal, i think noise won't be a big deal.
    and i was surprised too about this system could get data acquisition insteand of data timeout error (because of voltaje level's issues), at first test i performed the system made the measures already mentioned, but i realized the ones who made this system attached the signal acquisition line to waterpump's power source (in fact, they attatched all data signal's lines to waterpump's power source ¬¬) and they hid noise effects with waveform's settings, now i fixed this and the system only shows me data timeout error.
    initially i got confused because if im getting frequency acquisition of milivolts signal i thought daq card's counter input could deal with it, but now i realized it was just noise peak effects.
    best regards
    .:. Pedro Rivera .:.
    i love to work and develop on labview, this is real fun!!!
    Attachments:
    signal acquisition.zip ‏355 KB

Maybe you are looking for

  • Can't see text on video podcast page until video is fully loaded

    Is there any way to change the load order, or am I stuck? It sounds simple, but I have not found it yet... Moving parts front to back doesn't seem to help. Thanks. Message was edited by: Brent Harris3

  • How do I change application/dock/desktop icons?

    I recently downloaded a set of icons I'd like to replace my current icons on my desktop/dock. However, I'm having some problems. I've searched for the process to switch them I'm aware that you have to go to the Command+i option, copy the icon in the

  • I cannot post in the google adsense forum but I can using IE

    I cannot post in the google adsense forum but I can using IE, I was told to check my firefox settings.

  • FCPX runs always with 100% CPU usage

    Hi guys, I have following problem or issue: When i work with FCPX (10.1.4) i have some extreme performance problems with my machine. iStats Menus always displays an 100% usage of CPU even if I am not working or doing anything, even my background task

  • CR4E 2.0 + Teradata 12.0

    Hello! I have recently upgraded to Teradata 12.0, which I have successfully deployed with Crystal Reports for Eclipse 1.0.  I am now attempting to upgrade my CR plugins to 2.0, but am running into difficulty.  I have the appropriate Teradata JARs in