Download ScadaWorks Technical Reference Manual

Transcript
586
ScadaWorks Technical Reference Manual User's Guide
Limit Rise And Fall Rate Of An Analog Value -- ratelim()
Type
C Function Block
Function
Limits the rate of change for an input signal.
Syntax
ANA Ratelim( REAL in, REAL up, REAL down, BOO enb );
FBD
Parameters
in: REAL (Input) Real value on which to limit the rate variation.
up: REAL (UpRate) The upper limit rate, in units/minute.
down: REAL (DownRate) The lower limit rate, in units/minute.
enb: BOO (Enable) TRUE enables rate limitation action.
Return Value out: REAL (Output) When Enable is FALSE, Output equals Input. When Enable is TRUE,
Output rate is limited by UpRate or DownRate.
rl: BOOL (RisingLimit) TRUE when block limits a rising Input.
fl: BOOL (FallingLimit) TRUE when block limits a falling Input.
Remarks
When enb is TRUE:
When the Input signal changes faster than the UpRate limit, the RisingLimit is TRUE and
Output changes at the UpRate rate. When the Input signal changes slower than the DownRate
limit, the FallingLimit is TRUE and Output changes at the DownRate rate. When the Input
signal changes at a rate between UpRate and DownRate, Output tracks Input.
When enb is FALSE:
The Output tracks the Input.
To use the function block in structured text , you must declare a function block instance for
each operation used.
ST Example
(* limiter is a function block instance of ratelim *)
(* limit rise to 100 degrees per minute *)
(* limit fall to 50 degrees per minute *)
result := limiter( rampControl, 100.0, 50.0, rampLimiter )
(* assign to the core control analog output *)
rampOutput := limiter.out;
(* record whether we are limiting or not *)
limitRisingFlag := limiter.rl;
limitFallingFlag := limiter.fl;