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.

3. Instruction Set<br />

Program example 1:<br />

1. When M1168 = OFF (in BCD mode) and X0 = ON, the 4 th (thousand) and 3 rd (hundred) digit<br />

of the decimal value in D10 start to move to the 3 rd (hundred) and 2 nd (ten) digit of the<br />

decimal value in D20. 10 3 and 10 0 of D20 remain unchanged after this instruction is executed.<br />

2. When the BCD value exceeds the range of 0 ~ 9,999, PLC detects an operation error and will<br />

not execute the instruction. M1067, M1068 = ON and D1067 stores the error code OE18<br />

(hex).<br />

M1001<br />

X0<br />

M1168<br />

SMOV<br />

D10 K4 K2 D20 K3<br />

10 3 10 2 10 1 10 0<br />

No variation<br />

No variation<br />

10 3 10 2 10 1 10 0<br />

D10(BIN 16bit)<br />

Auto conversion<br />

D10(BCD 4 digits)<br />

Shift move<br />

D20(BCD 4 digits)<br />

Auto conversion<br />

D20(BIN 16bit)<br />

If D10 = K1234, D20 = K5678 before execution, D10 remains unchanged and D20 = K5128<br />

after execution.<br />

Program example 2:<br />

When M1168 = ON (in BIN mode) and SMOV instruction is in use, D10 and D20 will not be<br />

converted in BCD format but be moved in BIN format (4 digits as a unit).<br />

M1000<br />

X0<br />

M1168<br />

SMOV<br />

D10 K4 K2 D20 K3<br />

Digit 4 Digit 3 Digit 2 Digit 1<br />

D10(BIN 16bit)<br />

Shift move<br />

D20(BIN 16bit)<br />

Digit 4 Digit 3 Digit 2 Digit 1<br />

No variation<br />

No variation<br />

If D10 = H1234, D20 = H5678 before execution, D10 remains unchanged and D20 = H5128 after<br />

execution.<br />

3-65

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

Saved successfully!

Ooh no, something went wrong!