How to measure two frequency simultaniously in a PCI 6014

Hi I am measuring RPM of two gear drives by measuring the pulse/second(Measure frequency.vi). I have interlinked the gate of counter1 to the output of counter2. Similarly I have connected the gate of counter2 to output of counter1. to measure frequency.
This way in a cycle one counter acts as gate counter while the other counter counts and later the counters changes their role.But my problem is that I have to measure the two counters frequencies simultaniously.
I cannot do period measurement becasue I have several irregular pulse widths generated in each cycle.
I am currrently experimenting with mesure period(DAQ-STC).vi. I have the following doubts in this VI.
1)Can I replaced source configuration fr
om internal timebase to external PFI source signal.
2)If I replace my source signal from internal timebase to the pulse generated from my gear drive then would at the end of 1 sec (when the counter is disarmed due to change of trigger signal state and hence end of while loop) will the count attribute contain the count of my ttl edges?
3) Would this be a accurate method for measuring frequency simultanuiously without using two counters?
Thanks.

Hi balajkasthuri,
The best way to perform this is to use the frequency generator (freqout) of your 601x board. Your board only has 2 counters but it also has a frequency generator that doesn't use the counters. It is an output found on the freqout pin. You can choose to have a frequency of 10 MHz or 100 kHz divided by any integer between 1 and 16. This means you can create a pulse train of known frequency and known period and use that into the source or gate of your two counters depending on the frequency measurement method you are using.
For example, assuming your two signals are much faster than the freqout signal, you can apply the freqout signal to the gate of a counter and have your signal feed the source. The number of counts you get in 1 pulse
width of the gate (which is known since it is the frequency you generated) will determine the frequency of your signal.
Otherwise, if your signal is much slower than 20 MHz, you can simply use the 20 MHz as the source of the counters and perform a simple period measurement on your signal. You would then take the inverse of your period measurement.
Anyway, using the onboard frequency generator will give you the flexibility you need. I have linked below a useful tutorial describing the 3 typical frequency measurements. Hope that helps. Have a good day.
Making Accurate Frequency Measurements
http://zone.ni.com/devzone/conceptd.nsf/webmain/CD2C8AAED8FA59A486256C230078FE75?opendocument
Ron

Similar Messages

  • How do I simultaneo​usly measure two frequencie​s using the two counters on a CompactDAQ chassis?

    I am using two encoders as speed wheels to compare two different speeds simultaneously.  I have the encoders connected to the two counter inputs of my CompactDAQ chassis using NI 9423 cards in order to measure the frequencies produced be each and then I convert that data into speed.  How do I efficiently measure these frequencies simultaneously?  I say efficiently because the only way I can get it to work right now is to create a task for the first encoder, gather my frequency data, clear the task for that encoder and then move onto the next.  This is a slow process and therefore the measurements are not exactly simultaneous.  If I try to measure them simultaneously I get resource errors.

    Hey Kevin,
    Thank you for the information. The cDAQ-9172 has two counters on the chassis itself.  There are no counters on the actual module.  What this means is when you access Counter 0 using a module in slot5 (for example), you are actually accessing Counter 0 on the backplane of the chassis.  This is why you are getting the resource is reserved error.  If you have the other input frequency connected to the second counter of the chassis, you just need to access it using Counter 1 instead of Counter 0.
    In your code, for the Counter 2 input, you have "cDAQ1Mod6/ctr0".  If you just change that to "cDAQ1Mod6/ctr1", this will get rid of your "resource is reserved error.  Also, to get both your tasks to be a little more closely synchronized, you should probably use a sequence structure to be sure that they start together. In the code below, I have used two seperate counters on two different modules and synchronized them.  If you are using the same module you would just need to change the counter inputs to represent the two different counters on the same module.
    Hope that helps.
    Regards,
    Message Edited by Raajit L on 04-02-2007 11:00 AM
    Raajit L
    National Instruments
    Attachments:
    Counter Parallel Tasks.jpg ‏66 KB

  • How to measure the frequency of the data plotted on the waveform chart

    i have made a virtual instrument in labview that acquire data (say sine wave) into a spreadsheet file and also on the chart from the function generator. I measured the frequency of the data from the chart but it is coming out to be very less. How can i calculate the frequency of the plotted sine wave and also from the spreadsheet file.

    If you want to get an idea of the base-frequency of an periodic signal, you can measure the number of samples in between two maxima or in between two minima of the periodic signal.
    Multiply the number of samples by the sample-interval (1/Fsample in [sec]) gives you a rough estimate.
    FFT, I mentioned is one of the more advanced calculation-methods.
    The method calculates the spectrum from a waveform.
    Hope this helps,
    Patrick

  • How to measure the frequency of a pulse being generated by a counter

    Hi,
    I am using labview 8.6 to generate 5 evenly spaced pulses for every 1 revolution of my shaft. However, I would also want to know the frequency of these pulses so I can determine the shaft speed. Since I am already generating the pulses using one of my counters, can I still tap into that or task another counter to measure the pulse frequency? If so, how? I have attached my code for generating the pulses and I am using an Ni 9401 module and an NI 9172 chassis. If someone can helo me modify the code to measure and tell me the pulse frequency as well, that would be really appreciated
    Attachments:
    autotrain2.vi ‏19 KB

    You'd probably get a more coherent answer if you didn't bounce around from thread to thread so much...
    How can I generate a pulse train from shaft encoder? (5/13)
    pulse train from encoder (5/15)
    how to measure rpm (5/20)
    How to measure rpm using shaft encoder and labview (5/23)
    This thread (also 5/23)
    I see you ignored my suggestion from the other thread--Kevin's solution is good too but using an encoder task offers more noise immunity (I think this is probably the cause of the problem you reported on the other thread).  You can fix it with digital filtering if you want to keep using a counter output instead of an encoder task.  Noise during transitions is pretty common for a quadrature encoder.
    A finite counter output task uses 2 counters on the 9172 (although you said 9174 earlier at one point--this wouldn't be the case on a 9174) so you wouldn't have one left to make your frequency measurement.  With the solution you have now, you can change to continuous to free up a counter if you don't care about outputing an exact number of rotation's worth of pulses (I'm not sure if you do or not--I didn't read through all of the various threads relating to this application to find out).
    For your actual question in this thread...  Have you tried running one of the frequency measurement examples?  From the code here I can't tell what you have tried (it just looks like a mangled version of the code Kevin gave to you in your other thread).
    Best Regards,
    John Passiak

  • How to measure frequencies of two sources simultaneously using 6602?

    I am using pci-6602 & LabView to measure frequencies of two sources. I wired Measure Frequency (NI-TIO).vi to do it, but it seems the counter only works at one channel at a time. Can anybody send me an example vi?
    Many thanks in advance
    ZYuan

    Hi ZYuan,
    To measure the frequencies simultaneously, you would need to duplicate the code for the single counter example twice and link the error cluster from one set to the next. I don't have a specific example but the following example can be used as a guide.
    Simultaneous Buffered-Event Counting on All Eight Counters of the 6602 or 6608 Devices
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DC9F56A4E034080020E74861&p_node=DZ52325&p_source=External
    Hope that helps. Have a good day.
    Ron

  • 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

  • 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 to Measure frequency of less than 300 Hz

    Is it possible to measure frequency without a counter module? All I have is a cDAQ with 9205, 9221 and 9263 modules.

    Hello,
    I am assuming that you want to measure analog frequency, since you have analog input and output hardware.  There is a useful LabView Help file titled Measuring Analog Frequency.  You will be able to measure analog frequency using just software and no counters.  However, this involves using Fast Fourier Transform (FFT) functions that are only available in LabView Full and Professional versions.  Please also take a look at the examples in the Example Finder.  Some helpful ones are titled … Signal Generation and Processing.vi, Spectrum Measurements.vi, and Simple Spectrum Analyzer (sim).vi.  These example’s block diagrams are a little busy, however you can see how they are using simulated signals with the FFT Power Spectrum.vi.  Note that the example titled Spectrum Measurements.vi uses express functions.  These functions are going to involve less programming, but offer lower program efficiency.
    Samantha
    National Instruments
    Applications Engineer

  • How do I make a VI to measure the frequency and power level of a transmitter using the NI 5660

    I am working on an RF project that requires me to measure and record the frequency and power level of a transmitted signal. I am using the NI 5660. I am quite new to Labview and the PXI, so I'm not so sure how to do this.
     I know I have to initialize the NI 5660 but I don't know what to do afterwards in terms of measuring the frequency of the acquired signal. I'm not sure what blocks to put together nor do I know where to find them. could someone please enlighten me on how I may understand what I need to do.

    Hi princess!     (it's funny writing that somehow)
    Have you considered the example finder?
    There should be examples on how to acquire and measure with the NI 5660.
    And there should be a block in LV that was delivered with the NI 5660 software, that does something like "acquire spectrum" or something like that.
    Regards,
    Pattos
    LabVIEW Gretchin

  • How do i measure the frequency of a sine wave using a field point counter module

    I need to measure the frequency of the sine wave using field point. is it possible and if yes how. do i need to convert the sine wave signal to square wave. Please let me know.

    It probably would be easiest to convert the sine wave to a square wave with a simple external circuit and then use a counter module to measure the frequency. There is a shipping example in LabVIEW that shows how to measure frequency with a FieldPoint Counter module.
    JRA

  • How can I measure the frequency of an analog signal?

    Hi,  I am trying to measure the frequency of VAC signal coming from a gas turbine engine at my university.  If I can get the values of frequency, I can determine the speed (RPM) of the engine.  I am fairly new to LabVIEW and I have been looking through manuals like crazy in order to find out how to obtain the frequency.  I have measured the signal with an oscilliscope and the highest frequecy will be about 1.5kHz.  I am currently using a USB-6218 and it can collect the voltage signal with ease, but it won't give be analog frequency so simply.  Can anyone explain a way for me to obtain the frequency values?  And if you could show or tell me in a very simple way (because I am not very fluent in LabVIEW yet), that would be amazing!  Thanks!

    Check this out:
    Attachments:
    RPM.vi ‏17 KB

  • How to measure frequency

    hi i have made FM Jamer circuit in multisim 13 , my circuit image you can see below , now i want to measure the Measure Frequency which is Generated it L1 Inductor , so i do not know how to measure frequency in multsim , please help me , or also it would be good to use Antena instead of inductor or not , i have not see any Antena component in multsim 13 

    Hi Zahis,
    The measuring probe measures frequency, this video shows how you can use a probe in Multisim:
     http://www.youtube.com/watch?v=xKEQ3EXEaP8
    Tien P.
    National Instruments

  • How to measure the shift between two resembling images using LabVIEW?

    I am running an experiment in which I use a microscope to map the surface of a laboratory sample and due to some small drift consecutive image appear displaced. In order to correct for the drift I need to first measure it, which I can do by recording two images and finding the shift between. Because of some small random noise which adds to each image, the features in two consecutive images are not completely identical, but they do resemble each other very well. Do you have any suggestions on how to measure this image shift (in both x and y) using LabVIEW (I have version 8.20)?

    Hi, thanks for the answer, I´ll try to see if a 2D cross-correlation will work. I also attached two typical images with a small shift between them (there is also some change in background between them, but I belive the shift should still be measurable).
    Attachments:
    Image1.png ‏285 KB
    Image2.png ‏267 KB

  • How to measure frequency using daq 6009

    HAI..
       Im using PFIO line to measure the frequency..i have attached my vi along with this..output is read approximately to the given input when i highlight the execution,but when i use run and run continuosly alone,am getting incorrect values..im totally confused..suggest some ideas..
    another doubt, may i use analog port to measure the frequency of an oscillator?if so kindly help me to create a vi for this also..
    Attachments:
    counter.vi ‏19 KB

    From your VI, one thing is clear, you are creating a task, but you are not clearing it. Please take a look at this example:http://decibel.ni.com/content/docs/DOC-8172

  • How to measure the phase of a sinusoidal signal?

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

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

Maybe you are looking for