Hi, I am a new user of accelstepper and have some experience with arduino. Ordinarily I would take the time to research and fully understand the solutions to my problem but I have a very limited amount of time because this system is going to be installed inside a store window in several days and it will on display for an extended period of time...
I have a bipolar stepper motor being driven by a gecko (g251x) motor driver and currently using the accelstepper library. The motor is connected to an acme screw which moves an object back and forth along a single 48" axis. I would like to program a series of movements with delays and alternating direction (object goes near one end of ball screw, delay, object moves near the other end, delay, etc). My concern is as if/when someone disconnects the system, it will start up again without any memory of how far it is from the end and then just crash into the bearing blocks. I can install limit switches but I am not sure of how to incorporate them so that the system causes the motor to reverse direction and essentially re-zero the sequence in a fluid manner. The sequence is does not need to be very complicated, maybe four or five arbitrary movements back and forth with delays in between plus some contingency plan if/when the object reaches the end of travel. I am starting to get a grasp on how to go about this but I do not want to run out of time.
Thanks for any and all help.