3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E 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
3 - 4 9 7
Program Example 3:
1.
The source value
S
1
is D100=F500, the Max. source value is D0=F3000, the Min. source value
is D2=F200, the Max. destination value is D4=F500 and the Min. destination value is D6=F30.
When X0=On, SET M1162 which means the DSCLP instruction will assume floating point
values. The scaled value will be stored in D10.
2.
Equation: D10 = [(F500 –F200)
×
(F500–F30)]
÷
(F3000–F200) +F30=F80.35. Rounding off
the result into an integer, D10 =F80.
X0
DSCLP
D100
D0
D10
X0
DMOVR
DMOVR
F3000
F200
F500
F500
F30
D0
D2
D4
D6
DMOVR
DMOVR
DMOVR
D100
SET
M1162
Points to note:
1. The range for the 16-bit operand
S
1
: Max. source value
≧
S
1
≧
Min. source value.
-32768~32767. If the value exceeds a boundary value, use the boundary value for the
calculation.
2.
The range for the 32-bit integer operand
S
1
: Max. source value
≧
S
1
≧
Min. source value.
-2,147,483,648~2,147,483,647. If the value exceeds a boundary value, use the boundary
value for the calculation.
3.
The range for 32-bit floating point operand
S
1
: Max. source value
≧
S
1
≧
Min. source value,
according to the range of 32-bit floating point number. If the value exceeds a boundary value,
use the boundary value for the calculation.
4.
The Max. source value should be larger than Min. source value. The Max. destination value
does not need to be larger than Min. destination value.
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...