Table of Contents

Ramp with a constant time of change

Block name

B85_VARIABLESLEWRATELIMIT

ST call

PROGRAM TEST B85
   VAR
 REAL1,REAL2 : REAL;
 FB : LIB.CORE.V1_0.B85_VARIABLESLEWRATELIMIT;
   END_VAR
 FB(IN:=REAL1, TDOWN:=T#3S ,TUP:=T#3S,OUT=>REAL2);    
END_PROGRAM

Library

LIB\CORE

Version

V1.0

Description

The block prevents the signal from rapid changes. The output change is recalculated to travel over a constant time of signal rise (Tup)  or fall (Tdown).

Inputs

InputTypeDescription Default value
IN REALInput signal0
TDOWNTIMEFall time 30s
TUP TIMERise time 30s

Outputs

OutputTypeDescription
OUT REALFiltered output signal
BS BOOLSign of the output signal
NBS BOOLNegated sign of the output signal

Function

The block converts the input in to the output out with time delay as follows: every falling change at in causes a linear decline out=in in time of Tdown. The same is for a rising signal at in: it causes linear rise of y so that out=in in Tup time, see Fig. below. Each signal travel direction is thus controlled separately.

If Tdown=0 then any falling edge of in is transferred immediately to out, accordingly for the rising signal and Tup=0. At program start, the input in is copied to the output.

The output sign indicates the sign of the output signal out. If y>= 0 then sign=true, otherwise sign=false.

Function in case of wrong setting

If Tdown⇐ 0 then Tdown=0, if Tup⇐ 0 then Tup=0.

B85 Situation for Tup=3s. Note that the time of change is equal to Tup for any change of the input in.

Application example

The block is used for slow opening of valves at steam heat exchangers. The falling time is 0 so that the valve shuts down immediatelly according to the PI controller, while the rising time may be several minutes for the valve to open slowly even if the controller gives fast output response. This is to prevent rapid changes of pressure and temperature in the exchanger piping.