17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>SA2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

Program example 1:<br />

After program A has been executed for 3 times, it will resume its execution after NEXT instruction.<br />

Program B will be executed for 4 times whenever program A is executed once. Therefore, program<br />

B will be executed 3 × 4 = 12 times in total.<br />

FOR<br />

K3<br />

FOR<br />

NEXT<br />

K4<br />

B<br />

A<br />

NEXT<br />

Program example 2:<br />

When X7 = OFF, PLC will execute the program between FOR ~ NEXT. When X7 = ON, CJ<br />

instruction jumps to P6 and avoids executing the instructions between FOR ~ NEXT.<br />

X7<br />

CJ<br />

P6<br />

M0<br />

MOV<br />

K0<br />

D0<br />

FOR<br />

K3<br />

M0<br />

MOV<br />

D0<br />

D1<br />

INC<br />

D0<br />

P6<br />

X10<br />

MEXT<br />

Y10<br />

3-58

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!