24.04.2013 Views

Conceptos de PLC

Conceptos de PLC

Conceptos de PLC

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.

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

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

1. Cuando se dispara el flanco ascen<strong>de</strong>nte <strong>de</strong> X20, la instrucción CALL P10 transfiere la<br />

ejecución a la subrutina P10.<br />

2. Cuando X21 está ON, ejecutar CALL P11, saltar a y ejecutar subrutina P11.<br />

3. Cuando X22 está ON, ejecutar CALL P12, saltar a y ejecutar subrutina P12.<br />

4. Cuando X23 está ON, ejecutar CALL P13, saltar a y ejecutar subrutina P13.<br />

5. Cuando X24 está ON, ejecutar CALL P14, saltar a y ejecutar subrutina P14. Cuando se llega<br />

a la instrucción SRET, salta <strong>de</strong> regreso a la última subrutina P para concluir las instrucciones<br />

restantes.<br />

6. La ejecución <strong>de</strong> subrutinas irá en retroceso a la subrutina <strong>de</strong> nivel superior hasta que la<br />

instrucción SRET en la subrutina P10 sea ejecutada. Después <strong>de</strong> esta ejecución <strong>de</strong><br />

programa regresará al programa principal.<br />

3-41

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

Saved successfully!

Ooh no, something went wrong!