I'm guessing you miss one pulse and this causes the erratic display between 490 and 530 rpm.
If you want to monitor RPM and want a stable reading you must do it over a long period of time. In other words you can't miss the pulse.
If you want to monitor RPM and stop a process when it slows down you must do it over a short period of time. You have to balance your sample rate so you catch the condition fast enough without over-correcting. Then add a rung of logic that says it has to be low for x.xx seconds so you will stop when its slow for more than the one scan, more than the one pulse you are missing.
In my experience it is useful to have two separate routines. One is fast enough to catch the slowdown and stop the process. The other looks pretty for the display. Then you can control and it looks pretty.