The track needs to be measured using the calibrated TCP.
Measurement checklist:
Setting up the track measurements
Keep the same robot settings with zero base, zero tool and short spike, and attach the magnet spike somewhere so that the robot can reach the spike easily.
Save one point so that the robot is on the one end of the gantry axis and second when the robot is on the other end of the same axis. Make sure that in the second point the spike tips match exactly, move only the robot joints to match the points.
After track calibration, you should have one 2 point program.
After taking the measurements
Save the program to a USB-stick from the controller.