A method of teaching a robot comprising providing a pin at a location within a workstation and providing the robot in an area adjacent to the workstation. The robot has a pivoting arm and an end effector. The end effector has a through-beam sensor that includes a light emitter and a receiver to sense when there is an object in between. The robot is moved to perform a sensing operation in which the sensor detects the pin, while the position and/or orientation of the end effector is changed to collect sensed position and orientation data. The sensing operation is performed such that the pin is positioned at different distances between the emitter and receiver as the robot moves the sensor across the pin. Calculations are performed on the data to determine the position of the pin relative to the robot's coordinate system.
展开▼