Can i make a small suggestion before you go any further, you have got your Y Axis using motors 1 and 2 personally myself i would rearrange your wiring to the drivers for motors and swap 2 and 3 around so it gives you
Motor 0 = X
Motor 1 = Y
Motor 2 = Z
Motor 3 = Y Slave
This will make things a lot more simpler in the long run as its how most machines are set-up.
With your current config if you look into the mach config panel under homing/softlimits and the axis mapping you will see that you are getting confused with the motor number and axis in the left hand column.
Your homing sequence is set as follows.
Z(2) Home first and in place, this is motor 2 (Not your Z) that you have declared as one of the Y Axis
X(0) Is second to home and in place
Y(1) Is next to home in the pos direction - if homing an axis and a slave then one should be negative
A(3) Is last to home and in place
If you go to the documents section at
http://warp9td.com/index.php/documentation/doc-mach-four-setup and follow the videos to set these up you will then have a good setup, it will be easier in the long run when using any code in mach4 to reference axis etc.
DazTheGas