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

Create successful ePaper yourself

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

3. Instruction Set<br />

9. The 16-bit comparison values used in the 16-bit instruction are signed values. The comparison<br />

values used in the 32-bit instruction are 32-bit signed values (M1162=OFF), or floating-point<br />

numbers (M1162=ON).<br />

10. The 16-bit data or 32-bit data is written into D. If the data length is less than 16 bits or 32 bits,<br />

the bit which does not have a corresponding value is 0. For example, if n is K8, bit0~7 have<br />

corresponding values, and bit15~31 are 0.<br />

11. If the comparison result meets the comparison condition, the corresponding bit is 1. If the<br />

comparison result does not meet the comparison condition, the corresponding bit is 0.<br />

Program example:<br />

When M0 = ON, compare the 16-bit value in D0~D7 with D20~D27 and store the results in D100.<br />

M0<br />

CMPT D0 D20 K8 D100<br />

• Content in D0~D7:<br />

No. D0 D1 D2 D3 D4 D5 D6 D7<br />

Value K10 K20 K30 K40 K50 K60 K70 K80<br />

• Content in D20~D27:<br />

No. D20 D21 D22 D23 D24 D25 D26 D27<br />

Value K12 K20 K33 K44 K50 K66 K70 K88<br />

• After the comparison of CMPT instruction, the associated bit will be 1 if two devices have<br />

the same value, and other bits will all be 0. Therefore the results in D100 will be as below:<br />

D100<br />

Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 Bit8~15<br />

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

H0052 (K82)<br />

3-461

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

Saved successfully!

Ooh no, something went wrong!