A device is proposed for machining a workpiece using a robot which holds and moves the workpiece, in which the robot has a drive unit which is suitable for fixing the workpiece in a clamping device. According to the method the workpiece is placed in a clamping device by a robot and then machined after the workpiece has been fixed in the clamping device by means of the robot.