E L C P r o g r a m m i n g M a n u a l
F o r m o r e i n f o r m a t i o n v i s i t : w w w. e a t o n . c o m M N 0 5 0 0 3 0 0 3 E
3 - 4 9 2
API Mnemonic
Operands
Function
202
SCA L
P
S
1
, S
2
, S
3
, D
Calculation of Proportional Value
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K
H KnX
KnY
KnM KnS T
C
D
E
F
S
1
*
*
*
S
2
*
*
*
S
3
*
*
*
D
*
SCAL,SCLAP: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32
16
P
32 16
P
Operands:
S
1
: Source value
S
2
:
Slope
.
The units of S
2
are 0.001
S
3
:
Offset
D
:
Destination address
The range for operands
S1, S2, S3
is -32767~32767.
Description:
1. Equation:
D
= (
S
1
×
S
2
)
÷
1000+
S
3
2.
The values for
S
2
and
S
3
must be calculated using the slope and offset equations below with
decimal rounding to get 16-bit integer values.
3. Slope
equation:
S
2
= [(Max. destination value – Min. destination value)
÷
(Max. source value –
Min. source value)]
×
1000
4. Offset
equation:
S
3
=Min. destination value – (Min. source value
×
(
S
2
÷
1000))
5.
The output curve is as follow:
D
1
Min. destination value
Max. Destination value
Destination value
Source value
Max.
source value
Min.
source value
Program Example 1:
1.
S
1
is 500,
S
2
is 168 and
S
3
is –4. When X0=On, SCAL instruction executes and the scaled
value is stored in D0.
2. Equation
:
D0 = (500
×
168 )
÷
1000+ (-4)=80
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...