Stepper Motor and rotary encoder ppr mismatch

TobyOne:
not that it made any difference, I thought long int is a 2 byte number?

It is. I did not suggest otherwise. OOPs - my mistake. A long is a 4 byte number

Anyway I have tried your suggestions (removing the nointerupt and delay etc)

I did not suggest either of those.

...R

Edited to correct mistake - apologies for any confusion