DJChrisp -
I know your condition well; it happened to me twice. The "tapping" or "knocking" will continue for a few dozens of miles, then the engine will run but you will have no drive to the rear wheel.
That happened to me twice: The screw holding the 20-tooth little gear is working loose. That tapping is a symptom. The loose screw allows the 20-tooth gear to slap around the 82-tooth gear on every cycle. If that screw gets too loose, the tiny half-moon woodruff key (under the screw head) holding the 20-tooth gear is getting beaten senseless and is being deformed a little and may fall out. Then you have no go power to the rear wheel.
Fix: take off the right-hand side reduction gear cover. Spread a large clean cloth under the engine, just in case that tiny half-moon key falls out. Don't lose it! If the key has not fallen out, get a big screwdriver and check the tightness of the screw. If it is loose, take it out and apply a little oil or grease to the threads. Then tighten down the screw as tight as you can. (I found that oil or grease works better than blue locktite.) To keep the gears from turning, jam a piece of wood into the gear teeth. Don't use a metal shim or screwdriver blade; you risk breaking teeth that way.
While you have this cover off, apply just a few little dabs of axle grease on the gear teeth. Or maybe a few drops of heavy oil. Go light; the excess gets slung inside the cover making a mess.
Reassemble everything and go riding! The pinging should be absent. Be aware that the looseness may return a few hundred miles from now. (I once lost complete power transfer while 60 miles from home. Good thing I had a set of select tools and cloth with me. I fixed a fallen-out woodruff key along side the highway!)
MikeJ
920 miles and counting