In this video I show how you can have a DC motor turn one direction until it hits a limit switch. Then using a SPST switch or some other control circuit, you can reverse the DC motor until it hits another limit switch.
This circuit is very handy for many situations where you have to open and close things for example.
I have a corrected PNG image you can download here
https://el34world.com/Misc/misc/BlastGates.png
Here is the wiring hookup diagram without the relay contacts
This may help you do the basic wiring without showing the relay contacts
https://el34world.com/Misc/misc/DcMotorHookup.png
Here is my .diy file that you can open in DIYLC
https://el34world.com/Misc/misc/BlastGateSwiches4.diy
Do it yourself layout creator info is here.
https://el34world.com/Forum/index.php?board=26.0