Design of automatic fire alarm system based on PLC