Syslib rm036 - en P (P - ValveStats) PDF
Syslib rm036 - en P (P - ValveStats) PDF
Syslib rm036 - en P (P - ValveStats) PDF
WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous environment,
which may lead to personal injury or death, property damage, or economic loss.
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property
damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequence.
IMPORTANT
Identifies information that is critical for successful application and understanding of the product.
SHOCK HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous
voltage may be present.
BURN HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may
reach dangerous temperatures.
ARC FLASH HAZARD: Labels may be on or inside the equipment, for example, a motor control center, to alert people to
potential Arc Flash. Arc Flash will cause severe injury or death. Wear proper Personal Protective Equipment (PPE). Follow ALL
Regulatory requirements for safe work practices and for Personal Protective Equipment (PPE).
Allen-Bradley, Rockwell Software, Rockwell Automation, RSLogix, Logix5000, FactoryTalk, PlantPAx, and ControlLogix are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Table of Contents
Preface
Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Required Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Controller File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Visualization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Controller Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2-state Valve Statistics Input Structure . . . . . . . . . . . . . . . . . . . . . . . . . 11
2-state Valve Statistics Output Structure . . . . . . . . . . . . . . . . . . . . . . . 12
2-state Valve Statistics Local Configuration Tags. . . . . . . . . . . . . . . . 13
Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Programming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Display Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Using Display Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Faceplate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Operator Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Engineering Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table of Contents
Notes:
Preface
This document is updated throughout for version 3.1 of the Rockwell
Automation Library of Process Objects. Changes for this revision are marked by
change bars shown in the right margin.
Page
Changed title from 'PlantPAx Library of Process Objects' to 'Rockwell Automation Library of Process
Objects'
Front Cover
Changed version of Rockwell Automation Library of Process Objects from 3.0 to 3.1
5, 10
5, 10
11
Visualization Files - added Important note concerning the order in which files must be imported
10
14
For the latest compatible software information and to download the Rockwell
Automation Library of Process Objects, see the Product Compatibility and
Download Center at
http://www.rockwellautomation.com/rockwellautomation/support/pcdc.page.
For general library considerations, see Rockwell Automation Library of Process
Objects, publication PROCES-RM002.
Additional Resources
Description
Preface
Notes:
Faceplate
Global Object
Guidelines
Functional Description
This instruction monitors a 2-state valve and provides the following 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 slow open strokes; this is the number of open strokes that took
longer than the configured Slow Open Time
Number of slow close strokes; this is the number of close strokes that took
longer than the configured Slow Close Time
Add-On Instructions are reusable code objects that contain encapsulated logic
that can streamline implementing your system. This lets you create your own
instruction set for programming logic as a supplement to the instruction set
provided natively in the ControlLogix firmware. An Add-On Instruction is
defined once in each controller project, and can be instantiated multiple times in
your application code as needed.
Required Files
Controller File
The P_ValveStats_3_1-00_AOI.L5X Add-On Instruction must be imported
into the controller project to be used in the controller configuration. The service
release number (boldfaced) can change as service revisions are created.
Visualization Files
The following files for this Add-On Instruction can be downloaded from the
Product Compatibility and Download Center at
http://www.rockwellautomation.com/rockwellautomation/support/pcdc.page.
IMPORTANT
Files must be imported in the following order: image files, then global object
files, and then graphic files. This order is required to properly configure the
visualization files.
File Type
Description
Graphics - Displays
GFX
(RA-BAS) P_ValveStats-Faceplate
(RA-BAS-ME) P_ValveStats-Faceplate
(RA-BAS) Common-AnalogEdit
N/A
Graphics - Global
Objects
GGFX
Graphics - Images
PNG
HMI Tags
CSV
N/A
FTVME_PlantPAxLib_Tags_3_1_00.csv (1)
(1) The service release number (boldfaced) can change as service revisions are created.
10
This section describes the parameter references for this Add-On Instruction.
Controller Code
Data Type
Default
Description
EnableIn
BOOL
Ladder Diagram:
If the rung-in condition is true, the instructions Logic routine executes. If the rung-in condition is false,
the instructions EnableInFalse routine executes.
Function Block Diagram:
If true, or not connected, the instructions Logic routine executes. If the parameter is exposed as a pin
and wired, and the pin is false, the instructions EnableInFalse routine executes.
Structured Text:
No effect. The instructions Logic routine executes.
Inp_Closed
BOOL
Inp_Opened
BOOL
Inp_StopOther
BOOL
Cfg_HasStopOther
BOOL
Cfg_PCmdClear
BOOL
When this parameter is 1, program commands are cleared once they are acted upon. When set to 0,
program commands remain set until cleared by the application program logic.
IMPORTANT: Clearing this parameter online can cause unintended program command execution.
Cfg_SlowOpenT
REAL
10.0
Cfg_SlowCloseT
REAL
10.0
PCmd_ClearTotTimes
BOOL
When Cfg_PCmdClear is 1:
Set PCmd_ClearTotTimes to 1 to clear total time statistics
Set PCmd_ClearMaxTimes to 1 to clear maximum time statistics
Set PCmd_ClearStrokeCounts to 1 to clear stroke count statistics
Set PCmd_ClearSlowCounts to 1 to clear valve slow count statistics
Set PCmd_ClearMAvgs to 1 to clear moving average stoke times
These parameters reset automatically
When Cfg_PCmdClear is 0:
Set PCmd_ClearTotTimes to 1 to clear total time statistics
Set PCmd_ClearMaxTimes to 1 to clear maximum time statistics
Set PCmd_ClearStrokeCounts to 1 to clear stroke count statistics
Set PCmd_ClearSlowCounts to 1 to clear valve slow count statistics
PSet Cmd_ClearMAvgs to 1 to clear moving average stoke times
These parameters do not reset automatically
MCmd_ClearTotTimes
BOOL
MCmd_ClearMaxTimes
BOOL
MCmd_ClearStrokeCounts
BOOL
MCmd_ClearSlowCounts
BOOL
MCmd_ClearMAvgs
BOOL
PCmd_ClearMaxTimes
PCmd_ClearStrokeCounts
PCmd_ClearSlowCounts
PCmd_ClearMAvgs
11
Data Type
Description
EnableOut
BOOL
Enable output: The EnableOut signal is not manipulated by this instruction. Its output state always reflects EnableIn input
state.
Val_CurrClosedT
REAL
Val_LastClosedT
REAL
Val_TotClosedT
REAL
Val_MaxClosedT
REAL
Val_CurrOpeningT
REAL
Val_LastOpeningT
REAL
Val_TotOpeningT
REAL
Val_MaxOpeningT
REAL
Val_MAvgOpeningT
REAL
Moving average open stroke time, last 10 complete open strokes (seconds).
Val_CurrOpenedT
REAL
Val_LastOpenedT
REAL
Val_TotOpenedT
REAL
Val_MaxOpenedT
REAL
Val_CurrClosingT
REAL
Val_LastClosingT
REAL
Val_TotClosingT
REAL
Val_MaxClosingT
REAL
Val_MAvgClosingT
REAL
Moving average close stroke time, last 10 complete close strokes (seconds).
Val_CurrStopOtherT
REAL
Val_LastStopOtherT
REAL
Time in stopped/other state (seconds) last time valve was stopped (or other).
Val_TotStopOtherT
REAL
Val_MaxStopOtherT
REAL
Val_CpltOpenC
DINT
Val_CpltCloseC
DINT
Val_IncpltOpenC
DINT
Val_IncpltCloseC
DINT
Val_StopOtherC
DINT
Val_SlowOpenC
DINT
Val_SlowCloseC
DINT
Sts_SlowOpen
BOOL
12
Data Type
Description
Sts_SlowClose
BOOL
Sts_Err
BOOL
P_ValveStats
BOOL
Data Type
Default
Description
Cfg_Desc
STRING_40
Description for display on HMI. This string is shown in the title bar of the faceplate.
Cfg_Label
STRING_20
'Valve Statistics'
Label for graphic symbol displayed on HMI. This string appears on the graphic symbol.
Cfg_StopOtherDesc
STRING_20
''
Cfg_Tag
STRING_20
'P_ValveStats'
Tagname for display on HMI. This string is shown in the title bar of the faceplate.
13
Operations
This section describes the primary operations for this Add-On Instruction.
Modes
The P_ValveStats Add-On Instruction has no modes and does not use the
P_Mode Add-On Instruction. Commands to reset certain statistics are provided
with security, but are accepted at any time and do not depend on modes.
Alarms
The P_ValveStats instruction does not provide any alarms and does not have any
embedded P_Alarm Add-On Instructions. Slow Open and Slow Close Status bits
are provided if you want to alarm on every slow open stoke or slow close stroke.
External P_Alarm instances can be tied to these status outputs.
Simulation
The 2-state Valve Statistics Add-On Instruction does not have a Simulation
capability.
It monitors the associated valve regardless of whether that valve is live or
simulated.
Execution
The following table explains the handling of instruction execution conditions.
Condition
Description
Postscan
14
Programming Example
This section shows how the P_ValveStats instruction can collect statistics on a
motor-operated valve. In this example, the motor-operated valve is controlled by
using the P_ValveMO instruction. By naming the P_ValveStats instance tag the
same as the P_ValveMO tag plus 'ValveStats', it is automatically linked at the
HMI to the valve instance.
In this example, the motor-operated valve is either 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 P_ValveStats instruction.
15
The following local configuration tags are configured to drive the text on the
HMI faceplate:
Cfg_Tag:
MyValveMO_Stats
Cfg_Label:
MyValveMO Stats
Cfg_Desc:
MyValveMO Statistics
Cfg_StopOtherDesc: Stopped
Local tags can be configured through the HMI faceplates or in RSLogix 5000
software by opening the Instruction Logic of the Add-On Instruction instance
and then selecting the string on the displayed rung.
All of the strings in local tags are shown on the first rung of the
Add-On Instruction's Logic routine for your convenience.
16
To access the valve statistics from the faceplate for the valve, you must configure
MyValveMO. Set the Cfg_HasStatsObj parameter to 1. There is no need to set a
global object parameter, but the P_ValveStats backing tag must be named the
same as the Valve tag plus '_ValveStats'.
Display Elements
A display element (global object) is created once and can be referenced multiple
times on multiple displays in an application. When changes are made to the
original (base) object, the instantiated copies (reference objects) are
automatically updated. Use of global objects, in conjunction with tag structures
in the ControlLogix system, aid consistency and save engineering time.
Table 6 - P_ValveStats Display Elements Description
Display Element Name
Display Element
GO_P_ValveStats
Description
This GO_P_ValveStats object can be
added to application graphics to
access valve statistics. A similar object
is already included on faceplates for
2-state valves to provide access to
valve statistics.
2. In the display, right-click the global object and choose Global Object
Parameter Values.
17
Required
Description
#102
Object tag must point to the tag of the associated Add-On Instruction in the
controller.
103
Path used for display navigation features to other objects. Include program
scope if tag is a program scope tag.
120
121
3. Type the tag or value in the Value column as specified in the Description
column.
TIP
4. Click OK.
18
The P_ValveStats instruction faceplate consists of two tabs and each tab consists
of one or more pages.
Faceplate
Each faceplate contains the value of local configuration tags Cfg_Tag and
Cfg_Desc in the title bar.
The Operator tab appears when the faceplate is initially accessed. There is also an
Engineering tab for configuring the instruction.
Engineering
Exit
Operator
Operator Tab
The Faceplate initially opens to the Operator (Home) tab. From here, an
operator can monitor the device statistics.
The Operator tab shows the following information:
Completion information and moving average for close and open strokes.
Count and last stroke information for slow close and slow open strokes.
Current, last, maximum, and total time in different states.
19
The following table shows the functions included on the Operator tab.
Table 7 - Operator Tab Description
Function
20
Action
Security
Configuration and
Tuning Maintenance
(Code D)
Engineering Tab
The Engineering tab provides access to device configuration parameters and
ranges, options for device and I/O setup, displayed text, and
faceplate-to-faceplate navigation settings, and for initial system commissioning or
later system changes.
Engineering Tab
Configure Device
Description, Label,
and Tag Text
21
22
Function
Action
Security
Configuration Parameters
Description
Cfg_Desc
Label
Engineering
Configuration
(Code E)
Tag
Cfg_Tag
Stopped or Other
State Text
Cfg_StopOtherDesc
Cfg_HasStopOther
Clear Program
Commands on
receipt
Cfg_PCmdClear
Maximum Time
Closing (seconds)
before raising
Sts_SlowClose
Cfg_SlowCloseT
Maximum Time
Opening (seconds)
before raising
Sts_SlowOpen
Cfg_SlowOpenT
Cfg_Label
Installation Assistance
If you experience a problem within the first 24 hours of installation, review the information that is contained in this
manual. You can contact Customer Support for initial help in getting your product up and running.
United States or Canada
1.440.646.3434
Contact your distributor. You must provide a Customer Support case number (call the phone number above to obtain one) to your
distributor to complete the return process.
Please contact your local Rockwell Automation representative for the return procedure.
Documentation Feedback
Your comments will help us serve your documentation needs better. If you have any suggestions on how to improve this
document, complete this form, publication RA-DU002, available at http://www.rockwellautomation.com/literature/.
Rockwell Otomasyon Ticaret A.., Kar Plaza Merkezi E Blok Kat:6 34752 erenky, stanbul, Tel: +90 (216) 5698400
Copyright 2014 Rockwell Automation, Inc. All rights reserved. Printed in the U.S.A.