Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

Missing Tooth Detection MyDAQ Counter

$
0
0

I'm trying to use the MyDAQ to detect a trigger wheel missing tooth using the Counter period function but have thus far had spotty results. My input signal looks like this:

trigger_output.PNG

Which is the output from a 36-1 trigger wheel (which means teeth are spaced evenly for 36 teeth but 1 is missing). My goal is to detect the missing tooth (so I can synchronize other measurements to it) and use the period from all of the other non-missing teeth to get RPM.

 

I have attached the code I'm working on - it's not very pretty at the moment and has a few inputs that have not been hooked up yet because the core logic is not working properly. I know that my signal is extremely consistent but the periods in the output array indicate otherwise (I have thuroughly tested the signal generator I'm using to create this signal - I know that it is not the problem). Here's a sample:

output_array_sample.PNG

There seem to be a lot of missing or incorrect periods - it should have the (relatively) same period for 35 samples and then 1 period should be roughly 2 times that of the previous period.

 

Any idea what I'm doing wrong or how I can do it better?

 

Thanks!


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>