Process Analog HART (PAH)

This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Process Analog HART (PAH) instruction is used to provide HART digital data for an intelligent analog device alongside the analog input (PAI) or analog output (PAO) instruction for that device. It provides:
  • HART Dynamic Variables (PV, SV, TV and QV) values with engineering units and variable status, and the digital value of the device’s analog loop current (in milliamps DC).
  • Analog range (min, at 4 mA, and max, at 20 mA).
  • Analog units of measure.
  • Device information such as Tag and Description text.
  • Additional device status (HART “Command 48 additional status” bit array).
  • Lookup of diagnostic message and severity based on the Command 48 bits that are set (for the first three diagnostics found in the array).
  • Additional status information received from the device via HART, such as Field Device Status bits.
Available Languages
Ladder Diagram
PAH_ LadderDiagram_V33
Function Block Diagram
PAH_ FunctionBlockDiagram_V33
Structured Text
PAH(PAH_tag, Ref_HARTData, Ref_DiagTable, Ref_UnitsTable)
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 ControlPlantPAx Control
P_ANALOG_HART
tag
Data structure required for proper operation of instruction.
Ref_HARTData
PAX_HART_DEVICE:I:0
tag
HART device data for PlantPAx.
Ref_DiagTable
P_HART_CODE_DESC_STATUS[2]
tag
Lookup table for diagnostic bit number (to message and status).
Ref_UnitsTable
RAC_CODE_DESCRIPTION[2]
tag
Lookup table for units of measure code (to units text).
The PAX_HART_DEVICE:I:0 data type is associated with the Add-On Profile for Highly Integrated HART modules such as the 5094-IF8IH.
P_ANALOG_HART 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
FBD Default Visibility
FBD Wiring required
Usage
Description
EnableIn
BOOL
Not Visible
Not Required
Input
Enable input. Ladder Diagram: Corresponds to the rung condition.
Default is true.
Inp_InitializeReq
BOOL
Not Visible
Not Required
Input
1 = Request to initialize the instruction. The instruction is normally initialized in instruction first run. Use this request to re-initialize. The instruction clears this operand automatically.
Default is true.
Cfg_HasHARTPV
BOOL
Not Visible
Not Required
Input
1 = Has a HART digital PV, display on faceplate; 0 = HART digital PV not used.
Default is false.
Cfg_HasHARTSV
BOOL
Not Visible
Not Required
Input
1 = Has a HART digital SV, display on faceplate; 0 = HART digital SV not used.
Default is false.
Cfg_HasHARTTV
BOOL
Not Visible
Not Required
Input
1 = Has a HART digital TV, display on faceplate; 0 = HART digital TV not used.
Default is false.
Cfg_HasHARTQV
BOOL
Not Visible
Not Required
Input
1 = Has a HART digital QV, display on faceplate; 0 = HART digital QV not used.
Default is false.
Cfg_UseHARTVarSts
BOOL
Not Visible
Not Required
Input
1 = Use HART Communication Status to generate SrcQ, 0 = assume good.
Default is true.
Cfg_UseHARTText
BOOL
Not Visible
Not Required
Input
1 = Use text received from HART device, 0 = use extended properties for text.
Default is false.
Cfg_HARTPVDecPlcs
SINT
Not Visible
Not Required
Input
Number of decimal places for HART PV display. Valid = 0,1,2,3,4,5,6.
Default is 2.
Cfg_HARTSVDecPlcs
SINT
Not Visible
Not Required
Input
Number of decimal places for HART SV display. Valid = 0,1,2,3,4,5,6.
Default is 2.
Cfg_HARTTVDecPlcs
SINT
Not Visible
Not Required
Input
Number of decimal places for HART TV display. Valid = 0,1,2,3,4,5,6.
Default is 2.
Cfg_HARTQVDecPlcs
SINT
Not Visible
Not Required
Input
Number of decimal places for HART QV display. Valid = 0,1,2,3,4,5,6.
Default is 2.
Cfg_HasMoreObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object with more information is available for navigation.
Default is false.
Cfg_HasNav
BOOL
Not Visible
Not Required
Input
1 = Tells HMI a related analog input or output object is available for navigation.
Default is false.
Set_VirtualHARTPV
REAL
Not Visible
Not Required
Input
HART PV used in Virtual (when Sts_Virtual = 1) (PV engineering units).
Default is 0.0.
Set_VirtualHARTSV
REAL
Not Visible
Not Required
Input
HART SV used in Virtual (when Sts_Virtual = 1) (SV engineering units).
Default is 0.0.
Set_VirtualHARTTV
REAL
Not Visible
Not Required
Input
HART TV used in Virtual (when Sts_Virtual = 1) (TV engineering units).
Default is 0.0.
Set_VirtualHARTQV
REAL
Not Visible
Not Required
Input
HART QV used in Virtual (when Sts_Virtual = 1) (QV engineering units).
Default is 0.0.
PCmd_Virtual
BOOL
Not Visible
Not Required
Input
Program command to select Virtual (simulated) device operation. The instruction clears this operand automatically.
Default is false.
PCmd_Physical
BOOL
Not Visible
Not Required
Input
Program command to select Physical device operation (not simulated). The instruction clears this operand automatically.
Default is false.
Public Output Members
Data Type
FBD Default Visibility
FBD Wiring required
Usage
Description
EnableOut
BOOL
Not Visible
Not Required
Output
This output state always reflects EnableIn input state.
Val_HARTPV
REAL
Visible
Not Required
Output
Digital HART PV value in PV engineering units (after Substitution, if used).
Val_HARTSV
REAL
Visible
Not Required
Output
Digital HART SV value in SV engineering units (after Substitution, if used).
Val_HARTTV
REAL
Visible
Not Required
Output
Digital HART TV value in TV engineering units (after Substitution, if used).
Val_HARTQV
REAL
Visible
Not Required
Output
Digital HART QV value in QV engineering units (after Substitution, if used).
Val_HARTLoopCurrent
REAL
Visible
Not Required
Output
Digital HART value for Loop Current in milliamps.
Val_InpRawMinFromHART
REAL
Not Visible
Not Required
Output
Analog input unscaled signal minimum from HART module (in module units).
Val_InpRawMaxFromHART
REAL
Not Visible
Not Required
Output
Analog input unscaled signal maximum from HART module (in module units).
Val_PVEUMinFromHART
REAL
Not Visible
Not Required
Output
Analog input scaled range minimum from HART device (in engineering units).
Val_PVEUMaxFromHART
REAL
Not Visible
Not Required
Output
Analog input scaled range maximum from HART device (in engineering units).
Sts_eHARTDiagCode1
INT
Not Visible
Not Required
Output
HART Diagnostic Code #1 (bit number in Command 48, 255 = none).
Sts_eHARTDiagCode2
INT
Not Visible
Not Required
Output
HART Diagnostic Code #2 (bit number in Command 48, 255 = none).
Sts_eHARTDiagCode3
INT
Not Visible
Not Required
Output
HART Diagnostic Code #3 (bit number in Command 48, 255 = none).
Sts_bHARTDiagSts
SINT
Not Visible
Not Required
Output
Overall HART diagnostic status,
.0 = Info,
.1 = Maintenance Required,
.2 = Off Specification,
.3 = Function Check,
.4 = Failed.
Sts_bHARTDiagSts1
SINT
Not Visible
Not Required
Output
Diagnostic status for HART Diagnostic Code #1,
.0 = Info,
.1 = Maintenance Required,
.2 = Off Specification,
.3 = Function Check,
.4 = Failed.
Sts_bHARTDiagSts2
SINT
Not Visible
Not Required
Output
Diagnostic status for HART Diagnostic Code #2,
.0 = Info,
.1 = Maintenance Required,
.2 = Off Specification,
.3 = Function Check,
.4 = Failed.
Sts_bHARTDiagSts3
SINT
Not Visible
Not Required
Output
Diagnostic status for HART Diagnostic Code #3,
.0 = Info,
.1 = Maintenance Required,
.2 = Off Specification,
.3 = Function Check,
.4 = Failed.
Sts_Initialized
BOOL
Not Visible
Not Required
Output
1 = Instruction is initialized. Use Inp_InitializeReq to reinitialize.
Sts_Virtual
BOOL
Not Visible
Not Required
Output
1 = Using virtual PV instead of the input from the device (Inp_PVData) to calculate output. 0 = The instruction uses input parameter Inp_PVData to calculate output. Sts_Virtual is a copy of Inp_Virtual.
Sts_ConnectionFault
BOOL
Not Visible
Not Required
Output
1 = HART data input connection fault, 0 = connection OK.
Sts_DvcMalfunction
BOOL
Not Visible
Not Required
Output
1 = HART device reports it has a malfunction.
Sts_CurrentSaturated
BOOL
Not Visible
Not Required
Output
1 = HART reports analog current is limited.
Sts_CurrentFixed
BOOL
Not Visible
Not Required
Output
1 = Loop Current set to fixed value via HART command.
Sts_CurrentMismatch
BOOL
Not Visible
Not Required
Output
1 = Loop Current reported via HART does not match analog signal.
Sts_DiagnosticActive
BOOL
Not Visible
Not Required
Output
1 = HART data input diagnostic active.
Val_DiagnosticSeqCount
SINT
Not Visible
Not Required
Output
HART data input diagnostic sequence count (per change in diagnostic data, wraps).
SrcQ_IO
SINT
Not Visible
Not Required
Output
Source and quality of primary input or output (enumerated):
0=Good, live, confirmed good
1=Good, live, assumed good
2=Good, no feedback, assumed good
8=Test, virtualized
9=Test, loopback
10=Test, manually entered
16=Uncertain, live, off-spec
17=Uncertain, substituted at device or bus
18=Uncertain, substituted at instruction
19=Uncertain, using last known good
20=Uncertain, using replacement value
32=Bad, signal failure
33=Bad, channel fault
34=Bad, module or communication fault
35=Bad, invalid configuration
SrcQ
SINT
Not Visible
Not Required
Output
Source and quality of primary value or status (enumerated):
0=Good, live, confirmed good
1=Good, live, assumed good
2=Good, no feedback, assumed good
8=Test, virtualized
9=Test, loopback
10=Test, manually entered
16=Uncertain, live, off-spec
17=Uncertain, substituted at device or bus
18=Uncertain, substituted at instruction
19=Uncertain, using last known good
20=Uncertain, using replacement value
32=Bad, signal failure
33=Bad, channel fault
34=Bad, module or communication fault
35=Bad, invalid configuration
SrcQ_HARTPV
SINT
Not Visible
Not Required
Output
Source and quality of HART digital PV (enumerated):
0=Good, live, confirmed good
1=Good, live, assumed good
2=Good, no feedback, assumed good
8=Test, virtualized
9=Test, loopback
10=Test, manually entered
16=Uncertain, live, off-spec
17=Uncertain, substituted at device or bus
18=Uncertain, substituted at instruction
19=Uncertain, using last known good
20=Uncertain, using replacement value
32=Bad, signal failure
33=Bad, channel fault
34=Bad, module or communication fault
35=Bad, invalid configuration
SrcQ_HARTSV
SINT
Not Visible
Not Required
Output
Source and quality of HART digital SV (enumerated):
0=Good, live, confirmed good
1=Good, live, assumed good
2=Good, no feedback, assumed good
8=Test, virtualized
9=Test, loopback
10=Test, manually entered
16=Uncertain, live, off-spec
17=Uncertain, substituted at device or bus
18=Uncertain, substituted at instruction
19=Uncertain, using last known good
20=Uncertain, using replacement value
32=Bad, signal failure
33=Bad, channel fault
34=Bad, module or communication fault
35=Bad, invalid configuration
SrcQ_HARTTV
SINT
Not Visible
Not Required
Output
Source and quality of HART digital TV (enumerated):
0=Good, live, confirmed good
1=Good, live, assumed good
2=Good, no feedback, assumed good
8=Test, virtualized
9=Test, loopback
10=Test, manually entered
16=Uncertain, live, off-spec
17=Uncertain, substituted at device or bus
18=Uncertain, substituted at instruction
19=Uncertain, using last known good
20=Uncertain, using replacement value
32=Bad, signal failure
33=Bad, channel fault
34=Bad, module or communication fault
35=Bad, invalid configuration
SrcQ_HARTQV
SINT
Not Visible
Not Required
Output
Source and quality of HART digital QV (enumerated):
0=Good, live, confirmed good
1=Good, live, assumed good
2=Good, no feedback, assumed good
8=Test, virtualized
9=Test, loopback
10=Test, manually entered
16=Uncertain, live, off-spec
17=Uncertain, substituted at device or bus
18=Uncertain, substituted at instruction
19=Uncertain, using last known good
20=Uncertain, using replacement value
32=Bad, signal failure
33=Bad, channel fault
34=Bad, module or communication fault
35=Bad, invalid configuration
SrcQ_HARTLoopCurrent
SINT
Not Visible
Not Required
Output
Source and quality of HART loop current value (enumerated):
0=Good, live, confirmed good
1=Good, live, assumed good
2=Good, no feedback, assumed good
8=Test, virtualized
9=Test, loopback
10=Test, manually entered
16=Uncertain, live, off-spec
17=Uncertain, substituted at device or bus
18=Uncertain, substituted at instruction
19=Uncertain, using last known good
20=Uncertain, using replacement value
32=Bad, signal failure
33=Bad, channel fault
34=Bad, module or communication fault
35=Bad, invalid configuration
Sts_eSts
SINT
Not Visible
Not Required
Output
Device confirmed status:
0 = Live,
1 = diagnostic information,
2 = maintenance required,
3 = off-spec (uncertain),
4 = function check (substituted),
5 = failure,
6 = HART communication lost,
7 = Virtualized.
Sts_eFault
INT
Not Visible
Not Required
Output
Device fault status:
0 = None,
1 = a dynamic variable is bad,
2 = device diagnostic indicates a failure,
3 = HART communication lost,
4 = module connection fault,
5 = device reports malfunction.
Val_HARTRevision
SINT
Not Visible
Not Required
Output
HART Spec major revision received from device.
Private Input Members
Data Type
Description
MCmd_Physical
BOOL
Maintenance command to select Physical device operation (not simulated). The instruction clears this operand automatically.
Default is false.
MCmd_Virtual
BOOL
Maintenance command to select Virtual (simulated) device operation. The instruction clears this operand automatically.
Default is false.
Private Output Members
Data Type
Description
MRdy_Physical
BOOL
1 = Ready for MCmd_Physical, enable HMI button.
MRdy_Virtual
BOOL
1 = Ready for MCmd_Virtual, enable HMI button.
Sts_sHARTDesc
String_16
Description text from HART device.
Sts_sHARTDiagMsg1
String_32
HART device diagnostic message #1.
Sts_sHARTDiagMsg2
String_32
HART device diagnostic message #2.
Sts_sHARTDiagMsg3
String_32
HART device diagnostic message #3.
Sts_sHARTPVEU
String_16
Text of HART digital PV's engineering units.
Sts_sHARTQVEU
String_16
Text of HART digital QV's engineering units.
Sts_sHARTSVEU
String_16
Text of HART digital SV's engineering units.
Sts_sHARTTag
String_32
Tag text from HART device.
Sts_sHARTTVEU
String_16
Text of HART digital TV's engineering units.
Sts_sPVEU
String_16
Text of analog PV's engineering units.
Public InOut Members
Data Type
FBD Default Visibility
FBD Wiring required
Usage
Description
Ref_HARTData
PAX_HART_DEVICE:I:0
Visible
Required
InOut
HART data from I/O module assembly.
Ref_DiagTable
P_HART_CODE_DESC_STATUS[2]
Visible
Required
InOut
Lookup table for diagnostic bit number (to message and status).
Ref_UnitsTable
RAC_CODE_DESCRIPTION[2]
Visible
Required
InOut
Lookup table for units of measure code (to units text).
PAX_HART_DEVICE:I:O Structure
The PAX_HART_DEVICE:I:O structure is the input assembly subtype used by Highly-Integrated HART I/O modules to provide all the HART data required for this instruction:
Members
Data Type
Description
RunMode
BOOL
Always 0, not used by this instruction
ConnectionFaulted
BOOL
The network connection to the I/O module has been lost
DiagnosticActive
BOOL
I/O module has at least one diagnostic available
DiagnosticSequenceCount
SINT
This count increments each time the diagnostic information from the I/O module changes. It counts to +127, then loops back to -128, skipping zero.
CurrentSaturated
BOOL
The analog signal has reached its minimum or maximum value and does not represent the actual process variable
CurrentFixed
BOOL
The analog signal has been fixed by command and does not represent the actual process variable
MoreStatusAvailable
BOOL
At least one Command 48 (additional device status) bit is set and diagnostics should be displayed
CurrentMismatch
BOOL
I/O module reports digital value for loop current and actual analog loop current disagree significantly
ConfigurationChanged
BOOL
Device reports configuration data (scaling, text, units) have changed
Malfunction
BOOL
Device reports malfunction detected
LoopCurrent
CHANNEL_AI:I:O
HART digital value for device analog loop current (mA DC)
PV
CHANNEL_AI_HART:I:O
HART dynamic Primary Variable with units and status
SV
CHANNEL_AI_HART:I:O
HART dynamic Secondary Variable with units and status
TV
CHANNEL_AI_HART:I:O
HART dynamic Tertiary Variable with units and status
QV
CHANNEL_AI_HART:I:O
HART dynamic Quaternary Variable with units and status
Static
AB_5000_HART_Static_Struct:I:O
HART "static" data, such as device scale range, analog signal units of measure, and device text strings for description and tag name
ChDataAtSignal4
REAL
The value provided by the I/O module analog channel when a 4.0 mA DC signal is received, provided for scaling use by an associated PAI or PAO instruction
ChDataAtSignal20
REAL
The value provided by the I/O module analog channel when a 20.0 mA DC signal is received, provided for scaling use by an associated PAI or PAO instruction
P_HART_CODE_DESC_STATUS Structure
The P_HART_CODE_DESC_STATUS structure is used to look up the diagnostic text and device status associated with a particular Command 48 diagnostic bit. The device provides a 200-bit (25 byte) array of data, where each bit set indicates a particular diagnostic condition. An array of members of this type is used to allow the instruction to display a text description and status for a given bit.
This parameter links the instruction to an external tag that contains necessary data for the instruction to operate. The external tag must be of the data type shown, or may be NULL. If NULL, the diagnostic bit lookup function is not performed.
Members
Data Type
Description
Code
DINT
Diagnostic code. This is the diagnostic bit number (0 to 199) in the array of 200 bits returned in HART Command 48 (Additional Device Status), or -1 if no diagnostic bit is set.
Desc
STRING_32
Diagnostic text.
bSts
SINT
Device Status (bitmapped):
.0 = Information
.1 = Maintenance Required
.2 = Off Specification
.3 = Function Check
.4 = Failed
RAC_CODE_DESCRIPTION[x] Structure
The RAC_CODE_DESCRIPTION[x] structure is an array of engineering unit code numbers and corresponding engineering units text pairs, used as a lookup table. The instruction searches the table for the engineering units code received from the device and displays the corresponding engineering unit text for the variable. This parameter links the instruction to an external tag that contains necessary data for the instruction to operate. The external tag must be of the data type shown, or may be NULL. If NULL, the unit code lookup function is not performed.
Members
Data Type
Description
Code
DINT
Code for which to look up Description.
Desc
STRING
Description for given Code.
Operation
This diagram illustrates functionality of the PAH instruction:
PAH_Operation_V33
Virtualization
Use virtualization for instruction testing and operator training. Command virtual operation using program command PCmd_Virtual or maintenance command MCmd_Virtual. After finishing virtual operation, use program command PCmd_Physical or maintenance command MCmd_Physical to return to normal physical device operation.
When Virtualization is active, the output dynamic variable (PV, SV, TV, QV) values of the PAH instruction are set using Virtual value settings (Set_VirtualPV, etc.) and I/O faults are ignored. Manipulate the instruction to operate as if a working HART process device were present.
Initialization
The instruction is normally initialized in the instruction first run. Request re-initialization 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. The strings are set to extended properties of tag items.
  • Description
  • Label for graphic symbol
  • Display Library for HMI Faceplate call-up
  • Instruction name
  • Area name
  • URL link
  • Engineering units for raw analog signal
  • Engineering units for analog signal PV
  • Engineering units for HART PV
  • Engineering units for HART SV
  • Engineering units for HART TV
  • Engineering units for HART QV
  • Label for HART PV
  • Label for HART SV
Monitor the PAH 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
Instruction flagged for initialization on first scan / first run
Instruction first run
Internal data such as pointers and timers are initialized
Rung-condition-in is false
Set rung-condition-out to rung-condition-in.
The instruction executes. HART data, units and status are provided.
Rung-condition-in is true
Set rung-condition-out to rung-condition-in.
The instruction executes. HART data, units and status are provided.
Postscan
Rung-condition-out is cleared to false.
Function Block Diagram
Condition/State
Action Taken
Prescan
Instruction flagged for initialization on first scan / first run
Instruction first run
Internal data such as pointers and timers are initialized
Instruction first scan
Internal data such as pointers and timers are initialized
EnableIn is false
EnableOut is set to false.
The instruction executes. HART data, units and status are provided.
EnableIn is true
EnableOut is set to true.
The instruction executes. HART data, units and status are provided.
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 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 the following example, the PAH instruction is used alongside a PAI (Process Analog Input) instruction. The PAI provides processing for the analog (4 to 20 mA DC) signal from the HART analog input module, and the PAH instruction provides processing for the digital HART data overlaid upon the analog signal, received from the same field device. As a result, an analog real-time signal is provided for closed-loop control (not shown), and four digital dynamic variables are provided for additional process monitoring.
Ladder Diagram
PAH_LadderExample_v33
Function Block Diagram
PAH_ExampleSection_ FunctionBlockDiagram_V33
Structured Text
PAH(TI_301_Dvc, ProMag400_I:I.PAxDevice, HART_DiagTable_Flow, HART_EUTable_Generic);
TI_301.Cfg_InpRawMin:=TI_301_Dvc.Val_InpRawMinFromHART;
TI_301.Cfg_InpRawMax:=TI_301_Dvc.Val_InpRawMaxFromHART;
TI_301.Cfg_PVEUMin:=TI_301_Dvc.Val_PVEUMinFromHART;
TI_301.Cfg_PVEUMax:=TI_301_Dvc.Val_PVEUMaxFromHART;
TI_301.Inp_PVData:=TI_301_Inp_PVData;
TI_301.Inp_ModFault:=TI_301_Inp_ModFault;
TI_301.Inp_ChanFault:=TI_301_Inp_ChanFault;
TI_301.Inp_PVUncertain:=TI_301_Inp_PVUncertain;
PAI(TI_301, 0);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.