This is the wiring for a typical application. See details below.
Motor XA is drive #1, Motor Y is drive #2, Motor Z is drive #3, Motor XB is drive #4. The E-stop circuit can be a permanent jumper, or a normally closed switch.