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

API Mnemonic Operands Function<br />

26 WAND P Logical Word AND<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 WAND, WANDP: 7 steps<br />

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

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

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

S 1 : Source data device 1 S 2 : Source data device 2 D: <strong>Operation</strong> result<br />

Explanations:<br />

1. This instruction conducts logical AND operation of S 1 and S 2 in 16-bit mode and stores the<br />

result in D<br />

2. For 32-bit operation please refer to DAND instruction..<br />

Program Example:<br />

When X0 = ON, the 16-bit source D0 and D2 are analyzed and the operation result of the logical<br />

AND operation is stored in D4.<br />

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

SE<br />

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

X0<br />

WAND<br />

D0 D2 D4<br />

Before<br />

execution<br />

b15<br />

D0 1 1 1 1 1 1 1 1<br />

D2<br />

WAND<br />

b00<br />

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

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

After<br />

execution<br />

D4<br />

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

3-83

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

Saved successfully!

Ooh no, something went wrong!