Control of the position or alignment of the transfer device