RAMPPLCopen motion icon

FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. block - Limit the ascendance or descendance of a signal

Inputs

IN : REAL     Input signal
ASC : REAL    Maximum ascendance during time base
DSC : REAL    Maximum descendance during time base
TM : TIME     Time base
RST : BOOL    Reset

Outputs

OUT : REAL    Ramp signal

Time diagram

Remarks

Parameters are not updated constantly. They are taken into account when only:

  • the first time the block is called
  • when the reset input (RST) is TRUE

In these two situations, the output is set to the value of IN input.

ASC and DSC give the maximum ascendant and descendant growth during the TB time base. Both must be expressed as positive numbers.

In FFLD language, the operation is executed only if the input rung (EN) is TRUE. The output rung (ENO) keeps the same value as the input rung.

ST Language

(* MyRamp is a declared instance of RAMP function block *)
MyRamp (IN, ASC, DSC, TM, RST);
OUT := MyBlinker.OUT;

FBD Language

FFLD Language

(* The function is executed only if EN is TRUE *)
(* ENO keeps the same value as EN *)

IL Language

(* MyRamp is a declared instance of RAMP function block *)
Op1: CAL MyRamp (IN, ASC, DSC, TM, RST)
FFLD  MyBlinker.OUT
STClosed "Structured text" A high-level language that is block structured and syntactically resembles Pascal  OUT