The utility model relates to the technical field of instruments and meters, in particular to a
gas meter with an alarm function. The leakage-proof
gas meter with the alarm function comprises an installation frame, a
gas meter body, a displayer and the like. A displayer is arranged on the gas meter body, and a mounting frame is mounted on the side, back on to the displayer, of the gas meter body. The
electromagnet is activated, the
electromagnet generates magnetic attraction after being electrified, the
electromagnet moves upwards along the first guide rod, so that the first contact switch is in contact with the second contact switch to form an access, current flows to the motor through the second
electric wire, the motor is started to run, and the motor runs to drive the
cam to rotate through the belt. The
cam rotates to extrude the first wedge block to move downwards along the second guide rod and compress the first spring, the first wedge block moves to force the
extrusion rod to move inwards under stress, the displacement of the
extrusion rod triggers the emergency button, and therefore emergency closing of the gas valve is achieved.