23
1 Overview
1
1.2 PLC Operating Principle
After all the networks of the main program are scanned from top to the bottom, all timers are refreshed, and routine
communication and other data are processed, the PLC system program outputs the status of the variable in the Y register
buffer to the Y hardware port. Then the PLC starts the user program scanning again until the "RUN/STOP" switch for controlling
execution of user programs is toggled to STOP.
In addition, running preparation, system communication, and interrupt processing shall be nished for the PLC system
software. The system software running process is shown in the preceding gure. When scanning a complex user program, the
system can use the "interrupt" processing method to respond to the "user interrupt" signal to timely process important signals
(also called important "events").
"Interrupt" processing means that, after detecting a specic signal, the CPU immediately stops (or interrupts) the current routine
action, executes the specic subprogram, and resumes the routine action which is previously stopped after the subprogram is
executed. It is a main characteristic of the "interrupt" function that the interrupt signal request can receivie timely response and
processing.
In the PLC, interrupts are divided into user interrupts (interrupt of high-speed signal input (X0~X7), high-speed counting, and
timing) and communication interrupts (including system communication and communication launched by user programs). In the
PLC, the priorities of all interrupts are the same but their allowable intervals are slightly different (see the preceding illustration).