Enable PID in robotc

I installed two IEM caps on our robots back two wheels and the sensors appear to work correctly. We can use them to reasonably accurately trace the movements of the wheels. However, when I enable PID control (tick box in RobotC) the wheels with the first IEM sensor in the chain appears to go nuts! It runs >2x faster that the other wheel. Not what I was expecting. I verified that both are being sent identical motor values. Anyone have any ideas?

Can you post the entire code (including the #pragma statements) using the

 tags for our review? I'll need this information to check the configuration of the robot and to ensure that it is configured correctly. Also, which version of ROBOTC are you using? You can find this information under the "Help -> About ROBOTC" menu option in ROBOTC.

Thanks in advance!

Mystery Solved!

The boys that setup the wheels only revers one of the wheels (in setup). The other they reversed the wire lead going to the controller! So it works fine until you enable PID. Then that the encoder is trying to move the wheel forward, but it “sees” the wheel spin backwards and increases the motor power to compensate making it spin even faster…frustrating but at least it makes sense now.