Process Multi Sensor Analog Input (PAIM)

This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Process Multi Sensor Analog Input (PAIM) instruction monitors one analog process variable (PV) by using up to eight analog input signals from sources such as sensors, transmitters, and input channels. The PAIM instruction has functions for input selection, averaging, and failure detection. Additional functions, such as filtering and alarming, are done by a downstream PAI block.
The PAIM instruction provides:
  • Configuration to use between two and eight input signals.
  • Input Source and Quality monitoring of inputs, plus monitoring of each signal for out of range condition. Rejection from the PV calculation of inputs that are out of range, flagged as bad, infinite, or not a number (floating-point exception values).
  • Calculation of the average (mean) or median of the inputs in use as the PV value.
  • Selectable rejection from the PV calculation of inputs that are outside tau standard deviations from the mean, with a minimum of four required inputs, or inputs that are outside a user-defined deviation from the mean.
  • Configuration of the minimum number of good, unrejected input signals required to have a good PV value, and an alarm if the required number of good inputs is not met.
  • Configuration of which PV to use if there are only two unrejected signals remaining: the lesser, the greater, or the average of the two.
  • An alarm if any inputs configured to be used are rejected.
  • An alarm if the number of unrejected inputs is equal to the minimum number required to be good, meaning the next input failure results in a PV failure.
  • Display elements, plus a faceplate with bar graph PV indication, mode selection, alarm limit entry and alarm display, configuration, acknowledgment, trending, and maintenance and engineering configuration and setup.
Available Languages
Ladder Diagram
PAIM_avail_LD
Function Block Diagram
PAIM_avail_FBD
Structured Text
PAIM (PAIMTag, 0);
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_ANALOG_INPUT_MULTI
tag
Data structure required for proper operation of instruction.
BusObj
BUS_OBJ
tag
Bus component
P_ANALOG_INPUT_MULTI 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 - System Defined Parameter
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 when reinitialization is needed. The instruction clears this operand automatically.
Default is true.
Inp_PVAData
REAL
Visible
Not Required
Input
PV signal from sensor or input A (PV units). Valid = any float.
Default is 0.0.
Inp_PVASrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel A object, if available (enumeration).
Default is 0.
Inp_PVANotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcASts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVAData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVBData
REAL
Visible
Not Required
Input
PV signal from sensor or input B (PV units). Valid = any float.
Default is 0.0.
Inp_PVBSrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel B object, if available (enumeration).
Default is 0.
Inp_PVBNotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcBSts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVBData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVCData
REAL
Visible
Not Required
Input
PV signal from sensor or input C (PV units). Valid = any float.
Default is 0.0.
Inp_PVCSrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel C object, if available (enumeration).
Default is 0.
Inp_PVCNotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcCSts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVCData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVDData
REAL
Not Visible
Not Required
Input
PV signal from sensor or input D (PV units). Valid = any float.
Default is 0.0.
Inp_PVDSrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel D object, if available (enumeration).
Default is 0.
Inp_PVDNotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcDSts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVDData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVEData
REAL
Not Visible
Not Required
Input
PV signal from sensor or input E (PV units). Valid = any float.
Default is 0.0.
Inp_PVESrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel E object, if available (enumeration).
Default is 0.
Inp_PVENotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcESts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVEData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVFData
REAL
Not Visible
Not Required
Input
PV signal from sensor or input F (PV units). Valid = any float.
Default is 0.0.
Inp_PVFSrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel F object, if available (enumeration).
Default is 0.
Inp_PVFNotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcFSts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVFData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVGData
REAL
Not Visible
Not Required
Input
PV signal from sensor or input G (PV units). Valid = any float.
Default is 0.0.
Inp_PVGSrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel G object, if available (enumeration).
Default is 0.
Inp_PVGNotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcGSts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVGData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVHData
REAL
Not Visible
Not Required
Input
PV signal from sensor or input H (PV units). Valid = any float.
Default is 0.0.
Inp_PVHSrcQ
SINT
Not Visible
Not Required
Input
Input source and quality, from channel H object, if available (enumeration).
Default is 0.
Inp_PVHNotify
SINT
Not Visible
Not Required
Input
Related PV object alarm priority and acknowledgement status.
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Default is 0.
Inp_SmartDvcHSts
DINT
Not Visible
Not Required
Input
Current code provided by SMART device on Inp_PVHData. The code is copied to Out_SmartDvcSts allowing a user to monitor the device status on HMI for diagnostic lookup purposes. Valid = 0 to maximum positive number.
Default is 0.
Inp_PVABad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input A 1 = Bad, 0 = OK.
Default is false.
Inp_PVAUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input A, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcADiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVAData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_PVBBad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input B 1 = Bad, 0 = OK.
Default is false.
Inp_PVBUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input B, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcBDiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVBData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_PVCBad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input C 1 = Bad, 0 = OK.
Default is false.
Inp_PVCUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input C, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcCDiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVCData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_PVDBad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input D 1 = Bad, 0 = OK.
Default is false.
Inp_PVDUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input D, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcDDiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVDData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_PVEBad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input E 1 = Bad, 0 = OK.
Default is false.
Inp_PVEUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input E, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcEDiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVEData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_PVFBad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input F 1 = Bad, 0 = OK.
Default is false.
Inp_PVFUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input F, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcFDiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVFData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_PVGBad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input G 1 = Bad, 0 = OK.
Default is false.
Inp_PVGUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input G, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcGDiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVGData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_PVHBad
BOOL
Not Visible
Not Required
Input
Signal quality or communication status for input H 1 = Bad, 0 = OK.
Default is false.
Inp_PVHUncertain
BOOL
Not Visible
Not Required
Input
Signal quality for input H, 1 = Uncertain, 0 = OK.
Default is false.
Inp_SmartDvcHDiagAvailable
BOOL
Not Visible
Not Required
Input
1 = SMART device on Inp_PVHData diagnostics available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Cfg_AllowDisable
BOOL
Not Visible
Not Required
Input
1 = Allow maintenance to disable alarms.
Default is true.
Cfg_AllowShelve
BOOL
Not Visible
Not Required
Input
1 = Allow operator to shelve alarms.
Default is true.
Cfg_HasPVA
BOOL
Not Visible
Not Required
Input
1 = Inp_PVAData is connected in logic.
Default is true.
Cfg_HasPVB
BOOL
Not Visible
Not Required
Input
1 = Inp_PVBData is connected in logic.
Default is true.
Cfg_HasPVC
BOOL
Not Visible
Not Required
Input
1 = Inp_PVCData is connected in logic.
Default is true.
Cfg_HasPVD
BOOL
Not Visible
Not Required
Input
1 = Inp_PVDData is connected in logic.
Default is false.
Cfg_HasPVE
BOOL
Not Visible
Not Required
Input
1 = Inp_PVEData is connected in logic.
Default is false.
Cfg_HasPVF
BOOL
Not Visible
Not Required
Input
1 = Inp_PVFData is connected in logic.
Default is false.
Cfg_HasPVG
BOOL
Not Visible
Not Required
Input
1 = Inp_PVGData is connected in logic.
Default is false.
Cfg_HasPVH
BOOL
Not Visible
Not Required
Input
1 = Inp_PVHData is connected in logic.
Default is false.
Cfg_UsePVA
BOOL
Not Visible
Not Required
Input
1 = Inp_PVAData should be used in PV calculation if good.
Default is true.
Cfg_UsePVB
BOOL
Not Visible
Not Required
Input
1 = Inp_PVBData should be used in PV calculation if good.
Default is true.
Cfg_UsePVC
BOOL
Not Visible
Not Required
Input
1 = Inp_PVCData should be used in PV calculation if good.
Default is true.
Cfg_UsePVD
BOOL
Not Visible
Not Required
Input
1 = Inp_PVDData should be used in PV calculation if good.
Default is false.
Cfg_UsePVE
BOOL
Not Visible
Not Required
Input
1 = Inp_PVEData should be used in PV calculation if good.
Default is false.
Cfg_UsePVF
BOOL
Not Visible
Not Required
Input
1 = Inp_PVFData should be used in PV calculation if good.
Default is false.
Cfg_UsePVG
BOOL
Not Visible
Not Required
Input
1 = Inp_PVGData should be used in PV calculation if good.
Default is false.
Cfg_UsePVH
BOOL
Not Visible
Not Required
Input
1 = Inp_PVHData should be used in PV calculation if good.
Default is false.
Cfg_RejectUncertain
BOOL
Not Visible
Not Required
Input
1 = Reject an input if its quality is uncertain.
Default is false.
Cfg_UseStdDev
BOOL
Not Visible
Not Required
Input
1 = Reject outside tau standard deviations; 0 = Reject ouside Cfg_AbsDev from mean.
Default is false.
Cfg_CalcAvg
BOOL
Not Visible
Not Required
Input
1 = Calculate average of good inputs; 0 = calculate median of good inputs.
Default is false.
Cfg_UseInpSrcQPVA
BOOL
Not Visible
Not Required
Input
1 = Use PVA SrcQ input for rejection decisions.
Default is false.
Cfg_UseInpSrcQPVB
BOOL
Not Visible
Not Required
Input
1 = Use PVB SrcQ input for rejection decisions.
Default is false.
Cfg_UseInpSrcQPVC
BOOL
Not Visible
Not Required
Input
1 = Use PVC SrcQ input for rejection decisions.
Default is false.
Cfg_UseInpSrcQPVD
BOOL
Not Visible
Not Required
Input
1 = Use PVD SrcQ input for rejection decisions.
Default is false.
Cfg_UseInpSrcQPVE
BOOL
Not Visible
Not Required
Input
1 = Use PVE SrcQ input for rejection decisions.
Default is false.
Cfg_UseInpSrcQPVF
BOOL
Not Visible
Not Required
Input
1 = Use PVF SrcQ input for rejection decisions.
Default is false.
Cfg_UseInpSrcQPVG
BOOL
Not Visible
Not Required
Input
1 = Use PVG SrcQ input for rejection decisions.
Default is false.
Cfg_UseInpSrcQPVH
BOOL
Not Visible
Not Required
Input
1 = Use PVH SrcQ input for rejection decisions.
Default is false.
Cfg_HasPVNav
BOOL
Not Visible
Not Required
Input
1 = Tells HMI to enable navigation to a connected PV (Val) object.
Default is false.
Cfg_HasMoreObj
BOOL
Not Visible
Not Required
Input
1 = Tells HMI an object with more information is available.
Default is false.
Cfg_HasNav
SINT
Not Visible
Not Required
Input
Set bits indicate which navigation buttons are enabled .0=PVA, .1=PVB, ..., .7=PVH
Default is 0.
Cfg_MinGood
DINT
Not Visible
Not Required
Input
Minimum good inputs for good PV [1..number of "Cfg_Has" inputs].
Default is 2.
Cfg_CalcWhen2
DINT
Not Visible
Not Required
Input
PV calculation when only 2 good inputs: 0 = average, 1 = minimum, 2 = maximum.
Default is 0.
Cfg_PVEUMin
REAL
Not Visible
Not Required
Input
PV (Output) minimum for display PV units. Valid = any float.
Default is 0.0.
Cfg_PVEUMax
REAL
Not Visible
Not Required
Input
PV (Output) maximum for display PV units. Valid = any float.
Default is 100.0.
Cfg_AbsDevLim
REAL
Not Visible
Not Required
Input
Absolute deviation threshold for PV units. Valid = any nonnegative float: reject ouside this deviation from mean.
Default is 10.0.
Cfg_OoRHiLim
REAL
Not Visible
Not Required
Input
Out-of-range (fail) high limit for PV units. Valid = any float.
Default is 103.958336.
Cfg_OoRLoLim
REAL
Not Visible
Not Required
Input
Out-of-range (fail) low limit for PV units. Valid = any float.
Default is -2.0833333.
Cfg_OoRDB
REAL
Not Visible
Not Required
Input
Out-of-range (fail) deadbandfor PV units. Valid = any nonnegative float.
Default is 0.41666666.
Cfg_PVDecPlcs
SINT
Not Visible
Not Required
Input
Number of decimal places for PV display. Valid = 0,1,2,3,4,5,6.
Default is 2.
Cfg_CnfrmReqd
SINT
Not Visible
Not Required
Input
Operator Command Confirmation Required. Represents the type of command confirmation required. 0 = None, 1 = Command confirmation required, 2 = Performer e-signature required, 3 = Performer and approver e-signature required.
Default is 0.
PSet_Owner
DINT
Not Visible
Not Required
Input
Program owner request ID (non-zero) or release (zero) (Valid = any integer).
Default is 0.
PCmd_Reset
BOOL
Not Visible
Not Required
Input
Program command to reset all alarms requiring Reset.
Default is false.
XCmd_Reset
BOOL
Not Visible
Not Required
Input
External command to reset all alarms and latched shed conditions. The instruction clears this operand automatically.
Default is false.
XCmd_ResetAckAll
BOOL
Not Visible
Not Required
Input
External command to acknowledge and reset all alarms and latched shed conditions. 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
Enable Output - System Defined Parameter
Val
REAL
Visible
Not Required
Output
Selected analog PV (including substitute PV, if used) (PV units).
Val_PVA
REAL
Visible
Not Required
Output
Analog value (actual) from input A (PV units).
Val_PVB
REAL
Visible
Not Required
Output
Analog value (actual) from input B (PV units).
Val_PVC
REAL
Visible
Not Required
Output
Analog value (actual) from input C (PV units).
Val_PVD
REAL
Not Visible
Not Required
Output
Analog value (actual) from input D (PV units).
Val_PVE
REAL
Not Visible
Not Required
Output
Analog value (actual) from input E (PV units).
Val_PVF
REAL
Not Visible
Not Required
Output
Analog value (actual) from input F (PV units).
Val_PVG
REAL
Not Visible
Not Required
Output
Analog value (actual) from input G (PV units).
Val_PVH
REAL
Not Visible
Not Required
Output
Analog value (actual) from input H (PV units).
Val_InpPV
REAL
Not Visible
Not Required
Output
Selected PV (PV units).
Val_PVEUMin
REAL
Not Visible
Not Required
Output
Minimum of PV range = Min (Cfg_PVEUMin, Cfg_PVEUMax) (PV units).
Val_PVEUMax
REAL
Not Visible
Not Required
Output
Maximum of PV range = Max (Cfg_PVEUMin, Cfg_PVEUMax) (PV units).
Out_SmartDvcSts
DINT
Not Visible
Not Required
Output
Status code of a SMART device provided by Inp_SmartDvcASts or Inp_SmartDvcBSts or Inp_SmartDvcCSts or Inp_SmartDvcDSts or Inp_SmartDvcESts or Inp_SmartDvcFSts or Inp_SmartDvcGSts or Inp_SmartDvcHSts. Highest status code selected.
Val_NumPVs
DINT
Not Visible
Not Required
Output
Number of PVs that are currently used in calculating Val_CalcPV.
Sts_Initialized
BOOL
Not Visible
Not Required
Output
1 = Instruction is initialized. Use Inp_InitializeReq to reinitialize.
Sts_SmartDvcDiagAvailable
BOOL
Not Visible
Not Required
Output
1 = Diagnostics of a SMART device is currently available. Typically used to indicate one of the devices requires action to keep operating as expected.
Sts_PVBad
BOOL
Not Visible
Not Required
Output
1 = At least one input channel PV is bad quality or out of range.
Sts_PVUncertain
BOOL
Not Visible
Not Required
Output
1 = At least one input channel PV value is uncertain quality.
Sts_PVAReject
BOOL
Visible
Not Required
Output
1 = Input A rejected, not used to calculate PV.
Sts_PVBReject
BOOL
Visible
Not Required
Output
1 = Input B rejected, not used to calculate PV.
Sts_PVCReject
BOOL
Visible
Not Required
Output
1 = Input C rejected, not used to calculate PV.
Sts_PVDReject
BOOL
Not Visible
Not Required
Output
1 = Input D rejected, not used to calculate PV.
Sts_PVEReject
BOOL
Not Visible
Not Required
Output
1 = Input E rejected, not used to calculate PV.
Sts_PVFReject
BOOL
Not Visible
Not Required
Output
1 = Input F rejected, not used to calculate PV.
Sts_PVGReject
BOOL
Not Visible
Not Required
Output
1 = Input G rejected, not used to calculate PV.
Sts_PVHReject
BOOL
Not Visible
Not Required
Output
1 = Input H rejected, not used to calculate PV.
SrcQ_IOA
SINT
Not Visible
Not Required
Output
Source and quality of Input A (enumeration).
SrcQ_IOB
SINT
Not Visible
Not Required
Output
Source and quality of Input B (enumeration).
SrcQ_IOC
SINT
Not Visible
Not Required
Output
Source and quality of Input C (enumeration).
SrcQ_IOD
SINT
Not Visible
Not Required
Output
Source and quality of Input D (enumeration).
SrcQ_IOE
SINT
Not Visible
Not Required
Output
Source and quality of Input E (enumeration).
SrcQ_IOF
SINT
Not Visible
Not Required
Output
Source and quality of Input F (enumeration).
SrcQ_IOG
SINT
Not Visible
Not Required
Output
Source and quality of Input G (enumeration).
SrcQ_IOH
SINT
Not Visible
Not Required
Output
Source and quality of Input H (enumeration).
SrcQ_IO
SINT
Not Visible
Not Required
Output
Source and quality of calculated PV (enumeration).
SrcQ
SINT
Not Visible
Not Required
Output
Source and quality of primary Val/Sts (enumeration).
Sts_eSts
SINT
Not Visible
Not Required
Output
Device confirmed status (enum): 0 = PV Good, 1: PV Uncertain, 2: PV Bad.
Sts_eFault
INT
Not Visible
Not Required
Output
Device fault status (enum):
0 = None,
17 = Any Reject,
18 = Min Good,
32 = Fail,
34 = Bad Config.
Sts_eNotify
SINT
Not Visible
Not Required
Output
All alarm status enumerated values:
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyAll
SINT
Not Visible
Not Required
Output
All alarm status enumerated values including related objects:
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyAnyReject
SINT
Not Visible
Not Required
Output
Any Reject alarm status enumerated values:
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyMinGood
SINT
Not Visible
Not Required
Output
Min Good alarm status enumerated values:
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Sts_eNotifyFail
SINT
Not Visible
Not Required
Output
Fail alarm status enumerated values:
0 = Not in alarm, acknowledged,
1 = Not in alarm, unacknowledged or reset required,
2 = Low severity alarm, acknowledged,
3 = Low severity alarm, unacknowledged,
4 = Medium severity alarm, acknowledged,
5 = Medium severity alarm, unacknowledged,
6 = High severity alarm, acknowledged,
7 = High severity alarm, unacknowledged,
8 = Urgent severity alarm, acknowledged,
9 = Urgent severity alarm, unacknowledged.
Sts_UnackAlmCount
DINT
Not Visible
Not Required
Output
Count of unacknowledged alarms.
Sts_MaintByp
BOOL
Not Visible
Not Required
Output
1 = Device has a maintenance bypass function active.
Sts_Err
BOOL
Visible
Not Required
Output
1 = Error in config, see detail bits for reason.
Sts_ErrEU
BOOL
Not Visible
Not Required
Output
1 = Error in config: Cfg_PVEUMax cannot equal Cfg_PVEUMin.
Sts_ErrHas
BOOL
Not Visible
Not Required
Output
1 = Error in config: at least one Cfg_HasPVx must be 1.
Sts_ErrUse
BOOL
Not Visible
Not Required
Output
1 = Error in config: at least one Cfg_UsePVx must be 1.
Sts_ErrMinGood
BOOL
Not Visible
Not Required
Output
1 = Error in config: Cfg_MinGood must be in the range [1..8].
Sts_ErrOoRDB
BOOL
Not Visible
Not Required
Output
1 = Error in configuration: Cfg_OoRDB deadband is < 0.0.
Sts_ErrAlm
BOOL
Not Visible
Not Required
Output
1 = Error in logix tag-based alarm settings.
Sts_Alm
BOOL
Not Visible
Not Required
Output
1 = An alarm is active.
Sts_AlmInh
BOOL
Not Visible
Not Required
Output
1 = An alarm is shelved, disabled or suppressed: display icon.
Sts_AnyReject
BOOL
Not Visible
Not Required
Output
1 = At least one input has been rejected.
Sts_MinGood
BOOL
Not Visible
Not Required
Output
1 = At minimum required number of good inputs, next reject/fail will result in bad PV.
Sts_Fail
BOOL
Not Visible
Not Required
Output
1 = Total signal failure (too many inputs rejected).
Sts_RdyAck
BOOL
Not Visible
Not Required
Output
1 = An alarm is ready to be acknowledged.
Sts_RdyReset
BOOL
Not Visible
Not Required
Output
1 = A latched alarm or shed condition is ready to be reset.
XRdy_Reset
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_Reset, enable HMI button.
XRdy_ResetAckAll
BOOL
Not Visible
Not Required
Output
1 = Ready for XCmd_ResetAckAll, enable HMI button.
Val_Owner
DINT
Not Visible
Not Required
Output
Current object owner ID (0 = not owned).
Private Input Members
Data Type
Description
OCmd_Reset
BOOL
Operator command to reset all alarms requiring reset.
Default is false.
OCmd_ResetAckAll
BOOL
Operator command to reset and acknowledge all alarms.
Default is false.
Private Output Members
Data Type
Description
HMI_BusObjIndex
DINT
HMI bus object index.
Default is 0.
ORdy_Reset
BOOL
1 = Ready for OCmd_Reset (enables HMI button).
ORdy_ResetAckAll
BOOL
1 = Ready for OCmd_ResetAckAll (enables HMI button).
Public InOut Members
Data Type
Description
BusObj
BUS_OBJ
Bus component
Public InOut Members
Data Type
FBD Default Visibility
FBD Wiring required
Usage
Description
BusObj
BUS_OBJ
Visible
Required
InOut
Bus component
BUS_OBJ Structure
Members
Data Type
Description
Inp_Cmd
DINT
Input to assert commands
Out_Cmd
DINT
Resultant commands
Inp_CmdLLH
DINT
Input for level normally high commands
Out_CmdLLH
DINT
Resultant line level high commands
Inp_Sts
DINT
Input to assert status
Out_Sts
DINT
Resultant status
Inp_CmdAck
DINT
Input to assert a command acknowledgment
Out_CmdAck
DINT
Resultant command acknowledgments
Inp_SeverityMax
DINT
Input: maximum alarm severity
Out_SeverityMax
DINT
Resultant of maximum alarm severity
Cfg_CmdMask
DINT
Propagation mask for commands
Cfg_CmdLLHMask
DINT
Propagation mask for line level high commands
Cfg_StsMask
DINT
Propagation mask for status
Ref_Index
DINT
Bus array index
Alarms
Discrete tag-based alarms are defined for these members.
Member
Alarm name
Description
Sts_Fail
Alm_Fail
Raised when the two sensor PVs are bad or out of range.
Sts_AnyReject
Alm_AnyReject
Raised when any inputs configured to be used are rejected.
Sts_MinGood
Alm_MinGood
Raised when the number of unrejected input is equal to the minimum number required to be good, meaning the next input failure results in a PV failure.
Mark the alarm as used or unused and set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAIMTag.@Alarms.AlarmName.AlarmElement
There are Program, Operator, and External commands that enable the Reset and Reset & Acknowledge of all alarms of the instruction (Alarm Set) at the same time. This diagram shows how the commands interact with the PAIM instruction.
PAIM_alarms
Operation
This diagram illustrates the functionality of the PAIM instruction:
PAIM_operation
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, as seen in
FactoryTalk 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.
  • Description
  • Label for graphic symbol
  • Display Library for HMI Faceplate call-up
  • Instruction name
  • Area name
  • URL link
  • More Information
  • Selected Analog PV engineering units – Units of Val member, Val.@Units.
  • Analog input A description – Description of Inp_PVAData member, Inp_PVAData.@Label.
  • Analog input B description – Description of Inp_PVBData member, Inp_PVBData.@Label
  • Analog input C description – Description of Inp_PVCData member, Inp_PVCData.@Label.
  • Analog input D description – Description of Inp_PVDData member, Inp_PVDData.@Label.
  • Analog input E description – Description of Inp_PVEData member, Inp_PVEData.@Label.
  • Analog input F description – Description of Inp_PVFData member, Inp_PVFData.@Label.
  • Analog input G description – Description of Inp_PVGData member, Inp_PVGData.@Label.
  • Analog input H description – Description of Inp_PVHData member, Inp_PVHData.@Label.
  • Analog input A navigation – Navigation metadata of Inp_PVAData member.
  • Analog input B navigation – Navigation metadata of Inp_PVBData member.
  • Analog input C navigation – Navigation metadata of Inp_PVCData member.
  • Analog input D navigation – Navigation metadata of Inp_PVDData member.
  • Analog input E navigation – Navigation metadata of Inp_PVEData member.
  • Analog input F navigation – Navigation metadata of Inp_PVFData member.
  • Analog input G navigation – Navigation metadata of Inp_PVGData member.
  • Analog input H navigation – Navigation metadata of Inp_PVHData member.
Monitor the PAIM 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 clears to false.
Instruction first run
All commands that are automatically cleared on each execution are cleared and ignored.
PSet_Owner and Val_Owner are set to 0.
Ensure the constants for the Thompson Tau test logic have not been zeroed out.
The instruction executes normally.
Rung-condition-in is false
Rung-condition-out is cleared to false.
All commands that are automatically cleared on each execution are cleared and ignored.
PSet_Owner and Val_Owner are set to 0.
Latched alarms are reset.
Clear Bus Object commands and HMI Bus Object Index
Execute Bus command on receipt for Disable, Enable, Suppress, Unsuppress all alarms.
Execute Bus command status propagation.
Internal timers are reset.
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
All commands that are automatically cleared on each execution are cleared and ignored.
PSet_Owner and Val_Owner are set to 0.
Ensure the constants for the Thompson Tau test logic have not been zeroed out.
The instruction executes normally.
Instruction first scan
See Instruction first run in the Function Block Diagram table.
EnableIn is false
EnableOut is cleared to false.
All commands that are automatically cleared on each execution are cleared and ignored.
PSet_Owner and Val_Owner are set to 0.
Latched alarms are reset.
Clear Bus Object commands and HMI Bus Object Index
Execute Bus command on receipt for Disable, Enable, Suppress, Unsuppress all alarms.
Execute Bus command status propagation.
Internal timers are reset.
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
The example uses the PAIM instruction to monitor one analog Process Variable (PV) by using up to eight analog input signals (sensors, transmitters). The PAIM instruction allows you to display a temperature, pressure, level, or other PV on a user interface or use the PV in control logic, and the following apply:
  • Have three or more sensors for that PV, for example, six thermocouples.
  • Calculate a PV with the mean or median of the sensor input values.
The example uses the PAIM instruction to average multiple sensors for a single PV. In this example, an application uses three analog sensors (A, B, C). The average of these analogs is used elsewhere in logic to control a separate application element.
The Inp_PVAData, Inp_PVBData, and Inp_PVCData parameters are connected to the values from the three analog transmitters. The fault status of each sensor is tied to the bad input of the PAIM (for example, Inp_PVABad). The output parameters Val, Sts_PVBad and Sts_PVUncertain, can then be connected to the Inp_PVData, Inp_PVUncertain and Inp_ChanFault for control.
Ladder Diagram
PAIM_example_LD
Function Block Diagram
PAIM_example_FBD
Structured Text
PAI(AIT_301A);
PAI(AIT_301B);
PAI(AIT_301C);
AY_301.Inp_PVAData := AIT_301A.Val;
AY_301.Inp_PVASrcQ := AIT_301A.SrcQ;
AY_301.Inp_PVANotify := AIT_301A.Sts_eNotify;
AY_301.Inp_PVBData := AIT_301B.Val;
AY_301.Inp_PVBSrcQ := AIT_301B.SrcQ;
AY_301.Inp_PVBNotify := AIT_301B.Sts_eNotify;
AY_301.Inp_PVCData := AIT_301C.Val;
AY_301.Inp_PVCSrcQ := AIT_301C.SrcQ;
AY_301.Inp_PVCNotify := AIT_301C.Sts_eNotify;
PAIM(AY_301);
AI_301.Inp_PVData := AY_301.Val;
AI_301.Inp_ChanFault := AY_301.Sts_PVBad;
AI_301.Inp_PVUncertain := AY_301.Sts_PVUncertain;
PAI(AI_301);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.