Calculate the linear relationship, Calculate the out-of-range limits, Ladder logic – Rockwell Automation 1746-FIO4V SLC 500 Fast Analog I/O/ User Manual User Manual

Page 45

Advertising
background image

Publication 1746-UM009B-EN-P - September 2007

Write Ladder Logic 45

Calculate the Linear Relationship

Use the following equations to express the linear relationship between
the input value and the resulting scaled value.

Calculate the Out-of-range Limits

Use the following equation to compute low and high out-of-range
limits.

Ladder Logic

We present two examples for programming the processor.

The first example uses standard math instructions available in any
SLC 500 processor. This ladder logic prevents a processor fault by
unlatching the mathematical overflow bit S2:5/0 before the end of the
scan.

The second example uses the scaling instruction (SCL) available in
SLC 5/02 (and later) processors. The rate parameter is calculated by
multiplying the slope by 10,000. If the slope exceeds 3.2767, you
cannot use the SCL instruction.

Scaled value = (input value x slope) + offset

Slope = (scaled max – scaled min) / (input max – input min)

Offset = scaled min – (input min x slope)

(500 – 100) / (4095 – 0) = 400/4095 = 0.0977

(100 – (0 x [400/4095]) = 100

Scaled value = (input value x [0.0977]) + 100

Input value = (scaled value – offset) / slope

low limit: (275 – 100) / (0.0977) 1750 counts

~

high limit: (300 – 100) / (0.0977) 2750 counts

~

rate = (400/4095) x 10,000 = 977

(The slope is 0.0977 so you can use the SCL instruction.)

Advertising
This manual is related to the following products: