DVP - ES2/SA2/SS2/SA2/SX2/SE Operation Manual - Programming

Program example 1:

After program A has been executed for 3 times, it will resume its execution after NEXT instruction. Program B will be executed for 4 times whenever program A is executed once. Therefore, program B will be executed 3 × 4 = 12 times in total.

FOR K3

FOR K4

B

NEXT

NEXT

A

Program example 2:

When X7 = OFF, PLC will execute the program between FOR ~ NEXT. When X7 = ON, CJ instruction jumps to P6 and avoids executing the instructions between FOR ~ NEXT.

 

X7

 

 

 

CJ

P6

 

 

M0

 

 

 

MOV

K0

D0

 

FOR

K3

 

 

M0

 

 

 

MOV

D0

D1

 

INC

D0

 

 

MEXT

 

 

P6

X10

 

 

Y10

 

 

3 - 58

Page 174
Image 174
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual For K3 For K4 Next