A generator for delivering radio frequency energy and ultrasonic energy to a surgical instrument, the surgical instrument comprising a first jaw and a second jaw configured for pivotal movement between a closed position and an open position, the generator being configured to: receive a first input indicating a user selection of one of a first option and a second option; receive a second input indicating whether the first jaw and the second jaw are in the closed position or in the open position; receive a third input indicating either a low or a high electrical impedance at a RF energy output of the surgical instrument, wherein the low electrical impedance indicates the presence of stapled tissue and the high electrical impedance indicates an open circuit condition; and select a mode of operation for treating a tissue from a plurality of modes of operation based at least in part on the first input, the second input and the third input, wherein the plurality of modes of operation comprises: a first mode wherein the generator delivers RF energy to the surgical instrument; and a second mode wherein the generator delivers ultrasonic energy to the surgical instrument; wherein the generator is further configured to deliver ultrasonic energy to the surgical instrument at a low level or a high level determined based at least in part on the first input, the second input and the third input; and wherein the generator is configured to select the second mode and to deliver the ultrasonic energy at the low level, when the second input indicates the closed position, and the third input indicates the presence of stapled tissue. receive a first input indicating a user selection of one of a first option and a second option; receive a second input indicating whether the first jaw and the second jaw are in the closed position or in the open position; receive a third input indicating either a low or a high electrical impedance at a RF energy output of the surgical instrument, wherein the low electrical impedance indicates the presence of stapled tissue and the high electrical impedance indicates an open circuit condition; and select a mode of operation for treating a tissue from a plurality of modes of operation based at least in part on the first input, the second input and the third input, wherein the plurality of modes of operation comprises: a first mode wherein the generator delivers RF energy to the surgical instrument; and a second mode wherein the generator delivers ultrasonic energy to the surgical instrument; wherein the generator is further configured to deliver ultrasonic energy to the surgical instrument at a low level or a high level determined based at least in part on the first input, the second input and the third input; and wherein the generator is configured to select the second mode and to deliver the ultrasonic energy at the low level, when the second input indicates the closed position, and the third input indicates the presence of stapled tissue. a first mode wherein the generator delivers RF energy to the surgical instrument; and a second mode wherein the generator delivers ultrasonic energy to the surgical instrument; wherein the generator is further configured to deliver ultrasonic energy to the surgical instrument at a low level or a high level determined based at least in part on the first input, the second input and the third input; and wherein the generator is configured to select the second mode and to deliver the ultrasonic energy at the low level, when the second input indicates the closed position, and the third input indicates the presence of stapled tissue.