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.

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

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

Asuma que los dispositivos <strong>de</strong> bits KnX, KnY, KnM y KnS están <strong>de</strong>signados a moverse, el número<br />

<strong>de</strong> dígitos <strong>de</strong> S y D <strong>de</strong>be ser el mismo, por ejemplo, su n <strong>de</strong>be ser el mismo.<br />

M1000<br />

BMOV<br />

K1M0 K1Y0 K3 M0<br />

M1<br />

M2<br />

M3<br />

M4<br />

M5<br />

M6<br />

M7<br />

M8<br />

M9<br />

M10<br />

M11<br />

Y0<br />

Y1<br />

Y2<br />

Y3<br />

Y4<br />

Y5<br />

Y6<br />

Y7<br />

Y10<br />

Y11<br />

Y12<br />

Y13<br />

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

La instrucción BMOV operará <strong>de</strong> manera diferente, automáticamente, para prevenir errores<br />

cuando S y D coinci<strong>de</strong>n.<br />

1. Cuando S > D, la instrucción BMOV se procesa en el or<strong>de</strong>n →→.<br />

X20<br />

1<br />

BMOV D20 D19 K3 D20 D19<br />

2<br />

D21 D20<br />

3<br />

D22 D21<br />

2. Cuando S < D, la instrucción BMOV se procesa en el or<strong>de</strong>n: →→, entonces D11~D13<br />

todos son iguales a D10.<br />

X21<br />

BMOV D10 D11 K3 D10<br />

D11<br />

D12<br />

3<br />

2<br />

1<br />

D11<br />

D13<br />

n=3<br />

3-65

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

Saved successfully!

Ooh no, something went wrong!