To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Calculate the frequency of a signal (square wave) in LabVIEW.
Description
Note that this example will count extra transitions with noisy data. Filtering or other modifications may be necessary to ensure accurate counting if noise is present
Requirements
Steps to Implement or Execute Code
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
If this works when I get to my lab I think I'll cry! Been trying to get a photointerrupter signal with my myRIO (no DAQmx) for the past 5 days with no luck. It also doesn't help that I've not had any training! I'll let you know how it works out 🙂
your idea is great, it just work on square signals only.
so i just added a few ideas to make more signals to work with your idea.
averaging noises then scalling down around zero and then making it monobit so sine waves will work too.
here his my addition.
i cant post the average VI here , so here is a link to a version of it i posted.
Hi,
i'm using the VI posted by Jon F. of NI at beginning of this post to calculate the Frequency of a Square Wave,generated in my works with a Signal Simulate,and the result obviously is ok!
Now i would like to know:
if i add a Noise to the same Square Wave always with Simulate Signal (the SIMULATE is my waveform generator for my studies :)...) how can i do to obtain a correct measurement of the Frequency? How should i modify the VI posted by Jon F. for added Noise? Which code should i add to the initial VI?
In my tests i'm adding to the Square Wave with the Simulate Signal UNIFORM WHITE NOISE as type,and small values of Noise Amplitude and Seed Number.
I hope for your help! It would be great to receive some easy code attacched to solve this my problem!
Thanks all!