Internal Model Control (IMC)

This information applies to the
CompactLogix
5370,
ControlLogix
5570,
Compact GuardLogix
5370,
GuardLogix
5570,
Compact GuardLogix
5380,
CompactLogix
5380,
CompactLogix
5480,
ControlLogix
5580, and
GuardLogix
5580 controllers.
The Internal Model Control (IMC) instruction controls a single process variable by manipulating a single control-variable output. This function block performs an algorithm where the actual error signal is compared against that of an internal first-order lag plus deadtime model of the process. The IMC function block calculates the control variable output (CV) in the Auto mode based on the PV - SP deviation, internal model, and tuning.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram.
Function Block
IMC_FB_avail_v31
Structured Text
IMC(IMC_tag);
Operands
Function Block
Operands:
Type:
Format
Description:
IMC tag
INTERNAL MODEL CONTROL
Structure
IMC Structure
Structured Text
Operands:
Type:
Format
Description:
IMC tag
INTERNAL MODEL CONTROL
Structure
IMC Structure
See
Structured Text Syntax
for more information on the syntax of expressions within structured text.
IMPORTANT:
Whenever an APC block detects a change in Delta Time (DeltaT), a ModelInit will be performed. For this reason the blocks should only be run in one of the TimingModes in which DeltaT will be constant.
  • TimingMode = 0 (Periodic) while executing these function blocks in a Periodic Task
  • TimingMode = 1 (Oversample)
In either case, if the Periodic Task time is dynamically changed, or the OversampleDT is dynamically changed, the block will perform a ModelInit.
The following TimingMode setting are not recommended due to jitter in DeltaT:
  • TimingMode = 0 (Periodic) while executing these function blocks in a Continuous or Event Task
  • TimingMode = 2 (RealTimeSample)
Structure
Input Parameters
Data Type
Description
Valid and Default Values
EnableIn
BOOL
Enable Input. If False, the function block will not execute and outputs are not updated.
Default=TRUE
PV
REAL
Scaled process variable input. This value is typically read from an analog input module.
Valid = any float
Default = 0.0
PVFault
BOOL
PV bad health indicator. If PV is read from an analog input, then PVFault will normally be controlled by the analog input fault status.
If PVFault is TRUE, it indicates an error on the input module, set bit in Status.
Default = FALSE
FALSE = Good Health
PVUEMax
REAL
Maximum scaled value for PV. The value of PV and SP that corresponds to 100% span of the Process Variable. If PVEUMax ≤ PVEUMin, set bit in Status.
Valid = PVEUMin < PVEUMax ≤ maximum positive float
Default = 100.0
PVUEMin
REAL
Minimum scaled value for PV. The value of PV and SP that corresponds to 0% span of the Process Variable. If PVEUMax ≤ PVEUMin, set bit in Status.
Valid = maximum negative float ≤ PVEUMin < PVEUMax
Default = 0.0
SPProg
REAL
SP Program value, scaled in PV units. SP is set to this value when in Program control.
If value of SPProg or SPOper < SPLLimit or > SPHLimit, set bit in Status and limit value used for SP.
Valid = SPLLimit to SPHLimit
Default = 0.0
SPOper
REAL
SP Operator value, scaled in PV units. SP set to this value  when in Operator control.
If value of SPProg or SPOper < SPLLimit or > SPHLimit, set bit in Status and limit value used for SP.
Valid = SPLLimit to SPHLimit
Default = 0.0
SPCascade
REAL
SP Cascade value, scaled in PV units. If CascadeRatio mode and UseRatio is FALSE, then SP is set to this value, typically this will be CVEU of a primary loop. If CascadeRatio mode and UseRatio is TRUE, then SP is set to this value times Ratio.
If value of SPCascade < SPLLimit or > SPHLimit, set bit in Status and limit value used for SP.
Valid = SPLLimit to SPHLimit
Default = 0.0
SPHLimit
REAL
SP high limit value, scaled in PV units.
If SPHLimit < SPLLimit or SPHLimit > PVEUMax, set bit in Status.
Valid = SPLLimit to PVEUMax
Default = 100.0
SPLLimit
REAL
SP low limit value, scaled in PV units.
If SPLLimit < PVEUMin, or SPHLimit < SPLLimit, set bit in Status and limit SP by using the value of SPLLimit.
Valid = PVEUMin to SPHLimit
Default = 0.0
UseRatio
BOOL
Allow Ratio control permissive. Set TRUE to enable ratio control when in CascadeRatio mode.
Default = FALSE
RatioProg
REAL
Ratio Program multiplier, no units (for example, scalar). Ratio and RatioOper are set to this value when in Program control.
If RatioProg or RatioOper < RatioLLimit or > RatioHLimit, set bit in Status and limit value used for Ratio.
Valid = RatioLLimit to RatioHLimit
Default = 1.0
RatioOper
REAL
Ratio Operator multiplier, no units (for example, scalar). Ratio is set to this value when in Operator control.
If RatioProg or RatioOper < RatioLLimit or > RatioHLimit, set bit in Status and limit value used for Ratio.
Valid = RatioLLimit to RatioHLimit
Default = 1.0
RatioHLimit
REAL
Ratio high limit value, no units (for example, scalar). Limits the value of Ratio obtained from RatioProg or RatioOper.
If RatioLLimit < 0, set bit in Status and limit to zero. If RatioHLimit < RatioLLimit, set bit in Status and limit Ratio by using the value of RatioLLimit.
Valid = RatioLLimit to maximum positive float
Default = 1.0
RatioLLimit
REAL
Ratio low limit value, no units (for example, scalar). Limits the value of Ratio obtained from RatioProg or RatioOper.
If RatioLLimit < 0, set bit in Status and limit to zero. If RatioHLimit < RatioLLimit, set bit in Status and limit Ratio by using the value of RatioLLimit.
Valid = 0.0 to RatioHLimit
Default = 1.0
CVFault
BOOL
Control variable bad health indicator. If CVEU controls an analog output, then CVFault will normally come from the analog output's fault status.
If CVFault is TRUE, it indicates an error on the output module, set bit in Status.
Default = FALSE
FALSE = Good Health
CVInitReq
BOOL
CV initialization request. While TRUE, set CVEU to the value of CVInitValue. This signal will normally be controlled by the In Hold status on the analog output module controlled by CVEU or from the InitPrimary output of a secondary IMC loop.
Default = FALSE
CVInitValue
REAL
CVEU initialization value, scaled in CVEU units. When CVInitializing is TRUE set CVEU equal to CVInitValue and CV to the corresponding percentage value. CVInitValue will normally come from the feedback of the analog output controlled by CVEU or from the setpoint of a secondary loop. The function block initialization is disabled when CVFaulted or CVEUSpanInv are TRUE (bad).
Valid = any float
Default = 0.0
CVProg
REAL
CV Program-Manual value. CV is set to this value when in Program control and Manual mode.
If value of CVProg or CVOper < 0 or > 100, or < CVLLimit or > CVHLimit when CVManLimiting is TRUE, set unique Status bit and limit value used for CV.
Valid = 0.0 to 100.0
Default = 0.0
CVOper
REAL
CV Operator-Manual value. CV is set to this value when in Operator control and Manual mode. If not Operator-Manual mode, set CVOper to the value of CV at the end of each function block execution.
If value of CVProg or CVOper < 0 or > 100, or < CVLLimit or > CVHLimit when CVManLimiting is TRUE, set unique Status bit and limit value used for CV.
Valid = 0.0 to 100.0
Default = 0.0
CVOverrideValue
REAL
CV Override value. CV set to this value when in Override mode.
This value should correspond to a safe state output of the IMC loop. If value of CVOverrideValue < 0 or >100, set unique Status bit and limit value used for CV.
Valid = 0.0 to 100.0
Default = 0.0
CVTrackValue
REAL
CV track value. When CVTrackReq is enabled and the IMC function block is in Manual, the CVTrackValue will be ignored, and the IMC internal model will update its historical data with the CVOper or CVProg value. When CVTrackReq is enabled and the IMC function block is in Auto, the internal model will update its historical data based on the value of CVTrackValue. The CV in this case will be allowed to move as if the IMC function block was still controlling the process. This is useful in multiloop selection schemes where you want the IMC function block to follow the output of a different controlling algorithm, where you would connect the output of the controlling algorithm into the CVTrackValue.
Valid = 0.0 to 100.0
Default = 0.0
CVManLimiting
BOOL
Limit CV in Manual mode request. If Manual mode and CVManLimiting is TRUE, CV will be limited by the CVHLimit and CVLLimit values.
Default = FALSE
CVEUMax
REAL
Maximum value for CVEU. The value of CVEU that corresponds to 100% CV. If CVEUMax = CVEUMin, set bit in Status.
Valid = any float
Default = 100.0
CVEUMin
REAL
Minimum value of CVEU. The value of CVEU that corresponds to 0% CV. If CVEUMax = CVEUMin, set bit in Status.
Valid = any float
Default = 0.0
CVHLimit
REAL
CV high limit value. This is used to set the CVHAlarm output. It is also used for limiting CV when in Auto or CascadeRatio modes or Manual mode if CVManLimiting is TRUE.
If CVLLimit < 0, if CVHLimit > 100, if CVHLimit < CVLLimit, set bit in Status. If CVHLimit < CVLLimit, limit CV by using the value of CVLLimit.
Valid = CVLLimit < CVHLimit ≤ 100.0
Default = 100.0
CVLLimit
REAL
CV low limit value. This is used to set the CVLAlarm output. It is also used for limiting CV when in Auto or CascadeRatio modes or Manual mode if CVManLimiting is TRUE.
If CVLLimit < 0, if CVHLimit > 100, if CVHLimit < CVLLimit, set bit in Status.
If CVHLimit < CVLLimit, limit CV by using the value of CVLLimit.
Valid = 0.0 ≤ CVLLimit < CVHLimit
Default = 0.0
CVROCPosLimit
REAL
CV increasing rate of change limit, in percent per second.
Rate of change limiting is only used when in Auto or CascadeRatio modes or Manual mode if CVManLimiting is TRUE.
A value of zero disables CV ROC limiting.
If value of CVROCPOSLimit < 0, set bit in Status and disable CV ROC limiting.
Valid = 0.0 to maximum positive float
Default = 0.0
CVROCNegLimit
REAL
CV decreasing rate of change limit, in percent per second.
Rate of change limiting is only used when in Auto or CascadeRatio modes or Manual mode if CVManLimiting is TRUE.
A value of zero disables CV ROC limiting.
If value of CVROCNegLimit < 0, set bit in Status and disable CV ROC limiting.
Valid = 0.0 to maximum positive float
Default = 0.0
HandFB
REAL
CV HandFeedback value. CV set to this value when in Hand mode and HandFBFault is FALSE (good health). This value would typically come from the output of a field mounted hand/auto station and would be used to generate a bumpless transfer out of Hand mode.
If value of HandFB < 0 or > 100, set unique Status bit and limit value used for CV.
Valid = 0.0…100.0
Default = 0.0
HandFBFault
BOOL
HandFB value bad health indicator. If the HandFB value is read from an analog input, then HandFBFault will normally be controlled by the status of the analog input channel.
If HandFBFault is TRUE, it indicates an error on the input module, set bit in Status.
Default = FALSE
FALSE = Good Health
WindupHIn
BOOL
Windup high request. When TRUE, CV will not be allowed to increase in value. This signal will typically be the WindupHOut output from a secondary loop.
Default = FALSE
WinduplIn
BOOL
Windup low request. When TRUE, CV will not be allowed to decrease in value. This signal will typically be the WindupLOut output from a secondary loop.
Default = FALSE
GainEUSpan
BOOL
ModelGain units in EU or as % of span.
CV ModelGain units in EU or % of span. Set to interpret ModelGain as EU, reset to interpret ModelGain as % of Span.
Default = FALSE
TRUE = Gain in EU
FALSE = Gain in % of span
ProcessGainSign
BOOL
Used only for Autotuning. Sign of the process gain (Delta PV/Delta CV).
Set to indicate a negative process gain (increase in output causes a decrease in PV).
Reset to indicate a positive process gain (increase in output causes an increase in PV).
Default = FALSE
ProcessType
DINT
Process type selection (1=Integrating, 0=non-integrating)
Default = 0
ModelGain
REAL
The internal model gain parameter. Enter a positive or negative gain depending on process direction.
Valid = maximum negative float −> maximum positive float
Default = 0.0
ModelTC
REAL
The internal model time constant in seconds.
Valid = 0.0 to maximum positive float
Default = 0.0
ModelDT
REAL
The internal model deadtime in seconds.
Valid = 0.0 to maximum positive float
Default = 0.0
RespTC
REAL
The tuning parameter that determines the speed of the control variable action in seconds.
Valid = 0.0 to maximum positive float
Default = 0.0
PVTracking
BOOL
SP track PV request. Set TRUE to enable SP to track PV. Ignored when in CascadeRatio or Auto modes.
Default = FALSE
CVTrackReq
BOOL
CV Track request. Set true to enable CV Tracking when autotune is OFF. Ignored in Hand and Override mode.
Default = FALSE
AllowCasRat
BOOL
Allow CascadeRatio mode permissive. Set TRUE to allow CascadeRatio mode to be selected by using either ProgCasRatReq or OperCasRatReq.
Default = FALSE
ManualAfterInit
BOOL
Manual mode after initialization request.
When TRUE, the function block will be placed in the Manual mode when CVInitializing is set TRUE unless the current mode is Override or Hand.
When ManualAfterInit is FALSE, the function block's mode will not be changed.
Default = FALSE
ProgProgReq
BOOL
Program Program Request.
Set TRUE by the user program to request Program control. Ignored if ProgOperReq is TRUE. Holding this TRUE and ProgOperReq FALSE can be used to lock the function block into program control.
When ProgValueReset is TRUE, the function block resets the input to FALSE.
Default = FALSE
ProgOperReq
BOOL
Program Operator Request. Set TRUE by the user program to request Operator control. Holding this TRUE can be used to lock the function block into operator control. When ProgValueReset is TRUE, the function block resets the input to FALSE.
Default = FALSE
ProgCasRatReq
BOOL
Program-Cascade/Ratio mode request. Set TRUE by the user program to request Cascasde/Ratio mode. When ProgValueReset is TRUE, the function block resets the input to FALSE.
Default = FALSE
ProgAutoReq
BOOL
Program-Auto mode request. Set TRUE by the user program to request Auto mode. When ProgValueReset is TRUE, the function block resets the input to FALSE.
Default = FALSE
ProgManualReq
BOOL
Program-Manual mode request. Set TRUE by the user program to request Manual mode. When ProgValueReset is TRUE, the function block resets the input to FALSE.
Default = FALSE
ProgOverrideReq
BOOL
Program-Override mode request. Set TRUE by the user program to request Override mode. When ProgValueReset is TRUE, the function block resets the input to FALSE.
Default = FALSE
ProgHandReq
BOOL
Program-Hand mode request. Set TRUE by the user program to request Hand mode. This value will usually be read as a digital input from a hand/auto station. When ProgValueReset is TRUE, the function block resets the input to FALSE.
Default = FALSE
OperProgReq
BOOL
Operator Program Request. Set TRUE by the operator interface to request Program control. The function block resets this parameter to FALSE.
Default = FALSE
OperOperReq
Operator Operator Request. Set TRUE by the operator interface to request Operator control. The function block will reset this parameter to FALSE.
Default = FALSE
OperCasRatReq
BOOL
Operator-CascadeRatio mode request. Set TRUE by the operator interface to request CascadeRatio mode. The function block will reset this parameter to FALSE.
Default = FALSE
OperAutoReq
BOOL
Operator-Auto mode request. Set TRUE by the operator interface to request Auto mode. The function block will reset this parameter to FALSE.
Default = FALSE
OperManualReq
BOOL
Operator-Manual mode request. Set TRUE by the operator interface to request Manual mode. The function block will reset this parameter to FALSE.
Default = FALSE
ProgValueReset
BOOL
Reset Program control values. When TRUE, the Prog_xxx_Req inputs are reset to FALSE.
When TRUE and Program control, set SPProg equal to SP and CVProg equal to CV.
When ProgValueReset is TRUE, the function block resets this parameter to FALSE.
Default = FALSE
TimingMode
DINT
Selects Time Base Execution mode.
Value/Description
0 = Periodic mode
1 = Oversample mode
2 = Real time sampling mode
For more information about timing modes, see Function Block Attributes.
Valid = 0…2
Default = 0
OverSampleDT
REAL
Execution time for Oversample mode.
Valid = 0 to max. TON_Timer elapsed time (4194.303 seconds)
Default = 0
RTSTime
DINT
Module update period for Real Time Sampling mode.
Valid = 1 to 32,767
1 count = 1 ms
RTSTimeStamp
DINT
Module time stamp value for Real Time Sampling mode.
Valid = 0 to 32,767
(wraps from 32,767 to 0)
1 count = 1 ms
PVTuneLimit
REAL
PV tuning limit scaled in the PV units. When Autotune is running and predicted PV exceeds this limit, the tuning will be aborted.
Range: any float
Default=0
AtuneTimeLimit
REAL
Maximum time for autotune to complete following the CV step change. When autotune exceeds this time, tuning will be aborted.
Valid range: any float > 0.
Default = 60 minutes
NoiseLevel
DINT
An estimate of the noise level expected on the PV to compensate for it during tuning.
The selections are: 0=low, 1=medium, 2=high
Range: 0 to 2
Default=1
CVStepSize
REAL
CV step size in percent for the tuning step test. Step size is directly added to CV subject to high/low limiting.
Range: -100% … 100%
Default=10%
ResponseSpeed
DINT
Desired speed of closed loop response.
Slow response: ResponseSpeed=0
Medium response: ResponseSpeed=1
Fast response: ResponseSpeed=2.
If ResponseSpeed is less than 0, Slow response is used. If ResponseSpeed is greater than 2, Fast response is used.
Range: 0 to 2
Default=1
ModelInit
BOOL
Internal model initialization switch.
Default = FALSE
Factor
REAL
Non-integrating model approximation factor. Only used for integrating process types.
Default = 100
AtuneStart
BOOL
Start Autotune request. Set True to initiate auto tuning of the function block. Ignored when IMC is not in Manual mode. The function block will reset this parameter to FALSE.
Default = FALSE
AtuneUseModel
BOOL
Use Autotune model request. Set True to replace the current model parameters with the calculated Autotune model parameters. The function block sets the input parameter to FALSE.
Default = FALSE
AtuneAbort
BOOL
Abort Autotune request. Set True to abort the auto tuning of the IMC function block. The function block sets input parameter to FALSE.
Default = FALSE
Output Parameters
Data Type
Description
Valid and Default Values
EnableOut
BOOL
Indicates if instruction is enabled. Cleared to false if CVEU overflows.
CVEU
REAL
Scaled control variable output. Scaled by using CVEUMax and CVEUMin, where CVEUMax corresponds to 100% and CVEUMin corresponds to 0%. This output is typically used to control an analog output module or a secondary loop.
CVEU = (CV * CVEUSpan / 100) + CVEUMin
CVEU span calculation: CVEUSpan = ( CVEUMax − CVEUMin )
CV
REAL
Control variable output. This value will always be expressed as 0…100%. CV is limited by CVHLimit and CVLLimit when in Auto or CascadeRatio mode or Manual mode if CVManLimiting is TRUE; otherwise limited by 0 and 100%.
DeltaCV
REAL
Difference between the Current CV and the previous CV (Current CV - previous CV).
CVInitializing
BOOL
Initialization mode indicator. Set TRUE when CVInitReq or function block FirstScan are TRUE, or on a TRUE to FALSE transition of CVFault (bad to good). CVInitializing is set FALSE after the function block has been initialized and CVInitReq is no longer TRUE.
CVHAlarm
BOOL
CV high alarm indicator. TRUE  when the calculated value for CV > 100 or CVHLimit.
CVLAlarm
BOOL
CV low alarm indicator. TRUE when the calculated value for CV < 0 or CVLLimit.
CVROCPosAlarm
BOOL
CV rate of change alarm indicator. TRUE when the calculated rate of change for CV exceeds CVROCPosLimit.
CVROCNegAlarm
REAL
CV rate of change alarm indicator. TRUE when the calculated rate of change for CV exceeds CVROCNegLimit.
SP
REAL
Current setpoint value. The value of SP is used to control CV when in the Auto, the CascadeRatio, or the PV Tracking mode, scaled in PV units.
SPPercent
REAL
The value of SP expressed in percent of span of PV.
SPPercent = ((SP − PVEUMin ) * 100) / PVSpan
where
PVSpan = PVEUMax − PVEUMin
SPHAlarm
BOOL
SP high alarm indicator. TRUE when the SP ≥ SPHLimit.
SPLAlarm
BOOL
SP low alarm indicator. TRUE when the SP ≤ SPLLimit.
PVPercent
REAL
PV expressed in percent of span.
PVPercent = (( PV − PVEUMin ) * 100) / PVSpan
PV Span calculation: PVSpan =
( PVEUMax − PVEUMin )
E
REAL
Process error. Difference between SP and PV, scaled in PV units.
EPercent
REAL
The error expressed as a percent of span.
InitPrimary
BOOL
Initialize primary loop command. TRUE when not in CasRat mode or when CVInitializing is TRUE. This signal normally would be used by the CVInitReq input of a primary loop.
WindupHOut
BOOL
Windup high indicator. TRUE when either a SP high or CV high/low limit has been reached. This signal will typically be used by the WindupHIn input to limit the windup of the CV output on a primary loop.
WindupLOut
BOOL
Windup low indicator. TRUE when either a SP or CV high/low limit has been reached. This signal will typically be used by the WindupLIn input to limit the windup of the CV output on a primary loop.
Ratio
REAL
Current ratio multiplier, no units.
RatioHAlarm
BOOL
Ratio high alarm indicator. TRUE when Ratio > RatioHLimit.
RatioLAlarm
BOOL
Ratio low alarm indicator. TRUE when Ratio < RatioLLimit.
ProgOper
BOOL
Program/Operator control indicator. TRUE when in Program control. FALSE when in Operator control.
CasRat
BOOL
CascadeRatio mode indicator. TRUE when in the CascadeRatio mode.
Auto
BOOL
Auto mode indicator. TRUE when in the Auto mode.
Manual
BOOL
Manual mode indicator. TRUE when in the Manual mode.
Override
BOOL
Override mode indicator. TRUE when in the Override mode.
Hand
BOOL
Hand mode indicator. TRUE when in the Hand mode.
DeltaT
REAL
Elapsed time between updates in seconds.
StepSizeUsed
REAL
Actual CV step size used for tuning.
GainTuned
REAL
The calculated value of the internal model gain after tuning is completed.
TCTuned
REAL
The calculated value of the internal model time constant after tuning is completed.
DTTuned
REAL
The calculated value of the internal model deadtime after tuning is completed.
RespTCTunedS
REAL
The calculated value of the control variable time constant in slow response speed after tuning is completed.
RespTCTunedM
REAL
The calculated value of the control variable time constant in medium response speed after tuning is completed.
RespTCTunedF
REAL
The calculated value of the control variable time constant in fast response speed after tuning is completed.
AtuneOn
BOOL
Set True when auto tuning has been initiated.
AtuneDone
BOOL
Set True when auto tuning has completed successfully.
AtuneAborted
BOOL
Set True when auto tuning has been aborted by user or due to errors that occurred during the auto tuning operation.
AtuneStatus
DINT
Indicates the block tuning status.
AtuneFault
BOOL
Autotune has generated any of the following faults.
Bit 0 of AtuneStatus
AtunePVOutOfLimit
BOOL
Either PV or the deadtime-step ahead prediction of PV exceeds PVTuneLimit during Autotuning. When True, Autotuning is aborted.
Bit 1 of AtuneStatus
AtuneModeInv
BOOL
The IMC mode was not Manual at start of Autotuning or the IMC mode was changed from Manual during Autotuning. When True, Autotuning is not started or is aborted.
Bit 2 of AtuneStatus
AtuneCVWindupFault
BOOL
WindupHIn or WindupLIn is True at start of Autotuning or during Autotuning. When True, Autotuning is not started or is aborted.
Bit 3 of AtuneStatus
AtuneStepSize0
BOOL
StepSizeUsed = 0 at start of Autotuning. When True, Autotuning is not started.
Bit 4 of AtuneStatus
AtuneCVLimitsFault
BOOL
CVLimitsInv and CVManLimiting are True at start of Autotuning or during Autotuning. When True, Autotuning is not started or is aborted.
Bit 5 of AtuneStatus
AtuneCVInitFault
BOOL
CVInitializing is True at start of Autotuning or during Autotuning. When True, Autotuning is not started or is aborted.
Bit 6 of AtuneStatus
AtuneEUSpanChanged
BOOL
CVEUSpan or PVEUSpan changes during Autotuning. When True, Autotuning is aborted.
Bit 7 of AtuneStatus
AtuneCVChanged
BOOL
CVOper is changed when in Operatior control or CVProg is changed when in Program control or CV becomes high/low or ROC limited during Autotuning. When True, Autotuning is
aborted.
Bit 8 of AtuneStatus
AtuneTimeout
BOOL
Elapsed time is greater then AtuneTimeLimit since step test is started. When True, Autotuning is aborted.
Bit 9 of AtuneStatus
AtunePVNotSettled
BOOL
The PV is changed too much to Autotune. When True, Autotuning is aborted. Wait until PV is more stable before autotuning.
Bit 10 of AtuneStatus
Status1
DINT
Bit mapped status of the function block.
Status2
DINT
Additional bit mapped status for the function block.
InstructFault
BOOL
Function block has generated a fault. Indicates state of bits in Status1 and status2.
A value of 0 indicates that no faults have occurred. Any parameters that could be configured with an invalid value must have a status parameter to indicate their invalid status.
Bit 0 of Status1
PVFaulted
BOOL
Process variable PV health bad.
Bit 1 of Status1
CVFaulted
BOOL
Control variable CV faulted
Bit 2 of Status1
HandFBFaulted
BOOL
HandFB value health bad
Bit 3 of Status1
PVSpanInv
BOOL
The span of PV invalid, PVEUMax < PVEUMin.
Bit 4 of Status1
SPProgInv
BOOL
SPProg < SPLLimit or > SPHLimit. Limit value used for SP.
Bit 5 of Status1
SPOperInv
BOOL
SPOper < SPLLimit or > SPHLimit. Limit value used for SP.
Bit 6 of Status1
SPCascadeInv
BOOL
SPCascade < SPLLimit or > SPHLimit. Limit value used for SP.
Bit 7 of Status1
SPLimitsInv
BOOL
Limits invalid: SPLLimit < PVEUMin, SPHLimit > PVEUMax, or SPHLimit < SPLLimit. If SPHLimit < SPLLimit, then limit value using SPLLimit.
Bit 8 of Status1
RatioLimitsInv
BOOL
Ratio high-low limits invalid, low limit < 0 or high limit < low limit.
Bit 9 of Status1
RatioProgInv
BOOL
RatioProg < RatioLLimit or > RatioHLimit. Limit value used for Ratio.
Bit 10 of Status1
RatioOperInv
BOOL
RatioOper < RatioLLimit or > RatioHLimit. Limit value used for Ratio.
Bit 11 of Status1
CVProgInv
BOOL
CVProg < 0 or > 100, or < CVLLimit or > CVHLimit when CVManLimiting is TRUE. Limit value used for CV.
Bit 12 of Status1
CVOperInv
BOOL
CVOper < 0 or > 100, or < CVLLimit or > CVHLimit when CVManLimiting is TRUE. Limit value used for CV.
Bit 13 of Status1
CVOverrideValueInv
BOOL
CVOverrideValue < 0 or > 100. Limit value used for CV.
Bit 14 of Status1
CVTrackValueInv
BOOL
CVTrackValue < 0 or > 100. Limit value used for CV.
Bit 15 of Status1
CVEUSpanInv
BOOL
The span of CVEU invalid, CVEUMax equals CVEUMin.
Bit 16 of Status1
CVLimitsInv
BOOL
CVLLimit < 0, CVHLimit > 100, or CVHLimit <= CVLLimit. If CVHLimit <= CVLLimit, limit CV by using CVLLimit.
Bit 17 of Status1
CVROCLimitInv
BOOL
CVROCLimit < 0, disables ROC limiting.
Bit 18 of Status1
HandFBInv
BOOL
HandFB < 0 or > 100. Limit value used for CV.
Bit 19 of Status1
SampleTimeTooSmall
BOOL
Model DeadTime / DeltaT must be less than or equal to 200.
Bit 20 of Status1
FactorInv
BOOL
Factor < 0.
Bit 21 of Status1
ModuleGainInv
BOOL
ModelGain is 1.#QNAN or -1.#IND (Not A Number), or ±1.$ ( Infinity ∞)
Bit 22 of Status1
ModelTCInv
BOOL
ModelTC < 0.
Bit 23 of Status1
ModelDTInv
BOOL
ModelDT < 0.
Bit 24 of Status1
RespTCInv
BOOL
RespTC < 0.
Bit 25 of Status1
TimingModelInv
BOOL
TimingMode invalid. If the current mode is not Override or Hand then set to Manual mode.
Bit 27 of Status2
RTSMissed
BOOL
Only used when in Real Time Sampling mode. Is TRUE when ABS(DeltaT - RTSTime) > 1 millisecond.
Bit 28 of Status2.
RTSTimeInv
BOOL
RTSTime invalid.
Bit 29 of Status2.
RTSTimeStampInv
BOOL
RTSTimeStamp invalid. If the current mode is not Override or Hand then set to Manual mode.
Bit 30 of Status2.
DeltaTInv
BOOL
DeltaT invalid. If the current mode is not Override or Hand then set to Manual mode.
Bit 31 of Status2.
Description
The following illustration shows the IMC function block configuration.
IMC Description
At each execution, the IMC function block compares the actual PV measurement with PV prediction. The result is called disturbance estimate, which is the effect of unmeasured process disturbances combined with the modeling imprecision. The disturbance estimate is used as a bias for the setpoint of the control variable. In the ideal case of no disturbances and perfect modeling, the disturbance estimate (the feedback signal) becomes equal to zero.
First Order Model
M = K/(T*s+1)*exp(-D*s)
Inverse of Model
Inv = (T*s+1)/K
First Order Filter
F = 1/(e*s+1)
PV prediction = exp(-D*s)/(e*s+1) * (SP - Dist. estimate)
K...
Model gain
T...
Model time constant
D...
Model deadtime
e...
Response time constant
s...
Laplace variable
The function block then calculates the CV value (CVHLimit, CVLLimit, and rate of change limits are imposed) and the PV prediction.
The IMC function block can be used in place of a PID function block with the advantage over the PID control variable when controlling processes with large deadtimes.
For an integrating process type (such as level control and position control), an internal nonintegrating model is used to approximate the integrating process. The Factor parameter is used to convert the identified integrating-process model to a nonintegrating internal model that is used for CV calculation. This is necessary to provide for stable IMC execution.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Function Block
Condition/State
Action Taken
Prescan
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is false
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is true
EnableIn and .EnableOut bits are set to true.
The instruction executes.
Instruction first run
N/A
Instruction first scan
N/A
Postscan
EnableIn and EnableOut bits are cleared to false.
Structured Text
Condition/State
Action Taken
Prescan
See Prescan in the Function Block table.
Normal Execution
See Tag.EnableIn is true in the Function Block table.
Postscan
See Postscan in the Function Block table.
Examples
Function Block
IMC_FB_ex_v31
Structured Text
imcTag.PV := imcInput1;
imcTag.SPProg := imcInput2;
imcTag.CVProg := imcInput3;
IMC(imcTag);
imcOutput1 := imcTag.CVEU;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.