Wiring a linear actuator with external power source - 3 wires.

I want it so that i can control both directions without having to do any rewiring.