Process Run Time and Start Counter (PRT)

This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Process Run Time and Start Counter (PRT) instruction records the total run time and number of instances the motor or other equipment starts. The PRT is a software implementation of the mechanical hour meter that displays the total motor runtime. Maintenance personnel use the run time and equipment start variables to create a maintenance schedule for the applicable equipment.
Available Languages
Ladder Diagram
PRT_LD_availlang
Function Block Diagram
PRT_FBD_availlang
Structured Text
PRT(PRT_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
PRT
P_RUN_TIME
tag
PRT structure
P_RUN_TIME Structure
Public Input Members
Data Type
Description
EnableIn
BOOL
Enable Input – System Defined Parameter.
Inp_Starting
BOOL
1 = Equipment is starting.
Default = false.
Inp_Running
BOOL
1 = Equipment is confirmed running.
Default = true.
PCmd_ClearStarts
BOOL
Program Command to clear count of starts. The instruction clears this operand automatically.
Default = false.
PCmd_ClearMaxHrs
BOOL
Program Command to clear the maximum, continuous runtime for any start. The instruction clears this operand automatically.
Default = false.
PCmd_ClearTotHrs
BOOL
Program Command to clear the total run time. The instruction clears this operand automatically.
Default = false.
Public Output Members
Data Type
Description
EnableOut
BOOL
Enable Output – System Defined Parameter.
Val_Starts
DINT
Total number of equipment starts or attempts.
Val_CurRunHrs
REAL
Current running time this start (hours).
Val_MaxRunHrs
REAL
Maximum continuous running time for a given start (hours).
Val_TotRunHrs
REAL
Total accumulated running time (hours).
Private Input Members
Data Type
Description
MCmd_ClearStarts
BOOL
Maintenance Command to clear count of starts. The instruction clears this operand automatically.
Default = false.
MCmd_ClearMaxHrs
BOOL
Maintenance Command to clear the maximum, continuous runtime for any start. The instruction clears this operand automatically.
Default = false.
MCmd_ClearTotHrs
BOOL
Maintenance Command to clear the total run time. The instruction clears this operand automatically.
Default = false.
Operation
The PRT instruction:
  • Accumulates and displays the total running time for the associated equipment.
  • Accumulates and displays the count of starts or start attempts for the associated equipment.
  • Shows the amount of run time since the last start, or the length of the current run. This total is held after the equipment is stopped, until the next start, when it is reset to zero.
  • Shows the maximum amount of time for any single run; this is the highest value achieved by the previous total.
  • Allows maintenance personnel, but not operators, to clear individually the total run time, starts count, or maximum single run time. This lets the times be reset when the motor or other equipment is serviced, rebuilt or replaced.
This diagram illustrates the functionality of the PRT instruction:
PRT_FunctionalityIllustration
Configuration of Strings for HMI
Configure strings for HMI faceplates (
FactoryTalk View
) and for the
Logix Designer
configuration dialog box. The strings are set to extended properties of tag items. Configure the strings in the
Logix Designer
application only.
  • Description
  • Label for graphic symbol
  • Display Library for HMI Faceplate call-up
  • Instruction name
  • Area name
  • URL link
Implementation
Normal Ladder implementation
This illustration shows normal implementation with the input condition mapped to Inp_Running and Inp_Starting on a separate branch.
PRT_NormalInput
Rung-in-condition Ladder Implementation
The PRT instruction is designed so it can be used on a Ladder Diagram rung, using the rung-in condition to provide the state of the motor, running (rung-in condition TRUE) or stopped (rung-in condition FALSE):
PRT_RungConditionIn
When the motor is starting or running, the main logic of the PRT instruction is executed. For this to accumulate run time, the parameter Inp_Running must be set to 1.  When the motor is stopped, the rung is false and the EnableInFalse logic of the PRT instruction is executed, and the motor is treated as stopped.
Function Block Implementation (Inp_Running pin always indicates 1)
To ensure that a Ladder Diagram implementation of this application works correctly and that starts and run time are accumulated, the PRT instruction writes a 1 into Inp_Running each scan after executing its logic. This helps avoid having the input inadvertently cleared to 0, which results in the PRT instruction treating the motor as always stopped.
A side effect of this is that when monitoring a Function Block Diagram implementation of this strategy with input pin values displayed, the Inp_Running pin will always show a value of 1, even though the logic on the wire is correctly sending a 0 to the instruction:
This is normal, and the PRT instruction correctly accumulates starts and run time.
NOTE: This discrepancy is only apparent if the Function Block Diagram editor is configured to display the value of connected (wired) input pins.
To show the value of these pins in the editor:
  1. In the Logix Designer application, select
    Tools > Options
    to open the Workstation Options dialog.
  2. In the Categories list, select
    FBD Editor
    .
  3. Select
    Show values of Input Pins
    . Make sure the
    Unwired Pins Only
    check box is not selected.
Monitor the PRT 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
Total run time, Maximum run time and starts count are retained through a power cycle. Current run time is reset (internally only, Val_CurHours is maintained for display).
All Prog, Maint, commands that are automatically cleared each execution are cleared.
Instruction first run
Total run time, Maximum run time and starts count are retained through a power cycle. Current run time is reset (internally only, Val_CurHours is maintained for display).
All Prog, Maint, commands that are automatically cleared each execution are cleared.
Rung-condition-in is false
EnableIn False is treated the same as Motor Stopped: Commands are still processed, total run time is held, the Starts counter is prepared for the next start, and the Current Run Time is cleared.
Command Processing
This object has no Command Source and commands are accepted regardless of Source. Commands should be restricted to authorized personnel (typically at a maintenance level).
  • PCmd_ClearTotHrs: Program Command to Clear Total Runtime Hours
  • MCmd_ClearTotHrs: Maintenance Command to Clear Total Runtime Hours
  • PCmd_ClearStarts: Program Command to Clear Count of Starts
  • MCmd_ClearStarts: Maintenance Command to Clear Count of Starts
  • PCmd_ClearMaxHrs: Program Command to Clear Maximum Single Run Hours
  • MCmd_ClearMaxHrs: Maintenance Command to Clear Maximum Single Run Hours
  • The number of starts is directly reported as an integer Value.
  • The current hours working register is cleared, but the Value is left in place for display until the next run begins.
  • The Total Running Time is reported as a REAL number of Hours. (This will always be in completed tenths of an hour, like a mechanical hours counter.)
Rung-condition-in is true
Set rung-condition-out to rung-condition-in.
The instruction executes.
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.
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
In the following example, tag A100_MR_001 is the motor value monitored by the PRT instruction. This tag provides a Boolean indication of motor run time value.
Inp_Running is connected to the Motor Running status tag (A100_MR_001.Sts_Running) that comes from the Sts_Running output of the P_Motor instruction instance for this motor (A100_MR_001). Inp_Starting is connected to the Motor Starting status tag (A100_MR_001.Sts_Starting) that comes from the Sts_Starting output of the P_Motor instruction instance for this motor (A100_MR_001).
Finally, A100_MR_001_RT.Val_TotRunHrs is the output tag that will indicate the total running hours of A100_MR_001. There is also current running hours (A100_MR_001_RT.Val_CurRunHrs) of the motor and maximum running hours (A100_MR_001_RT.Val_MaxRunHrs) of the motor available.
Ladder Diagram
PRT_Example_Ladder
Function Block Diagram
PRT_Example_FBD
Structured Text
PRT_01.Inp_Starting:=A100_MR_001.Sts_Starting;
PRT_01.Inp_Running:=A100_MR_001.Sts_Running;
PRT(PRT_01);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.