57
Call the subprogram (CALL)
CALL
X0
FEND
SRET
P10
P10
The subprogram will start from Pn and finish with SRET. CALL Pn is used to call the
subprogram. n is a integer in the range of 0 to 9999.
Tag I is usually used in interruption, including external interruption, time interruption etc. It
often works together with IRET (interruption return), EI (enable interruption), DI (disable
interruption);
External interruption
Accept the input signal from the special input terminals, not affected by the scan cycle.
Activate the input signal, execute the interruption subroutine.
With external interruption, PLC can dispose the signal shorter than scan cycle; So it can be
used as essential priority disposal in sequence control, or used in short time pulse control.
Time interruption
Execute the interruption subroutine at each specified interruption loop time. Use this
interruption in the control which is different from PLC’s operation cycle;
Action sequence of input/output relays and response delay
Input
Before PLC executing the program, read all the input terminal’s ON/OFF status to the image
area. In the process of executing the program, even the input changed, the content in the input
image area will not change. However, in the next scan cycle, the changes will be read.
Output
Once all the instructions end, transfers the ON/OFF status of output Y image area to the
output lock memory area. This will be the actual output of the PLC. The output contactors
will act according to the device’s response delay time.
When use batch input/output mode, the drive time and operation cycle of input filter and
output device will also show response delay.
If X0 is ON, jump to the
subprogram
If the coil is not ON, run the
original program;
After executing the subprogram,
return to the main program;
M
ai
n
pr
ogr
am
Sub
pr
og
ra
m
Sign I