Analog Control Blocks > Enhanced Ramp function block

Enhanced Ramp function block configuration and execution

Reference the target function block

The Enhanced Ramp function block allows you to specify parameters to be ramped in a target function block. These parameters are specified through the configuration of external reference parameters in the Enhanced Ramp function block. You must specify the MODE parameter of the target function block, as well as the parameter that should be ramped in the target function block when it is in the respective mode. The Enhanced Ramp function block can ramp target function block parameters in the AUTO, MAN, RCAS, ROUT, and LO modes, but are not permitted when the target function block mode is CAS.

The Enhanced Ramp function block includes the following external reference parameters:
External reference parameter Description Mode Example
REF_MODE The target function block mode parameter. This parameter must be configured. n/a PID1/MODE
REF_RAMP_AUTO The target function block parameter to be ramped when its mode is: AUTO PID1/SP
REF_RAMP_LO LO PID1/TRK_VAL
REF_RAMP_MAN MAN PID1/OUT
REF_RAMP_RCAS RCAS PID1/RCAS_IN
REF_RAMP_ROUT ROUT PID1/ROUT_IN
Tip

For ramp modes that are not used, specify #IGNORE to prevent a warning message from being generated during download.

Specify the ramp type

Use the ERAMP_TYPE parameter to indicate whether to use the time duration or the ramp rate for ramp calculation:
  • Specify the Use Time parameter option of the ERAMP_TYPE parameter to use the configured ERAMP_TIME parameter value for ramp calculation.
  • Specify the Use Rate parameter option of the ERAMP_TYPE parameter to use the configured ERAMP_RATE parameter value for ramp calculation.

You can specify the time units for ramp calculation with the TIME_UNIT parameter.

Obey the limits option

In some cases, it is desirable to enforce limits when ramping by specifying the Obey the limits option of the ERAMP_OPTS parameter. If the Obey the limits option is enabled, you can configure a low limit (LO_LIM) and a high limit (HI_LIM) to be used.

  • Low limit (LO_LIM) – The minimum value allowed for:
    • The IN and ERAMP_END_VALUE parameters of the ramp
    • The OUT parameter
  • High limit (HI_LIM) – The maximum value allowed for:
    • The IN and ERAMP_END_VALUE parameters of the ramp
    • The OUT parameter

An entry or value that is lower than LO_LIM or higher than HI_LIM is clamped to the configured limit value. By default, the Obey the limits option is disabled.

Variable endpoint option

The Variable endpoint option of the ERAMP_OPTS parameter allows for the execution of a ramp without a static endpoint.

If the Variable endpoint option of the ERAMP_OPTS parameter is enabled:
  • Settings for the Autotracking, Reset if IN value changes, and Use REF_RAMP_VAL as IN options of the ERAMP_OPTS parameter are overridden, as indicated in the following table:
    Option Setting if Variable endpoint option enabled
    Autotracking Enabled
    Reset if IN value changes Disabled
    Use REF_RAMP_VAL as IN Enabled
  • When a ramp starts, the ERAMP_END_VALUE and IN parameter values are used to calculate the ramp rate or ramp time.
  • The ramp rate stays the same during the ramp unless the ERAMP_RATE, ERAMP_TIME, or ERAMP_TYPE parameter values are changed.
  • During the ramp, the ERAMP_END_VALUE parameter value continues to be read and compared with the IN parameter value to evaluate when a ramp ends.
  • After the TIME_REMAIN parameter value evaluates to zero or the IN and ERAMP_END_VALUE parameter values are equal, the ramp ends and the COMPLETE parameter value is set to 1 (True).
  • After a ramp ends, the OUT parameter value may not equal the ERAMP_END_VALUE parameter value.
  • The ERAMP_ACTIVE, TIME_REMAIN, ERAMP_STATE, and OUT parameter values are set appropriately (for more information, refer to End a ramp).
Note

When the absolute value of the difference between the IN and ERAMP_END_VALUE parameter values is less than or equal to the VAR_THRESHOLD parameter value, the IN parameter values is set to the ERAMP_END_VALUE parameter value.

Ramp in one direction options

If Ramp up or Ramp down is specified for the ERAMP_DIR parameter, a ramp can function in one direction only. If you specify Ramp down for the ERAMP_DIR parameter after the REF_RAMP_VAL parameter is already below the ERAMP_END_VALUE parameter value, the ramp stops.

Note

The ERAMP_DIR parameter, if specified as Ramp up or Ramp down, is prioritized over the ERAMP_RATE parameter value (or the ramp rate implied by the IN and ERAMP_END_VALUE parameter values).

Enable a ramp

A ramp does not start until the operator or other function block logic sets ramp parameters and enables the ramp. A ramp is enabled when the ERAMP_ENABLE parameter input transitions from 0 (False) to 1 (True). The operator or other function block logic can enable a ramp.

When a ramp is enabled:
  • The COMPLETE and ERAMP_ACTIVE parameter values are set to 0.
  • The Named state of the ERAMP_STATE parameter is set to Enabled.
  • The current target block mode is evaluated; when it matches the specified ERAMP_IN_MODE parameter value, the ERAMP_ACTIVE parameter value transitions to 1, starting the ramp.
A ramp starts under the following conditions:
  • The ERAMP_STATE parameter is set to Enabled.
  • The COMPLETE parameter value is 0 (False).
  • The PAUSE parameter value is 0 (False).
  • The current target block mode matches the specified ERAMP_IN_MODE parameter value.
When a ramp starts:
  • The ERAMP_ACTIVE parameter value is set to 1 (True).

    While a ramp is active, the OUT parameter is written to the target block parameter to be ramped, REF_RAMP_VAL. If the Obey the limits option of the ERAMP_OPTS parameter is enabled and the OUT parameter is outside the configured limits, OUT is clamped to the appropriate limit, and then written to the target block ramp parameter.

  • The ERAMP_STATE parameter is set to Ramping.
  • If the Auto Tracking option of the ERAMP_OPTS parameter is enabled, the IN parameter value is used as the ramp starting point.
  • If the Auto Tracking option of the ERAMP_OPTS parameter is not enabled, the Enhanced Ramp function block uses the following values as the ramp starting point:
    • If the TRK_IN_D parameter value is 1 (True), the IN parameter value is used as the ramp starting point.
      Note

      If the Use REF_RAMP_VAL as IN option of the ERAMP_OPTS parameter is enabled, the current REF_RAMP_VAL parameter value is used as the ramp starting point. If the IN parameter value is wired, the wired value is used.

    • If the TRK_IN_D parameter value is 0 (False), the previous OUT parameter value is used as the ramp starting point.
    Note

    If the Obey the limits option of the ERAMP_OPTS parameter is enabled and the ramp starting point is out of range, it is clamped to the limit value, and the ramp ends. As needed, the Enhanced Ramp function block calculates the ramp rate.

  • The ERAMP_END_VALUE parameter value specifies the ramp end point and the final OUT parameter target value (except for some Variable endpoint, Ramp up, or Ramp down configurations; for more information, refer to Variable endpoint option and Ramp in one direction options).

Disable a ramp

A ramp is disabled before completion if the ERAMP_ENABLE parameter input transitions from 1 (True) to 0 (False). The operator, Enhanced Ramp function block logic, or other function block logic can disable a ramp.
  • The operator or other function block logic can disable a ramp by setting the ERAMP_ENABLE parameter to 0 (False).
  • A ramp can be disabled by Enhanced Ramp function block logic.

    If the ERAMP_ACTIVE parameter is 1 (True), the current target block mode does not match the ERAMP_IN_MODE parameter value, and the Pause if mode changes option of the ERAMP_OPTS parameter is not enabled, the ramp is disabled.

If a ramp is disabled:
  • The COMPLETE, PAUSE, and ERAMP_ACTIVE parameter values are 0 (False).
  • The TIME_REMAIN parameter value is set to 0 seconds.
  • The ERAMP_STATE parameter is set to Stopped.
  • If the Autotracking option of the ERAMP_OPTS parameter is enabled, the OUT parameter value tracks the IN parameter value.
  • If the Autotracking option of the ERAMP_OPTS parameter is disabled, the OUT parameter value depends on the TRK_IN_D parameter value as follows:
    • If the TRK_IN_D parameter value is 0 (False), the OUT parameter value persists at its last previous value.
    • If the TRK_IN_D parameter value is 1 (True), the OUT parameter value tracks the IN parameter value. If the Use REF_RAMP_VAL as IN option of the ERAMP_OPTS parameter is enabled, the OUT parameter value tracks the REF_RAMP_VAL parameter value. If the IN parameter value is wired, the wired value is used.

Pause a ramp

The operator, other function block logic, or Enhanced Ramp function block logic can pause a ramp.
  • The operator or other function block logic can pause a ramp by setting the PAUSE parameter value to 1 (True) when the ramp is active.
  • Enhanced Ramp function block logic sets the ERAMP_STATE parameter to Paused when the Pause if mode changes option is enabled and the current target block mode does not match the ERAMP_IN_MODE parameter value.
When a ramp is paused:
  • The ERAMP_ACTIVE parameter value is 0 (False).
  • The OUT and TIME_REMAIN parameter values persist at their current value.
  • The Named state of the ERAMP_STATE parameter is Paused.

Resume a paused ramp

The PAUSE or RESUME parameter can be used by the operator or by other function block logic to resume a paused ramp.
  • Changing the PAUSE parameter value from 1 (True) to 0 (False) resumes a paused ramp under the following conditions:
    • The COMPLETE parameter evaluates to 0 (False).
    • The ERAMP_ENABLE parameter value is 1 (True).
    • The current target block mode matches the specified ERAMP_IN_MODE parameter value.
  • Changing the RESUME parameter value from False to True resumes a paused ramp under the following conditions:
    • The PAUSE parameter value is 0 (False), following a mode change when the Pause if mode changes option of the ERAMP_OPTS parameter is enabled.
    • The COMPLETE parameter evaluates to 0 (False).
    • The ERAMP_ENABLE parameter value is 1 (True).
    • The current target block mode matches the specified ERAMP_IN_MODE parameter value.

When a paused ramp is resumed, the TIME_REMAIN and ERAMP_RATE parameter values at the time the ramp was paused persist.

If the operator or other function block logic sets the ERAMP_ENABLE parameter value to 0 (False) when a ramp is paused, it is disabled. The TIME_REMAIN, ERAMP_STATE, and OUT parameter values are set appropriately. For more information, refer to Disable a ramp.

Reset a ramp during execution

During the execution of the Enhanced Ramp function block, a ramp is recalculated with new values if:
  • The Named state of the ERAMP_TYPE parameter changes.
  • The ERAMP_TIME parameter value changes.
  • The ERAMP_RATE parameter value changes.
  • The IN parameter value changes, and:
    • The Reset if IN value changes option of the ERAMP_OPTS parameter is enabled.
    • The Variable endpoint option of the ERAMP_OPTS parameter is not enabled.
    • The Use REF_RAMP_VAL as IN option of the ERAMP_OPTS parameter is not enabled.
  • The ERAMP_END_VALUE parameter value changes and the Variable endpoint option of the ERAMP_OPTS parameter is not enabled.

End a ramp

A ramp ends under the following conditions:
  • If the Variable endpoint option of the ERAMP_OPTS parameter is not enabled, ramp calculation ends after the final value is written to the target block parameter to be ramped. The COMPLETE parameter value transitions to 1 (True) after the last SP and OUT limit is written and verified.
  • If the Variable endpoint option of the ERAMP_OPTS parameter is enabled, the ramp ends if the TIME_REMAIN parameter value evaluates zero or if the IN and ERAMP_END_VALUE parameter values are equal.
  • If Ramp down is specified for the ERAMP_DIR parameter, the ramp ends if the ERAMP_END_VALUE parameter value goes below the REF_RAMP_VAL parameter value.
  • If Ramp up is specified for the ERAMP_DIR parameter, the ramp ends if the ERAMP_END_VALUE parameter value exceeds the REF_RAMP_VAL parameter value.
  • If the Obey limits option of the ERAMP_OPTS parameter is enabled, the ramp ends if the IN, ERAMP_END_VALUE, or OUT parameter value is out of range while clamped to the limit value.
After a ramp ends:
  • The ERAMP_ACTIVE parameter value is 0 (False).
  • The TIME_REMAIN parameter value is zero.
  • The OUT parameter value equals the ERAMP_END_VALUE parameter value (except for some Variable endpoint, Ramp up, or Ramp down configurations; for more information, refer to Variable endpoint option and Ramp in one direction options), as when the ERAMP_STATE parameter is set to Stopped (for more information, refer to Disable a ramp).
  • The ERAMP_STATE parameter value is set to Complete.
  • If it is not wired, the PAUSE parameter value is set to 0 (False).
  • If it is not wired, the ERAMP_ENABLE parameter value is set to 0 (False), allowing another ramp to start.

    If the ERAMP_ENABLE parameter is wired, you must explicitly set it to 0 (False) before starting another ramp.