Process High or Low Selector (PHLS)
This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Process High or Low Selector (PHLS) instruction selects the highest or the lowest of up to six incoming controlled variables (CVs). The instruction sends the selected CV as output and flags the unselected CVs to track the selected CV.
To avoid problems with ever-decreasing or ever-increasing output, offset the tracking value by an amount equal to the upstream PID/PIDE gain time’s error value.
Use the PHLS instruction to implement an Override Select control strategy. An Override Select strategy provides control of a primary process variable while allowing other process variables to override the output on the final control element, which avoids exceeding constraints.
Available Languages
Ladder Diagram
Function Block Diagram
Structured Text
PHLS(PHLSTag);
Operands
IMPORTANT:
Unexpected operation may occur if:
- Output tag operands are overwritten.
- Members of a structure operand are overwritten.
- Except when specified, structure operands are shared by multiple instructions.
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions.
Configuration Operands
Operand | Type | Format | Description |
---|---|---|---|
PHLS | P_HIGH_LOW_SELECT | tag | PHLS structure |
PHLS Input Structure
Input Members | Data Type | Description |
---|---|---|
EnableIn | BOOL | Enable input. Ladder Diagram: Corresponds to the rung-condition-in. Default is true. |
Inp_InitializeReq | BOOL | Use this request when reinitializing. Default is false. |
Inp_1 | REAL | Input #1. Valid = Any float. Default is 0.0. |
Inp_E1 | REAL | Loop error from primary #1 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_PGain1 | REAL | Proportional gain from primary #1 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_2 | REAL | Input #2. Valid = Any float. Default is 0.0. |
Inp_E2 | REAL | Loop error from primary #2 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_PGain2 | REAL | Proportional gain from primary #2 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_3 | REAL | Input #3. Valid = Any float. Default is 0.0. |
Inp_E3 | REAL | Loop error from primary #3 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_PGain3 | REAL | Proportional gain from primary #3 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_4 | REAL | Input #4. Valid = Any float. Default is 0.0. |
Inp_E4 | REAL | Loop error from primary #4 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_PGain4 | REAL | Proportional gain from primary #4 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_5 | REAL | Input #5. Valid = Any float. Default is 0.0. |
Inp_E5 | REAL | Loop error from primary #5 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_PGain5 | REAL | Proportional gain from primary #5 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_6 | REAL | Input #6. Valid = Any float. Default is 0.0. |
Inp_E6 | REAL | Loop error from primary #6 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_PGain6 | REAL | Proportional gain from primary #6 (optional, used for offset calculation). Valid = Any float. Default is 0.0. |
Inp_InitializeVal | REAL | Initialization value from downstream block. Valid = Any float. Default is 0.0. |
Cfg_HiLoSel | BOOL | Selection: 1 = High - Select, 0 = Low - Select. Default is false. |
Cfg_HasInp1 | BOOL | 1 = Inp_1 is connected. Default is true. |
Cfg_UseInp1 | BOOL | 1 = Inp_1 is included in selection (for maintenance use). Default is true. |
Cfg_Inp1Offset | BOOL | 1 = Offset Inp_1, Offset = Val +/- Inp_PGain1 * Inp_E1. Default is false. |
Cfg_HasInp2 | BOOL | 1 = Inp_2 is connected. Default is true. |
Cfg_UseInp2 | BOOL | 1 = Inp_2 is included in selection (for maintenance use). Default is true. |
Cfg_Inp2Offset | BOOL | 1 = Offset Inp_2, Offset = Val +/- Inp_PGain2 * Inp_E2. Default is false. |
Cfg_HasInp3 | BOOL | 1 = Inp_3 is connected. Default is false. |
Cfg_UseInp3 | BOOL | 1 = Inp_3 is included in selection (for maintenance use). Default is false. |
Cfg_Inp3Offset | BOOL | 1 = Offset Inp_3, Offset = Val +/- Inp_PGain3 * Inp_E3. Default is false. |
Cfg_HasInp4 | BOOL | 1 = Inp_4 is connected. Default is false. |
Cfg_UseInp4 | BOOL | 1 = Inp_4 is included in selection (for maintenance use). Default is false. |
Cfg_Inp4Offset | BOOL | 1 = Offset Inp_4, Offset = Val +/- Inp_PGain4 * Inp_E4. Default is false. |
Cfg_HasInp5 | BOOL | 1 = Inp_5 is connected. Default is false. |
Cfg_UseInp5 | BOOL | 1 = Inp_5 is included in selection (for maintenance use). Default is false. |
Cfg_Inp5Offset | BOOL | 1 = Offset Inp_5, Offset = Val +/- Inp_PGain5 * Inp_E5. Default is false. |
Cfg_HasInp6 | BOOL | 1 = Inp_6 is connected. Default is false. |
Cfg_UseInp6 | BOOL | 1 = Inp_6 is included in selection (for maintenance use). Default is false. |
Cfg_Inp6Offset | BOOL | 1 = Offset Inp_6, Offset = Val +/- Inp_PGain6 * Inp_E6. Default is false. |
Cfg_DecPlcs | SINT | Number of decimal places for display. Valid = 0 to 6. Default is 2. |
Cfg_HasOutNav | BOOL | 1 = Tells HMI to enable navigation to a connected output object. Default is false. |
Cfg_HasNav | SINT | Set bits to indicate which navigation buttons are enabled: Cfg_HasNav.0 = Inp_1, Cfg_HasNav.1 = Inp_2, Cfg_HasNav.2 = Inp_3, Cfg_HasNav.3 = Inp_4, Cfg_HasNav.4 = Inp_5, Cfg_HasNav.5 = Inp_6. Default is 0. |
Cfg_OutLoLim | REAL | Output low clamping limit. Valid = any float less than or equal to Cfg_OutHiLim. Default is 0.0 |
Cfg_OutHiLim | REAL | Output high clamping limit. Valid = any float greater than or equal to Cfg_OutLoLim. Default is 100.0. |
Cfg_HasMoreObj | BOOL | 1 = Tells HMI an object with more info is available. Default is false. |
Output Members | Data Type | Description |
---|---|---|
EnableOut | BOOL | This output state always reflects EnableIn input state. |
Val | REAL | Output value (selected minimum or maximum) for downstream block. |
Val_Inp1Prev | REAL | Previous (Feedback) input value for primary #1. |
Sts_UseInp1Prev | BOOL | Request for primary #1 to use feedback Val_Inp1Prev. |
Val_Inp2Prev | REAL | Previous (Feedback) input value for primary #2. |
Sts_UseInp2Prev | BOOL | Request for primary #2 to use feedback Val_Inp2Prev. |
Val_Inp3Prev | REAL | Previous (Feedback) input value for primary #3. |
Sts_UseInp3Prev | BOOL | Request for primary #3 to use feedback Val_Inp3Prev. |
Val_Inp4Prev | REAL | Previous (Feedback) input value for primary #4. |
Sts_UseInp4Prev | BOOL | Request for primary #4 to use feedback Val_Inp4Prev. |
Val_Inp5Prev | REAL | Previous (Feedback) input value for primary #5. |
Sts_UseInp5Prev | BOOL | Request for primary #5 to use feedback Val_Inp5Prev. |
Val_Inp6Prev | REAL | Previous (Feedback) input value for primary #6. |
Sts_UseInp6Prev | BOOL | Request for primary #6 to use feedback Val_Inp6Prev. |
Val_Out | REAL | Output value (selected minimum or maximum Input) for HMI. |
Val_Sel | DINT | Selected input: 0 = Minimum, 1 = Inp_1, 2 = Inp_2, 3 = Inp_3, 4 = Inp_4, 5 = Inp_5, 6 = Inp_6, 7 = Maximum, 8 = Inp_InitializeVal. |
Sts_Initialized | BOOL | 1 = Instruction is initialized. |
Sts_MaintByp | BOOL | 1 = A maintenance bypass is active (display icon on HMI) |
Sts_Err | BOOL | 1 = Error in configuration, check Sts_ErrHas or Sts_ErrLim for reason. |
Sts_ErrHas | BOOL | 1 = Configuration error: must HAVE at least one Input. |
Sts_ErrLim | BOOL | 1 = Configuration error: Cfg_OutHiLim less than or equal to Cfg_OutLoLim. |
Alarms
The PHLS instruction does not have any alarms.
Virtualization
The PHLS instruction does not have any virtualization capability.
Configuration of Strings for HMI
Configure strings for HMI faceplates (FT View) and for the
Logix Designer
configuration dialog box. The strings are set to extended properties of tag items. Configure the strings in Logix Designer
only.- Description - Description of PHLS Tag
- Label for graphic symbol – Label metadata of PHLS tag
- Display Library for HMI Faceplate call-up - Library metadata of PHLS tag
- Instruction name - Instruction metadata of PHLS tag
- Area name - Area metadata of PHLS tag
- URL link - URL metadata of PHLS tag
- Output Units – Engineering Unit metadata of PHLS member Val_Out tag
- Input Label Input1 – Description metadata of PHLS member Inp_1 tag
- Input Label Input2 – Description metadata of PHLS member Inp_2 tag
- Input Label Input3 – Description metadata of PHLS member Inp_3 tag
- Input Label Input4 – Description metadata of PHLS member Inp_4 tag
- Input Label Input5 – Description metadata of PHLS member Inp_5 tag
- Input Label Input6 – Description metadata of PHLS member Inp_6 tag
- Input1 EU – Engineering Unit metadata of PHLS member Inp_1 tag
- Input2 EU – Engineering Unit metadata of PHLS member Inp_2 tag
- Input3 EU – Engineering Unit metadata of PHLS member Inp_3 tag
- Input4 EU – Engineering Unit metadata of PHLS member Inp_4 tag
- Input5 EU – Engineering Unit metadata of PHLS member Inp_5 tag
- Input6 EU – Engineering Unit metadata of PHLS member Inp_6 tag
- Allow Navigation Object Tag Name Output - Navigation metadata of PHLS member Out_Val tag
- Allow Navigation Object Tag Name Input1 - Navigation metadata of PHLS member Inp_1 tag
- Allow Navigation Object Tag Name Input2 - Navigation metadata of PHLS member Inp_2 tag
- Allow Navigation Object Tag Name Input3 - Navigation metadata of PHLS member Inp_3 tag
- Allow Navigation Object Tag Name Input4 - Navigation metadata of PHLS member Inp_4 tag
- Allow Navigation Object Tag Name Input5 - Navigation metadata of PHLS member Inp_5 tag
- Allow Navigation Object Tag Name Input6 - Navigation metadata of PHLS member Inp_6 tag
Monitor the PHLS Instruction
Use the operator faceplate from the PlantPAx library of Process objects for monitoring.
Affects Math Status Flags
No.
Major/Minor Faults
None specific to this instruction. See Index Through Arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
Prescan | Rung-condition-out is cleared to false. |
Instruction first run | All configurations has input, use input and input offset are cleared. All previous feedback, loop error, gain values is set to 0. The instruction executes normally. |
Rung-condition-in is false | Rung-condition-out is cleared to false. All configurations has input, use input and input offset are cleared. All previous feedback, loop error, gain values is set to 0. The instruction is kept in its last state. |
Rung-condition-in is true | Set rung-condition-out to rung-condition-in. The instruction executes. |
Postscan | Rung-condition-out is cleared to false. |
Function Block Diagram
Condition/State | Action Taken |
Prescan | EnableOut is cleared to false. |
Instruction first run | All configurations has input, use input and input offset are cleared. All previous feedback, loop error, gain values is set to 0. The instruction executes normally. |
Instruction first scan | See Instruction first run in the Function Block Diagram table. |
EnableIn is false | EnableOut is cleared to false. The instruction will hold its last selection state and output value (Val) is not updated (holds last value). |
EnableIn is true | EnableOut is set to true. The instruction executes. |
Postscan | EnableIn and EnableOut bits are cleared to false. |
Structured Text
In Structured Text, EnableIn is always true during normal scan. The instruction executes when it is in the control path activated by the logic.
Condition/State | Action Taken |
Prescan | See Prescan in the Function Block Diagram table. |
Instruction first run | See Instruction first run in the Function Block Diagram table. |
EnableIn is true | See EnableIn is true in the Function Block Diagram table. |
Postscan | See Postscan in the Function Block Diagram table. |
Example
The example uses the PHLS instruction to implements part of the pressure control strategy. In this case, two PIDE instructions are used as inputs. The PIDE instructions are for Suction Pressure Override Control and Discharge Pressure Control. The PIDE output values CV (CV to final control element) and E (Loop Error) are used as inputs to the PHLS instruction.
This example also shows PHLS inputs for Initial Value (Inp_InitializeVal) and initialization request (Inp_InitializeReq). In this case, the Initial Value is taken from the speed reference to the pump motor drive. The Initialization
In this example the instruction initialization request flag is set based on the motor’s running and availability status.
Ladder Diagram
Function Block Diagram
Structured text
PIDE(PIDE_01);
PIDE(PIDE_02);
PHLS.Inp_1 := PIDE_01.CV;
PHLS.Inp_E1 := PIDE_01.E;
PHLS.Inp_2 := PIDE_02.CV;
PHLS.Inp_E2 := PIDE_02.E;
PHLS.Inp_InitializeVal := P50_Motor.Val_SpeedRef;
PHLS.Inp_InitializeReq := NOT(P50_Motor.Sts_RunningFwd AND P50_Motor.Sts_Available);
PHLS(PHLS);
Provide Feedback