Process Valve Statistics Object (PVLVS)
This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Process Valve Statistics Object (PVLVS) instruction monitors a two-state (open and close) valve and records statistics for stroke times and stroke counts to aid in planning maintenance or diagnosing valve and actuator problems. The PVLVS instruction is designed to work with the PVLV (solenoid, motor, and hand operated) valve instruction.
The PVLVS instruction records these statistics:
- Amount of time in the current state (closed, opening, opened, closing, stopped/other)
- Amount of time the valve was in each state the last time it was in that state (closed, opening, opened, closing, stopped/other)
- Maximum amount of time spent in each state (closed, opening, opened, closing, and stopped/other); these are the highest values achieved by the previous statistics
- Total amount of time spent in each state (closed, opening, opened, closing, stopped/other)
- Moving average of the last 10 closing (close stroke) times
- Moving average of the last 10 opening (open stroke) times
- Number of completed open strokes (from closed to opened)
- Number of completed close strokes (from opened to closed)
- Number of incomplete open strokes (from closed to opening and back to closed)
- Number of incomplete close strokes (from opened to closing and back to opened)
- Number of times the valve was in the stopped/other state
- Number of open strokes that took longer than the configured Slow Open Time
- Number of close strokes that took longer than the configured Slow Close Time
Available Languages
Ladder Diagram
Function Block Diagram
Structured Text
PVLVS (PVLVS_01);
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 |
---|---|---|---|
PlantPAx Control | P_VALVE_STATISTICS | tag | Data structure required for proper operation of the instruction. |
P_VALVE_STATISTICS Structure
Public members are standard, visible tag members that are programmatically accessible. Private, hidden members are used in HMI faceplates and are not programmatically accessible. Private members are listed in separate tables after public members.
Public Input Members | Data Type | Description |
---|---|---|
EnableIn | BOOL | Enable Input - System Defined Parameter Default is true. |
Inp_InitializeReq | BOOL | 1 = Request to initialize the instruction. The instruction is normally initialized in instruction first run. Use this request when reinitialization is needed. The instruction clears this operand automatically. |
Inp_Closed | BOOL | 1 = Device is confirmed Closed. Default is false. |
Inp_Opened | BOOL | 1 = Device is confirmed Opened. Default is false. |
Inp_StopOther | BOOL | 1 = Device is confirmed Stopped / Other. Default is false. |
Cfg_HasStopOther | BOOL | 1 = Device has Stopped or other state(s) to be monitored. Default is false. |
Cfg_SlowOpenTime | REAL | Maximum time Opening (seconds) before raising Sts_SlowOpen. Valid = 0.0 to 2147483.0 seconds. Default is 10.0. |
Cfg_SlowCloseTime | REAL | Maximum time Closing (seconds) before raising Sts_SlowClose. Valid = 0.0 to 2147483.0 seconds. Default is 10.0. |
PCmd_ClearTotTimes | BOOL | Program command to clear total time statistics. Default is false. |
PCmd_ClearMaxTimes | BOOL | Program command to clear maximum time statistics. Default is false. |
PCmd_ClearStrokeCounts | BOOL | Program command to clear stroke count statistics. Default is false. |
PCmd_ClearSlowCounts | BOOL | Program command to clear device slow count statistics. Default is false. |
PCmd_ClearMAvgs | BOOL | Program command to clear moving average stroke times. Default is false. |
Public Output Members | Data Type | Description |
---|---|---|
EnableOut | BOOL | Enable Output - System Defined Parameter |
Val_CurrClosedTime | REAL | Current time in Closed state (seconds). |
Val_LastClosedTime | REAL | Time in Closed state (seconds) last time device was closed. |
Val_TotClosedTime | REAL | Accumulated time in Closed state (hours). |
Val_MaxClosedTime | REAL | Maximum time in Closed state (hours) of any occurrence. |
Val_CurrOpeningTime | REAL | Current time in Opening state (seconds). |
Val_LastOpeningTime | REAL | Time in Opening state (seconds) last time device was opening. |
Val_TotOpeningTime | REAL | Accumulated time in Opening state (hours). |
Val_MaxOpeningTime | REAL | Maximum time in Opening state (hours) of any occurrence. |
Val_MAvgOpeningTime | REAL | Moving average Open stroke time, last 10 complete open strokes (seconds). |
Val_CurrOpenedTime | REAL | Current time in Opened state (seconds). |
Val_LastOpenedTime | REAL | Time in Opened state (seconds) last time device was opened. |
Val_TotOpenedTime | REAL | Accumulated time in Opened state (hours). |
Val_MaxOpenedTime | REAL | Maximum time in Opened state (hours) of any occurrence. |
Val_CurrClosingTime | REAL | Current time in Closing state (seconds). |
Val_LastClosingTime | REAL | Time in Closing state (seconds) last time device was closing. |
Val_TotClosingTime | REAL | Accumulated time in Closing state (hours). |
Val_MaxClosingTime | REAL | Maximum time in Closing state (hours) of any occurrence. |
Val_MAvgClosingTime | REAL | Maximum time in Closing state (seconds) of any occurrence. |
Val_CurrStopOtherTime | REAL | Current time in Stopped / Other state (seconds). |
Val_LastStopOtherTime | REAL | Time in Stopped / Other state (seconds) last time device was stopped (or other). |
Val_TotStopOtherTime | REAL | Accumulated time in Stopped / Other state (hours). |
Val_MaxStopOtherTime | REAL | Maximum time in Stopped / Other state (hours) of any occurrence. |
Val_CpltOpenCount | DINT | Count of complete device Open strokes (Closed to Opened). |
Val_CpltCloseCount | DINT | Count of complete device Close strokes (Opened to Closed). |
Val_IncpltOpenCount | DINT | Count of incomplete device Open strokes (Closed - Moving - Closed). |
Val_IncpltCloseCount | DINT | Count of incomplete device Close strokes (Opened - Moving - Opened). |
Val_StopOtherCount | DINT | Count of device Stopped / Other occurrences. |
Val_SlowOpenCount | DINT | Count of device Slow to Open occurrences. |
Val_SlowCloseCount | DINT | Count of device Slow to Close occurrences. |
Sts_SlowOpen | BOOL | 1 = Last Closed to Opened stroke exceeded configured time threshold. |
Sts_SlowClose | BOOL | 1 = Last Opened to Closed stroke exceeded configured time threshold. |
Sts_Err | BOOL | 1 = Configuration Error: invalid Slow Open Time or Slow Close Time. |
Sts_ErrSlowCloseTime | BOOL | 1 = Error in configuration: Invalid SlowCloseTime timer preset (use 0.0 to 2147483.0). |
Sts_ErrSlowOpenTime | BOOL | 1 = Error in configuration: Invalid SlowOpenTime timer preset (use 0.0 to 2147483.0). |
Private Input Members | Data Type | Description |
---|---|---|
MCmd_ClearMAvgs | BOOL | Maintenance command to clear moving average stroke times. Default is false. |
MCmd_ClearMaxTimes | BOOL | Maintenance command to clear maximum time statistics. Default is false. |
MCmd_ClearSlowCounts | BOOL | Maintenance command to clear device slow count statistics. Default is false. |
MCmd_ClearStrokeCounts | BOOL | Maintenance command to clear stroke count statistics. Default is false. |
MCmd_ClearTotTimes | BOOL | Maintenance command to clear total time statistics. Default is false. |
Operation
These diagrams illustrate the functionality of the PVLVS instruction:
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.- Valve is confirmed Stopped / Other (in Logix Designer dialog box) – Description of Inp_StopOther item.
- Description
- Label for graphic symbol
- Display Library for HMI Faceplate call-up
- Instruction name
- Area name
- URL link
Monitor the PVLVS 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. Total times, stroke counts and slow counts are maintained through a power cycle. Current times are cleared. The internal state is set to unknown . When an input shows the valve in a known condition, the main logic transitions to the corresponding state. |
Instruction first run | All commands that are automatically cleared each execution are cleared and ignored. The instruction executes normally. |
Rung-condition-in is false | Set rung-condition-out to rung-condition-in. If this instruction is on a false rung, or if EnableIn is false in FBD, Total times, stroke counts, and slow counts are maintained, but Current times are cleared. The internal state is set to unknown .Copies the current time of the previous state to its last time and resets the current time (and accumulated 10ths of hours, if applicable). The internal state is set to unknown (disabled).When normal execution (Logic routine) is resumed, when an input shows the valve in a known condition, a transition to the corresponding state occurs. Should scan all the retentive timers FALSE to stop them. |
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 | See Prescan in the Ladder Diagram table. |
Instruction first run | See Instruction first run in the Ladder Diagram table. |
Instruction first scan | See Instruction first run in the Ladder Diagram table. |
EnableIn is false | See Rung-condition-in is false in the Ladder Diagram table. |
EnableIn is true | See Rung-condition-in is true in the Ladder Diagram table. |
Postscan | EnableIn and EnableOut bits are cleared to false. |
Structured Text
In Structured Text, EnableIn is always true during normal scan. Therefore, if the instruction is in the control path activated by the logic it will execute.
Condition/State | Action Taken |
Prescan | See Prescan in the Ladder Diagram table. |
Instruction first run | See Instruction first run in the Ladder Diagram table. |
EnableIn is true | See Rung-condition-in is true in the Ladder Diagram table. |
Postscan | EnableIn and EnableOut bits are cleared to false. |
Example
This section shows how the PVLVS instruction collects statistics on a motor-operated valve. In this example, the motor-operated valve is controlled by using the PVLVS instruction. By naming the PVLVS instance tag the same as the PVLV tag plus ValveStats, the PVLVS instance tag is automatically linked at the HMI to the valve instance. In this example, the motor-operated valve is opened, closed, or the motor could stop moving while in travel before reaching either position. Statistics for all of these three states can be tracked by using the PVLVS instruction. In this example, the parameters Inp_Closed, Inp_Opened, and Inp_StopOther are connected to the parameters Sts_Closed, Sts_Opened, and Sts_Stopped of the PVLV instruction. The PVLVS instruction keeps track of completed strokes, plus open and close strokes that are slower than expected. The parameters Cfg_SlowOpenTime and Cfg_SlowCloseTime are set to 10, to indicate that any transition longer than 10 seconds is considered slow.
Ladder Diagram
Function Block Diagram
Structured Text
PVLVMO_ValveStat.Inp_Closed := PVLVMO.Sts_Closed;
PVLVMO_ValveStat.Inp_Opened := PVLVMO.Sts_Opened;
PVLVMO_ValveStat.Inp_StopOther := PVLVMO.Sts_Stopped;
PVLVS (PVLVMO_ValveStat);
Provide Feedback