An industrial robot includes a first member, a positioning member arranged
to be attached to the first member, a second member arranged to rotate
relative to the first member, and a first joint for coupling the first
member with the second member. The second member has a contact point
arranged to contact the positioning member. An indication for requesting
to enable the positioning member to contact the contact point is
displayed. The second member rotates at the first joint relatively to the
first member while the positioning member can contact the contact point.
It is detected whether or not the contact point of the second member
contacts the positioning member. A position of the second member is
stored as an origin when it is detected that the contact point of the
second member contacts the positioning member. This method prevents a
possible failure of the attaching of the positioning member, and
decreases a work load on an operator.