Calculate the linear relationship – Rockwell Automation 1746-FIO4V SLC 500 Fast Analog I/O/ User Manual User Manual
Page 52
Publication 1746-UM009B-EN-P - September 2007
52 Write Ladder Logic
Range-check an Analog
Input and Scale It for an
Output
This example checks the range of an analog input and scales it for use
as an output. An 1746-FIO4V module is placed in slot 1 of an SLC 500
system. A 4…20 mA signal representing 0…200 PSI from a pressure
sensor is delivered to input channel 0. The input value is checked to
ensure it remains within range. If the ladder logic detects an
out-of-range condition, it sets a flag bit.
The input signal is then scaled and delivered as a 0…1.0V output
signal to a panel pressure meter connected to output channel 0.
The graph displays the linear relationship between the analog input
signal and the 0…1.0 output signal delivered to the panel pressure
meter.
Calculate the Linear Relationship
Use the following equations to compute the linear relationship
between the input values (from the input image table) and resulting
scaled values for the 0…1V output:
1.0 volt = 3276
(scaled max)
0 volt = 0
(scaled min)
Scaled
Value
Input Value
(from data table)
2047
(input max)
409
(input min)
Scaled value = (input value x slope) + offset
Slope = (scaled max – scaled min) / (input max – input min)
Offset = scaled min – (input min x slope)
(3276 – 0) / (2047 – 409) = 3276 / 1638 = 2.0
0 – (409 x 2) = –818
Scaled value = (input value x 2) – 818
Since the slope is less than 3.2767, you can use the SCL instruction.