Addressing and scaling outputs, Addressing and scaling outputs -8, Calculating the linear relationship -8 – Rockwell Automation 1746-XXXX SLC 500 4-Channel Analog I/O Modules User Manual User Manual
Page 70: Calculating the linear relationship

Publication 1746-UM005B-EN-P - June 2004
6-8 Programming Examples
Addressing and Scaling
Outputs
We are making the following assumptions:
•
The NIO4I is located in slot 2 of a SLC 500 system.
•
An actuator from a flow control valve is wired to output channel
0.
•
The actuator accepts a 4 mA to 20 mA signal proportional to 0 to
100% of the valve’s opening. For this example the signal actuator
can not receive a signal out of the 4 mA to 20 mA range.
•
The percentage of valve opening is manually input to the SLC.
The following graph displays the linear relationship.
Calculating the Linear Relationship
Use the following equations to calculate the scaled output value:
Scaled value = (input value x slope) + offset
Slope = (scaled max. - scaled min.) / (input max. - input min.)
(31,208 - 6,242) / (100-0) = 24,966/100
Offset = scaled min. - (input min. x slope)
6,242 - (0 x (24,966/100)) = 6,242
Scaled value = (input value x (24,966/100)) + 6,242
Scaled
Value
Input Value
(input min.)
100%
(input max.)
0%
20 mA = 31208
(scaled max.)
4 mA = 624 2
(scaled min. )