Analog Control Blocks > Enhanced Control Selector function block

Enhanced Control Selector function block configuration and execution

The Enhanced Control Selector function block supports up to 16 inputs and selects the inputs either by direct selection (OP_SELECTION) or by applying a selected algorithm (SEL_TYPE).

Configure selections and the number of used selections

All required selections and corresponding statuses are automatically generated if you extend the default selection of 3 to any number between 2 and 16.

You can set the NOF_USED_SEL parameter of the Enhanced Control Selector function block at the function block level. For the module instance, the NOF_TOTAL_SEL parameter is not configurable.

By default, the function block has three selections. You can define the NOF_TOTAL_SEL parameter for a number of selections of 2 through 16. The parameters related to the selection numbers up to NOF_TOTAL_SEL are shown at the function block level.

The number of selections that are used at the instance level by the logic of the function block is defined by the NOF_USED_SEL parameter. NOF_USED_SEL must be less than or equal to NOF_TOTAL_SEL. If NOF_USED_SEL is greater than NOF_TOTAL_SEL, the number of selections used by the block logic is limited to NOF_TOTAL_SEL. By default, NOF_USED_SEL = 3.

Example: NOF_TOTAL_SEL = 7 and NOF_USED_SEL = 3. Only the first three selections are evaluated by the logic of the function block; however, the selection parameters associated with all seven selections are shown at the function block level.

The following table shows the configuration constraints of the NOF_TOTAL_SEL and NOF_USED_SEL parameters:
Usage NOF_TOTAL_SEL NOF_USED_SEL
Module instance Not user-configurable User-configurable, 2 through 16
  • By default, NOF_USED_SEL = 3.
  • Otherwise, NOF_USED_SEL must be ≤ NOF_TOTAL_SEL.
Module class User-configurable
Module that is not class-based

Configure or wire the input selection for non-Auto selection

If the OP_SELECTION parameter is not set to Auto selection, OP_ SELECTION is set to the user-configured input selection by the operator or to the input selection defined by calculation code and wired to the selector.

Calculate the Enhanced Control Selector function block actual mode

At the beginning of each scan period, the Enhanced Control Selector function block calculates the actual mode according to the input status, target mode, and configured parameter settings. The function block steps into the calculated actual mode or stays in the original mode.

Note

If the Shed to MAN on a bad input status option is selected for the STATUS_OPTS parameter, the Enhanced Control Selector function block works the same as the Control Selector function block. For example: In Auto mode, if any of the connected SEL_ X (X = 1, 2, …, NOF_USED_SEL) inputs have Bad status during block execution, the function block transitions its actual mode to Man. If the Bad SEL_X input transitions back to Good status, the function block resumes Auto operation.

Indicate the selected input number in Auto mode

If the the Enhanced Control Selector function block is in Auto mode, the SELECTED parameter indicates the selected input as a read-only integer, 1 ≤ SELECTED ≤ NOF_USED_SEL.

If OP_SELECTION is not set to Auto selection, SELECTED is set to the index value of OP_SELECTION.

If OP_SELECTION is set to Auto selection, SELECTED is calculated based on the SEL_TYPE parameter. The function block picks a Low, Middle, or High value from SEL_X (X = 1, 2, …, NOF_USED_SEL) and sets X to SELECTED.

Note

You can select Middle only when there are exactly three inputs.

Calculate the Enhanced Control Selector function block output

Next, the Enhanced Control Selector function block calculates the forward path primary output:
  • In Initializing Manual mode (IMan), the primary output OUT is unchanged. The BKCAL_SELX (X = 1, 2, …, NOF_USED_SEL) parameter values are passed to the upstream function blocks.
  • In Manual (Man) mode, OUT can be set manually.
  • In Automatic (Auto) mode:
    • If OP_SELECTION is not set to Auto selection, the block selects SEL_X (where X is the index of OP_SELECTION) as the primary output OUT
    • If OP_SELECTION is set to Auto selection, the block selects SEL_X (where X = SELECTED) as the primary output based on the SEL_TYPE parameter.

The output value is sent back to all (NOF_USED_SEL) upstream function blocks.

All the output parameter status values are set to indicate the status of the function block and the status of the corresponding parameter.

Output limit scaling

During download, OUT_HI_LIM and OUT_LO_LIM are set to their configured values. If you have not changed these values from their defaults, they are set as follows during the first execution of the Enhanced Control Selector function block:
  • OUT_HI_LIM is set to OUT_SCALE(EU100).
  • OUT_LO_LIM is set to OUT_SCALE(EU0).
During runtime, the limits are restricted as follows:
  • OUT_HI_LIM is restricted to OUT_SCALE(EU100) + 0.1 × (OUT_SCALE(EU100)OUT_SCALE(EU0)).
  • OUT_LO_LIM is restricted to OUT_SCALE(EU0) - 0.1 × (OUT_SCALE(EU100)OUT_SCALE(EU0)).

The OUT parameter is not changed as a result of changing the scale or limits. However, if OUT violates the new limits, OUT is forced within the limits on the next execution of the function block.

Output limiting

You can limit the output by configuring the OUT_HI_LIM and OUT_LO_LIM parameters.