The present disclosure is directed to systems and methods for operating an electromechanical surgical system. The electromechanical surgical system includes a hand-held surgical instrument including an instrument housing defining a connecting portion for selectively connecting with a shaft assembly. The system also includes an end effector configured to perform at least one function. The shaft assembly is arranged for selectively interconnecting the end effector and the hand-held surgical instrument. The shaft assembly includes a drive member, a flag member configured to translate axially along the drive member, and a sensor disposed about the drive member. The sensor provides a signal indicating that the end effector has reached an end stop when the flag member contacts that sensor.