@bookra

start by ensuring that the motor movement direction and which motor is allocated to "X" and "Y" is such that you have a right hand co-ordinate system for movement. You can do this by manually moving the carriage (slowly) to the middle of the work volume, then send G92 X150 Y150 or similar so that the printer allows movement. Be careful not to send too large moves when jogging the axis. Now job the axis using DWC. Does 10mm in +/-X move in the correct way for a RH system? the same for +/- Y? If this is working correctly then move on to the endstops, if not first sort the motor directions (using M569) and/or allocation (using M584) until this is correct.

Next the endstops. If you have, for example, the y endstop at Ymax, then use Y2 in the M574 command to indicate this endstop is at Y Max. if its at Y min use Y1. Similar for X.