Rockwell Automation 1336T Function Block Prog. Manual, Series A/B User Manual
Page 86

Function Block Library
4–24
1336 FORCE — 5.9 August 1995
3. If Min Val < Input and < Max Val:
Calculate x
i
, x
i+1
from Input, where x
i
≤
Input
≤
x
i+1
.
Calculate y
i
, y
i+1
from x
i
, x
i+1
.
Output =
{
[(y
i+1
– y
i
)
×
(Input – x
i
)] / (x
i+1
– x
i
)
}
+ y
i
@Max Lim = @Min Lim = false.
PARAMETERS
DATA TYPE
LINKABLE
DEFAULT VALUE
RANGE
Input
Signed Integer
Yes
0
±
32767
Smp Val1 – 5
Signed Integer
No
0
±
32767
Min Val
Signed Integer
No
0
±
32767
Max Val
Signed Integer
No
4
±
32767
@Min Lim
Logic Output
No
—
True/False
@Max Lim
Logic Output
No
—
True/False
Output
Signed Integer
No
—
±
32767
EXAMPLES
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
Input
2
14
±
32767
±
32767
Smp Val1
2
2
16383
16383
Smp Val2
8
8
32767
32767
Smp Val3
4
4
0
0
Smp Val4
12
12
8192
8192
Smp Val5
10
10
– 16383
– 16383
Min Val
0
0
– 16383
– 32767
Max Val
16
16
+ 16383
+ 32767
@Min Lim
0
0
– 16383
– 32767
@Max Lim
16
16
+ 16383
+ 32767
Output
5
11
See plot
See plot
Examples 1
&
2
2
6
4
2
6
8
10
8
12
Y-Axis
Ex 1 Input
Ex 2 Input
Smp Val5
Smp
Val4
Smp
Val2
Smp
Val3
Smp
Val1
10
12
14
4
Y-Axis coordinate Smp Val1 is located at X-Axis coordinate Min Val.
Y-Axis coordinate Smp Val5 is located at X-Axis coordinate Max Val.
Smp Val2, Smp Val3,
&
Smp Val4, are located at equal X-Axis coordinates between Smp Val1
&
Smp Val5.
FUNCTION interpolates to determine the Y-Axis coordinate of the Input.
16
X-Axis
FUNCTION
(continued)