Function blocks, Analogue scaling, Drum level control – Rockwell Automation T8019 Trusted Process Control Algorithm Software Package User Manual

Page 12: Trusted, Process control algorithms t8019, Out ip - ip ip ip , ip pv, max min out

Advertising
background image

Trusted

TM

Process Control Algorithms T8019

Issue 8 Sep 07

PD-T8019

12

2. Function Blocks

2.1. Analogue Scaling

SCALE

PV

OUT

IP

MAX

IP

MIN

OUT

MAX

OUT

MIN

LIMIT

The scale function linearly scales the input value (PV) according to the low input (IP

MIN

), high input

(IP

MAX

), low output (OUT

MIN

) and high output (OUT

MAX

) values. The input value is clamped to the range

IP

MIN

to IP

MAX

. I.e. a PV value less than IP

MIN

results in the IP

MIN

value being used, similarly a value

greater than IP

MAX

results in the IP

MAX

value being used). The output (OUT) value varies linearly

between OUT

MIN

and OUT

MAX

as the input (PV) varies between IP

min

and IP

MAX

. The LIMIT output is to

indicate that the input value (PV) is out of range, i.e LIMIT = IP

MIN

>PV>IP

MAX

, LIMIT is set TRUE if PV

is out of range.

IP

MAX

, IP

MIN

, OUT

MAX

and OUT

MIN

are typically constants but may, in practise, use any analogue or

register value.

(

)

(

)

(

)

MIN

MIN

MAX

MIN

MAX

MIN

MAX

MIN

OUT

OUT

OUT

IP

-

IP

IP

IP

,

IP

PV,

Max

Min

OUT

+

×

=

Note: PV, IP

MAX

, IP

MIN

, OUT

MAX

and OUT

MIN

have to be of type REAL, the result (OUT) is returned as

type REAL and LIMIT is of type BOOLEAN.

If IP

MAX

< IP

MIN

, the function is to assume that the values have been reversed and “swap” the values.

Similarly, if OUT

MAX

< OUT

MIN

the two values are to be swapped. In both cases, the “reversed” error

counter is to be incremented each time the function has to swap the parameters. All range parameters
(IP

MAX

, IP

MIN

, OUT

MAX

, OUT

MIN

) must be finite, i.e. not ±infinities or NaNs. Behaviour is not defined for

any other values.

If IP

MAX

= IP

MIN

, the function is to set OUT to OUT

MIN

, LIMIT to FALSE and increment the “Zero Divide”

error counter to indicate that a divide by zero error would have occurred.

If PV is a NaN, the function is to set OUT to OUT

MIN

, LIMIT to FALSE and increment the “Param” error

counter. If PV is not a NaN and overflow or underflow conditions occur during the execution of the
function, the function is to set OUT to OUT

MAX

or OUT

MIN

respectively, LIMIT to FALSE and increment

the corresponding error counter. If both overflow and underflow conditions occur, the function is to set
OUT to OUT

MIN

, LIMIT to FALSE and increment both corresponding error counters.

Advertising