Case Study
XK8 transmission warnings and limp mode
Looked at this for a busy diagnostic garage on the island.
The car drove fine but was plagued by intermittent transmission warnings and the resultant limp mode. Initially these occurred when using the manual side of the J-Gate however it got progressively worse so it would fault even moving from P to D or N/R.
The car had recently had a new gearbox and a replacement TCM put in it, not sure if that was to try and fix this fault or something else.
Looking at the live data (on a JLR dealer laptop) it all looked fine and it showed the gearbox output moving smoothly through the gears, setting the ones and zeros to to indicate what gear it was in.
A clue came from seeing the PRND indicator lights on the J Gate occasionally flicker slightly on change.
Knowing that the lights were driven from the CAN bus output from the TCM and ECU and not the lever position, an oscilloscope was put on the P/N output from the transmission selector switch at the ECU - (the P/N signal goes to the ECU the rest go to the TCM), it should switch 0-12v from P to N like this.

However occasionally it would do this

That 30ms glitch was enough to confuse the ECU and set all the warnings and codes.
This is the rotary switch that says what gear has been selected,

Left is the early type in a brown case, later XK8s use a different type shown on the right with a black case.
The glitchy switch was replaced and the fault was rectified.