You are on page 1of 2

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:

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

Control Program:

EI

Main Program

FEND
M1000
I001 Y0

Y1

IRET
M1000
I101 RST Y0

RST Y1

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


5. Loop Instruction Design Examples

z Press the alarm reset button if the alarm situation is cleared. X1 = ON, the PLC will stop the
main program to execute the interruption subroutine I101. In this case, sprayer Y0 and
alarm Y1 will be shut down. After the execution of I101, the program will return to the main
program and resume execution from the interruption point.

5-6 DVP-PLC Application Examples

You might also like