4000rpm is the speedo sensor fault code.
Try a TPS check first and see what it does.
Turn key on (don't start engine), unplug the TPS, then plug it back in and see where the rev needle goes, it should tell you what you need to know?
If you get the 4000RPM code doing that, pull off the front wheel and have a look at your speedo sensor, prone to breaking on the 600's, and are about £15-20 for a new one.
if it shows 5000rpm then all is well. either 0rpm or 10000rpm means your TPS needs adjusting.