Workpiece position errors can be detected and corrected simply by installing the CCD camera and height sensor. With this high precision position error detection and correction capabilities, it is no longer necessary to repeat teaching every time a position error occurs.