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.

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

API Mnemonic Operands Function<br />

179 D WSUM P<br />

Type<br />

Sum of multiple<br />

devices<br />

Controllers<br />

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

SE<br />

Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F<br />

S * * *<br />

n * * *<br />

D * * *<br />

WSUM, WSUMP: 7 steps<br />

DWSUM, DWSUMP: 13<br />

steps<br />

PULSE 16-bit 32-bit<br />

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

<strong>SA2</strong><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 SE SE <strong>SX2</strong><br />

Operands:<br />

S: Source device n: Data length to be summed up D: Device for storing the result<br />

Explanations:<br />

1. WSUM instruction sums up n devices starting from S and store the result in D.<br />

2. If the specified source devices S are out of valid range, only the devices in valid range will be<br />

processed.<br />

3. Valid range for n: 1~64. If the specified n value is out of the available range (1~64), PLC will<br />

take the upper (64) or lower (1) bound value as the set value.<br />

Program example:<br />

When X10 = ON, 3 consecutive devices (n = 3) from D0 will be summed up and the result will be<br />

stored in D10<br />

X10<br />

WSUM D0 K3 D10<br />

(D0+D1+D2)<br />

D10<br />

D0<br />

K100<br />

D1<br />

K113<br />

Result: D10<br />

K338<br />

D2<br />

K125<br />

3-406

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

Saved successfully!

Ooh no, something went wrong!