A method of controlling a function of a surgical instrument of a surgical robot with a input of a user interface includes selecting a function of a surgical instrument to link a input of the user interface with the function of the surgical instrument, actuating the input to activate the function of the surgical instrument, and delinking the input from the surgical instrument in response to an event of the surgical robot or the user interface.