Pid control with analog i/o scaling – Rockwell Automation 1746-FIO4V SLC 500 Fast Analog I/O/ User Manual User Manual
Page 56

Publication 1746-UM009B-EN-P - September 2007
56 Write Ladder Logic
PID Control with Analog I/O
Scaling
With the combination of PID and SCL (scale) instructions or PID and
standard math instructions, you can write and display ladder logic in
engineering units such as PSI or °C.
Follow these steps to display ladder logic in engineering units.
1. Scale the analog input PV by calculating the slope (or rate) of
the analog input range.
For example, an input range such as 1…5V dc has a
corresponding scaled range of 409…2047. You would scale the
409…2047 against 0…16383 for a slope of 10 (SCL rate of
100,000).
2. Scale the analog output CV by calculating the slope (or rate) of
the analog output range.
For example, an output range such as 4…20 mA has a
corresponding decimal (scaled) range of 6242…31,208. You
would scale the 6242…31,208 against 0…16,383.
Here are some useful rate and offset parameters for the SCL
instruction when scaling analog output ranges.
IMPORTANT
You cannot use the SCL instruction for scaling inputs if input
rates (slope x 10,000) are too large (exceed 32,767). You must
use standard math instructions instead.
For this output
range
Compute the slope as follows
Compute offset as follows
4…20 mA
scaled max – scaled min
input max – input min
scaled min – [input min x slope]
31208 – 6242 = 24966 = 1.5238
16383 – 0
16383
= 6242 – [0 x 1.5238]
= 6242
SCL Parameter
0…20 mA
4…20 mA
0…5V dc
1…5V dc
0…10V dc
Rate
(slope x 10,000)
19,049
15,239
10,000
8,000
19,999
Offset
0
6242
0
3277
0