An operation region detection device includes a dog, a support member for
supporting it, and a detection switch outputting a signal based on
contact or noncontact with the corresponding dog. The support member is
arranged in a hollow part of a joint of a robot and attached to one of
two link members of the robot rotatable relative to each other so that a
center axis of the support member is substantially aligned with a
rotation axis of relative rotation of the two link members. The dog is
attached to the outer circumference of the support member and has a
length corresponding to a predetermined detection region along a
peripheral direction of the outer circumference. The detection switch is
provided on the other of the two link members at a position facing the
dog to detect a region to which a current position of the relative
rotation belongs based on the state of output of the signal. An operation
range restricting device for restricting an operation range of the
relative rotation based on a region to which a current position of the
detected relative rotation belongs.