Rate Limit

This function creates an output that follows the input but prevents the output from changing faster that the specified rates depending on direction. The input pins are in, disable, startInterval, startVal, upRate, downRate and the output pin is Out.

Logic Inputs

Input Name Input Value Logic Value Description
disable unconnected 0 Function runs.
  VAL != 0.0 1 Function disabled
  0 0 Function runs.
  invalid 0 Function runs.

Analog Inputs

Range
Input Name Low High Input Value Description
in >=- infinity <+ infinity unconnected In= 0.0
invalid In = Invalid
Valid In = value
startInterval 0 65535 unconnected Startinterval = 0
(sec) invalid Start interval = 0
0<val<max float Limit Start interval value 0 to 65535.0 seconds
<0 StartInterval = 0
startVal >=- infinity <+ infinity Output assumes the start value when the function is disabled.
unconnected If disable=1, then Out=in
invalid If disable=1, then Out=in
upRate 0< <+ infinity unconnected No limit on up rate
invalid No limit on up rate
0 No limit on up rate
<0 upRate = 0 (no limit on up rate)
downRate 0< <+ infinity unconnected no limit on down rate
invalid no limit on down rate
0 no limit on down rate
<0 downRate=0 (no limit on up rate)

Output

Output Name Range Description
OUTPUT Any floating point value Rate limit

Operation

The value startInterval (sec) limits the output after the rate limit function is enabled (disable input set to 0) and the startInteval time is still in process. Ratelimit uses the startVal input as the default output during disable.

If the rate limit function is disabled (disable input set to 1) the output is set to StartVal.

After rateLimit is enabled (disable set to 0) the StartInterval timer counts down from the StartInterval number of seconds and during this time the output is rate limited.

When the timer expires (and ratelimit is enabled) the out value is exactly what the input (in) is set to and there is no longer rate limiting.

If the StartInterval seconds is set to 0 (and ratelimit is enabled), then the output is Ratelimited.

During Ratelimit the output moves at a maximum allowed rate toward the new input value each second.

UpRate controls the rate in a more positive direction, and DownRate controls the rate in a more negative direction. UpRate set to zero means the uprate limit is not enforced. DownRate set to zero means the downrate limit is not enforced.

Out is set to StartVal before rate limiting is enabled (disable set to 0).

From iteration to iteration, the Function Block keeps track of the start timer. On power/up/reset, this is set to the StartInterval.