Motor Encoder - Program an action for every loop

I probably don't need that high of resolution, but I do want to make the first barrel return to the top position when it slows to a stop. This way it will always be reset properly. To do that I think I would probably need more than the six steps, but probably not 408.

I have thought about using an absolute position encoder rather than relative, but this is really just a toy and I don't want to start getting into more expensive components if I don't need to. I just figured there is so much about the coding side things I"m not aware of that I might just be missing a function or library that can handle this kind of thing.