Publication 1763-RM001C-EN-P - October 2009
Math Instructions
197
SCP - Scale with
Parameters
Instruction Type: output
The SCP instruction produces a scaled output value that has a linear
relationship between the input and scaled values. This instruction solves
the following equation listed below to determine scaled output:
y = [(y
1
- y
0
)/(x
1
- x
0
)](x - x
0
) + y
0
Addressing Modes and File Types can be used as shown in the following
table:
SCL Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 82.
Parameter
Data Files
Function Files
CS - Com
m
s
IOS - I/O
DL
S -
D
a
ta
L
o
g
Address
(1)
Mode
Address Level
O
I
S
B
T,
C
, R
N
F
ST
L
MG, PD
RI/RIX
PLS
RTC
HSC
PTO, PW
M
STI
EII
BH
I
MMI
LCD
Immedia
te
Dir
e
c
t
Indir
e
ct
Bit
Wo
rd
Long W
o
rd
Ele
m
ent
Source
•
•
•
•
•
•
•
•
•
Rate
•
•
•
•
•
•
•
•
•
•
Offset
•
•
•
•
•
•
•
•
•
•
Destination
•
•
•
•
•
•
•
•
•
(1) See Important note about indirect addressing.
IMPORTANT
You cannot use indirect addressing with: S, ST, MG, PD,
RTC, HSC, PTO, PWM, STI, EII, BHI, MMI, CS, IOS, and
DLS files.
IMPORTANT
Do not use the High Speed Counter Accumulator
(HSC.ACC) for the Destination parameter in the SCL
instruction.
SCP
Scale w/Parameters
Input
N7:0
0<
Input Min.
N7:1
0<
Input Max.
N7:2
0<
Scaled Min.
N7:3
0<
Scaled Max.
N7:4
0<
Output
N7:5
0<
SCP
Execution Time for the SCP Instruction
Controller
Data Size
When Rung Is:
True
False
MicroLogix 1100
word
331.27
μ
s
0.87
μ
s
long word
337.2
μ
s
0.87
μ
s
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive