beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 214

background image

6 Application Instructions API 00-49

DVP-PLC Application Manual

6-2

X0

X1

X2

CJ

P1

Y1

Y2

0

N

P1

P***

(

)

CJ instruction

Program Example 2:

1.

CJ instruction can be used in the following 5 conditions between MC and MCR instructions.

a) Without MC ~ MCR.

b) From without MC to within MC. Valid in the loop P1 as shown in the figure below.

c) In the same level N, inside of MC~MCR.

d) From within MC to without MCR.

e) Jumping from this MC ~ MCR to another MC ~ MCR

1

.

2.

Actions in ES/EX/SS series models V4.7 (and below): When CJ instruction is used between MC and MCR, it

can only be applied without MC ~ MCR or in the same N layer of MC ~ MCR. Jumping from this MC ~ MCR to

another MC ~ MCR will result in errors, i.e. a) and c) as stated above can ensure correct actions; others will

cause errors.

3.

When MC instruction is executed, PLC will push the status of the switch contact into the self-defined stack in

PLC. The stack will be controlled by the PLC, and the user cannot change it. When MCR instruction is executed,

PLC will obtain the previous status of the switch contact from the top layer of the stack. Under the conditions as

stated in b), d) and e), the times of pushing-in and obtaining stack may be different. In this case, the maximum

stack available to be pushed in is 8 and the obtaining of stacks cannot resume once the stack becomes empty.

Thus, when using CALL or CJ instructions, the user has to be aware of the pushing-in and obtaining of stacks.

X0

MC

N0

X2

X3

X1

M1000

M1000

P1

P0

CJ

CJ

MC

N1

N1

N0

P1

P0

Y1

Y0

MCR

MCR

1

This function is only available in ES/EX/SS series models V4.9 (and above) and

SA/SX/SC/EH/

EH2

/SV

series models.