@codfish124:
thank you I got it I found some core XY help
M400 ; make sure everything has stopped before we make changes
M574 X1 Y1 S3 ; set endstops to use motor stall
M913 X50 Y50 Z50 ; drop motor currents to 50%
M915 X Y S3 R0 F0 ; set X and Y to sensitivity 3, do nothing when stall, unfiltered
G91 ; use relative positioning
G1 S1 X-400 Y-400 F4000 ; move left 300mm, stopping at the endstop
G90 ; back to absolute positioning
M400 ; make sure everything has stopped before we reset the motor currents
M913 X100 Y100 Z100 ; motor currents back to 100%
M574 X1 Y1 S0 ; Define active low and unused microswitches
M574 Y1 Z1 S1 ; Define active low and unused microswitches
That is for homing X and Y without using endstop switches. However, it is incomplete because on a CoreXY printer that will home either X or Y (whichever stops first). You would need to follow G1 S1 X-400 Y-400 F4000 with G1 S1 X-400 F4000 and G1 S1 Y-400 F4000 to ensure that both X and Y are homed.