As shown in the drawing above, the color code used with the motors will help you to identify which cable belongs to which axis. Since there are 2 cables for the X and Y axes, pay attention to the cable lengths.
The X+ cable has to be inserted inside the cable fixture, all along the X-axis (see picture below). This will prevent the cable from falling during machine movements.
X- = axis 1 negative limit (shorter cable)
X+ = axis 1 positive limit (longer cable)
Y1- = axis 2 negative limit (shorter cable)
Y1+ = axis 2 positive limit(longer cable)
Z+ = axis 3 positive limit
Y2- = axis 4 negative limit
Drawing
To fully secure the cable to the sensor, you have to also screw the ring (see picture below).