speed measurement of dc motor with encoder without rotating

The code for measuring dc speed through rotary encoder is not running i.e..,my encoder is not rotating

123_able:
The code for measuring dc speed through rotary encoder is not running i.e..,my encoder is not rotating

You need to post your code and post a diagram showing how everything is connected.

What is the encoder connected to? If it is meant to be turning with the motor and the motor is turning but the encoder is not then something is broken.

...R

PS. I have suggested to the Moderator to move your question to its own Thread