We are using bang-bang control in a labview 10ms metronome loop. We have used this same control and RPM calculation in the past with success, and it is working fine for us this year too. But this year we are seeing huge spikes in the RPM calculation that seem to me to have a harmonic frequency. (No hard data, just watching a chart in the front panel of the vi.)
Our setup is the same we used to shoot Frisbee back in the day.
Our speed sensor is a banner photoeye, that we have 3 pieces of reflector tape on our hex shaft for the shooter wheel. This gives us 3 pulses per revolution.
In Mark McLeod’s awesome Labview tips website, We have made the these changes to his code attached. In the config timer block we are averaging over 3 pulses, and in the divide by pulses we have changed the 99 to 3.
Like I said before the code is working, but the issue is we will see a RPM calc that is way over what is physically possible by the motor and shaft combination. like 1.9k RPM? These blips seem to last maybe one calculation and are gone, (no data, just looking at chart, which is moving pretty quick) but they don’t last long.
Seeing we are using bang-bang, this High rpm count just means we turn the motor off, for the 10ms, which about 35% of the time is the correct thing to do, the other 65% of the time, it doesn’t really affect the system response, as they are not long duration.
So am I missing something? It seems to me that the only thing that could cause this error is in the Counter Period output, as I could not create that many pulses on the photoeye to event be close to real.
I am thinking implementing code to check if the RPM is in the physically possible range, and if not, use the last 10ms value for RPM.
Not a problem, just not what we expected?