The present disclosure is directed to systems and methods for operating an electromechanical surgical system (100). The electromechanical surgical system includes a hand-held surgical instrument including an instrument housing (102) defining a connecting portion for selectively connecting with a shaft assembly (200). The system 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 includes a drive member (118, 120, 122), a flag member (247) configured to translate axially along the drive member, and a sensor (248a) disposed about the drive member. 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).