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

33 D RCL P Rotation Left with Carry<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 RCL, RCLP: 5 steps<br />

D * * * * * * * * DRCL, DRCLP: 9 steps<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 />

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

Explanations:<br />

1. This instruction rotates bit status of the device D together with M1022 to the left 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 (RCLP, DRCLP).<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 left, as shown in the figure below. The bit marked with ※ will<br />

be sent to carry flag M1022.<br />

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

X0<br />

RCLP<br />

D10<br />

K4<br />

Rotate to the left<br />

M1022<br />

Carry<br />

flag<br />

M1022<br />

Carry<br />

flag<br />

Upper bit<br />

Lower bit<br />

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

16 bits<br />

After one rotation<br />

Upper bit<br />

to the left<br />

Lower bit<br />

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

3-94

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

Saved successfully!

Ooh no, something went wrong!