I am having programming difficulties with Controlling motors with limits.

Your wiring anything close to the below?