How to read an encoder and control a stepper motor without delay()

Hi dhenry,
How would I implement your approaches into my existing code?

Many thanks,