The potentiometric device and method selective for pioglitazone relates to the detection of pioglitazone in urine, in other liquid biological samples, and in pharmaceutical preparations for quality control testing and the like, and particularly to the use of a potentiometric sensor for potentiometric detection and measurement of the concentration of pioglitazone. A charged particle beam apparatus of the present invention irradiates the same portion of a specimen with electron beams at a plurality of accelerating voltages, and differentiates a grain from a void on the basis of a contrast change amount of the same portion in a plurality of images acquired so as to respectively correspond to the plurality of accelerating voltages. A signal path though the cavity is made or broken by energizing an actuator to move the liquid metal volume within the cavity in response to a switching signal.