What type of encoder (model #) are you using?
How have you wired it up to the roboRIO?
Can you provide a copy of your code so we can check it?
Have you tried following the java encoder code example here?:
https://wpilib.screenstepslive.com/s...or-other-shaft