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).
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.
| Usage | NOF_TOTAL_SEL | NOF_USED_SEL |
|---|---|---|
| Module instance | Not user-configurable | User-configurable, 2 through
16
|
| Module class | User-configurable | |
| Module that is not class-based |
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.
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.
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.
You can select Middle only when there are exactly three inputs.
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.
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.
You can limit the output by configuring the OUT_HI_LIM and OUT_LO_LIM parameters.