Process Analog Input (PAI)

This information applies to the CompactLogix 5380P and ControlLogix 5580P controllers.
The Process Analog Input (PAI) instruction monitors an analog input and checks for alarm conditions. Use the PAI instruction to process a signal from a channel of an analog input module. Use the PAI instruction with any analog (REAL) signal.
The PAI instruction:
  • Monitors one analog input channel.
  • Scales the input Process Value (PV) from raw, input card units to engineering display units.
  • Filters PV to reduce signal noise.
  • Monitors PV source, PV quality and PV out-of-range condition.
  • Overrides input PV in maintenance.
  • Supports virtual PV for use in instruction testing, demonstration, or operator training.
  • Calculates the PV deviation from reference, or setpoint, value.
  • Calculates the PV rate of change.
  • Captures Min and Max PV excursion values.
  • Triggers alarms on PV failure, PV level, and PV deviation from the reference and PV rate of change.
Available Languages
Ladder Diagram
PAI_avail_ladder_v33
Function Block Diagram
PAI_avail_FBD_v33
Structured Text
PAI(PAI tag, BusObj);
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
tag
Data structure required for proper operation of the instruction.
BusObj
BUS_OBJ
tag
Bus component
P_ANALOG_INPUT Structure
Public members are standard, visible tag members that are programmatically accessible. Private, or 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.
Default is true.
Inp_InitializeReq
BOOL
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.
Inp_PVData
REAL
PV signal from sensor or input (PV units). Valid = any float.
Default is 4.0.
Inp_SmartDvcSts
DINT
Current code provided by SMART device on Inp_PVData. 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_SmartDvcDiagAvailable
BOOL
1 = SMART Device diagnostics is available. Typically used to indicate device requires action to keep operating as expected.
Default is false.
Inp_ModFault
BOOL
1 = I/O module failure or module communication status bad,
0 = OK.
Default is false.
Inp_ChanFault
BOOL
1 = I/O channel fault or failure,
0 = OK.
Default is false.
Inp_OutOfSpec
BOOL
1 = PV out of specification (PV uncertain, from device).
Default is false.
Inp_FuncCheck
BOOL
1 = Function check (PV substituted, from device).
Default is false.
Inp_MaintReqd
BOOL
1 = Maintenance required (from device).
Default is false.
Inp_PVUncertain
BOOL
Indicates the channel data accuracy is undetermined. 1 = The channel data is uncertain. This input sets Sts_PVUncertain if not in Virtual.
Default is false.
Inp_PVNotify
SINT
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_HiHiGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_HiGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_LoGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_LoLoGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_HiRoCGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_HiDevGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_LoDevGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_OoRGate
BOOL
The gate input used for status detection.
1 = The corresponding analog input threshold monitoring is enabled,
0 = detection is disabled and the corresponding status output is forced off.
Default is true.
Inp_Reset
BOOL
1 = Reset shed latches and cleared alarms.
Default is false.
Cfg_AllowDisable
BOOL
1 = Allow maintenance to disable alarms.
Default is true.
Cfg_AllowShelve
BOOL
1 = Allow operator to shelve alarms.
Default is true.
Cfg_ClampSB
REAL
Clamping snap-to band, to clamp when PV gets near to limit (% of PV span). Valid = 0.0 to 100.0 percent of span.
Default is 0.0.
Cfg_InpRawMin
REAL
Input (unscaled) minimum for scaling. Must be set to the range of the signal connected to the Inp_PVData (raw PV) input. The input is then scaled to the values set by Cfg_PVEUMin and Cfg_PVEUMax. Valid = any float not equal to Cfg_InpRawMax
Default is 4.0.
Cfg_InpRawMax
REAL
Input (unscaled) maximum for scaling. Must be set to the range of the signal connected to the Inp_PVData (raw PV) input. The input is then scaled to the values set by Cfg_PVEUMin and Cfg_PVEUMax. Valid = any float not equal to Cfg_InpRawMin
Default is 20.0.
Cfg_PVEUMin
REAL
PV (output) minimum for scaling to engineering units. Valid = any float not equal to Cfg_PVEUMax
Default is 0.0.
Cfg_PVEUMax
REAL
PV (output) maximum for scaling to engineering units. Valid = any float not equal to Cfg_PVEUMin. Tip: The analog input instruction supports reverse scaling. Either the raw (Input) or engineering (Scaled) range can be reversed (maximum less than minimum).
Default is 100.0.
Cfg_Ref
REAL
Reference setting for deviation alarms (engineering units). Valid = any float.
Default is 0.0.
Cfg_FiltWLag
REAL
Filter cutoff frequency (radian/second). Valid = any float >= 0.0.
Default is 0.0.
Cfg_FiltOrder
DINT
Filter order: 0 = no filtering, 1 = 1st order low-pass filter, 2 = 2nd order low-pass filter.
Default is 0.
Cfg_RateTime
REAL
Rate of change time base (seconds), use 1.0 for units/second, 60.0 for units/minute, 3600.0 for units/hour, 86400.0 for units/day. Valid = any float greater than zero.
Default is 1.0.
Cfg_PVHiLim
REAL
PV clamping high limit (engineering units). Valid = any float greater than or equal to Cfg_PVLoLim.Default is 1.50E+38.
Default is 1.50E+38.
Cfg_PVLoLim
REAL
PV clamping low limit (engineering units). Valid = any float less than or equal to Cfg_PVHiLim.
Default is - 1.5E+38.
Cfg_PVReplaceVal
REAL
Value to use to replace PV when action = replace (engineering units). Valid = any float.
Default is 0.0.
Cfg_HiHiLim
REAL
High-High status threshold (engineering units). Valid = any float.
Default is 1.50E+38.
Cfg_HiHiDB
REAL
The deadband that is applied to the alarm limit. This is used to prevent a noisy signal from generating spurious alarms. Valid = any float >= 0.0. Tip: If the High-High alarm limit (Cfg_HiHiLim) is 90 and the High-High alarm deadband (Cfg_HiHiDB) is 5, the High-High alarm is generated when the output (PV filtered, Val) rises above 90 and is cleared once the output (Val) falls below 85 (90 minus 5).
Default is 1.0.
Cfg_HiHiGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_HiLim
REAL
High status threshold (engineering units). Valid = any float.
Default is 1.50E+38.
Cfg_HiDB
REAL
The deadband that is applied to the alarm limit (engineering units).
Default is 1.0.
Cfg_HiGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_LoLim
REAL
Low status threshold (engineering units). Valid = any float.
Default is -1.5E+38.
Cfg_LoDB
REAL
The deadband that is applied to the alarm limit (engineering units). Valid = any float >= 0.0.
Default is 1.0.
Cfg_LoGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_LoLoLim
REAL
Low-Low status threshold (engineering units). Valid = any float.
Default is -1.5E+38.
Cfg_LoLoDB
REAL
The deadband that is applied to the alarm limit (engineering units).
Default is 1.0.
Cfg_LoLoGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_HiRoCLim
REAL
High rate of change status threshold (engineering units). Valid = any float >= 0.0.
Default is 1.50E+38.
Cfg_HiRoCDB
REAL
The deadband that is applied to the alarm limit (engineering units). Valid any float >= 0.0 and <Cfg_HiRoCLim. If Cfg_HiRoCLim=0.0 then the only valid setting is Cfg_HiRoCDB=0.0.
Default is 1.0.
Cfg_HiRoCGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_HiDevLim
REAL
High deviation status threshold (engineering units). Valid = any float >= 0.0.
Default is 1.50E+38.
Cfg_HiDevDB
REAL
The deadband that is applied to the alarm limit (engineering units). Valid = any float >= 0.0.
Default is 1.0.
Cfg_HiDevGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_LoDevLim
REAL
Low Deviation status threshold (engineering units). Valid = any float <= 0.0.
Default is -1.5E+38.
Cfg_LoDevDB
REAL
The deadband that is applied to the alarm limit (engineering units). Valid = any float >= 0.0.
Default is 1.0.
Cfg_LoDevGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_OoRHiLim
REAL
High out of range status threshold (raw units). Valid = any float.
Default is 20.633333.
Cfg_OoRLoLim
REAL
Low out of range status threshold (raw units). Valid = any float.
Default is 3.6666667.
Cfg_OoRDB
REAL
The deadband that is applied to the alarm limit (raw units). Valid = any float >= 0.0.
Default is 0.06666667.
Cfg_OoRGateDly
REAL
The time (seconds) after the gate input activates before the threshold detection is enabled. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_OoROnDly
REAL
The minimum time (seconds) the gated raw PV must remain above the upper (Cfg_OoRHiLim) or below the lower (Cfg_OoRLoLim) limit for the status Sts_OoR to be set. On-delay time is used to avoid unnecessary alarm when the raw PV only briefly overshoots Cfg_OoRHiLim or undershoots Cfg_OoRLoLim. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_OoROffDly
REAL
The time (second) the gated raw PV must stay within each status threshold to clear the status. Off-delay time is used to reduce chattering alarm. Tip: If Cfg_OoROffDly is five seconds, the gated raw PV must be below the status limit (Cfg_OoRHiLim) minus deadband (Cfg_OoRDB) for five seconds before the status is returned to normal. Valid = 0.0 to 2147483.0 seconds.
Default is 0.0.
Cfg_StuckTime
REAL
Time with no change in input to raise stuck status (second). Valid = 0.0 to 2147483.0 seconds.
Default is 60.0.
Cfg_InpOoRAction
SINT
PV action on out of range:
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 1.
Cfg_InpOoRQual
SINT
Out of range flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 3.
Cfg_InpStuckAction
SINT
PV action on stuck (unchanging):
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 1.
Cfg_InpStuckQual
SINT
Stuck (unchanging) flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 1.
Cfg_InpNaNAction
SINT
PV action on not a number:
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 2.
Cfg_InpNaNQual
SINT
PV not a number flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 3.
Cfg_ModFaultAction
SINT
PV action on I/O module fault:
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 2.
Cfg_ModFaultQual
SINT
I/O module fault Flag as:
1 = Good,
2= Uncertain,
3 = Bad.
Default is 3.
Cfg_ChanFaultAction
SINT
PV action on channel fault:
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 2.
Cfg_ChanFaultQual
SINT
I/O channel fault flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 3.
Cfg_OutOfSpecAction
SINT
PV action on out of spec (from device):
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 1.
Cfg_OutOfSpecQual
SINT
Inp_PVUncertain flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 2.
Cfg_FuncCheckAction
SINT
PV action on function check (from device):
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 3.
Cfg_FuncCheckQual
SINT
Function check flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 3.
Cfg_MaintReqdAction
SINT
PV action on maintenance required (from device):
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 3.
Cfg_MaintReqdQual
SINT
Maintenance required flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 3.
Cfg_CfgErrAction
SINT
PV action on Instruction configuration error:
1 = Pass input PV through unchanged,
2 = Hold last good PV value,
3 = Replace PV value with Cfg_PVReplaceVal.
Default is 3.
Cfg_CfgErrQual
SINT
Instruction configuration error flag as:
1 = Good,
2 = Uncertain,
3 = Bad.
Default is 3.
Cfg_CtrlHiHiLim
REAL
Current high-high control threshold (engineering units). Valid = any float.
Default is 1.50E+38.
Cfg_CtrlHiHiDB
REAL
High-High control deadband (engineering units). Valid = any float >= 0.0.
Default is 1.0.
Cfg_CtrlHiLim
REAL
Current high control threshold (engineering units). Valid = any float.
Default is 1.50E+38.
Cfg_CtrlHiDB
REAL
High control deadband (engineering units). Valid = any float >= 0.0.
Default is 1.0.
Cfg_CtrlLoLim
REAL
Current low control threshold (engineering units). Valid = any float.
Default is -1.5E+38.
Cfg_CtrlLoDB
REAL
Low control deadband (engineering units). Valid = any float >= 0.0.
Default is 1.0.
Cfg_CtrlLoLoLim
REAL
Current low-low control threshold (engineering units). Valid = any float.
Default is -1.5E+38.
Cfg_CtrlLoLoDB
REAL
Low-Low control deadband (engineering units). Valid = any float >= 0.0.
Default is 1.0.
Cfg_HasSmartDvc
BOOL
1 = Enable a button on the HMI that could be used to call up a SMART Device faceplate (diagnostics).
Default is false.
Cfg_HasRoC
BOOL
1 = PV rate of change made visible in HMI.
Default is false.
Cfg_HasDev
BOOL
1 = PV Deviation made visible in HMI.
Default is false.
Cfg_HasMoreObj
BOOL
1 = Tells HMI an object with more info is available.
Default is false.
Cfg_HasOutNav
BOOL
1 = Tells HMI to enable navigation to a connected output object,
0 = No connected output object.
Default is false.
Cfg_HasPVNav
BOOL
1 = Tells HMI to enable navigation to a connected process variable object.
Default is false.
Cfg_HasHistTrend
SINT
Has Historical Trend. This enables navigation to the Device Historical Trend Faceplate from the HMI.
0 = No external historical trend,
1 = Datalog historical trend,
2 = Historian historical trend.
Default is 0.
Cfg_FailOnUncertain
BOOL
1 = Raise Sts_Fail (and fail alarm) if PV quality is uncertain,
0 = Raise Sts_Fail (and fail alarm) only if PV quality is bad (scaling configuration error, PV is NaN or Inf, I/O fault or raw PV is out of range.
Default is false.
Cfg_NoSubstPV
BOOL
Disables the maintenance substitution feature.
0 = The Substitute PV Maintenance function is enabled,
1 = The Substitute PV Maintenance function is disabled.
When Cfg_NoSubstPV is 0, the commands MCmd_SubstPV and MCmd_InpPV are used to select the input PV or the substitute PV. Sts_SubstPV is set to 1 when the substitute PV is selected.
Default is false.
Cfg_SetTrack
BOOL
1 = Set_VirtualPV tracks Val_InpPV in virtual. MSet_SubstPV tracks Val_InpPV when substitution is not active. 0 = No tracking.
Default is true.
Cfg_SclngTyp
SINT
Scaling Type
0 = none,
1 = Linear,
2 = Square Root.
Default is 1.
Cfg_PVDecPlcs
SINT
Number of decimal places for process variable display. Valid = 0 to 6.
Default is 2.
Cfg_CnfrmReqd
SINT
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
Program owner request ID (non-zero) or release (zero).
Default is 0.
Set_VirtualPV
REAL
PV used in virtual (Sts_Virtual = 1) (engineering units).
Default is 0.0.
PCmd_ClearCapt
BOOL
Set PCmd_ClearCapt to 1 to clear the captured minimum/maximum PV excursion values. The instruction clears this operand automatically.
Default is false.
PCmd_Reset
BOOL
Program command to reset all alarms and latched shed conditions requiring reset. The instruction clears this operand automatically.
Default is false.
PCmd_Physical
BOOL
Program command to select Physical device operation (not simulated). The instruction clears this operand automatically.
Default is false.
PCmd_Virtual
BOOL
Program command to select Virtual (simulated) device operation. The instruction clears this operand automatically.
Default is false.
XCmd_ClearCapt
BOOL
External command to clear the captured minimum/maximum PV excursion values. The instruction clears this operand automatically.
Default is false.
XCmd_Reset
BOOL
External command to reset all alarms and latched shed conditions. The instruction clears this operand automatically.
Default is false.
XCmd_ResetAckAll
BOOL
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
Description
EnableOut
BOOL
This output state always reflects EnableIn input state.
Val
REAL
Analog input value in engineering units (after Substitute PV, if used).
Extended Properties of this member:
Units - Engineering units (text) used for the analog input.
Val_InpPV
REAL
Analog input value in engineering units (actual, before Substitute PV selection).
Val_RoC
REAL
Analog value Rate of Change (engineering units/rate time).
Val_Dev
REAL
Calculated deviation from reference (engineering units).
Val_PVMinCapt
REAL
Captured PV minimum (excursion) since last cleared (engineering units). Default is 1.5E+38.
Val_PVMaxCapt
REAL
Captured PV maximum (excursion) since last cleared (engineering units). Default is -1.5E+38.
Val_PVEUMin
REAL
Minimum of scaled range = MIN (Cfg_PVEUMin, Cfg_PVEUMax).
Val_PVEUMax
REAL
Maximum of scaled range = MAX (Cfg_PVEUMin, Cfg_PVEUMax).
Out_SmartDvcSts
DINT
Status code of a SMART Device provided by Inp_SmartDvcSts. Out_SmartDvcSts is a copy of Inp_SmartDvcSts.
Sts_Initialized
BOOL
1 = Instruction is initialized. Use Inp_InitializeReq to reinitialize.
Sts_SmartDvcDiagAvailable
BOOL
1 = Diagnostics of a SMART Device is currently available. Typically used to indicate device requires action to keep operating as expected. Sts_SmartDvcDiagAvailable is a copy of Inp_SmartDvcDiagAvailable.
Sts_PVGood
BOOL
1 = PV quality is Good (not flagged as Bad or Uncertain).
Sts_PVUncertain
BOOL
Indicates the channel data accuracy is undetermined. 1 = The channel data is uncertain. This output is set by Inp_PVUncertain (if not in Virtual).
Sts_PVBad
BOOL
1 = PV quality is flagged as Bad.
Sts_InpStuck
BOOL
1 = Input is stuck (unchanging).
Sts_InpNaN
BOOL
1 = Input is not a number (floating point exception).
Sts_OutOfSpec
BOOL
1 = Working outside specifications (from device).
Sts_FuncCheck
BOOL
1 = Function check (PV simulated/replaced at device).
Sts_MaintReqd
BOOL
1 = Maintenance is required (from device).
Sts_UseInp
BOOL
1 = Using input to calculate PV (not replaced or held).
Sts_HoldLast
BOOL
1 = Analog PV being held at last good value.
Sts_Clamped
BOOL
1 = Analog PV being clamped at Low or High Limit.
Sts_Replaced
BOOL
1 = Analog PV being replaced with configured value.
Sts_SubstPV
BOOL
1 = Using substitute PV (Override).
Sts_InpPV
BOOL
1 = Using input PV (Normal).
Sts_Virtual
BOOL
1 = Using virtual PV instead of the input from the device (Inp_PVData) to calculate output.
0 = The instruction uses input operand Inp_PVData to calculate output.
Sts_Virtual is a copy of Inp_Virtual.
SrcQ_IO
SINT
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
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.
Sts_bSts
SINT
Device confirmed status:
0 = PV Good,
Sts_bSts.0: PV Uncertain,
Sts_bSts.1: PV Bad,
Sts_bSts.2: PV Substituted.
PV is Good if Sts_PVUncertain = 0 and Sts_PVBad = 0,
PV is Uncertain if Sts_PVUncertain = 1,
PV is Bad if Sts_PVBad = 1,
PV is Substituted if Sts_SubstPV or Sts_Virtual = 1.
Sts_bFault
INT
Device fault status:
0 = None,
Sts_bFault.0: Low,
Sts_bFault.1: High,
Sts_bFault.2: Low Deviation,
Sts_bFault.3: High Deviation,
Sts_bFault.4: Low Low,
Sts_bFault.5: High High,
Sts_bFault.6: High Rate of Change,
Sts_bFault.7: Fail,
Sts_bFault.8: Configuration Error.
Sts_eNotify
SINT
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
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_eNotifyHiHi
SINT
HiHi 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_eNotifyHi
SINT
Hi 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_eNotifyLo
SINT
Lo 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_eNotifyLoLo
SINT
LoLo 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_eNotifyHiRoC
SINT
HiRoC 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_eNotifyHiDev
SINT
HiDev 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_eNotifyLoDev
SINT
LoDev 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
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
Count of unacknowledged alarms.
Sts_MaintByp
BOOL
1 = The Device has a maintenance bypass function active.
Sts_Err
BOOL
1 = Error in configuration: See detail bits (Sts_Errxxx) for reason.
Sts_ErrRaw
BOOL
1 = Error in configuration: Raw input scaling Min = Max.
Sts_ErrEU
BOOL
1 = Error in configuration: Scaled EU Min = Max.
Sts_ErrFiltWLag
BOOL
1 = Error in configuration: Filter cutoff frequency.
Sts_ErrFiltOrder
BOOL
1 = Error in configuration: Filter order.
Sts_ErrRateTime
BOOL
1 = Error in configuration: PV Rate of Change time base.
Sts_ErrHiHiDB
BOOL
1 = Error in configuration: Cfg_HiHiDB deadband is < 0.0.
Sts_ErrHiHiGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrHiDB
BOOL
1 = Error in configuration: Cfg_HiDB deadband is < 0.0.
Sts_ErrHiGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrLoDB
BOOL
1 = Error in configuration: Cfg_LoDB deadband is < 0.0.
Sts_ErrLoGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrLoLoDB
BOOL
1 = Error in configuration: Cfg_LoLoDB deadband is < 0.0.
Sts_ErrLoLoGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrHiRoCDB
BOOL
1 = Error in configuration: Cfg_HiRoCDB deadband is invalid.
Sts_ErrHiRoCGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrHiDevDB
BOOL
1 = Error in configuration: Cfg_HiDevDB deadband is < 0.0.
Sts_ErrHiDevGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrLoDevDB
BOOL
1 = Error in configuration: Cfg_LoDevDB deadband is < 0.0.
Sts_ErrLoDevGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrOoRDB
BOOL
1 = Error in configuration: Cfg_OoRDB deadband is < 0.0.
Sts_ErrOoRGateDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrOoROnDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrOoROffDly
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrStuckTime
BOOL
1 = Invalid timer preset (use 0.0 to 2147483.0).
Sts_ErrCmdCnfrmTimeOutTime
BOOL
1 = Error in configuration: Command confirmation timer preset (use 0.0 to 2147483.0).
Sts_ErrAlm
BOOL
1 = Error in tag-based alarm settings.
Sts_Alm
BOOL
1 = An alarm is active.
Sts_AlmInh
BOOL
1 = An alarm is shelved or disabled.
Sts_IOFault
BOOL
IO Fault status is set to 1 if there is a Module fault (Inp_ModFault = 1) or Channel fault (Inp_ChanFault = 1) and PV is not virtual.
Sts_HiHiCmp
BOOL
PV comparison result, 1 = High-High.
Sts_HiHiGate
BOOL
PV High-High gate delay status, 1 = done.
Sts_HiHi
BOOL
1 = Analog input is above High-High limit.
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_HiHi.AlarmElement
Sts_HiCmp
BOOL
PV comparison result 1 = High.
Sts_HiGate
BOOL
PV High gate delay status, 1 = done.
Sts_Hi
BOOL
1 = Analog input is above High limit.
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_Hi.AlarmElement
Sts_LoCmp
BOOL
PV comparison result 1 = Low.
Sts_LoGate
BOOL
PV Low gate delay status, 1 = done.
Sts_Lo
BOOL
1 = Analog input is below Low limit.
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_Lo.AlarmElement
Sts_LoLoCmp
BOOL
PV comparison result 1 = Low-Low.
Sts_LoLoGate
BOOL
PV Low-Low gate delay, status 1 = done.
Sts_LoLo
BOOL
1 = Analog input is below Low-Low limit.
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_LoLo.AlarmElement
Sts_HiRoCCmp
BOOL
PV comparison result 1 = High Rate of Change.
Sts_HiRoCGate
BOOL
PV High Rate of Change gate delay status, 1 = done.
Sts_HiRoC
BOOL
1 = Analog input Rate of Change is above High limit.
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_HiRoC.AlarmElement
Sts_HiDevCmp
BOOL
PV comparison result 1 = High Deviation.
Sts_HiDevGate
BOOL
PV High Deviation gate delay, status 1 = done.
Sts_HiDev
BOOL
1 = Analog input Deviation is above High limit.
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_HiDev.AlarmElement
Sts_LoDevCmp
BOOL
PV comparison result, 1 = Low Deviation.
Sts_LoDevGate
BOOL
PV Low Deviation delay status, 1 = done.
Sts_LoDev
BOOL
1 = Analog input Deviation is below Low limit.
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_LoDev.AlarmElement
Sts_OoRHiCmp
BOOL
PV comparison result, 1 = High Out of Range.
Sts_OoRLoCmp
BOOL
PV comparison result, 1 = Low Out of Range.
Sts_OoRCmp
BOOL
PV comparison result, 1 = Out of Range.
Sts_OoRGate
BOOL
PV Out of Range gate delay status, 1 = done.
Sts_OoR
BOOL
1 = Analog raw input is above High raw limit or below Low raw limit.
Sts_Fail
BOOL
1 = Analog input failed. At least one of the following conditions holds: PV scaling configuration error, raw PV is out of range or not a number, input module or input channel fault, device reports PV uncertain (if configured for).
There is a predefined default discrete tag-based alarm for the status. Set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.Alm_Fail.AlarmElement
Sts_CnfrmOperCmdReq
BOOL
1 = Operator command request is awaiting confirmation.
Sts_RdyAck
BOOL
1 = An alarm is ready to be acknowledged.
Sts_RdyReset
BOOL
1 = A latched alarm or shed condition is ready to be reset.
XRdy_ClearCapt
BOOL
1 = Ready for XCmd_ClearCapt, enable HMI button.
XRdy_Reset
BOOL
1 = Ready for XCmd_Reset, enable HMI button.
XRdy_ResetAckAll
BOOL
1 = Ready for XCmd_ResetAckAll, enable HMI button.
Val_Owner
DINT
Current object owner ID (0 = not owned).
Private Input Members
Data Type
Description
MSet_SubstPV
REAL
Maintenance-entered substitute PV in engineering units that overrides input PV when MCmd_SubstPV is 1. If not using the substitute (MCmd_SubstPV is false), the MSet_SubstPV setting tracks the Out value for bumpless transfer from input PV to substitute PV.
Default = 0.0.
MCmd_SubstPV
BOOL
Maintenance command to use Substitute PV. The instruction clears this operand automatically.
Default is false.
MCmd_InpPV
BOOL
Maintenance command to use Input PV (normal). The instruction clears this operand automatically.
Default is false.
OCmd_ClearCapt
BOOL
Operator command to clear the captured minimum/maximum PV excursion values. The instruction clears this operand automatically.
Default is false.
OCmd_Reset
BOOL
Operator command to reset all alarms and latched shed conditions. The instruction clears this operand automatically.
Default is false.
OCmd_ResetAckAll
BOOL
Operator command to acknowledge and reset all alarms and latched shed conditions. The use of OCmd_ResetAckAll is restricted to HMI. The instruction clears this operand automatically.
Default is false.
OCmd_CmdCncl
BOOL
Operator command to cancel command request. The instruction clears this operand automatically.
Default is false.
OCmd_CmdCnfrm
BOOL
Operator command to confirm command request. The instruction clears this operand automatically.
Default is false.
Private Output Members
Data Type
Description
HMI_BusObjIndex
DINT
HMI bus object index.
MRdy_SubstPV
BOOL
1 = Ready for MCmd_SubstPV.
MRdy_InpPV
BOOL
1 = The instruction is ready for MCmd_InpPV command.
ORdy_ClearCapt
BOOL
1 = Ready for OCmd_ClearCapt, enable HMI button.
ORdy_Reset
BOOL
1 = A latched alarm or shed condition is ready to be reset.
ORdy_ResetAckAll
BOOL
1 = A latched alarm or shed condition is ready to be reset or acknowledged.
Public InOut Members
Data Type
Description
BusObj
BUS_OBJ
Bus component.
BUS_OBJ Structure
The BUS_OBJ structure links the analog input instruction to other devices and instructions in a complex control strategy, typically into a hierarchy. A Bus Object rolls up status and alarm information from lower level devices to higher level control and fans out commands from higher level control to lower level devices. Items link to the bus by referencing a single member of the BUS_OBJ array associated with the bus.
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 Bus functions of this instruction are not available.
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 acknowledgement
Out_CmdAck
DINT
Resultant command acknowledgements
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 any of the following is true:
  • The PV quality is bad. The PV quality is bad if either Inp_ChanFault or Inp_ModFault input is 1. The PV bad quality check is skipped in Virtual.
  • The Inp_PVUncertain input is true and the instruction is configured for PV uncertain status taking effect on failure. The PV uncertain check is skipped in Virtual.
  • The PV is outside the configured failure limits.
  • The PV is infinite or not a number (floating-point exception).
  • The raw or engineering unit range configuration used in scaling is invalid.
Sts_HiHi
Alm_HiHi
Raised when the PV is above the High-High threshold and the associated gate is opened (Inp_HiHiGate = 1). The threshold, deadband, and gate delay are set in alarm configuration.
Sts_Hi
Alm_Hi
Raised when the PV is above the High threshold and the associated gate is opened (Inp_HiGate = 1). The threshold, deadband, and gate delay are set in alarm configuration.
Sts_Lo
Alm_Lo
Raised when the PV is below the Low threshold and the associated gate is opened (Inp_LoGate = 1). The threshold, deadband, and gate delay are set in alarm configuration.
Sts_LoLo
Alm_LoLo
Raised when the PV is below the Low-Low threshold and the associated gate is opened (Inp_LoLoGate = 1). The threshold, deadband, and gate delay are set in alarm configuration.
Sts_HiDev
Alm_HiDev
Raised when the amount by which the PV exceeds the setpoint or reference is above the High Deviation threshold while the associated gate is opened (Inp_HiDevGate = 1). The threshold, deadband, and gate delay are set in alarm configuration.
Sts_LoDev
Alm_LoDev
Raised when the amount by which the PV exceeds the setpoint or reference is below the Low Deviation threshold while the associated gate is opened (Inp_LoDevGate = 1). Since the threshold is a negative number, this is the amount the PV falls below the setpoint or reference. The threshold, deadband, and gate delay are set in alarm configuration.
Sts_HiRoC
Alm_HiRoC
Raised when the amount by which the absolute value of PV rate of change exceeds High Rate of Change limit while the associated gate is opened (Inp_HiRoCGate = 1). The threshold, deadband, and gate delay are set in alarm configuration.
Mark the alarm as used or unused and set standard configuration members of the discrete tag-based alarm. Access alarm elements using this format:
PAITag.@Alarms.AlarmName.AlarmElement
  • There is a Program command that enables to Reset all alarms of the instruction (Alarm Set) at the same time.
  • There are Operator commands that enable to Reset, and Reset&Acknowledge all alarms of the instruction (Alarm Set) at the same time.
  • There are External commands that enable to Reset, and Reset&Acknowledge all alarms of the instruction (Alarm Set) at the same time.
PAI_alarmchart
These diagrams show how Fail, High High, High, Low, Low Low, High Deviation, Low Deviation and High Rate of Change alarm conditions are calculated in the PAI instruction.
PAI_alarmflowchart2
PAI_alarmflowchart3
PAI_alarmflowchart4
PAI_alarmflowchart5
PAI_alarmflowchart6
PAI_alarmflowchart7_v34
PAI_alarmflowchart8_v34
PAI_alarmflowchart9_v34
Operation
The PAI instruction:
  • Monitors one analog input channel for the following conditions:
    • Invalid configuration of the instruction (scaling configuration error)
    • I/O channel fault
    • I/O module fault
    • Input not-a-number (floating-point exception)
    • Raw input out of range
    • Input stuck (unchanging)
    • Out of specification (uncertain) – reported from the device
    • Function check (substitute PV entered manually) - reported from the device
    • Maintenance required - reported from the device
  • For each condition, takes these actions:
    • Pass the PV through unchanged
    • Use the last good PV value
    • Apply a configured replacement PV value
  • Scales the input value from raw (input card) units to engineering (display) units:
    • Linear scaling (optional)
    • Square root characterized scaling (optional).
      TIP:
      Square root characterized scaling is typically used with orifice plates or other pressure-differential elements for flow measurement when the transmitter does not provide square root characterization. The square root scaling in the instruction works with Plus or minus symbol pressure differential to provide positive or negative flow values.
  • Filters PV (optional) to reduce signal noise.
  • Monitors PV Source, PV Quality and PV out-of-range condition.
  • Supports maintenance selection of the substitute PV function to allow manual override of the input PV.
  • Supports virtual PV for use in instruction testing, demonstration, or operator training.
  • Provides entry of a reference (setpoint) value and calculates PV deviation from the reference value.
  • Calculates the PV rate of change (RoC).
    IMPORTANT: To correctly report the instantaneous rate of change, the application code should update the analog PV input at least as often as the PAI instruction is scanned. For example, if the PV input is increasing 1 unit per second and updates every 1.00 seconds, but the PAI instruction is being scanned every 500 ms, the instruction reports a rate of change of 0.0 for the scan when the input doesn’t change, and a rate of change of 2.0 (double) for the scan when the input is updated.
  • Captures Min and Max PV excursion values.
These diagrams illustrate the functionality of the PAI instruction:
PAI_opsflowchart1
PAI_opsflowchart2
PAI_opsflowchart3
PAI_opsflowchart4
Virtualization
Use virtualization for instruction testing and operator training. Set the Inp_Virtual operand to 1 to enable virtualization. After finishing virtualization, set the Inp_Virtual operand to 0 to return to normal operation.
Virtualization enables processing the virtual input instead of normal (scaled) input PV. The instruction has operand (Set_VirtualPV) for entering virtual PV in EU. When the instruction is not in Virtual, the virtual PV setting (Set_VirtualPV) tracks the selected PV for bumpless transfer into Virtual.
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, 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 the
Logix Designer
application only.
  • Description
  • Label for graphic symbol
  • Display Library for HMI Faceplate call-up
  • Instruction name
  • Area name
  • URL link
  • PV raw units
  • PV engineering units
Monitor the PAI 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.
The state of using raw input or maintenance substitute PV is not modified and persists through a controller powerup or PROG-to-RUN transition.
Instruction first run
All commands that are automatically cleared each execution are cleared and ignored.
Filter is initialized. Internal timers are reset.
The instruction executes normally.
Rung-condition-in is false
Set rung-condition-out to rung-condition-in.
The instruction shows a status of IO fault (Sts_IOFault). The calculation of the scaled input PV value (Val_InpPV) is executed to indicate to the operator the actual input value, even though the primary PV (Val) is not updated (holds last value).
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.
The state of using raw input or maintenance substitute PV is not modified and persists through a controller powerup or PROG-to-RUN transition.
Instruction first run
All commands that are automatically cleared on each execution are cleared and ignored.
Filter is initialized. Internal timers are reset.
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.
The instruction shows a status of IO fault (Sts_IOFault). The calculation of the scaled input PV value (Val_InpPV) is executed to indicate to the operator the actual input value, even though the primary PV (Val) is not updated (holds last value).
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 following example shows the processing of raw analog input by the PAI instruction. The raw input value (Local:1:I.Ch0Data) from the analog input card is used as the raw input value (Inp_PVData) for the PAI instruction. The final output process value (Feedwater_Flow) is the fully converted, scaled, and filtered analog value that is propagated through the system. The instruction also uses the Channel Fault and Module Fault parameters taken from the same analog input module as the process value. The Inp_ChanFault is the tag value for the channel (Local:1:I.Ch0Fault). The Inp_ModFault is the tag value for the Local:1:I.AnalogGroupFault tag, which is set when any bits in the Channel Fault word are set.
Ladder Diagram
PAI_example_ladder
Function Block Diagram
PAI_example_FBD
Structured Text
FI_103.Inp_PVData := Local:1:I.Ch0Data;
FI_103.Inp_ModFault := Local:1:I.AnalogGroupFault;
FI_103.Inp_ChanFault := Local:1:I.Ch0Fault;
PAI(FI_103);
Feedwater_Flow := FI_103.Out;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.