RAMP_INT
¶
Bibliothek: Util
The function block RAMP_INT
smoothes the given input signal IN
by limiting its rate of change and then outputs the resulting value in Out
. The parameters ASCEND
and DESCEND
, together with the parameter TIMEBASE
and the call frequency of the function block, determine the smoothing behaviour.
Attention
For the calculations within the function block, CODESYS uses the data type INTEGER
! So also the change in value, given in the output signal, is an integer value. If this behaviour does not meet your requirements, please instead use the function block RAMP_REAL
. RAMP_INT
is a speed-optimized variant or RAMP_REAL
.
See also
Name | Data type | Description |
---|---|---|
IN |
INT |
(Discrete) value of the input signal |
ASCEND |
INT |
Limitation of acceleration: Maximum ascent per time base Example: |
DESCEND |
INT |
Limitation of deceleration: Maximum descent per time base ( Example: |
TIMEBASE |
TIME |
Time base, to which the limitations Example: If Note: If the time base |
RESET |
BOOL |
Reset of the function block
|
Name | Data type | Description |
---|---|---|
OUT | INT |
(Discrete) value of the output signal The value gets stored internally and will be used for the calculation of the ascent and the descent of the input signal. |
Attention
The parameters ASCEND
, DESCEND
and TIMEBASE
, in relation to the call frequency of the function block, might be determined in a way that does not match the sampling theorem. This might lead to a loss of information in the output signal.
Example in CFC