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

users. When the instruction MCR is executed, the previous state of the switch contact is popped from the top of the stack. Under the conditions listed in (b), (d), and (e) above, the number of times the items are pushed onto the stack may be different from the number of times the items are popped from the stack. When this situation occurs, at most 32 items can be pushed onto the stack, and the items can be popped form the stack until the stack is empty. Therefore, when CJ or CJP is used with MC and MCR, users have to be careful of the pushing of the item onto the stack and the popping of the item from the stack.

Program example 3:

The table explains the device status in the ladder diagram below.

Device

 

Contact state

Contact state

Output coil state

 

 

before CJ execution

during CJ execution

during CJ execution

 

 

 

 

 

 

 

 

 

 

 

 

 

M1, M2, M3 OFF

M1, M2, M3

Y1 *1, M20, S1 OFF

 

 

 

 

OFFON

 

 

Y, M, S

 

 

 

 

 

 

 

 

 

 

 

 

M1, M2, M3 ON

M1, M2, M3

Y1 *1, M20, S1 ON

 

 

 

 

 

 

 

 

ONOFF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

M4 OFF

M4 OFFON

Timer is not activated

 

 

10ms,

 

 

 

 

 

 

 

 

 

Timer T0 immediately stops and

100ms

 

 

 

Timer*2

 

M4 ON

is latched. When M0 ON

t

OFF,

 

 

M4 ON OFF

 

 

 

 

 

T0 will be reset.

 

 

 

 

 

 

 

 

1ms,10ms,

M6 OFF

M6 OFFON

Timer T240 is not activated

 

 

 

 

 

 

 

 

 

 

 

100ms

 

 

 

Timer T240 immediately stops

accumulative

M6 ON

M6 ONOFF

and is latched. When M0 ON t

Timer

 

 

 

 

 

 

 

 

 

 

 

OFF, T240 will still be latched.

 

 

 

 

 

 

 

 

 

M7, M10 OFF

M10 is ON/OFF

Counter C0 stops

 

 

 

 

triggered

 

 

 

 

 

 

 

 

 

*3

 

 

 

C0~C234

M7 OFF, M10 is

M10 is ON/OFF

Counter C0 stops and latched.

 

 

When M0 is OFF, C0 resumes

 

 

ON/OFF triggered

triggered

 

 

counting.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

M11 OFF

M11 OFFON

Application instructions will not

 

 

be executed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Application

 

 

The skipped application

 

 

instruction

M11 ON

M11 ONOFF

instruction will not be executed

 

 

but API 53~59, API 157~159

 

 

 

 

 

 

 

 

keep executing.

 

 

 

 

 

 

 

 

 

3 - 44

Page 160
Image 160
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Off→On, ON→OFF M4 OFF M4 OFF→ON, M4 on OFF, M6 OFF M6 OFF→ON, M6 on M6 ON→OFF