Motor Encoder seems to stop counting

Using the getMotorEncoder to move the robot to a particular spot. Also using the displayMotorValue to read the numbers. works fine for 5 to 10 runs but then it seems like the encoder stops counting. The displayed values stay at “0” and the motor never stops running. This has happened to a few of our teams. Both teams are also using the gyroSensor but even after commenting out all other code, the problem persists. Any ideas why this would happen. I have removed all programs from the brain and reloaded but that doesn’t fix it. Problem continues even after a full recharge.

Can you post your code up so we can take a look? What version of the IQ firmware and ROBOTC are you using?

We updated all firmware before running the progarm, it started out fine and ran about 12 times stoping at 1001 as well as displaying the value of the encoders. Then it just stopped both.

You’re not updating the display. Add one more displayMotorValues line into the motor while loop (between the lines 9 and 10).
The one on line 1 and 2 will only print the initial values once, not during the program run.

                "You're not updating the display. Add one more displayMotorValues line into the motor while loop (between the lines 9 and 10).
                 The one on line 1 and 2 will only print the initial values once, not during the program run."

But it was working that way, and weather we display it or not, the encoder should still be counting. When the problem started, the robot would not stop moving forward and the display would not change from 0. The display is not the real issue, the real issue is why the robot won’t stop.

What does the debug screen say if you run the program with the robot still connected to the USB cable? Is this showing the encoder counting? Is it counting from zero down?
Can you upload your actual program as an attachment rather than just a screenshot?