Hi Ron,
If i try to just tell you what you want is,you are looking for control which automatically detects the 500 steps and it must reverse the direction of what was previous,if i am right,this is the solution you will have a count of steps from the upper or lower step so you put a OR condition for the limit switch control,and keeping track of the present of the direction and inverse it using SHIFT REGISTER, i am sorry if i have usderstood a wrong thing,plz expalin if i am wrong.