I thought you said that you were not using delay(). There it is in your ISR where it will not work anyway because interrupts are disabled automatically and delay() depends on them. You have not posted all of your code so I can't see whether encoder0Pos is declared volatile, which it should be as you are changing its value in the ISR.