@GT1Za in answer to your question: BOTH
I use this on a few of my dual Z machines. here is my G code for one of my Chiron's
M584 X0 Y1 Z2:4 E3 ; Custom drive mapping
M671 X-40:440 Y206:206 S2 ; Lead screw positions at right and left of the X axis
I have that in the "drives" section of my config.g
That works in conjunction with my bed.g file which is executed by G32 Which I set in motion by means of a macro entitled "all in one leveling" it first levels the X gantry ( I do it twice to reduce the amount of error correction) then I have it probe the bed by calling G29 that uses the info from my M557 Command
contents on my bed.g
; bed.g
; called to perform automatic bed compensation via G32
M561 ; Clear any bed transform
G28 ; Home All
G30 P0 X15 Y206 Z-99999 ; Probe near a lead screw, half way along the Y axis (1st motor)
G30 P1 X400 Y206 Z-99999 S2 ; Probe near a lead screw and calibrate 2 motors (2nd motor)
G30 P0 X15 Y206 Z-99999 ; Probe near a lead screw, half way along the Y axis (1st motor)
G30 P1 X400 Y206 Z-99999 S2 ; Probe near a lead screw and calibrate 2 motors (2nd motor)
G1 H0 X20 Y61 F7000 ; Move the head to the front left corner
G29 ; Carry out mesh leveling
M557 X12:420 Y10:460 S30 ; define mesh grid