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.

Similar Messages

  • 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

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

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

  • 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

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

  • 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

  • How can I measure RPM with CTR-500 module?

    I have used  the CTR-500 module for mesurement of  motor RPM. But it doesn't have direct option to measure  RPM ,
    so i have count pulses for  1sec (then reset the counter) and  by calculation show the result for 1min. But it varies every time ,cant give me fix RPM.
    I want reliable solution for this.

    min
    You have not said how much the RPM actually varies from reading to reading and what the range of measured RPM is for the process.  This variation can be caused by a couple of things.  One would be actual variations in RPM due to changes in motor loading.  What is this motor driving?  Most RPM readouts use some form of sample averaging to smooth out the readings.
    A second cause could be your vi.  Suggest you post a copy of your vi. 
    In case you have not seen it, here is a link to a KB about measuring frequency with cFP.  It also links to several other docs on the same subject .  http://digital.ni.com/public.nsf/allkb/D8DB42F9FDC3607E862568640047F144?OpenDocument 

  • Pins at a PCI MIO-16E-1 to Measure Frequency(DAQ-STC).vi?

    I want to measure frequency with the
    "Measure Frequency(DAQ-STC).vi".
    Can't find the appropriate connector pins
    in the manual of my PCI MIO-16E-1.
    Can someone confirm or correct me?
    Signal - PFI1/GPCTR1_SOURCE
    SignalGND - PFI9/GPCTR0_GATE
    PFI8/GPCTR0_SOURCE - PFI4/GPCTR1_GATE
    Thanks in advance
    Manfred

    Manfred,
    You can find this information by going to the http://www.ni.com/manuals site and viewing the E-series manual. There is a table which shows the pin number, name, and function for each pin.
    Pin 10 - PFI1/Trig2
    Pin 11 - PFI0/Trig1
    Pin 43 - PFI2/Convert
    Pin 42 - PFI3/GPCTR1_Source
    Pin 41 - PFI4/GPCTR1_Gate
    Pin 40 - GPCTR1_out
    Pin 6 - PFI5/Update
    Pin 5 - PFI6/WFTRIG
    Pin 3 - PFI9/GPCTR0_Gate
    Pin 2 - GPCTR0_Out
    Pin 4,39,35,36 - DGND
    Mark

  • Measure frequency by singalExpress V2.0

    I am trying to use 6602 to measure frequency   (  2 Counters mode), but i get an error
    "Sample period too Short" even i increase the Measurement Time....
    Attached the Screen Capture, could anyone help me?
    Attachments:
    freq_measure.JPG ‏232 KB

    Dear all, i try to set using 2 counter to measure single point frequency...but why the program SE warm me that the " Sample period too short" , How can i solve this problems??
    Attachments:
    freq_measure.JPG ‏232 KB

  • How to measure and log frequency with fieldpoint CTR

    Hi,
    I am developing a data acquistion and control system for an engine dynamometer using the fieldpoint modules and Labview.  One of the most important signals is the engine speed, measured in RPM.  The RPM signal is a 0-12V pulse where one pulse equals one revolution of the engine.  As well as being an important piece of data for later analysis, engine RPM will also be in the input into a PID controller, so the signal must be both accurate and have a high measurement frequency. 
    Currently I am using the FP-CTR500 modules to measure the frequency of the signal.  I am already aware of the included frequency measurement VI example, as well as the one posted before for low frequency measurements, and I have gotten both to work with my setup.  I would be using the low frequency VI becuase the max frequency measurement would be in the 200Hz range. 
    The first problem I am having is with the structure of the VI and how the data is output.  The case structure in the VI activates when the counter is read and resets the counter, then switches to the next case.  I would like the RPM number to output out of the case structure into a write_to_file VI and PID controller input.  The problem is that when the case switches, the counter is reset to 0, which will be recorded in the written file. 
    This is some example output data (RPM):
    1232
    0
    2321
    0
    2400
    0
    2521
    0
    The data is being written correctly, but of course I can't have 0 readings when the case structure changes.  This would be especially problematic when input into a controller VI. 
    The next problem I am having is with sampling rate.  If I were to use the low frequency measurement VI, the sampling rate of RPM would be variable based upon the the speed of the signal.  Or, the original frequency measurement VI has an adjustable sampling rate.  Of course, in my system there are a number of other signals that need to be recorded at the same time.  I have found that as I am collecting data, the "write to file frequency" is entirely dependent on the read frequency of the frequency measurement.  Therefore, if I had set the read frequency VI to read at 1 Hz, data will be recorded only every 2Hz.  Ideally I would like an overall measurement frequency of all channels (mix of analog and digital) to read between 20-50Hz, but if I am limited by the frequency measurement. 
    Any ideas on how to solve this problem, either through Fieldpoint or Labview?
    I can post my VI if this help.
    Thanks,
    Huang

    Thanks for your reply. 
    I should probably describe my current setup before I go into anymore details with the problem.  As for my specific setup, I am using an FP-1000 connected with an AIO600, AI110, CTR500, and TC120 all running through the RS232 line to a desktop running labview 8.  The actual counter module is reading a tachometer signal output from a separate engine controller.  THe output is a 0-12V ON 50% duty cycle signal.  As for data logging, i am simply using a "write to measurement file"  Express VI.  I have a while structure which holds all of the express VIs which access the fieldpoint IO, and these are all routed to the "write to" VI. 
    As for the specifics of the data logging problem, as I said, when I set the count frequency of the "Fieldpoint Frequency Measurement" VI to 1Hz, (which means the VI calls the case structure at 2Hz), the "write to measurment file" VI is called at the same rate (2Hz).  Which means that the overall logging rate of the VI is only 2Hz.  Is there someway to decouple this? 
    I was able to solve the problem of calling the frequency variable from the case structure by using a local variable which is called outside the case structure. 
    And now I have been having a lot of problems with reading the actual frequency from my engine controller.  THe actual signal will only range from 0 to around 200Hz.  I noticed, by comparing the actual signal to what was being read in my labview program, that after around 80Hz the signal increases by around 1.5times more than the actual signal.  ie.  Actual signal = 100hz, Read Signal = 150Hz.  After trying to figure out what was the problem, I decided to change the Noise Filter settings to 200Hz.  It actually worked for all the frequency ranges up to around 150Hz but after that the filter attenuates the signal to the point where the actual signal is 160Hz, but is being read at 100Hz.  My question is if there is a way to change the actual filter setting outside of the 2 given setpoints (200hz and 40khz) or if you have any other suggestions on how to fix this problem?  I was thinking of creating a noise filter input in MAX so that i could play with the values in Labview, but am i only limited to those two filters? 
    Thanks again for your help,
    Huang

  • Unable to measure frequency below 20 Hz on a NIDAQ 9178 chassis with NI 9402 even while using a hardware timed delay

    Hello,
    I am trying to measure frequency using NI 9402 in NI cDAQ9178 chassis. I am setting the clock for my counter channel to be my chassis ai Sample Clock.
    I am able to measure frequency above 20 Hz. For frequencies less than 20Hz, I get the following error:
    DAQmx Error: Multiple Sample Clock pulses were detected within one period of the input signal. Use a Sample Clock rate that is slower than the input signal. Ifyou are using an external Sample Clock, ensure that clock signal is within the jitter and voltage level specifications and without glitches.Task Name: _unnamedTask<0>
    Status Code: -201314
    Setting the Rate to 1 also not does resolve the issue.
    OTHER DETAILS:
    * Running on 64 bit, Win7 platform.
    * NIDAQmx Driver Version: 14.5
    I had posted regarding this earlier and I was told that this might be because the counter is armed immediately before the first sample is taken. The recommendation was to add a hardware-timed delay using the DAQmxSetStartTrigDelay method to the AI task. I have added this delay but I still receive the same error message. The previous post I had mentioned can be found below:
    http://forums.ni.com/t5/Multifunction-DAQ/Cannot-measure-frequency-below-20-Hz-on-a-NIDAQ-9178-chassis/td-p/1537274
    I have also attached my current code which has the delay. Is this a bug in the driver? If yes, can we have a CAR# to track this?
    Thanks.
    Regards,
    Varun Hariharan
    The MathWorks

    Alright so I got everything working correctly in both C and LabVIEW code.
    The problems is in fact with the first sample, as John_P1 suggested. You simply need to delay that first sample from being requested. It is simple to do this in software instead of hardware.
    If you are using CVI, just add #include <utility.h> to the top of your .c file and then add a delay before your DAQmxErrChk (DAQmxStartTask(AItaskHandle)); line.
    Comment out / remove the DAQmxSetStartTrigDelay(AItaskHandle,10); line, as it wasn't doing what we thought it would. (Hardware delay).
    I added Delay (.05); to delay long enough for the full period of the input signal at 20 Hz.
    Depending on your frequency, this value may need to be adjusted. 100ms wouldn't be a bad idea.
    This is expected behavior, and I don't think we need a CAR.
    Let me know what you think!
    -CB

  • 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

  • Scxi 1126 frequency measurement along with other scxi modules

    I want to measure frequency signal using sxci 1126. I have gone through the example code for sxci 1126. I am using NI-DAQ and Labview 7.1.
    The example code is applicable when am acquiring only from 1126. I have to acquire data also from 1102 102B along with 1126.
    In the example code along with AI config.vi and Ai Start.vi there are two additional vi's like AI paramete.vi and AI Trigger config.vi I understand that they are used for reading from 1126. My worry is how this is going to affect my acquisition from other scxi modules as all the modules are in multiplexed mode.

    Hi Bipin,
    Looking at your code, I see that you are still using Traditional DAQ. Since you have LV 7.1, you can take advantage of the new features of DAQmx.
    With DAQmx, you can create a virtual task that includes all of the different types of measurements you want to make. Once you set up the task in MAX, you can place it on the block diagram and automatically generate the code necessary to execute this.
    To do this, open up the Measurement and Automation Exlporer (MAX). Select "Data Neighborhood" from the tree on the left. Then click the button labeled "Create New." Create a DAQmx Virtual Channel. Follow the series of menus to set up your first type of acquisition (1126 frequency measurement). When you are
    done creating the task, you can add the second type of measurement to that same task. In the task config page, you will see a white box with the name of the channel you just created in it. Above the name you will see an "Add" button. Click on this button and follow the menus to set up your second measurement (1102 module).
    Once they are set up, save the task and open LabVIEW. Place the DAQmx Task Name constant on your block diagram found in All Functions >> Data Acquisition >> DAQmx... the task name constant is a purple colored box. Clicking on the box once its on the block diagram will expand a menu that will let you choose your task. Once selected, right click on the task name and choose Generate Code >> Example. This will automatically generate the code necessary to run the tasks. Simply hit the run button and enjoy!
    Thanks,
    Sal

  • Error out problems with measuring frequency VI

    I am having some error out problems with measure frequency VI. The instructions is change error out from indicator to control but does not work. Anyone can help? The VI is attached
    Attachments:
    Measure Frequency VI error.vi ‏27 KB

    This VI does not have an error out. Obviously, you replaced a subVI that did have an error out with this one, otherwise you would not have been able to create this wire.
    Simply remove the wire or save the subVI with another name then modify it to have the error out that you are looking for.
    Hope that this helps,
    Bob
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

Maybe you are looking for