Controlling a gantry robot with one smart controller