EasyManua.ls Logo

Delta VP3000 Series - Page 372

Delta VP3000 Series
714 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 7 Second Development PlatformVP3000
363
API Instruction code Operand Function
202 SCAL P S
1
, S
2
, S
3
, n
Proportional calculation
Type
Operand
Bit devices Word devices
16-bit instruction (9 steps)
SCAL
Continuous
execution
type
SCALP
Pulse
execution
type
32-bit instruction
- - - -
Associated flag: none
X Y M K H KnX KnY KnM T C D
S
1
S
2
S
3
D
Caution for using operand
The range of S
1
, S
2
, S
3
is -32768–32767
If D > 32,767, then D = 32,767
If D < -32,768, then D = -32,768
Description
S
1
: source value
S
2
: slope (unit: 0.001)
S
3
: offset
D: destination devices
Operation formula in the instruction: D = (S
1
× S
2
) ÷ 1,000 + S
3
Users have to obtain S
2
and S
3
(decimals are rounded up into 16-bit integers) by using the
slope and offset formulas below.
Formula for slope: S
2
= [(max. destination value – min. destination value) ÷ (max. source
value – min. source value)] × 1,000
Formula for offset: S
3
= min. destination value – min. source value x S
2
÷ 1,000
Using the formula for slope must be noted that the max. source value has to be greater than
the min. source value, and it’s not limited that the max. destination value to be greater than
the min. destination value.
The output curve is shown as the figure:

Table of Contents

Related product manuals