A linear motion guide device includes a magnetic member disposed on a
guide rail, a slider slidably attached onto the guide rail for moving
along the guide rail, and a detecting device includes a housing
detachably secured to the slider and has a chamber for receiving a
detecting member, and a casing detachably coupled to the housing for
retaining the detecting member in the housing. The detecting device may
be easily and readily attached to the linear motion guide device without
changing the arrangement of the linear motion guide device. Other casings
may be changeably coupled to the housing of different structure.