24.04.2013 Views

Conceptos de PLC

Conceptos de PLC

Conceptos de PLC

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Ejemplo <strong>de</strong> programa 1:<br />

3. Conjunto <strong>de</strong> instrucciones<br />

Después que el programa A se ha ejecutado 3 veces, reanudará su ejecución <strong>de</strong>spués <strong>de</strong> la<br />

instrucción NEXT. El programa B se ejecutará 4 veces por cada vez que se ejecute el programa A.<br />

Por lo tanto, el programa B se ejecutará 3 × 4 = 12 veces en total.<br />

FOR K3<br />

FOR K4<br />

NEXT<br />

NEXT<br />

Ejemplo <strong>de</strong> programa 2:<br />

B<br />

Cuando X7 = OFF, el <strong>PLC</strong> ejecutará el programa entre FOR ~ NEXT. Cuando X7 = ON, la<br />

instrucción CJ salta a P6 y eva<strong>de</strong> la ejecución <strong>de</strong> las instrucciones entre FOR ~ NEXT.<br />

P6<br />

X7<br />

M0<br />

M0<br />

X10<br />

CJ P6<br />

MOV<br />

FOR<br />

MOV D0<br />

INC<br />

MEXT<br />

Y10<br />

K0<br />

K3<br />

D0<br />

A<br />

D0<br />

D1<br />

3-53

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

Saved successfully!

Ooh no, something went wrong!