Two micro-switches (one for each direction) controls the travel.

Wired into the cross-feed control panel, the motor is turned off automatically by the micro-switches.  When the directional switch is thrown in the opposite direction, the motor comes on again.