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 />

API Mnemonic Operands Function<br />

32 D RCR P Rotation Right with Carry<br />

Controllers<br />

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

SE<br />

<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 RCR, RCRP: 5 steps<br />

D * * * * * * * * DRCR, DRCRP: 9 steps<br />

n * *<br />

PULSE 16-bit 32-bit<br />

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

<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 />

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

SE<br />

Operands:<br />

D: Device to be rotated n: Number of bits to be rotated in 1 rotation<br />

Explanation:<br />

1. This instruction rotates bit status of the device D together with M1022 to the right for n bits.<br />

2. The status of the last bit rotated (marked with ※) is moved to the carry flag M1022.<br />

3. This instruction is generally used in pulse execution mode (RCRP, DRCRP).<br />

4. If operand D uses index F, only a 16-bit instruction is available.<br />

5. If operand D is specified as KnY, KnM or KnS, only K4 (16-bit) or K8 (32-bit) is valid.<br />

6. Valid range of operand n: 1≤ n ≤16 (16-bit), 1≤ n ≤32 (32-bit)<br />

Program Example:<br />

When X0 goes from OFF to ON, the 16 bits (4 bits as a group) in D10 together with carry flag<br />

M1022 (total 17 bits) will rotate to the right, as shown in the figure below. The bit marked with ※<br />

will be moved to carry flag M1022<br />

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

SE<br />

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

X0<br />

RCRP<br />

D10<br />

K4<br />

D10<br />

D10<br />

Rotate to the right<br />

Upper bit<br />

Lower bit<br />

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

16 bits<br />

After one rotation<br />

Upper bit<br />

to the right<br />

Lower bit<br />

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

0<br />

1<br />

M1022<br />

Carry<br />

flag<br />

M1022<br />

Carry<br />

flag<br />

3-93

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

Saved successfully!

Ooh no, something went wrong!