Motor Controller placement

I did a bunch of searching but couldn’t find an answer, even though I believe I have seen the answer before.

Which is better and why:

  1. Motor controllers directly plugged into the cortex or the power expander, and then use a 2 wire extension if needed for the motors, or

  2. 3 wire extensions from the cortex/power expander to the motor controllers and plug the motors directly into the motor controllers

Or doesn’t it matter?

I seem to remember that the controllers should be closer to the cortex, but I’m not sure. Does it help cut down on noise with the PWM signal?

There’s a note on the motor controller product page recommending no more than one 3-wire extension cable, and use 2-wire extensions after the controller if more length is needed.