Anda di halaman 1dari 7

PIDE - ENHANCED PID FUNCTION BLOCK

The PIDE function block provides advanced capabilities over the standard PID ladder
language instruction. In addition, it uses the velocity form of the PID algorithm. The
gain terms are applied to the change in the value of the error or PV, not the value of error
or PV.
When looking at this instruction, we see that it has a large number of different inputs and
outputs. It is important that we select and apply the correct inputs to make the function
block function in the mode that is desired. The intent of this document is to break these
down into different sections to make the choice easier for all of us.
Operational States
PROGRAM CONTROL
OPERATOR CONTROL

The users application program controls all modes.


The users HMI system controls the normal operation of the PIDE function.

Table 1. Operational States


A boolean output labeled ProgOper is provided to indicate the operational condition of
the PIDE function block. It provides data on the control state of the function block for
both modes. If it is set to a logical 1, the PIDE block is in the Program control state
and if set to a logical 0, it is in the Operator control state.

Figure 2 PIDE Function Block with Operator Control State Inputs and Outputs.

X
X
Request Program Mode

X
X

X
X

0
0
0
0
0
1
1
1

Operator Mode

X
X

Program Mode

X
X
X

ProgOper Output

ProgProgReq Input

X
X

ProgOperReq Input

OperProgReq Input

OperOperReq Input
Request Operator Mode

X
X
X
X
X
X
X
X

Table 3 Operator/Program Mode Selection.


Table 3 shows the logical state of the various inputs required to place the PIDE function
block into either the Operator or Program mode state.

Operator Mode Faceplate


Included on the RSLogix50000 install CD are a number of faceplates that can be used
with different function blocks. A faceplate is provided for the PIDE function block. This
faceplate makes it very easy to use the PIDE with a HMI control package like RSView.
This faceplate is described on pages C-17 through C-19 of the Process Control and
Drives Instruction Manual, 1756-RM006A-EN-P.
Modes of Operation
CASCADE/RATIO

AUTO
MANUAL
OVERRIDE

HAND

The instruction computes the change in the CV. The instruction regulates the
CV to maintain the PV at either the SPCascade value for Cascade control or
the SPCascade value multiplied by the Ratio value.
The instruction computes the change in the CV. Instruction regulates the CV
to maintain the PV at the SP
Instruction does not compute the change in the CV. CV = CVProg or CVOper
depending upon the operational condition.
In this mode, the instruction does not compute the change in SP. This mode is
typically used to set a safe state CV value for the loop. CV = CVOverride
regardless of the control mode.
Instruction does not compute the change in CV. CV = HandFB, regardless of
the control mode. Typically used when an external Hand/Auto station takes
control of the loop.

Table 4. Modes of Operation


The Cascade/Ratio, Auto, and Manual modes can be controlled by the users program
when in Program control or by an operator faceplate or other interface when in Operator
2

control. Note that the Override and Hand modes have mode request boolean inputs
which are only controlled by the users program. These inputs operate in both Program
and Operator control.
In looking at the function block icon we see that inputs are shown on the left hand side of
the block icon and outputs are shown on the right side. The boolean inputs are used to
control the state of the PIDE function block while the boolean outputs are used as status
or feedback indicators. The programmer, using the setup box inside the function block
icon can select which inputs and outputs he wants to display in his program. For
purposes of this discussion, analog variables are shown as all caps and boolean variables
are shown in lower case letters and have a dot inside their connection boxes.
While the different illustrations and the Figure 7 chart show boolean inputs whose tags
start with the word Prog, there are another duplicate set of inputs that start with the
word Oper that are used when the function block is in the Operator state. These inputs
are shown with an asterisk in front of their name.

Figure 5. PIDE with Auto, Manual, Hand and Override Control Functions for the
Program Control State Input and Outputs shown.

Figure 6. Additional Inputs and Outputs for Cascade and Ratio Control.
While the illustrations and the Table 7 chart show boolean inputs whose tags start with
the word Prog, there are another duplicate set of inputs that start with the word Oper
that are used when the function block is in the Operator state. These inputs are shown
with an asterisk in front of their name.

Enable Hand mode


Enable Override mode
Enable Manual mode
Enable Auto mode
Manual from Auto
Auto from Manual
Enable Cascade mode
Enable Ratio mode
Back to Auto mode
Hand from Manual
Hand from Auto
Hand from Override mode
Override mode
Hand mode

X
X

X
X

X
X
X
X

X
X
X
X
X

CasRat

X
X

X
X
X

Hand

Override

Manual

Auto

UseRatio

AllowCasRat

* ProgCasRatReq

ProgOverrideReq

* ProgAutoReq

* ProgManualReg

ProgHandReq

The chart in Table 7 shows how the different control modes for the PIDE function block
are achieved with different input combinations.. Status indicator states are shown in the
right hand columns.

X
X

X
X

X
X

X
X
X

X
X
X
X

X
X

X
X

Table 7. Control Modes Selection and Feedback Indicators.

Status Words 1 and 2


Two status words are included in the PIDE control structure. They are named Status 1
and Status 2. Both of these status words are DINTs and in normal operation, should
have a value of zero. Each bit in the status word has a different meaning and provides
lots of help in trouble shooting problems in the instruction setup. The error data is
expressed in HEX in the PIDE control structure. Tables 8 and 9
Status 1 provides information on the status of the instruction. Everything is fine when it
has a a value of 0. It uses bits 00 through 29. Each bit has a different meaning with bit
00 indicating that a fault has been detected when its value equals 1. A breakdown of
what each error individual bit means and information regarding what happens to the
value impacted is shown in Table 8.

Status 2 provides information on the timing status of the instruction. It uses bits 27
through 31 to indicate invalid timing states. Table 9 gives the information on the
meaning of the individual bits for this status word.

Status
Parameter
Word
Bit
Address

Explanation

1.00
1.01
1.02
1.03
1.04
1.05
1.06
1.07
1.08

InstructFault
PVFaulted
CVFaulted
HandFBFaulted
PVSpanInv
SPProgInv
SPOperInv
SPCascadeInv
SPLimitsInv

1.09
1.10
1.11
1.12

RatioProgInv
RatioOperInv
RatioLimitsInv
CVProgInv

1.13

CVOperInv

1.14
1.15

CVOverrideInv
CVPreviousInv

1.16
1.17
1.18
1.19
1.20
1.21
1.22
1.23
1.24
1.25
1.26
1.27

CVEUSpanInv
CVLimitsInv
CVROCLimitInv
FFInv
FFPreviousInv
HandFBInv
PgainInv
IGainInv
DGainInv
ZCDeadbandInv
PVDeadbandInv
PVROCLimitsInv

1.28

DevLLimitsInv

1.29

DevDeadbandInv

Notes

An instruction fault has been detected.


Process variable (PV) bad
Control variable (CV) bad
Hand FB value bad
PVEUMax <= PVEUMin
SPProg < SPLLimit or SPProg > SPHLimit
SPOper < SPLLimit or SPOper > SPHLimit
SPCascade < SPLLimit or SPCascade > SPHLimit
SPLLimit < PVEUMin, SPHLimit > PVEUMax, or SPHLimit
< SPLLimit.
RatioProg < RatioLLimit or RatioProg > RatioHLimit
RatioOper < RatioLLimit or RatioOper > RatioHLimit
Low limit < 0 or High limit < low limit.
CVProg < 0 or CVProg > 100, or CVProg < CVLLimit or
CVProg > CVHLimit when CVManLimiting is set.
CVOper < 0 or CVOper > 100, or CVOper < CVLLimit or
CVOper > CVHLimit when CVManLimiting is set
CVOverride < 0 or CVOverride > 100.
CVPrevious < 0 or CVPrevious > 100 or > CVHLimit when in
Auto or Cascade/Ratio mode.
Invalid CVEU span.
CVLLimit < 0, CVHLimit > 100, or CVHLimit < CVLLimit.
CVROCLimit < 0.
FF < -100 or FF > 100.
FFPrevious < -100 or FFPrevious > 100.
HandFB < 0 or HandFB > 100.
Pgain < 0.
Igain < 0.
Dgain < 0.
ZCDeadband < 0
PVDeadband < 0
PVROCPostLimit < 0, PVROCNegLimit < 0, or
PVROCPeriod < 0.
Low low limit < 0, Low limit < 0, High limit < 0 or High high
limit < 0.
Deviation deadband < 0.

18
18
19
1
1
1
2
3
3
4
4
4
5
6
7
8
9
10
11
12
13
14
15

16
17

Table 8. Status 1 Instruction Faults


Many of the faults are derived from limit settings for the different variables that the PIDE
uses. It is very important to make sure that when limits are used, they are set properly.
Notes:
1.
2.
3.
4.

The instruction uses the limited value for SP.


The instruction limits the value using SPLLimit.
The instruction limits the value for Ratio.
The instruction limits the value for CV.

5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.

Status
Word
Bit
Address
27
28
29
30
31

The instruction uses the limited value for CVn-1.


The instruction uses a value of CVEUMax = CVEUMin.
If CVHLimit < CVLLimit, the instruction limits CV using CVLLimit.
The instruction disables ROC limiting.
The instruction uses the limited value for FF.
The instruction uses the limited value for FFn-1.
The instruction uses the limited value for CV.
The instruction uses a value of Pgain = 0.
The instruction uses a value of Igain = 0.
The instruction uses a value of Dgain = 0.
The instruction disables zero crossing deadband.
The instruction uses 0 for the invalid limit.
The instruction uses a value of DevDeadband = 0.
Fault bit is set by the fault indicator of the analog input or output module.
Fault bit is set by the fault indicator of the analog input module which reads the HAND signal
from an External Auto-Manual station.

Parameter

Explanation

TimingModeInv
RTSMissed

Invalid TimingMode value


Only used in real time sampling mode. Set when ABS[
DeltaT RTSTime}> 1 (.oo1 second).
Invalid RTSTime value.
Invalid RTSTimeStamp value
Invalid DeltaT value

RTSTimeInv
RTSTimeStampInv
DeltaTInv

Table 9. Status 2 - Timing Status Errors

Indicators
The PIDE function block has a number of boolean outputs which are used for status or
alarm indicators. These may be selected or deselected by checking or unchecking the
appropriate box in the function blocks for the desired indicator. Some of these indicators
have been reviewed earlier in this presentation. When unselected, they will not show up
on the function block pictoral.
These indicators and their triggers are explained below in Table 10.
Description
CVInitializing

CVHAlarm
CVLAlarm
CVROCAlarm
SPHAlarm
SPLAlarm
WindupHOut

Explanation
Initialization mode indicator. CVInitializing is set when CVInitReq is set, during
instruction first scan, and on a set to cleared transition of CVHealth (bad to good).
CVInitializing is cleared after the instruction has been initialized and CVInitReq is
cleared.
CV high alarm indicator.. Set when calculated value of CV > 100 or CVHLimit.
CV low alarm indicator.. Set when calculated value of CV < 0 or CVLLimit.
CV rate of change alarm indicator. Set when the rate of change for the CV exceeds
the CVROCLimit.
Set point high alarm indicator. Set when SP > SPHLimit.
Set point low alarm indicator. Set when SP < SPLLimit.
Windup high indicator. Set when either a SP high, CV high, or CV low

WindupLOut

RatioHAlarm
RatioLAlarm
ZCDeadbandOn

PVHAlarm
PVLAlarm
PVROCPosAlarm
PVROCNegAlarm
DevHHAlarm
DevHAlarm
DevLAlarm
DevLLAlarm

limit(depending on the control action) has been reached. This signal is typically used
by the WindupHIn input of the primary loop contoller to prevent its output from
winding up.
Windup low indicator. Set when either a SP high, CV high, or CV low
limit(depending on the control action) has been reached. This signal is typically used
by the WindupLIn input of the primary loop contoller to prevent its output from
winding up.
Ratio high alarm indicator. Set when Ratio > RatioHLimit.
Ratio low alarm indicator. Set when Ratio < RatioLLimit.
Zero crossing deadband indicator. When set, the value of CV does not change. If
ZCOff is set, then ZCDeadbandOn is set when the ERROR is within the ZCDeadband
range. If ZCOff is cleared, then ZCDeadbandOn is set when ERROR crosses zero
and remains within the ZCDeadband range. ZCDeadbandOn is cleared when ERROR
exceeds the deadband range or when ZCDeadband = 0.
PV high alarm indicator. Set when PV => PVHLimit. Cleared when PV <
(PVHLimit PVDeadband).
PV low alarm indicator. Set when PV =< PVLLimit. Cleared when PV > (PVLLimit
+ PVDeadband).
PV positive rate-of-change alarm indicator. Set when calculated PV rate-of-change
=> PVROCPosLimit.
PV negative rate-of-change alarm indicator. Set when calculated PV rate-of-change
=< (PVROCNegLimit x 1).
Deviation high-high alarm indicator. Set when PV => (SP+DevHHLimit). Cleared
when PV > (SP+DevHHLimit DevDeadband.
Deviation high alarm indicator. Set when PV => (SP+DevHLimit). Cleared when
PV > (SP+DevHLimit DevDeadband.
Deviation low alarm indicator. Set when PV =< (SP-DevLLimit). Cleared when PV
> (SP-DevHLimit + DevDeadband).
Deviation low-low alarm indicator. Set when PV =< (SP-DevLLLimit). Cleared
when PV > (SP-DevHLimit + DevDeadband).

Table 10 Alarm Indicators

Anda mungkin juga menyukai