beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 229

background image

6 Application Instructions API 00-49

DVP-PLC Application Manual

6-17

Program Example 3:

When the programs between FOR ~ NEXT are not to be executed, the user can adopt CJ instruction for a jumping.

When the most inner FOR ~ NEXT loop is in the status of X1 = On, CJ instruction executes jumping to P0 and skips

the execution on P0.

X0

TMR

T0

K10

P0

FOR

K4X100

X0

INC

D0

K2

X0

D1

K3

X0

D2

K4

X0

WDT

D3

X1

CJ

P0

FOR

K5

X0

INC

D4

NEXT

NEXT

NEXT

NEXT

NEXT

END

FOR

INC

FOR

INC

FOR

INC