I replaced both speed sensors, one on the driver side behind the motor mount, and one under the rear exhaust manifold. I cleared the codes but I still have the same problems. The OBDII still reads a p0500 malfunction. Did I miss something?
The '97 only has ONE speed sensor (that I know of). It sits atop the tranny case (IIRC) out of sight from the top looking down. Kind of hard to reach from the bottom. I remember the trouble I had replacing it back in 2000.
It probably IS the wiring, but did you install the correct sensor? There are two kinds - one for each transmission. My Taurus (3.0L '97) has the AX4S/AXOD tranny which takes the narrower-barreled sensor. The one for the AX4N tranny has a wider barrel. Not sure if you could even install the wrong one ... might not be physically possible, but just a thought.
Also, what about the plastic gear on the end? When I bought my sensor it didn't come with one and so I had to transfer the old gear to the new sensor (by contrast, the AX4N sensor CAME with a gear already on it). Maybe a sillly question, but did you remember to do this (or if you did, did the old one have any damaged fins on it)? Maybe it's not turning inside the tranny case.
But like the others have suggested ... check the wiring. It's easy to damage that short wire on this sensor. I know when I changed my sensor out, something cracked (I guess it was the plug's clip) so I had to tie-wrap it around the barrel of the sensor to make sure it didn't vibrate off while driving (because the plug sits horizontally, IIRC).