A method of controlling a robotic surgical system is provided, where the robotic surgical system including an arm having an instrument with jaws and an access port each coupled to the arm. The method includes detecting a position of the instrument, and opening the jaws of the instrument, in response to a determination that a distance between the position of the instrument and a position of the access port is greater than a predetermined distance.