1997 XJ6 will not rev passed 2000rpm

Hi all. I hope I’m posting this in the correct place.
I have a 1997 XJ6 that failed to start the other day. It would crank but not fire up and I had a zero rpm reading on the gauge while cranking. So I replaced the crankshaft position sensor and the old girl fired straight up but went for a drive and I can only get the rpm just above 2000 rpm then it stubbles, it feels like I’m hitting a rev limiter. Any ideas on what to check.
Thank you

Hi Adam,
I have a similar problem with my 3.2 manual car after going through lots of puddles yesterday, did you find a solution?
Nick

Hi Nick

Yes my problem was a loose wire in the crank sensor plug and at 2000rpm the wire was vibrating enough to kill the signal. I hope your issue is as simple as mine was

Good to hear that you reached a solution, did it take long to determine the fault?