Bill,
After I looked at what I was doing, I remembered that the mockup program that I'm using right now does not have an encoder. I'm using a rotor flow sensor. All it is, is a reed switch that rotates and picks up the field and makes/ brakes. But yeah I have to use a power supply for the 24VDC, you might get away with using a AC voltage proximity switch on a sprocket to make your counts, then the DC supply can be left out. We used this method for some machines years ago to load product in a pan and other things, it worked pretty good. There is a hundred ways to do this and the more I think about the deeper I get into it, I better stop. Experiment and see what comes out.
Vern.