5. Loop Instruction Design Examples 5.3 Fire Alarm in the Office (Interruption Application) Control Purpose: z Starting the alarm and sprayer when the temperature alarm detects high temperature. z Stopping the alarm and sprayer when the alarm reset button is pressed. Devices: Control Program: EI Main Program M1000 FEND I001 Y0 Y1 IRET M1000 I101 IRET Program Description: z In the program, the interruption pointers I001, I101 correspond to the external input points X0, X1. When X0, X1 is ON, the subroutines corresponding to I001, I101 will be executed. z If the temperature in the office is normal, X0 = OFF. The temperature alarm will not perform any action.
No interruption signal is generated, and no interruption subroutine will be executed in this case. z If the temperature in the office is too high, X0 = ON, the temperature alarm will be enabled. The PLC will stop the main program to execute the interruption subroutine I001. In this case, sprayer valve Y0 and alarm Y1 will be enabled. After the execution of I001, the program will return to the main program and resume execution from the interruption point. DVP-PLC Application Examples 5-5 Device Function X0 Temperature alarm. X0 = ON when the temperature is too high. X1 Alarm reset button. X1 = ON when the button is pressed. Y0 Sprayer Y1 Fire alarm RST Y0 RST Y1