I'd use one of these to do what you want.
http://motion.schneider-electric.com/products/mdriveplus_overview.html?gclid=CL2Q7aCr9LMCFSemPAodJE8AlAYou can write a program and download it to the unit.
Self contained just need a Power Supply and a means to trigger input the program to start and stop. One trigger to send it home, trigger to start, trigger to stop and what ever you can think of. You can change/set the accel/decel and speed during the program run. You just write a text program and then send it to the processor. Different programs can be run depending on the trigger that is sensed. Great for repeated routines. Fun units to work with too. But Servos are so much faster and more powerful, Parker makes a GV Drive that does this also to control Servos that I have used.