I would set the G327 up in one of the diagnostic modes where it shows you the gray code output. You could also check the pin outputs on the encoder. Just takes time.
If it's a wiring issue, I'd call SteinAir and get a new harness. And make sure you get it signed off by an A&P!
I had a problem where the G327 randomly displayed totally wrong altitudes ... like FL270! The avionics show said it wasn't the encoder, G327 needed to go to Garmin for refurb. The good part is that it's a fixed price no matter what's wrong - you know exactly what you're paying. The bad news is that's $600 plus shipping.
Garmin reflashed the software and called it good. Never got a good reason for what exactly happened, but it's working, at least as of yesterday. Today, I can't say, haven't flown .....
Doug
190 hours in the CT and have loved every one.