11-15-2009 08:13 PM
I'm currently working on project requiring one task to measure the pulse frequency coming out from UUT. Is it possible using only an NI-6501 DIO?
attached is the sample waveform to measure. Duty cycle = 50%
11-16-2009
04:06 PM
- last edited on
02-25-2025
10:17 PM
by
Content Cleaner
The 6501 is far from the ideal solution, but you do have the following subsystems available on the device:
1. Software-timed Digital Input: Not very useful unless the frequency is very slow. The amount of time the software takes to pull one sample from the device is going to be fairly slow and completely non-deterministic so you can't get a very accurate measurement.
2. Counter Input: The counter on the 6501 only supports Edge Counting. If you're stuck with the 6501 I would try this route--count the edges of your input signal over a software-defined amount of time. Divide by this time to obtain the average frequency. The exact time you are acquiring over is going to be software defined and thus non-deterministic, but if it is a long enough window the jitter should make less of an impact on your measurement.
Ideally, you would use a board with a counter that supports frequency measurements. Here's an example of some of the boards that NI has in various form-factors:
1. USB 6210
2. PCIe 6320
3. PCI 6220
If you have any questions don't hesitate to let me know--I hope this at least helps you get started in the right direction. Again, I wouldn't recommend the 6501 for this type of measurement but if you don't have a choice the above is the best advice I can give.
Best Regards,
John
11-16-2009 08:35 PM
thanks John for your reply. Right now I'm stuck with using only NI-6501 as my DAQ but I will try the other DAQ if needed. I have attached my VI which I got from other forum but I can't display the waveform I want.
11-17-2009 09:34 AM
It looks like this VI is using the first process I mentioned (software-timed digital input). I don't think this is what you want--the code as you have it configured is only going to sample the digital line once per second (it will return a single High/Low point during this sample). How fast is your input signal?
-John
11-17-2009 08:00 PM
The input frequency ranges from 450 HZ to 600 HZ. Do I have to change my sampling rate to be equal to my input frequency?
BTW, thanks for supporting me on this.
11-18-2009
10:46 AM
- last edited on
02-25-2025
10:17 PM
by
Content Cleaner
You would actually want to be able to sample much faster than your input frequency so you can get a good representation of the input signal. This isn't going to be achievable using SW-Timed digtial inputs.
I actually get this question quite a bit so I figured I would post an example of how you might use the edge counter to get a decent frequency measurement. You won't be able to tell the duty cycle of your waveform but to my knowledge this is the best way to measure frequency using the 6501 (or 6008/6009):
Software-Timed Frequency Measurement Using Edge Counter
If you have any questions about it be sure to let us know.
Best Regards,
John