Slave motor - Marlin

Hello,

I've added a slave motor to the Y axis of my laser cutter running Marlin.

What changes do I need to make to drive the motor? It's running in the opposite direction to it's parent motor.

Thanks

From:

http://reprap.org/wiki/Stepper_wiring

Motor moving the wrong direction

To get the motor moving in the right direction, is actually does matter which coil is which and what the polarity of the coils are. However, if they're wrong, the motor just turns the wrong way, it's easy to fix that by swapping wires. Pick one of the following in order to reverse the stepper's direction:

  1. Switching the polarity of either (one) coil, like changing ABCD to BACD or ABCD to ABDC.
  2. Swapping the coils, like changing ABCD to CDAB.
  3. Stepper direction can also be reversed in the firmware.
  4. Plugging the plug in backwards (in case your electronics' plugs allow that). This swaps the coils, and reverses both coil A and coil B. Thus the effect is to change the direction 3 times, which gives a net effect the same as changing the direction once. Only few electronics allow that, because you have to figure the right way not once, but each time you connect the stepper.

Sorry I should have been more clear.

My question isn't how to change the direction of the motor, it's how to drive a second motor on the Y axis.

The second motor needs to run in the opposite direction to the primary motor on the Y axis.

  1. Switching the polarity of either (one) coil, like changing ABCD to BACD or ABCD to ABDC.
  2. Swapping the coils, like changing ABCD to CDAB.

How do I drive the second motor?

Basically I want to use either the E0 or E1 stepper driver to drive a second motor for the Y axis.

Not familiar with Marlin but are you sure it supports what you're trying to do? Could we see some code?

Many controllers have (4) axes capability but (2) have to be driven with the same pulse/direction (as a slave).
This controls have a jumper to attach the 4th axis to one of the others.
We don't know what you have.
here are some images:
https://www.google.com/search?q=arduino+cnc+shield&tbm=isch&imgil=veB0AU4UWqncXM%253A%253BXeCpfWRQrmk_pM%253Bhttp%25253A%25252F%25252Fforum.hobbycomponents.com%25252Fviewtopic.php%25253Ff%2525253D40%25252526t%2525253D1747&source=iu&pf=m&fir=veB0AU4UWqncXM%253A%252CXeCpfWRQrmk_pM%252C_&usg=__t0WT8_9dzQnZ1xTqumMLe5qeFbE%3D&biw=1366&bih=611&ved=0ahUKEwiV7aiNnYvRAhWh7IMKHauRCgUQyjcIvgE&ei=05JdWNW3OKHZjwSro6oo#imgrc=veB0AU4UWqncXM%3A

(wow - that's one big ass link)

I'm using RAMPS 1.4 with Arduino mega.

It can run 5 motors. I was only using 2 (1 for x and 1 for y) but now I'm wanting to use 3 (1 for x and 2 for y).

I believe it is supported in Marlin. I only have my iPad at the moment so can't post any code at the moment.