Pressure/Temperature Compensated Flow (PPTC)

This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Pressure/Temperature Compensated Flow (PPTC) instruction calculates a flow at standard temperature and pressure, essentially a mass flow rate, given a volumetric flow rate or differential pressure measurement. This instruction requires measurements of the actual temperature and pressure of the flowing gas.
Available Languages
Ladder Diagram
PPTC_avail_ladder_v33
Function Block Diagram
PPTC_avail_FBD_v33
Structured Text
PPTC(PPTC_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_PRESS_TEMP_COMPENSATED
tag
Data structure required for proper operation of the instruction.
P_PRESS_TEMP_COMPENSATED 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. Ladder Diagram: Corresponds to the rung-condition-in.
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.
Default is true.
Inp_TAct
REAL
Actual (measured) temperature, can be absolute or common units. Valid = any float.
Default is 0.0.
Inp_PAct
REAL
Actual (measured) pressure, can be absolute or common units. Valid = any float.
Default is 0.0.
Inp_DPAct
REAL
Actual (measured) differential pressure. Valid = any float.
Default is 0.0.
Inp_FAct
REAL
Actual (measured) uncompensated flow in volumetric units. Valid = any float.
Default is 0.0.
Cfg_LoFlowCutoff
REAL
If Out_Flow is less than this cutoff value, it is shown as 0.0. Valid = 0.0 to maximum positive float.
Default is 0.0.
Cfg_TStd
REAL
Standard temperature in Inp_TAct units. Valid = any float.
Default is 0.0.
Cfg_PStd
REAL
Standard pressure in Inp_PAct units. Valid = any float.
Default is 0.0.
Cfg_TOffset
REAL
Zero input-units temperature in absolute units. Typically 273.15 Kelvins or 459.67 Rankine. Valid = 0.0 to maximum positive float.
Default is 273.15.
Cfg_POffset
REAL
Zero input-units pressure in absolute units. Typically 14.696 PSIA. Valid = 0.0 to maximum positive float.
Default is 14.696.
Cfg_DPRef
REAL
Reference (full-scale) differential pressure. Common value 100.0 inches WC. Valid = 0.0 to maximum positive float.
Default is 100.0.
Cfg_FRef
REAL
Reference flow in volumetric units at reference dp. Valid = 0.0 to maximum positive float.
Default is 1.0.
Cfg_UseDP
BOOL
1 = Use Inp_DPAct (square root curve) to calculate flow. 0 = use Inp_FAct (linear).
Default is false.
Public Output Members
Data Type
Description
EnableOut
BOOL
Enable Output. This output state always reflects EnableIn input state.
Out_Flow
REAL
Compensated flow (at standard temperature and pressure: mass flow).
Sts_Initialized
BOOL
1 = Instruction is initialized. Use Inp_InitializeReq to reinitialize.
Sts_Err
BOOL
1 = Error in configuration: See detail bits (Sts_Errxxx) for reason.
Sts_ErrTStd
BOOL
1 = Invalid standard temperature (Cfg_TStd + Cfg_TOffset must be > 0.0).
Sts_ErrPStd
BOOL
1 = Invalid standard pressure (Cfg_PStd + Cfg_PStd must be > 0.0).
Sts_ErrDPRef
BOOL
1 = Invalid reference differential pressure (must be > 0.0 if DP used).
Sts_ErrFRef
BOOL
1 = Invalid reference flow (at reference DP) (must be > 0.0).
Operation
The PPTC instruction is intended as a calculation function only, between other blocks. If a faceplate or alarms are needed, the calculated output from the instruction can be sent to a PAI (analog input) instruction for alarming and display.
The PPTC instruction:
  • Takes as its primary input either a volumetric flow rate or a differential pressure across a flow element, such as an orifice plate or pitot tube. When a differential pressure is used, the PPTC instruction allows configuration of the volumetric flow rate for a given differential pressure.
  • Accepts a temperature in common units (Fahrenheit or Celsius degrees) or in absolute units (Rankine degrees or Kelvins).
  • Accepts a pressure in common units (PSIG, kPa Gauge, or MPa Gauge) or in absolute units (PSIA, kPa Absolute, MPa Absolute).
  • Has user-configurable standard conditions, such as 14.696 PSIA and 60 °F, or 101.325 kPa and 0 °C.
  • Determines flow at the specified standard conditions by using the Ideal Gas Law (PV = nRT) to adjust from the given temperature and pressure to the standard temperature and pressure.
Virtualization
Virtualization is not applicable to the PPTC instruction.
Initialization
The instruction is normally initialized in the instruction first run. Re-initialization can be requested any time by setting Inp_InitializeReq = 1. For proper initialization, when adding the instruction while performing an online edit of the code, make sure that Inp_InitializeReq = 1, the default value.
Configuration of Strings for HMI
Configure strings for HMI faceplates (FT View) and for the Logix Designer configuration dialog box.
  • Description – Description of PPTC tag
  • Label for graphic symbol – Label metadata of PPTC tag
  • Display Library for HMI Faceplate call-up – Library metadata of PPTC tag
  • Instruction name – Instruction metadata of PPTC tag
  • Area name – Area metadata of PPTC tag
  • URL link – URL metadata of PPTC tag
  • Actual differential pressure units – Engineering Unit metadata of .Inp_DPAct
  • Actual uncompensated flow in volumetric units – Engineering Unit metadata of .Inp_FAct
  • Actual pressure, can be abs or common units – Engineering Unit metadata of .Inp_PAct
  • Actual temperature, can be abs. or common units – Engineering Unit metadata of .Inp_TAct
  • Compensated flow (at standard temperature and pressure: mass Flow) units – Engineering Unit metadata of .Out_Flow
Monitor the PPTC 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
The instruction executes normally.
Rung-condition-in is false
Set rung-condition-out to rung-condition-in.
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
See Instruction first run in the Ladder Diagram table.
Instruction first scan
See Instruction first run in the Function Block Diagram table.
EnableIn is false
EnableOut is cleared to false.
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
In this example, the PPTC instruction to determine the flow rate of compressed nitrogen at a standard pressure and flow. This can provide a more accurate measurement for custody transfer or control calculations where there is variability in environmental conditions and the flow transmitter is not capable of performing the compensation.
In this case, the PPTC instruction measures flow from a dp-transmitter. The transmitter provides the controller with a value that has been scaled to volumetric flow but not compensated for environmental temperature and pressure. We also have temperature and pressure measurements from where the flow is measured. In this example, the desired standard pressure and flow is 0 psig and 15 °C.
Ladder Diagram
PPTC_Example1_ladder_v33
PPTC_Example2_ladder_v33
PPTC_Example3_ladder_v33
Function Block Diagram
PPTC_Example_FBD_v33
Structured Text
TI101.Inp_PVData:=I_TE101;
TI101.Inp_PVUncertain:=I_TE101_Flt;
PAI(TI101);
PI101.Inp_PVData:=I_PE101;
PI101.Inp_PVUncertain:=I_PE101_Flt;
PAI(PI101);
FI101.Inp_PVData:=I_FE101;
FI101.Inp_PVUncertain:=I_FE101_Flt;
PAI(FI101);
FY101A.Inp_Tact:=TI101.Val;
FY101A.Inp_Pact:=PI101.Val;
FY101A.Inp_Fact:=FI101.Val;
PPTC(FY101A);
FI101.Inp_PVData:=FY101A.Out_Flow;
FI101.Inp_PVUncertain:=FY101A.Sts_Err;
PAI(FI101);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.