Limit switch on reversing motor
Make sure diodes can handle motor startup current.  Measure current to motor on startup.  Add safety factor.  You should know the drill.  







simulate this circuit &ndash; Schematic created using CircuitLab

Insert this into either black or white wire going to the motor.

Not sure of polarities on diodes.  You have to figure up/down and appropriate diode polarity.

Do this one limit switch and diode at a time.  Switch stops motor at limit and diode allows reversing of motor.

Normally Upper and Lower are closed, but at limits one will open and shuts off motor.  Diode will be reversed biased.

Diode will allow motor to go in reverse direction.  Once motor moves, limit switch closes and power flows through switches.

Once limit switches are closed, motor can go in either direction until limit switches are opened.