Yes. Data does just that while he is in command of the Sutherland in the TNG episode Redemption, Part II. Data is part of a sensor net blockade tasked with preventing cloaked Romulan Warbirds from sneaking supplies to the Duras faction in the Klingon civil war. The Romulans fire a massive tachyon burst to disable the sensor net long enough to slip past the blockade, but Data figures out a way to expose them, using torpedoes set to a low-power yield that will not damage them, but will expose their presence.
DATA: Overlay display with tachyon emissions. Highlight any tachyon signatures which show subspace inertial displacement. Concentrate a
sensor sweep in that area.
(four targets emerge)
HOBSON: Sir, this is pointless. Those readings could be anything.
There's no way for us to be sure the Romulans are out there.
DATA: Reconfigure photon torpedo warhead yields. Set for high energy
burst level six.
HOBSON: Level six? But that won't even
DATA: Do it!