Specifications

7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-10
00 CJ
P** P 00 to P 63 Conditional jump
Executes the program of specified pointer when the jump command is
on.
Executes the program of the next step when the jump command is off.
Program Example
CJ P1
P**
Y1
Y2
X0
X1
X2
P1
0
N
(jump command)
Ϩʳ When X0=ON, program address jumps from 0 to N (label P1)
continuing the program, skipping the addresses in between.
Ϩʳ If there is a TMR (timer) in the middle of the address, the timer will stop
counting. When X0=OFF, the program will continue from address 0, the
CJ command will not be activated, and the timer will continue counting.
01 CALL
P** P 0 to P 63 Call subroutine
Up to five levels of nesting of the CALL instruction are allowed.
Executes the subroutine program specified by the pointer (P**)
02 SRET
Termination of subroutine program
Executes the sequence program located at the next step to the CALL
instruction when the SRET instruction is executed.
Indicates the end of subroutine program.
Program Example
Subroutin
e
Call of subroutine
Return of subroutine
program
Head pointer
number (label)
of subroutine
CALL P2
P**
Y1
P2
20
24
FEND
X0
X1
SRET
Ϩʳ When X0 = ON then starts CALL command, jump to P2 and run
subroutine. When run SRET command, it will jump back to address 24.
Ϩʳ Program continues in the subroutine after the FEND command.
Ϩʳ When using CALL command, the numbers of P0 to P63 cannot be
duplicated with CJ command.
03 IRET
Termination of processing of interrupt program
Indicates the termination of interrupt program.
04 EI
Enables interrupt
05 DI
Disables interrupt
During the PLC operation, the program scans the commands between
EI and DI, if X001 and X002 are ON, the Interrupt Service Subroutine I
001 and I 201 will be activated when IRET is reached, the main
program will resume.