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.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

API Mnemonic Operands Function<br />

41 DECO P Decode<br />

Controllers<br />

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

SE <strong>SX2</strong><br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F DECO, DECOP: 7 steps<br />

S * * * * * * * * * * *<br />

D * * * * * * * *<br />

n * *<br />

PULSE 16-bit 32-bit<br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

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

SE<br />

SE<br />

SE<br />

Operands:<br />

S: Source device to be decoded D: Device for storing the result n: Number of consecutive<br />

bits of S<br />

Explanation:<br />

1. The instruction decodes the lower “n” bits of S and stores the result of “2 n ” bits in D.<br />

2. This instruction is generally used in pulse execution mode (DECOP).<br />

3. When operand D is a bit device, n = 1~8, when operand D is a word device, n = 1~4<br />

Program Example 1:<br />

1. When D is used as a bit device, n = 1 ~ 8. Errors will occur if n = 0 or n > 8.<br />

2. If n = 8, the decoded data is 2 8 = 256 bits data.<br />

3. When X20 goes from OFF to ON, the data of X0~X2 will be decoded to M100~M107.<br />

4. If the source data is 3, M103 (third bit from M100) = ON.<br />

5. After the execution is completed, X20 is turned OFF. The decoded results or outputs will retain<br />

their operation.<br />

<strong>SX2</strong><br />

X20<br />

DECOP X0 M100 K3<br />

X2 X1 X0<br />

0 1 1<br />

4 2 1<br />

3<br />

7 6 5 4 3 2 1 0<br />

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

M107 M106 M105 M104 M103 M102 M101 M100<br />

3-104

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

Saved successfully!

Ooh no, something went wrong!