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

24 D INC P Increment<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 INC, INCP: 3 steps<br />

D * * * * * * * * DINC, DINCP: 5 steps<br />

Operands:<br />

D: Destination device<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 />

Explanations:<br />

1. If the instruction is not used in pulse execution mode, the content in the designated device D<br />

will plus “1” in every scan period<br />

2. When INC is executed, the content in D will be incremented. However, in 16-bit instruction, if<br />

+32,767 is reached and “1” is added, it will write a value of –32,768 to the destination. In<br />

32-bit instruction, if +2,147,483,647 is reached and “1” is added, it will write a value of<br />

-2,147,483,648 to the destination.<br />

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

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

5. The operation results will not affect M1020 ~ M1022.<br />

Program Example:<br />

When X0 is triggered, the content of D0 will be incremented by 1.<br />

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

SE<br />

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

X0<br />

INCP<br />

D0<br />

3-81

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

Saved successfully!

Ooh no, something went wrong!