Controlling Window Motor

We are using a windows motor to control our arm. We want to set it so the arm can go up to maximum height and will not allow the arm to go up anymore. Also, when the arm is at lowest height, the arm cannot move down anymore. The window motor is controlled by a spike relay, thus we are pretty sure we cannot use a servo to control angles and such of the motor. What are some ways we can make our arm act in such fashion? Is their a way to make the motor run for let’s say 3 seconds, stop, then reverse for 3 seconds?

Thanks in advance

A very simple and easy to implement design would be to use Limit switches as stops on both the maximum and minimum height. They are simply digital inputs and would be easy to read.

If you do this, put a flexible extension on each switch so that inertia of the arm does not destroy the switch.

**

Thanks. Do you know how to do this in labview by any chance? I am a rookie programer who picked up labview 3 weeks ago

See attached screenshot.

The switch is wired to a DIO input.

**





Thanks for the picture. I found it on frcmastery.com, so i will figure it all out.