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>SX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> – Programming<br />

API Mnemonic Operands Function<br />

203 D SCLP P<br />

Type<br />

Parameter proportional<br />

calculation<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 1 * * *<br />

S 2 *<br />

D *<br />

Operands:<br />

S 1 : Source value S 2 : Parameters D: <strong>Operation</strong> result<br />

SCLP, SCLPP: 7 steps<br />

DSCLP, DSCLPP: 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 />

Explanations:<br />

1. SCLP instruction performs a proportional calculation according to the internal slope equation<br />

as well as the parameters set in this instruction.<br />

2. Settings of S 2 for 16-bit instruction (occupies 4 consecutive devices):<br />

Device No. Parameter Range<br />

S 2 Max. source value -32768~32767<br />

S 2 +1 Min. source value -32768~32767<br />

S 2 +2 Max. destination value -32768~32767<br />

S 2 +3 Min. destination value -32768~32767<br />

3. Settings of S 2 for 32-bit instruction (occupies 8 consecutive devices).<br />

Device No.<br />

Parameter<br />

S 2 、S 2 +1 Max. source value<br />

S 2 +2、3<br />

S 2 +4、5<br />

S 2 +6、7<br />

Min. source value<br />

Max. destination value<br />

Min. destination value<br />

Integer<br />

Range<br />

-2,147,483,648~2,147,483,647<br />

Floating point number<br />

Range of 32-bit<br />

floating point number<br />

4. <strong>Operation</strong> equation in the instruction: D = [(S 1 – min. source value) × (max. destination value –<br />

min. destination value)] ÷ (max. source value – min. source value) + min. destination value<br />

5. The equation to obtain the operation equation of the instruction:<br />

y = kx + b<br />

where<br />

y = Destination value (D)<br />

k = Slope = (max. destination value – min. destination value) ÷ (max. source value – min.<br />

source value)<br />

x = Source value (S 1 )<br />

b = Offset = Min. destination value – Min. source value × slope<br />

3-456

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

Saved successfully!

Ooh no, something went wrong!