Ramp (FB)¶
FUNCTION_BLOCK Ramp
Short Description¶
Limitation of the signal change of one analog input signalTypical application: damping / filtering
Portrayal¶
Interfaces¶
Inputs¶
Name Datatype
Range
Init-Value
Function
rIn REAL Analog value input
Outputs¶
Name Datatype
Range
Init-Value
Function
rOut REAL Analog value output
xRampActive BOOL Status - Ramp
Setpoints / Parameters¶
Name Datatype
Range
Init-Value
Function
rVariation REAL 0 ... 100 Maximum change per unit of time
tTime TIME T#10s Unit of time
rInitValue REAL 0 Init-Value
eInitial eInit eInit.InputValue Selection of the initial value
tInitDelay TIME T#5s Start delay
Functional Description¶
General¶
The analog input signal rIn is permanently monitored for value changes.
If the signal at the analog value output rOut differs from the input signal, it follows the input signal with the maximum change rate.
Setting the unit of time tTime
This setpoint / parameter may only accept values >= 0.
The maximum signal change rate is calculated by the quotient of the setpoints / parameters rVariation and tTime (tTime > 0s).
The maximum signal change rate is calculated by the quotient of the setpoints / parameters rVariation and the task cycle time (tTime = 0s).
The maximum signal change rate is effective for positive and negative changes at the input value rIn.

Type of initialization eInitial¶
This setpoint / parameter defines the type of initialization of the analog value input rIn.
The initialization is performed once after each CPU restart.
The following options are possible:
Art Initialization value
Note
eInit.InitValue rInitValue Configurable initial value
eInit.InputValue rIn Input value
eInit.InputValueDelayed rIn Delayed input value
Independent of this, the initialization is continuously performed if the setpoint / parameter tTime has the value T#0s.
Visualization¶
Information¶
Element Authors
Date
Version Notes
Function
Adam Bartod 04.2016 1.0 Initial version
Programming
Adam Bartod 04.2016 1.0 Initial version
Test Jochen Reu 10.2017 1.0 Initial version
Documentation
Jochen Reu 10.2017 1.0 Initial version
Codesys¶
- InOut:
Scope Name Type Initial Comment Input rIn REAL Analog value input
rVariation REAL 100 Maximum change per unit of time
tTime TIME TIME#10s0ms Unit of time
rInitValue REAL 0 Init-Value
eInitial eInit eInit.InputValue Selection of the initial value
tInitDelay TIME TIME#5s0ms Start delay
Output rOut REAL Analog value output
xRampActive BOOL Status - Ramp