beautypg.com

Delta DVP-ES2 User Manual

Page 159

background image

3 . I n s t r u c t i o n S e t

3 - 4 3

Program example 1:

When X0 = ON, the program will skip from address 0 to N (Pointer P1) automatically and keep on

executing. Instructions between address 0 and N will be skipped..

When X0 = OFF, program flow will proceed with the row immediately after the CJ instruction.

X0

X1

X2

CJ

P1

Y1

Y2

0

N P1

P***

(CJ instruction)

Program example 2:

1. The instruction CJ between the instruction MC and the instruction MCR can be used in the five

conditions below.

a). The execution of the program jumps from the part of the program outside one MC/MCR

loop to the part of the program outside another MC/MCR loop.

b). The execution of the program jumps from the part of the program outside the MC/MCR loop

to the part of the program inside the MC/MCR loop.

c). The execution of the program jumps from the part of the program inside the MC/MCR loop

to the part of the program inside the MC/MCR loop.

d). The execution of the program jumps from the part of the program inside the MC/MCR loop

to the part of the program outside the MC/MCR loop.

e). The execution of the program jumps from the part of the program inside one the MC/MCR

loop to the part of the program inside another the MC/MCR loop.

X0

MC

N0

X2

X3

X1

M1000

M1000

P1

P0

CJ

CJ

MC

N1

N1

N0

P1

P0

Y1

Y0

MCR

MCR

2. When the instruction MC is executed, the previous state of the switch contact is put onto the

top of the stack inside the PLC. The stack is controlled by the PLC, and can not be changed by

This manual is related to the following products: