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.

Manual <strong>de</strong> operación <strong>de</strong> DVP-ES2/EX2/SS2/SA2/SX2 - Programación<br />

API Mnemónico Operandos Función<br />

182<br />

3-426<br />

MXOR P Matriz XOR<br />

OP<br />

Tipo Dispositivos<br />

<strong>de</strong> bit<br />

X Y M S<br />

Dispositivos <strong>de</strong> palabra<br />

K H KnX KnY KnM KnS T C D E F<br />

S1 * * * * * * *<br />

S2 * * * * * * *<br />

D * * * * * *<br />

n * * *<br />

Controladores<br />

ES2/EX2 SS2 SA2 SX2<br />

Escalones <strong>de</strong><br />

programa<br />

MXOR, MXORP:<br />

9 escalones<br />

PULSE 16 bits 32 bits<br />

ES2/EX2 SS2 SA2 SX2 ES2/EX2 SS2 SA2 SX2 ES2/EX2 SS2 SA2 SX2<br />

Operandos:<br />

S1: Dispositivo fuente <strong>de</strong> matriz 1 S2: Dispositivo fuente <strong>de</strong> matriz 2 D: Resultado <strong>de</strong><br />

operación n: Longitud <strong>de</strong> matriz (n = K1~K256)<br />

Explicaciones:<br />

1. La instrucción MXOR realiza una operación matriz XOR entre los dispositivos fuente <strong>de</strong><br />

matriz 1 y 2 con longitud <strong>de</strong> matriz n y almacena el resultado <strong>de</strong> operación en D.<br />

2. Regla <strong>de</strong> operación matriz XOR: el resultado es 1 si los dos bits son diferentes. el resultado<br />

es 0 si los dos bits son iguales.<br />

3. Si los operandos S1, S2, D usan formato KnX, KnY, KnM, KnS, solo n = 4 es aplicable.<br />

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

Cuando X0 = ON, MXOR realiza la operación matriz XOR entre los registros <strong>de</strong> 16 bits D0~D2 y<br />

los registros <strong>de</strong> 16 bits D10~D12. El resultado <strong>de</strong> operación entonces es almacenado en los<br />

registros <strong>de</strong> 16 bits D20~D22<br />

X0<br />

Antes <strong>de</strong><br />

la ejecución<br />

Después <strong>de</strong><br />

la ejecución<br />

S1<br />

S 2<br />

D<br />

MXOR D0 D10 D20 K3<br />

D0<br />

D1<br />

D2<br />

D10<br />

D11<br />

D12<br />

D20<br />

D21<br />

D22<br />

b15 b0<br />

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1<br />

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1<br />

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1<br />

0<br />

0<br />

0<br />

0 0<br />

0 0<br />

0 0<br />

MXOR<br />

0 1 1 1 1 1 0 1 0 0 1 0 1<br />

0 1 1 1 1 1 0 1 0 0 1 0 1<br />

0 1 1 1 1 1 0 1 0 0 1 0 1<br />

0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0<br />

0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0<br />

0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0

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

Saved successfully!

Ooh no, something went wrong!