#$%^&*AU2014259544A120150903.pdf#####END STOP DETECTION ABSTRACT The present disclosure is directed to systems and methods for operating an electromechanical surgical system (10). The electromechanical surgical system (10) includes a hand-held surgical instrument (100) including an instrument housing (102) defining a connecting portion (108a) for selectively connecting with a shaft assembly (200). The system (10) also includes an end effector (400) configured to perform at least one function. The shaft assembly (200) is arranged for selectively interconnecting the end effector (400) and the hand-held surgical instrument (100). The shaft assembly (200) includes a drive member (246a), a flag member (247) configured to translate axially along the drive member (246a), and a sensor (248a) disposed about the drive member (246a). The sensor (248a) provides a signal indicating that the end effector (400) has reached an end stop when the flag member (247) contacts that sensor (248a).