Home

1756-RM006 - Rockwell Automation

image

Contents

1. CascadeRatio SP gt pe Select set Output Selected SP Select cleared CasRat mode te ee eee eee eee pe Select Py Selected Non Cascade Ratio SP SPProg a j gt _______ p Select set Output B Select set Output p SPOper i P CC MMC Selected SP Select cleared __ Select cleared i ProgOper i EE pe Select z P gt Select PVTracking and not Auto mode i SP High Low Limiting The high to low alarming algorithm compares SP to the SPHLimit and SPLLimit alarm limits SPHLimit cannot be greater than PVEUmaximum and SPLLimit cannot be less than PVEUMin SP gt SPHLimit SPHAlarm is cleared SP lt SPHLimit SPHAlarm is set SP lt SPLLimit SPLAlarm is cleared SP gt SPLLimit SPLAlarm is set lt SP selected SP p if SPHALARM is set B SPHAlarm Aa ee B SP SPHLimit il P if SPLAlarm is set SPEAlarMm e622 5 Settee oes p gt SP SPLLimit 1 During instruction first scan the instruction clears the SP alarm outputs The instruction also clears the SP alarm limits and disables the alarming algorithm when PVSpanInv is set 88 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Updating the SPOper and SPProg Values Chapter 1 The PIDE instruction makes SPOper SP or SPProg SP to obtain bumpless control s
2. Input Parameter Data Type Description In4 REAL The fourth analog signal input to the instruction Valid any float Default 0 0 Ind REAL The fifth analog signal input to the instruction Valid any float Default 0 0 In6 REAL The sixth analog signal input to the instruction Valid any float Default 0 0 In1Fault BOOL Bad health indicator for In1 If In1 is read from an analog input then In1Fault is normally controlled by the fault status on the analog input If all the In Fault inputs are set the instruction sets the appropriate bit in Status the control algorithm is not executed and Out is not updated Default cleared In2Fault BOOL Bad health indicator for In2 If In2 is read from an analog input then In2Fault is normally controlled by the fault status on the analog input If all the In Fault inputs are set the instruction sets the appropriate bit in Status the control algorithm is not executed and Out is not updated Default cleared In3Fault BOOL Bad health indicator for In3 If In3 is read from an analog input then In3Fault is normally controlled by the fault status on the analog input If all the In Fault inputs are set the instruction sets the appropriate bit in Status the control algorithm is not executed and Out is not updated Default cleared In4Fault BOOL Bad health indicator for In4 If In4 is read from an analog input then In4Fault is normally controlled by the fault stat
3. Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Output Parameter Type Description Values Status3CV3 DINT Additional bit mapped CV3 status for the function block A value of 0 indicates that no faults have occurred InstructFault BOOL function block has generated a fault Indicates state of bitsin Bit 0 of Status1 Status1 Status2 and Status3CVi n where n can be 1 2 or 3 PV1Faulted BOOL Process variable PV1 health bad Bit 1 of Status1 PV2Faulted BOOL Process variable PV2 health bad Bit 2 of Status1 PV1Spanlnv BOOL The span of PV1 invalid PV1EUMax lt PV1EUMin Bit 3 of Status1 PV2Spaninv BOOL The span of PV2 invalid PV2EUMax lt PV2EUMin Bit 4 of Status1 SP1Proginv BOOL SP1Prog lt SP1LLimit or gt SP1HLimit Limit value used for SP Bit 5 of Status1 SP2ProgInv BOOL SP2Prog lt SP2LLimit or gt SP2HLimit Limit value used for SP Bit 6 of Status SP1Operlnv BOOL SP1Oper lt SP1LLimit or gt SP1HLimit Limit value used for SP1 Bit 7 of Status SP2Operlnv BOOL SP2Oper lt SP2LLimit or gt SP2HLimit Limit value used for SP2 Bit 8 of Status SP1LimitsInv BOOL Limits invalid SP1LLimit lt PVIEUMin SP1HLimit gt PV1EUMax Bit 9 of Status1 or SP1HLimit lt SP1LLimit If SP1HLimit lt SP1LLimit then limit value by using SP1LLimit SP2LimitsInv BOOL Limits invalid SP2LLimit lt PV2EUMin SP2HLimit gt PV2EUMax Bit 10 of Status1 or SP2HLimi
4. negate NOT MOD subtract lt S gt gt lt gt amp AND S wl x om a ss wl nN XOR Publication 1756 RMO06G EN P September 2010 OR 395 Appendix B Structured Text Programming Instructions tag_xic Structured text statements can also be instructions See the Locator Table at the beginning of this manual for a list of the instructions available in structured text A structured text instruction executes each time it is scanned A structured text instruction within a construct executes every time the conditions of the construct are true If the conditions of the construct are false the statements within the construct are not scanned There is no rung condition or state transition that triggers execution This differs from function block instructions that use EnableIn to trigger execution Structured text instructions execute as if EnableIn is always set This also differs from relay ladder instructions that use rung condition in to trigger execution Some relay ladder instructions only execute when rung condition in toggles from false to true These are transitional relay ladder instructions In structured text instructions will execute each time they are scanned unless you pre condition the execution of the structured text instruction For example the ABL instruction is a transitional instruction in relay ladder In this example the ABL
5. Publication 1756 RMO06G EN P September 2010 If you want to Use this instruction Languages Page calculate a time Moving Average MAVE structured text 346 average value function bloc find the maximum Maximum Capture MAXC structured text 350 signal in time function bloc find the minimum Minimum Capture MINC structured text 352 signal in time function bloc calculate a moving Moving Standard Deviation MSTD structured text 354 standard deviation function bloc 345 Chapter 6 Statistical Instructions MAVE MAXC MINC MSTD Moving Average MAVE MAVE MAVE_tag storage weight Operands MAVE_04 The MAVE instruction calculates a time average value for the In signal This instruction optionally supports user specified weights Structured Text Operand Type Format Description MAVE tag MOVING_AVERAGE structure MAVE structure storage REAL array holds the moving average samples This array must be at least as large as NumberOfSamples weight REAL array optional used for weighted averages This array must be at least as large as NumberOfSamples Element 0 is used for the newest sample element n is used for the oldest sample Function Block MAVE E Moving Average The operands are the same as for the structured text FGEN instruction gin Out StorageArray WeightArray MOVING_AVERAGE Structure Input Parameter Data
6. Input Parameter Data Type Description SelectorMode DINT Selector mode input This value determines the action of the instruction Value Description 0 manual select 1 high select 2 low select 3 median select 4 average select If this value is invalid the instruction sets the appropriate bit in Status and does not update Out Valid 0 to 4 Default 0 Progselector DINT Program selector input When the selector mode is manual select and the instruction is in Program control ProgSelector determines which input In1 In6 to move into Out If Progselector 0 the instruction does not update Out If ProgSelector is invalid the instruction sets the appropriate bit in Status If invalid and the instruction is in Program control and the selector mode is manual select or Override is set the instruction does not update Out Valid 0 to 6 Default 0 OperSelector DINT Operator selector input When the selector mode is manual select and the instruction is in Operator control OperSelector determines which input In1 In6 to move into Out If OperSelector 0 the instruction does not update Out If OperSelector is invalid the instruction sets the appropriate bit in Status If invalid and the instruction is in Operator control and the selector mode is manual select or Override is set the instruction does not update Out Valid 0 to 6 Default 0 ProgProgReq BOOL Program program request Set by the user program to request Program contro
7. Pe Output _ gt _ FE 11 12 CV FF p 11 Output 12 PV SP FFPrevious 1 12 AFF Select set Output p12 FFh 1 _ ___ gt Select cleared FFSetPrevious Select Set FF 4 FFPrevious when FFSetPrevious is set Selecting the Control Variable Once the PID algorithm has been executed select the CV based on program ot operator control and the current PID mode HandFB CVOverride VP CUPOS Select set Output CVOper Select cleared L Select set Output _ gt ProgOper S Selected CV elect LB Select set Output a Select cleared Calculated CV from B Select set Output Ha Select cleared p gt Select FeedForward algorithm Si t CV used for cascade ration or auto mode gt Select cleared aa ae Manual mode Select 94 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 CV Windup Limiting Limit the CV such that its value cannot increase when WindupHIn is set or decrease when WindupLIn is set These inputs are typically the WindupHOut or WindupLOut outputs from a secondary loop The WindupHIn and WindupLIn inputs are ignored if CVInitializing CVFault or CVEUSpanInv is set CV from windup algorithm selected CV p gt if WindupHin and CV gt CVa WindupHIn gt gt gt lt CV CVn
8. AtuneCV3PV2StepSize0 BOOL CV3StepSizeUsed 0 at start of CV3 PV2 Autotuning When True CV3 PV2 Autotuning is not started Bit 4 of AtuneCV3PV2Status AtuneCV1PV2LimitsFault BOOL CV1LimitsInv and CVManLimiting are True at start of CV1 PV2 Autotuning or during CV1 PV2 Autotuning When True CV1 PV2 Autotuning is not started or is aborted Bit 5 of AtuneCV1PV2Status AtuneCV2PV2LimitsFault BOOL CV2LimitsInv and CVManLimiting are True at start of CV2 PV2 Autotuning or during CV2 PV2 Autotuning When True CV2 PV2 Autotuning is not started or is aborted Bit 5 of AtuneCV2PV2Status AtuneCV3PV2LimitsFault BOOL CV3LimitsInv and CVManLimiting are True at start of CV3 PV2 Autotuning or during CV3 PV2 Autotuning When True CV3 PV2 Autotuning is not started or is aborted Bit 5 of AtuneCV3PV2Status AtuneCV1PV2InitFault BOOL CV Initializing is True at start of CV1 PV2 Autotuning or during CV1 PV2 Autotuning When True CV1 PV2 Autotuning is not started or is aborted Bit 6 of AtuneCV1PV2Status AtuneCV2PV2InitFault BOOL CV2Initializing is True at start of CV2 PV2 Autotuning or during CV2 PV2 Autotuning When True CV2 PV2 Autotuning is not started or is aborted Bit 6 of AtuneCV2PV2Status AtuneCV3PV2InitFault BOOL CV3lnitializing is True at start of CV3 PV2 Autotuning or during CV3 PV2 Autotuning When True CV3 PV2 Autotuning is not start
9. Feature on control Displays the In current In Value Rate Of Change ROC value of the ROC If either the ROCPosAlarm or ROCNegAlarm values are set the text color turns red A tooltip is shown with the text of Rate Of Change when the cursor points to the control Alarm Bar Meter In value of the block as it relates to the Alarm Limits of the block If either the HAlarm or LAlarm values are set the bar color is yellow Likewise if either the HHAlarm or LLAlarm value are set the bar color is red If there are no alarms the bar color is green Alarm Marking Bars values of HHLim HLim LLim and LLLim The HHLim and LLLim bars are red the HLim and LLim bars are yellow Alarm Meter Scale scale of the alarm bar The high part of the scale HHLim Deadband The low end of the scale LLLim Deadband Detail Button Detail Dialog pop up Alarm Alarm1 Detail Ed gallons gallons sec HiHi Limit 90 ROC Fos Limit 30 Hi Limit 80 ROC Neg Limit 30 Lo Limit 20 RO Feriod sec 2 LoLo Limit 10 5 Deadband Status 426 all the status bits that are set in the block If no bits are set the status displays OK Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Appendix D The ALM control has this additional property page x General Display Alarm Fonts Locale In Un
10. Q SourceA Proportional_Gain Q SourceB SourceA regulator_out C SourceB Dancer_Loop_Error Int_saturate_low INTG_04 INTG Integrator L Initialize int_init_val SD q Initialvalue g IGain Isain SD HighLimit LowLimit ee HoldLow L Publication 1756 RM006G EN P September 2010 247 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Proportional Integral PI PI PI_tag Input Parameter Enableln Data Type BOOL The PI instruction provides two methods of operation The first method follows the conventional PI algorithm in that the proportional and integral gains remain constant over the range of the input signal error The second method uses a non linear algorithm where the proportional and integral gains vary over the range of the input signal The input signal is the deviation between the setpoint and feedback of the process Structured Text Operand Type Format Description PI tag PROP_INT structure PI structure Function Block Operand Type Format Description PI tag PROP_INT structure PI structure PROP_INT Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REAL The process error signal input This is the difference between setpoint
11. MMC Input Parameter Type Description Values CV1StepSize REAL CV1 step size in percent for the tuning step test Step size is Range 100 100 directly added to CV1 subject to high low limiting Default 10 CV2StepSize REAL CV2 step size in percent for the tuning step test Step size is Range 100 100 directly added to CV2 subject to high low limiting Default 10 CV3StepSize REAL CV3 step size in percent for the tuning step test Step size is Range 100 100 directly added to CV3 subject to high low limiting Default 10 CV1PV1ResponseSpeed DINT Desired speed of closed loop response for CV1 PV1 Range 0 2 Slow response Responsespeed 0 Default 1 Medium response ResponseSpeed 1 Fast response ResponseSpeed 2 If ResponseSpeed is less than 0 Slow speed is used If ResponseSpeed is greater than 2 Fast speed is used CV2PV1ResponseSpeed DINT Desired speed of closed loop response for CV2 PV1 Range 0 2 Slow response ResponseSpeed 0 Default 1 Medium response ResponseSpeed Fast response ResponseSpeed 2 If ResponseSpeed is less than 0 Slow speed is used If ResponseSpeed is greater than 2 Fast speed is used CV3PV1ResponseSpeed DINT Desired speed of closed loop response for CV3 PV1 Range 0 2 Slow response ResponseSpeed 0 Default 1 Medium response ResponseSpeed Fast response ResponseSpeed 2 If ResponseSpeed is less than 0 Slow speed is used If ResponseSpeed is greater than 2 Fas
12. PGain REAL Proportional gain When the independent form of the PID algorithm is selected enter the unitless proportional gain into this value When the dependent PID algorithm is selected enter the unitless controller gain into this value Enter 0 to disable the proportional control If PGain lt 0 the instruction sets the appropriate bit in Status and uses of value of PGain 0 Valid 0 0 to maximumimum positive float Default 0 0 IGain REAL Integral gain When the independent form of the PID algorithm is selected enter the integral gain in units of 1 minutes into this value When the dependent PID algorithm is selected enter the integral time constant in units of minutes repeat into this value Enter 0 to disable the integral control If IGain lt 0 the instruction sets the appropriate bit in Status and uses a Value of IGain 0 Valid 0 0 to maximumimum positive float Default 0 0 DGain REAL Derivative gain When the independent form of the PID algorithm is selected enter the derivative gain in units of minutes into this value When the dependent PID algorithm is used enter the derivative time constant in units of minutes into this value Enter 0 to disable the derivative control If DGain lt 0 the instruction sets the appropriate bit in Status and uses a value of DGain 0 Valid 0 0 to maximumimum positive float Default 0 0 PVEProportional BOOL Proportional PV control request When set calculate the proportiona
13. g InitialValue Initialize q InMinus g Initial alue O WordSize C Multiplier Initialize_Position Et Motor B PMUL Pulse Multiplier In Out E Initialize g InitialValue Q WordSize c Multiplier Publication 1756 RM006G EN P September 2010 267 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN S Curve SCRV Operands SCRV SCRV_tag SCRV_O14 The SCRV instruction performs a ramp function with an added jerk rate The jerk rate is the maximum rate of change of the rate used to ramp output to input Structured Text Operand Type Format Description SCRV tag S_CURVE structure SCRV structure Function Block Operand Type Format Description SCRV tag S_CURVE structure SCRV structure S CURVE Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL The Initialize input to the instruction When set the instruction holds Out InitialValue Default is cleared InitialValue REAL Initial value of S Curve When Initialize is set Out InitialValue
14. 1 When Initialize is set the instruction sets the following Out InitialValue Outh 1 Out Rate 0 Rate 0 2 When HoldMode is cleared Out is moving toward In and HoldEnable is set the rate begins decreasing towards zero at the jerk rate Due to the JerkRate Out is held at whatever value it had when the rate reached zero When the Out is finally held constant it has a value that is different from the value it had the instant that HoldEnable was set When HoldMode is set Out is moving toward In and HoldEnable is set the rate is immediately set to zero Out is held at whatever value it had when HoldEnable was set Reducing the JerkRate during a transition might cause Out to overshoot the In If overshoot occurs it is the result of enforcing the entered JerkRate You can avoid an overshoot by decreasing JerkRate in small steps while tuning or by changing JerkRate while Out In not during a transition The time that is required for Out to equal a change in the input is a function of AccelRate JerkRate and the difference between In and Out 272 Publication 1756 RMO06G EN P September 2010 A Counts Initial output Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Calculating output and rate values In transition from an initial value to final value Out goes through three regions In region 1 and region 3 the rate of change of Out is based on JerkRate In region 2 the rate
15. BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value Publication 1756 RMO06G EN P September 2010 315 Chapter 4 316 Filter Instructions DERV HPF LDL2 LPF NTCH Description The NTCH instruction uses the Order parameter to control the sharpness of the cutoff The QFactor parameter controls the width and the depth ratio of the notch The NTCH instruction is designed to execute in a task where the scan rate remains constant The NTCH instruction uses this equation 2 21 s o i s x 2 0 Q where i is the Order operator with these parameters limits where DeltaT is in seconds Parameter Limitations WNotch second order LowLimit 0 0000001 DeltaT WNotch fourth order DeltaT HighLimit 0 77 DeltaT OFactor LowLimit 0 5 HighLimit 100 0 Whenever the value computed for the output is invalid NAN or INF the instruction sets Out the invalid value and sets the arithmetic overflow status flag When the value computed for the output becomes valid the instruction initializes the internal parameters and sets Out In Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Publication 1756 RMO06G EN P September 2010 Filter Instruc
16. Operands SRTP SRTP_tag Structured Text SRTP tag SPLIT_RANGE structure SRTP structure Function Block SRTP_O2 Split Range Time Proportional Function SRTP ta SPLIT_RANGE structure SRTP structure In HeatOut E 3 structure CoolOut f HeatTimePercent CoolTimePercent SPLIT_RANGE Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input asking for heating or cooling This input typically comes from the CVEU of a PID loop Valid any float CycleTime REAL The period of the output pulses in seconds A value of zero turns off both heat and cool outputs If this value is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid any positive float Default 0 0 maximumHeatIn REAL maximumimum heat input This value specifies the percentage of the In which will cause maximumimum heating This is typically 100 for a heat cool loop Valid any float Default 100 0 MinHeatln REAL Minimum heat input Specify the percent of In that represents the start of the heating range and causes minimum heating This is typically 50 for a heat cool loop Valid any float Default 50 0 Publication 1756 RMO06G EN P September 201
17. PVEUmaximum PVEUMin SPHAlarm BOOL SP high alarm indicator Set when the SP gt SPHLimit SPLAlarm BOOL SP low alarm indicator Set when the SP lt SPLLimit PVPercent REAL PV expressed in percent of span PVPercent PV PVEUMin x 100 PVSpan PV Span calculation PVSpan PVEUmaximum 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 Set when not in Cascade Ratio mode or when CVInitializing is set This signal is normally used by the CVInitReq input of a primary PID loop 72 Publication 1756 RMO006G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Output Parameter Data Type Description WindupHOut BOOL Windup high 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 WindupHIn input to prevent the windup of the CV output on a primary loop WindupLOut BOOL Windup low indicator Set when either a SP CV high or CV low limit depending on the control action has been reached This signal is typically used by the WindupLIn input to prevent the windup of the CV output on a primary loop Ratio REAL Current ratio multiplier RatioHAlarm BOOL
18. Structured Text DEDT_01 In SimulatedLoop CVEU DEDT DEDT_01 DEDT_ Olarray LDLG 01 In DEDT 01 Out LDLG LDLG_01 SimulatedLoop PV LDLG 01 0ut PIDE SimulatedLoop Function Block DEDT_04 DEDT E Deadtime LDLG_04 LDLG Ei Lead Lag SimulatedLoop PIDE Enhanced PID StorageArray DEDT_O1 array PVHHAIarm PVHAlarm PVLAlarm PYLLAlarm PVROCPosAlarm PYROCNegAlarm D DevHHAlarm amp E ProgProgReq ProgOperReq E ProgCasRatReq DewHAlarm D E ProgAutoReq DevLAlarm E ProghanualReq DevLLAlarm ProgOverrideReg ProgOper D ProgHandReq Override Publication 1756 RMO06G EN P September 2010 63 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Enhanced PID PIDE Operands PIDE PIDE_ tag PIDE_04 PIDE Enhanced PID E ProgProgReq ProgOperReq ProgCasRatReg ProgAutoReq ProgManualReq FE ProgOverrideReg ProgHandReq AutotuneTag 64 The PIDE instruction provides enhanced capabilities over the standard PID instruction The instruction uses the velocity form of the PID algorithm The gain terms are applied to the change in the value of error or PV not the value of error or PV Structured Text Operand Type Format Description PIDE tag PIDE_ENHANCE
19. To specify the Autotune Tag PIDE tag PV Units string for the PV and SP units on the control Time Span length of time that the values are kept for the trends Display Time length of time that the values are displayed in the trends PV SP and CV Colors color of the trend line for each parameter Tuning Access level of access full or read only Detail Access Alarm Colors alarm colors represent the colors in the color bars Alarm 1 Color represents the Lo or Hi alarms Alarm 2 color represents the low low or high high alarms 440 Publication 1756 RMO06G EN P September 2010 ASCII Character Codes Character Dec Hex Character Dec Hex Character Dec Hex Character Dec Hex ctr NUL 0 00 T ga Ma BES B yM c SH ctrl A SOH 1 01 i 34 22 C 67 43 d 100 64 ctrl B STX 2 02 35 23 D 68 44 e 101 65 ctrl C ETX 3 03 36 24 E 69 45 f 102 66 ctrl D EOT 4 04 37 25 F 70 46 g 103 67 ctrl E ENQ 5 05 amp 38 26 G 71 47 h 104 68 ctrl F ACK 6 06 39 27 H 72 48 i 105 69 ctrl G BEL 7 07 40 28 l 73 49 j 106 6A ctrl H BS 8 08 41 29 J 74 4A k 107 6B ctrl I HT 9 09 7 42 2A K 75 4B l 108 6C ctrl J LF 10 I 0A 43 2B L 76 4C m 109 6D ctrl K VT 11 0B 44 2C M 7 4D n 110 6E ctrl L FF 12 0C 45 2D N 78 4E 0 111 6F ctrl M CR 13 r
20. 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The selected output of the algorithm Arithmetic status flags are set for this output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred SelectorInv Status 1 BOOL Invalid Selector value Description Based on the Selector value the MUX instruction sets Out equal to one of Arithmetic Status Flags Fault Conditions Condition prescan Execution eight inputs Arithmetic status flags are set for the Out output none Function Block Action No action taken instruction first scan Internal parameters are cleared instruction first run No action taken Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated Enableln is set The instruction executes EnableOut is set postscan Publication 1756 RMO06G EN P September 2010 No action taken 331 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Example This MUX instruction selects In1 In2 or In3 based on the Selector The instruction sets Out In For example if select_value 2 the instruction sets Out analog_input2 MUX_O04 MUX analog_input1 Multiplexer analog_inpu
21. 1 00 seconds mMin The example Block Tag in the screen above shows a controller scoped tag name By default function blocks automatically assign a program scoped block tag when you insert the function block To specify a program scoped block tag named PID1 enter program program_name PID1 where program_name is the name of the program 422 Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Appendix D Configuring display properties The display property page determines general screen properties Logix5000 PIDE Faceplate Control Properties x General Display PIDE Fonts Locale r General Drawing Show Frame BackgroundColor v Feature on property page Background Color Cancel Apply Description This button is the color of the faceplate s background color default light gray Show Frame This option turns on and off a 3 dimensional frame to the control This allows the user to separate the control from other items that may be on the display default checked 423 Appendix D 424 Function Block Faceplate Controls Configuring Font Properties The fonts property page determines the fonts that appear on the faceplates Configure a ControlFont to be used in the main part of the faceplates and a MinorFont font to be used in scales and other minor portions of the faceplates L
22. CV3StepSizeUsed REAL Actual CV3 step size used for tuning Publication 1756 RMO06G EN P September 2010 229 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Output Parameter Type Description Values CV1PV1GainTuned REAL The calculated value of the internal model gain for CV1 PV1 after tuning is completed CV2PV1GainTuned REAL The calculated value of the internal model gain for CV2 PV1 after tuning is completed CV3PV1GainTuned REAL The calculated value of the internal model gain for CV3 PV1 after tuning is completed CV1PV2GainTuned REAL The calculated value of the internal model gain for CV1 PV2 after tuning is completed CV2PV2GainTuned REAL The calculated value of the internal model gain for CV2 PV2 after tuning is completed CV3PV2GainTuned REAL The calculated value of the internal model gain for CV3 PV2 after tuning is completed CV1PV1TCTuned REAL The calculated value of the internal model time constant for CV1 PV1 after tuning is completed CV2PV1TCTuned REAL The calculated value of the internal model time constant for CV2 PV1 after tuning is completed CV3PV1TCTuned REAL The calculated value of the internal model time constant for CV3 PV1 after tuning is completed CV1PV2TCTuned REAL The calculated value of the internal model time constant for CV1 PV2 after tu
23. Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan No action taken No action taken Publication 1756 RMO06G EN P September 2010 43 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Example The D3SD instruction is typically used to control 3 state devices such as high low off feed systems In this example the D3SD instruction controls a feed system consisting of a pair of solenoid valves adding vegetable oil to a batch tank One of the valves is on a large diameter feed pipe into the batch tank and the other valve is plumbed in parallel on a small diameter feed pipe When oil is first added the D3SD instruction is commanded to the fast feed state state 2 where both valves are opened When the oil added approaches the target amount the D3SD instruction is commanded to the slow feed state state 1 where the large valve is closed and the small valve is kept open When the target is reached the D3SD instruction is commanded to go to the off state state 0 and both valves are closed As long as the D3SD instruction is in Program control the valves open according to the CloseOilFeed SlowOilFeed and FastOilFeed inputs The operator can also take Operator control of the feed system i
24. Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Commanded state in Operator control The following diagram illustrates how the D2SD instruction operates when in ooo n Operator control OOOO OperOReq is set StateOPerm is set Set Command Status lt Oper1Req is set State1Perm is set Te o Cleared Command Status be If both OperOReq and Oper1Req are set e the instruction sets the appropriate bit in Status e if Override and Hand are cleared the instruction holds the previous state After every instruction execution the instruction e clears all the operator request inputs e if ProgValueReset is set clears all the program request inputs Hand mode or Override mode The following table describes how the D2SD instruction determines whether to operate in Hand or Override mode ProgHandReq ProgOverrideReq FaultAlarm and Description OverrideOnFault set either either Hand mode Hand is set Override is cleared cleared set either Override mode Hand is cleared Override is set cleared either set Override mode Hand is cleared Override is set When the instruction is in Override mode CommandStatus OverrideState When the instruction is in Hand mode CommandStatus HandFB Publication 1756 RMO06G EN P September 2010 35 Output state Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG P
25. Refer to CV Rate of Change Limiting on page 96 CV1ROCNegLimit REAL CV1 rate of change limit in percent per second Rate of change Valid 0 0 to maximum positive limiting is only used when in Auto mode or in Manual mode if float CVManLimiting is TRUE A value of zero disables CV1 ROC limiting If value of CV1ROCLimit lt 0 set bit in Status and disable Default 0 0 CV1 ROC limiting Refer to CV Rate of Change Limiting on page 96 CV2ROCNegLimit REAL CV2 rate of change limit in percent per second Rate of change Valid 0 0 to maximum positive limiting is only used when in Auto mode or in Manual mode if float CVManLimiting is TRUE A value of zero disables CV2 ROC limiting If value of CV2ROCLimit lt 0 set bit in Status and disable Default 0 0 CV2 ROC limiting Refer to CV Rate of Change Limiting on page 96 CV3ROCNegLimit REAL CV3 rate of change limit in percent per second Rate of change Valid 0 0 to maximum positive limiting is only used when in Auto mode or in Manual mode if float CVManLimiting is TRUE A value of zero disables CV3 ROC limiting If value of CV3ROCLimit lt 0 set bit in Status and disable Default 0 0 CV3 ROC limiting Refer to CV Rate of Change Limiting on page 96 CV1HandFB REAL CV1 HandFeedback value CV1 set to this value when in Hand Valid 0 0 100 0 mode and CV1HandFBFault is FALSE good health This value would typically come from the output of a field mounted Default 0 0 hand auto station and
26. SNEG 339 structured text Selected Negate function block SOC 278 structured text Second Order Controller function block SRTP 125 structured text Split Range Time Proportional function block SSUM 341 structured text Selected Summer function block Publication 1756 RMO06G EN P September 2010 Instruction Locator Instruction TOT Totalizer UPDN Up Down Accumulator Location Languages structured text function block structured text function block Publication 1756 RMO06G EN P September 2010 16 Preface Introduction This manual is one of several Logix based instruction documents Documents Logix5000 Controllers General Instructions Reference Manual publication 1756 RM003 Task Goal Programming the controller for sequential applications Instructions Reference Manual publication 1756 RM006 Logix5000 Controllers Process Control and Drives Programming the controller for process or drives applications Logix5000 Controllers Motion Instructions Reference Manual publication 1756 RMO007 Programming the controller for motion applications Logix5000 Controller Import Export Reference Manual publication 1756 RM084 Importing a text file or tags into a project Exporting a project or tags to a text file Logix5000 Controller Converting PLC 5 or SLC Converting a PLC 5 or SLC 500 500 Logic to Logix5000 Logic Reference Manual application to a Logix5000
27. TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value Description The DERV instruction supports a bypass input that lets you stop calculating Publication 1756 RMO06G EN P September 2010 the derivative and pass the signal directly to the output When Bypass is The instruction uses this equation set Out In In _ In cleared and DeltaT gt 0 rae Out Gain DeltaT In _ In where DeltaT is in seconds 293 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Inn1 n INp 1 IN instruction first run INn 1 Np Inn 1 IMa Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan 294 No action
28. Valid any float Default 0 0 AbsAlgRamp BOOL Ramp type If set the instruction functions as an absolute value ramp If cleared the instruction functions as an algebraic ramp Default is set AccelRate REAL Acceleration rate in input units per second A value of zero prevents Out from accelerating When AccelRate lt 0 the instruction assumes AccelRate 0 and sets the appropriate bit in Status Valid 0 0 to maximum positive float Default 0 0 DecelRate REAL Deceleration rate in input units per second A value of zero prevents Out from decelerating When DecelRate lt 0 the instruction assumes DecelRate 0 and sets the appropriate bit in Status Valid 0 0 to maximum positive float Default 0 0 268 Publication 1756 RMO06G EN P September 2010 Input Parameter JerkRate Data Type REAL Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Description Jerk rate in input units per second Specifies the maximum rate of change in the acceleration and deceleration rates when ramping output to input When JerkRate DeltaT gt AccelRate and or DecelRate the acceleration and deceleration rates are not bounded In this situation the instruction behaves as a ramp function When JerkRate lt 0 the instruction assumes JerkRate 0 and sets the appropriate bit in Status Valid 0 0 to maximum positive float Default 0 0 HoldMode BOOL S Curve hold mode parameter This parameter is used with the Hol
29. 0 0 PVTracking BOOL SP track PV request Set TRUE to enable SP to track PV Ignored Default FALSE when in Auto modes SP will only track PV when all three outputs are in manual As soon as any output returns to Auto PVTracking stops Refer to Current SP on page 88 CVTrackReq BOOL CV Track request Set true to enable CV Tracking when autotune is Default FALSE OFF Ignored in Hand and Override mode Refer to CV1TrackValue on page 173 for more information ManualAfterlnit BOOL Manual mode after initialization request Default FALSE e When TRUE the appropriate CV n where n can be 1 2 or 3 will be placed in Manual mode when CV n Initializing is set TRUE unless the current mode is Override or Hand e When ManualAfterlnit is FALSE the CV n mode will not be changed Refer to Execution on page 80 Instruction First Scan ProgProgReq BOOL Program Program Request Default FALSE e Set TRUE by the user program to request Program control e Ignored if ProgOperReg is TRUE Holding this TRUE and ProgOperReq FALSE can be used to lock the function block into program control e When ProgValueReset is TRUE the function block resets the input FALSE Refer to Switching between Program control and Operator control on page 114 180 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 CC Input Parameter Data Type Description Values ProgOperReq BOOL
30. 0 or gt 100 Limit value used for CV Bit 14 of Status CVTrackValuelnv BOOL CVTrackValue lt 0 or gt 100 Limit value used for CV Bit 15 of Status CVEUSpanInv BOOL The span of CVEU invalid CVEUMax equals CVEUMin Bit 16 of Status CVLimitsInv BOOL CVLLimit lt 0 CVHLimit gt 100 or CVHLimit lt CVLLimit If Bit 17 of Status CVHLimit lt CVLLimit limit CV by using CVLLimit CVROCLimitInv BOOL CVROCLimit lt 0 disables ROC limiting Bit 18 of Status1 HandFBInv BOOL HandFB lt 0 or gt 100 Limit value used for CV Bit 19 of Status SampleTimeToosmall BOOL Model DeadTime DeltaT must be less than or equal to 200 Bit 20 of Status FactorInv BOOL Factor lt 0 Bit 21 of Status1 ModelGainInv BOOL ModelGain for Model Gain is 1 4QNAN or 1 4IND Not A Bit 22 of Status1 Number or 1 Infinity 00 ModelTCinv BOOL ModelTC for Model Time Constant lt 0 Bit 23 of Status ModelDTInv BOOL ModelDT for Model Deadtime lt 0 Bit 24 of Status RespTCInv BOOL RespIC for Response Time Constant lt 0 Bit 25 of Status1 TimingModelnv BOOL TimingMode invalid If the current mode is not Override or Bit 27 of Status2 Hand then set to Manual mode RTSMissed BOOL Only used when in Real Time Sampling mode TRUE whenABS Bit 28 of Status2 DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL RTSTime invalid Bit 29 of Status2 RTSTimeStamplnv BOOL RTSTimeStamp invalid If the current mode is not Override or Bit 30 of Sta
31. 0D 46 2E 0 79 4F p 112 70 ctrl N SO 14 0E 47 2F P 80 50 q 113 71 ctrl O SI 15 OF 0 48 30 0 81 51 r 114 72 ctrl P DLE 16 10 1 49 31 R 82 52 S 115 73 ctrl Q DC1 17 11 2 50 32 S 83 53 t 116 74 ctrl R DC2 18 12 3 51 33 T 84 54 u 117 75 ctrl S DC3 19 13 4 52 34 U 85 55 V 118 76 ctrl T DC4 20 14 5 53 35 V 86 56 Ww 119 77 ctrl U NAK 21 15 6 54 36 W 87 57 X 120 78 ctrl V SYN 22 16 7 55 37 X 88 58 y 121 79 ctrl W ETB 23 17 8 56 38 y 89 59 Z 122 7A ctrl X CAN 24 18 9 57 39 Z 90 5A 123 7B ctrl Y EM 25 19 58 3A 91 5B 124 7C ctrl Z SUB 26 1A 59 3B 92 5C 125 7D ctri ESC 27 1B lt 60 3C 93 5D 126 7E ctrl FS 28 1C 61 3D h 94 5E DEL 127 7F ctrl GS 29 1D gt 62 3E _ 95 5F ctrl A RS 30 1E 63 3F 96 60 ctrl JUS 31 1F 64 40 a 97 61 SPACE 32 20 A 65 41 b 98 62 Notes A Alarm 24 ALARM structure 24 ALM 24 arithmetic status flags overflow 376 ASCII instructions STOD 398 assume data available 373 374 375 attributes converting data types 416 immediate values 415 autotuning 78 C CASE 401 common attributes 415 converting data types 416 immediate values 415 converting data types 416 Coordinated Control CC fuction block 161 fuction block configuration 161 function block diagram 163 input parameters 169 model initialization 167 output parameters 186 temperature control example 164 tuning 165 tuning e
32. AREAL value uses up to 24 bits for the base value 23 stored bits plus a hidden bit A DINT value uses up to 32 bits for the value one for the sign and 31 for the value If the DINT value requires more than 24 significant bits it may not convert to the same REAL value If it will not the controller rounds to the nearest REAL value using 24 significant bits DINT to SINT or INT To convert a DINT value to a SINT or INT value the controller truncates the upper portion of the DINT and sets the overflow status flag if necessary The following example shows the result of a DINT to SINT or INT conversion EXAMPLE Conversion of a DINT to an INT and a SINT This DINT value Converts to this smaller value 16 0001_0081 65 665 INT 16 0081 129 SINT 16 81 127 Publication 1756 RMO06G EN P September 2010 419 Appendix Common Attributes REAL to an integer To convert a REAL value to an integer value the controller rounds the fractional part and truncates the upper portion of the non fractional part If data is lost the controller sets the overflow status flag Numbers round as follows e Numbers other than x 5 round to the nearest whole number e X 5 rounds to the nearest even number The following example show the result of converting REAL values to DINT values EXAMPLE Conversion of REAL values to DINT values This REAL value Converts to this DINT value
33. AtuneCVInitFault BOOL CVInitializing is True at start of Autotuning or during Bit 6 of AtuneStatus Autotuning When True Autotuning is not started or is aborted AtuneEUSpanChanged BOOL CVEUSpan or PVEUSpan changes during Autotuning When Bit 7 of AtuneStatus True Autotuning is aborted AtuneCVChanged BOOL CVOper is changed when in Operatior control or CVProg is Bit 8 of AtuneStatus changed when in Program control or CV becomes high low or ROC limited during Autotuning When True Autotuning is aborted AtuneTimeout BOOL Elapsed time is greater then AtuneTimeLimit since step test is Bit 9 of AtuneStatus started When True Autotuning is aborted AtunePVNotSettled BOOL The PV is changed too much to Autotune When True Bit 10 of AtuneStatus Autotuning is aborted Wait until PV is more stable before autotuning Status 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 Bit 0 of Status 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 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 Status PVSpaninv BOOL The span of PV invali
34. Bit 13 of Status3CV1 Publication 1756 RMO06G EN P September 2010 195 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Output Parameter Data Type Description Values CV2RespTClInv BOOL CV2 Response Time Constant CV2RespIC lt 0 Bit 13 of Status3CV2 CV3RespTCInv BOOL CV3 Response Time Constant CV3RespIC lt 0 Bit 13 of Status3CV3 CV1Targetinv BOOL CV1 Target CV1Target lt 0 or gt 100 Bit 14 of Status3CV1 CV2TargetInv BOOL CV2 Target CV2Target lt 0 or gt 100 Bit 14 of Status3CV2 CV3Targetinv BOOL CV3 Target CV3Target lt 0 or gt 100 Bit 14 of Status3CV3 196 Publication 1756 RMO06G EN P September 2010 Modular Multivariable Control MMC Function Block Ea g Pv g Pv2 g SP1Prog g SP2Prog g CV1Prog CV2Prog Q CV3Prog E ProgProgReq o ProgOperReq q ProgCV30verride Req Publication 1756 RMO06G EN P September 2010 MMC_01 MMC E ProgCV 1AutoReg E ProgCV2AutoReq E ProgCV3AutoReg E ProgCV iManualReq o ProgCV2ManualReq E ProgCV3ManualReq E ProgCV 10verride Req E ProgCV20verride Req Modular Multivariable Control CV1EU CV2EU CVSEU SP1 SP2 ProgOper C 4Auto CV2Auto CV3Auto CV1Manual CV2Manual CV3Manual CV1 Override CV2Override CV3O0verride Cn oo A GOGU GOB CM O Ue gg E oqgoooco0odbsodst OGOGO Advanced Process Control Function Blocks IMC CC MMC Chapter 2 The Modular Multivariable control MMC function bl
35. D Device2State CommandO0Status Command1 Status p Command2Status F FaultAlarm ModeAlarm ProgOper A Override amp SmallOilValve E LargeOilValve Switching between Program control and Operator control The following diagram shows how the D3SD instruction changes between Program control and Operator control OperOperReq is set when ProgProgReg is cleared ProgOperReg is set 1 Override transitions from set to cleared and Hand is cleared Hand transitions from set to cleared and Override is cleared ProgProgReq is set when ProgOperReg is cleared Yyyy mN Operator Control OperProgReq is set when ProgOperReg is cleared and OperOperReg is cleared B y 1 The instruction remains in Operator control mode when ProgOperReg is set For more information on program and operator control see page 381 Publication 1756 RM006G EN P September 2010 45 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Commanded state in Program control The following table describes how the D3SD instruction o Program control perates when in ProgO Prog Prog2 State0 State1 State2 Description Command Command Command Perm Perm Perm cleared cleared set either either set CommandOStatus is cleared Command Status is cleared Command2Status is set cleared set cleared either set either Command0Status is
36. Else KpShapeGain ShapeKpMinus KpRange KpInRange Kp input ratio If In lt KpInRange 1 KpInputRatio In X KpInRange Else KpInputRatio 1 Kp ratio If not parabolic mode KpRatio KpInputRatio x 0 5 If parabolic mode KpRatio KpInputRatio x 0 333 Kps shaping gain Kps Kp x KpShapeGain 1 x KpRatio 1 Proportional output If In lt KpInRange PTerm Kps xIn Else limit gain PTerm Kps x KpRange In KpRange x KpShapeGain Wid shaping gain If In gt 0 then WlidShapeGain ShapeWldPlus Else WlidShapeGain ShapeWldMinus Wid input If In gt WidRange then WidInput WidInRange Else if In lt WldInRange then WldInput WldInRange Else WldInput In 254 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Value Wld input ratio Equations If In lt WidInRange 1 WldInputRange In x WidInRange Else WidInputRange 1 Wd ratio If not parabolic mode WldRatio WldInputRatio If parabolic mode WldRatio WldInputRatio Wilds shaping gain Wilds Wld x WldShapeGain 1 x WldRatio 1 Wlds limits LowLimit gt 0 0 77 HighLimit E TEHN DeltaT Integral output WldInput WidInput _ ITerm Kps x Wlds x 5 x DeltaT ITerm _ Output Publication 1756 RMO06G EN P September 2010 Out PTerm ITerm
37. Gain 60 REAL The process gain multiplier This value allows the simulation of a process gain The In signal is multiplied by this value In x Gain Bias Valid any float Default 1 0 Publication 1756 RMO06G EN P September 2010 Input Parameter Data Type Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Description Bias REAL The process offset level This value allows the simulation of an ambient condition This value is summed with the results of the multiplication of In times Gain In x Gain Bias Valid any float Default 0 0 TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode Valid 0 2 Default 0 For more information about timing modes see appendix Function Block Attributes OversampleDT REAL Execution time for oversample mode Valid 0 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Output Parameter Data Type Valid 0 32 767ms Default 0 Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are used for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algori
38. IMC Function Block IM C_04 IMC Internal Model Control Pro gPro gReq ProgOperReq fj ProgCasRatReq E Pro gAutoReq E ProghManualReq Pro gQve ride Req Pro gHandReq 140 The IMC function block 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 IMC Function Block Configuration Example Process SP Disturbance The IMC Function Block 1st Order Inverse of Filter Model Disturbance Process Prediction Estimate 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 gai
39. Move Logical Instructions DFF JKFF RESD SETD Chapter 7 Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan No action taken No action taken instruction first run Out is set OutNot is cleared Out is set OutNot is cleared Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example When Set is set Out is set when Reset is set Out is cleared Set has precedence over Reset Publication 1756 RMO06G EN P September 2010 Structured Text SETD_01 Set SETD_01 Reset SETD SETD 01 S output not output Function Block 0 set_input pB reset_input Se S set_input reset_input ETD _01 0ut ETD _01 0utNot SETD_04 SETD Set Dominant Set Out Reset OutNot o o a aoa 0 a not_output 367 Chapter 7 Move Logical Instructions DFF JKFF RESD SETD Notes 368 Publication 1756 RMO06G EN P September 2010 Appendix A Function Block Attributes Introduction This appendix describes issues that are unique with function block instructions Review the information in this appendi
40. RLIM SEL SNEG SSUM Chapter 5 Condition prescan Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan No action taken No action taken instruction first run No action taken No action taken Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example This HLL instruction limits In between two values and sets HighAlarm or LowAlarm if needed When In is outside the limits the instruction sets Out limited value of In Structured Text HLL O1 In value HLL HLL 01 limited value HLL 01 0Out high alarm HLL 01 HighAlarm low alarm HLL 01 LowAlarm Function Block x value A Publication 1756 RM006G EN P September 2010 g limted_value a high_alarm L a lovw_alarm HighAlarm fE LowAlarm 329 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Multiplexer MUX Operands MUX_O4 ns Selector Input Parameter Enableln Multiplexer MUX J Out D Data Type BOOL The MUX instruction selects one of eight inputs based on the selector input Function Block block tag MU
41. RMPS SCL SRTP TOT Data Type REAL Chapter 1 Description Minimum scaled value of Position and SP Valid any float Default 0 0 CycleTime REAL Period of the output pulse in seconds A value of zero clears both OpenOut and CloseOut If this value is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid any positive float Default 0 0 OpenRate REAL Open rate of the device in second A value of zero clears OpenOut If this value is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid any positive float Default 0 0 CloseRate REAL Close rate of the device in second A value of zero clears CloseOut If this value is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid any positive float Default 0 0 maximumOnTime REAL maximumimum time in seconds that an open or close pulse can be on If OpenTime or CloseTime is calculated to be larger than this value they are limited to this value If this value is invalid the instruction assumes a value of CycleTime and sets the appropriate bit in Status Valid 0 0 to CycleTime Default 0 0 MinOnTime REAL Minimum time in seconds that an open or close pulse can be on If OpenTime or CloseTime is calculated to be less than this value they are set to zero If this value is invalid the instruction assum
42. September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Structured Text DEDT_01 In SimulatedLoop CVEU DEDT DEDT_01 DEDT_Olarray LDLG 01 In DEDT _01 Out LDLG LDLG_01 SimulatedLoop PV LDLG 01 0ut PIDE SimulatedLoop Function Block DEDT_01 LDLG_01 SimulatedLoop DEDT Ea LDLG al PIDE Deadtime Lead Lag Enhanced PID StorageArray DEDT_Otarray PVHHAlarm PY HAlarm PYLAlarm PYLLAlarm PVROCPosAlarm PYROCNegAlarm D DevHHAlarm H ProgProgReq E ProgOperReq ProgCasRatReq DewHAlarm DevLAlarm D DevLLAlarm E ProgAutoReg E ProghtanualReq ProgOverrideReg ProgOper A amp ProgHandReq Override Publication 1756 RMO06G EN P September 2010 55 Chapter 1 Function Generator FGEN Operands FGEN FGEN_ tag X1 Y1 X2 Y2 Pigi FGEN_01 FOEN Function Generator 56 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT The FGEN instruction converts an input based on a piece wise linear function Structured Text Operand FGEN tag Type FUNCTION_ GENERATOR Format structure Description FGEN structure X1 REAL array X axis array table one Combine with the Y axis array table one to define the points of the first piece wi
43. The instructions that support time base modes have these input and output parameters Input parameters Input Parameter Data Type Description TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode valid 0 to 2 default 0 When TimingMode 0 and task is periodic periodic timing is enabled and DeltaT is set to the task scan rate When TimingMode 0 and task is event or continuous periodic timing is enabled and Deltal is set equal to the elapsed time span since the last time the instruction was executed When TimingMode 1 oversample timing is enabled and DeltaT is set to the value of the OversampleDT parameter When TimingMode 2 real time sampling timing is enabled and Deltal is the difference between the current and previous time stamp values read from the module associated with the input If TimingMode invalid the instruction sets the appropriate bit in Status OversampleDT REAL Execution time for oversample timing The value used for DeltaT is in seconds If TimingMode 1 then OversampleDT 0 0 disables the execution of the control algorithm If invalid the instruction sets DeltaT 0 0 and sets the appropriate bit in Status valid 0 to 4194 303 seconds default 0 0 378 Publication 1756 RMO06G EN P September 2010 Function Block Attributes Appendix A Input Parameter Data Type Description
44. gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value This can occur if OversampleDT is invalid in oversample timing mode Description This instruction typically totals the amount of a material added over time based on a flow signal The TOT instruction supports e Time base selectable as seconds minutes hours or days e You can specify a target value and up to two pre target values Pre target values are typically used to switch to a slower feed rate Digital flags announce the reaching of the target or pre target values e A low flow input cutoff that you can use to eliminate negative totalization due to slight flowmeter calibration inaccuracies when the flow is shut off e Operator or program capability to start stop reset e A user defined reset value e Trapezoidal rule numerical integration to improve accuracy e The internal totalization is done with double precision math to improve accuracy 134 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Monitoring the TOT instruction There is an operator faceplate available for the TOT instruction For more information see appendix Function Block Attributes Arithmetic Status Flags Arithmetic status flags are set for the Total output Conditi
45. keep doing something until a condition is true REPEAT UNTIL structured text 410 Publication 1756 RMO06G EN P September 2010 Some key words are reserved for future use These constructs are not available e GOTO e REPEAT RSLogix 5000 software will not let you use them 397 Appendix B Structured Text Programming IF THEN Use IF THEN to do something if or when specific conditions occur Operands Structured Text IF bool_expression THEN Operand Type Format Enter lt statement gt ee END IF bool_ BOOL tag BOOL tag or expression that evaluates to expression expression a BOOL value BOOL expression Description The syntax is IF bool _expressionl THEN lt statement gt lt q statements to execute when bool_expression is true Fi Z ELSIF bool expression2 THI optional lt statement gt lt q Statements to execute when bool_expression2 is true ELSE optional lt statement gt lt q Statements to execute when both expressions are false END IF To use ELSIF or ELSE follow these guidelines 1 To select from several possible groups of statements add one or more ELSIF statements e Each ELSIF represents an alternative path e Specify as many ELSIF paths as you need e The controller executes the first true IF or ELSIF and skips the rest of the ELSIFs and the ELSE 2 To do something when all of the IF or ELSIF conditions are false add
46. lt PVEUMin lt PVEUMax If PVEUMax lt PVEUMin set bit in Status Default 0 0 Refer to Processing Faults on page 99 PVSpaninv or SPLimitsInv for details SPProg REAL SP Program value scaled in PV units SP is set to this value when Valid SPLLimit to SPHLimit the instruction is in Program control Default 0 0 Refer to Current SP on page 88 SPOper REAL SP Operator value scaled in PV units SP set to this value when Valid SPLLimit to SPHLimit Operator control Default 0 0 Refer to Current SP on page 88 If value of SPProg or SPOper lt SPLLimit or gt SPHLimit set bit in Status and limit value used for SP SPHLimit REAL SP high limit value scaled in PV units Valid SPLLimit to PVEUMax Refer to SP High Low Limiting on page 88 If SPHLimit lt SPLLimit or SPHLimit gt PVEUMax set bit in Status Refer to Processing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling Publication 1756 RMO06G EN P September 2010 Default 100 0 169 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Input Parameter Data Type Description Values SPLLimit REAL SP low limit value scaled in PV units Refer to SP High Low Valid PVEUMin to SPHLimit Limiting on page 88 Default 0 0 If SPLLimit lt PVEUMin or SPHLimit lt SPLLimit set bit in Status and limit SP by using the value of SPLLimit Refer to Pro
47. the instruction sets SoakDeadband 0 0 and the instruction sets the appropriate bit in Status Valid any float gt 0 0 Default 0 0 108 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type Description CurrentSegProg DINT Current segment program The user program writes a requested value for the CurrentSeg into this input This value is used if the ramp soak is in Program Manual mode If this value is invalid the instruction sets the appropriate bit in Status Valid 0 to NumberOfSegs 1 Default 0 OutProg REAL Output program The user program writes a requested value for the Out into this input This value is used as the Out when the ramp soak is in Program Manual mode Valid any float Default 0 0 SoakTimeProg REAL Soak time program The user program writes a requested value for the SoakTimeLeft into this input This value is used if the ramp soak is in Program Manual mode If this value is invalid the instruction sets the appropriate bit in Status Valid 0 0 to maximumimum positive float Default 0 0 CurrentSegOper DINT Current segment operator The operator interface writes a requested value for the CurrentSeg into this input This value is used if the ramp soak is in Operator Manual mode If this value is invalid the instruction sets the appropriate bit in Stat
48. 1756 RMO06G EN P September 2010 311 312 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH The following graphs illustrate the effect of the various orders of the filter for a given cutoff frequency For each graph ideal asymptotic approximations are given with gain and frequency in logarithmic scales The actual response of the filter approaches these curves but does not exactly match these curves Filter Graph 1t order filter Baia 1 0 l Frequency i rad sec log scale l l Wig 2 4 order filter Gain 1 0 Frequency rad sec log scale Wig 3 order filter Gain 1 0 Frequency rad sec log scale l l w Publication 1756 RM006G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Cutoff_frequency Publication 1756 RMO06G EN P September 2010 Velocity_Feedback Structured Text LPF 01 In Velocity Feedback LPF 01 WLag Cutoff frequency LPF LPF 01 filtered velocity output LPF 01 0ut Function Block filtered_vwelocity_output 313 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Notch Filter NTCH Operands NTCH NTCH tag Input Parameter Enableln NTCH_04 NTCH El Notch Filter Data Type BOOL The NTCH instruction provides a filter to attenuate input frequencies that are at the notch frequency Structured Text NTCH tag FILTER_NOTCH structure NTCH structure Functio
49. 266 Example 2 In this electronic line shaft application motor A s feedback acts as a master reference which motor B needs to follow Motor A s feedback is aliased to Position_feedback Motor B s feedback is aliased to Follower_Position Due to the multipliers of both instructions being a ratio of 1 4 motor B needs to rotate once for every four revolutions of Motor A in order to maintain an accumulated value of zero in the UPDN accumulator Any value other than zero on the output of the UPDN instruction is viewed as Position_error and can be regulated and driven back out to motor B in order to maintain a phase lock between the two motors Structured Text UP UP UP UP L 02 L 02 L 02 L 02 03 L 03 i 08 L_03 DN 02 Initialize DN 02 InPlus DN 02 InMinus Position error In Position feedback Initalize Initialize Position WordSize 12 Multiplier 25000 L PMUL_02 In Follower Position Initalize Initialize Position WordSize 12 Multiplier 100000 L PMUL_03 Initialize Position PMUL 02 0ut PMUL 03 0ut DN UPDN_02 UPDN_02 0ut Publication 1756 RM006G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Function Block UPDN_O2 UPON i Up Down Accumulator PMUL_O2 PMUL E Pulse Multiplier Initialize Position_error Motor A
50. AtuneCV3PV1 Timeout BOOL Elapsed time is greater then PV1AtuneTimeLimit since step test Bit 9 of AtuneCV3PV1 Status is started When True CV3 PV1 Autotuning is aborted AtuneCV1PV1NotSettled BOOL The PV1 is changed too much to Autotune for CV1 PV1 When Bit 10 of True CV1 PV1 Autotuning is aborted Wait until PV1 is more AtuneCV1PV1Status stable before autotuning CV1 PV1 AtuneCV2PV1NotSettled BOOL The PV1 is changed too much to Autotune for CV2 PV1 When Bit 10 of True CV2 PV1 Autotuning is aborted Wait until PV1 is more AtuneCV2PV1 Status stable before autotuning CV2 PV1 AtuneCV3PV1NotSettled BOOL The PV1 is changed too much to Autotune for CV3 PV1 When Bit 10 of True CV3 PV1 Autotuning is aborted Wait until PV1 is more AtuneCV3PV1 Status stable before autotuning CV3 PV1 AtuneCV1PV2Fault BOOL CV1 PV2 Autotune has generated any of the following faults Bit 0 of AtuneCV1PV2Status AtuneCV2PV2Fault BOOL CV2 PV2 Autotune has generated any of the following faults Bit 0 of AtuneCV2PV2Status AtuneCV3PV2Fault BOOL CV3 PV2 Autotune has generated any of the following faults Bit 0 of AtuneCV3PV2Status AtuneCV1PV20utOfLimit BOOL Either PV2 or the deadtime step ahead prediction of PV2 Bit 1 of AtuneCV1PV2Status exceeds PV2TuneLimit during CV1 PV2 Autotuning When True CV1 PV2 Autotuning is aborted AtuneCV3PV20utOfLimit BOOL Either PV2 or the deadtime step ahead prediction of PV2 Bit 1 of AtuneCV3PV2Status exceeds PV2TuneLimi
51. Auto mode indicator TRUE when in the Auto mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 for details Manual BOOL Manual mode indicator TRUE when in the Manual mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 for details Override BOOL Override mode indicator TRUE when in the Override mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 for details Hand BOOL Hand mode indicator TRUE when in the Hand mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 for details 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 RespT CTunedF 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 i
52. CV1 subject to high low limiting Default 10 CV2StepSize REAL CV2 step size in percent for the tuning step test Step size is Range 100 100 directly added to CV2 subject to high low limiting Default 10 CV3StepSize REAL CV3 step size in percent for the tuning step test Step size is Range 100 100 directly added to CV3 subject to high low limiting Default 10 CV1ResponseSpeed DINT Desired speed of closed loop response for CV1 Range 0 2 Slow response Responsespeed 0 Default 1 Medium response ResponseSpeed 1 Fast response ResponseSpeed 2 If ResponseSpeed is less than 0 Slow response is used If ResponsesSpeed is greater than 2 Fast response is used CV2Responsespeed DINT Desired speed of closed loop response for CV2 Range 0 2 Slow response Responsespeed 0 Default 1 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 CV3Responsespeed DINT Desired speed of closed loop response for CV3 Range 0 2 Slow response Responsespeed 0 Default 1 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 184 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 CC Input Parameter Data Type Description Values
53. CV3 PV2 Autotuning is aborted Bit 8 of AtuneCV3PV2Status AtuneCV1PV2Timeout BOO Elapsed time is greater then PV2AtuneTimeLimit since step test is started When True CV1 PV2 Autotuning is aborted Bit 9 of AtuneCV1PV2Status AtuneCV2PV2Timeout BOO Elapsed time is greater then PV2AtuneTimeLimit since step test is started When True CV2 PV2 Autotuning is aborted Bit 9 of AtuneCV2PV2Status AtuneCV3PV2Timeout BOO Elapsed time is greater then PV2AtuneTimeLimit since step test is started When True CV3 PV2 Autotuning is aborted Bit 9 of AtuneCV3PV2Status AtuneCV1PV2NotSettled BOO The PV2 is changed too much to Autotune for CV1 PV2 When True CV1 PV2 Autotuning is aborted Wait until PV2 is more stable before autotuning CV1 PV2 Bit 10 of AtuneCV1PV2Status AtuneCV2PV2NotSettled BOO The PV2 is changed too much to Autotune for CV2 PV2 When True CV2 PV2 Autotuning is aborted Wait until PV2 is more stable before autotuning CV2 PV2 Bit 10 of AtuneCV2PV2Status AtuneCV3PV2NotSettled BOO The PV2 is changed too much to Autotune for CV3 PV2 When True CV3 PV2 Autotuning is aborted Wait until PV2 is more stable before autotuning CV3 PV2 Bit 10 of AtuneCV3PV2Status AtuneCV1PV2Modelnv BOO The MMC mode was not Manual at start of Autotuning or the MMC mode was changed from Manual during CV1 PV2 Autotuning When True CV1 PV2 Autotuning is n
54. Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT The ALM instruction provides alarming for any analog signal Structured Text ALM tag ALARM ALM structure Function Block ALM tag ALARM structure ALM structure ALARM Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction always executes In REAL The analog signal input Valid any float Default 0 0 HHLimit REAL The high high alarm limit for the input Valid any real valu Default maximumimum positive value a gt HLimit REAL The high alarm limit for the input Valid any real value Default maximumimum positive value LLimit REAL The low alarm limit for the input Valid any real value Default maximumimum negative value LLLimit REAL The low low alarm limit for the input Valid any real value Default maximumimum negative value Deadband REAL 24 The alarm deadband for the high high to low low limits Valid any real value gt 0 0 Default 0 0 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type Description ROCPosL
55. Device D3SD 436 Enhanced PID PIDE 438 You configure the faceplates through property pages that you open through the container application such as RSView SE or RSView32 software All faceplates have four property pages in common e general e display server e fonts 421 Appendix D Function Block Faceplate Controls Configuring general properties The general property page determines how the control operates Logix5000 PIDE Faceplate Control Properties x Logix5000 PIDE Faceplate Control Properties xj General Display PIDE Fonts Locale General Display PIDE Fonts Locale Communication x Communication RS Linx Enterprise Factory Talk Launch Remotely I Factory Talk Area v Remote Machine ja Tag o gy Tag CO By Update Rate 104 sec Update Rate 0 504 sec Cancel Cancel Apply Feature on property page Description Communication Select RSLinx Classic OPC Server or RSLinx Enterprise Factory Talk If you select RSLinx Classis OPC Server you must also specify e whether to launch remotely e the access path to the remote machine If you select RSLinx Enterprise Factory Talk you must also specify e the Factory Talk Area Tag Specify the function block instruction to connect to this control Update Rate This option configures the Update Rate of the control in seconds Use the spin control to modify the rate in increments of 0 25 seconds default
56. E ProgOperReq E ProgCasRatReq E ProgAutoReg ProgManualReq ProgOverrideReg ProgHandReq AutotuneTag PVROCNegAlarm DevHHAlarm DevHAlarm DevLAlarm DevLLAlarm ProgOper CasRat Auto Manual Override Hand 7 TDUUUETUUUTUEPeeeeeood p o eo ooo oO oO oO OOOO oo ofa ojo O Local 2 0 ChOData Switching between Program control and Operator control The PIDE instruction can be controlled by either a user program or an operator interface You can change the control mode at any time Program and Operator control use the same ProgOper output When ProgOper is set control is Program when ProgOper is cleared control is Operator The following diagram shows how the PIDE instruction changes between Program control and Operator control OperOperReg is set and ProgProgReq is cleared ProgOperReq is set 1 p p Program Control w ProgProgReg is set and ProgOperReg is cleared o a Operator Control OperProgReq is set and ProgOperReq and OperOperReq are cleared q Publication 1756 RM006G EN P September 2010 Nooo o 1 The instruction remains in Operator control mode when ProgOperReg is set Por more information on program and operator control see page 381 Chapter 1 85 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Operating modes The PIDE instruction supports these PID modes
57. EN P September 2010 Chapter Move Logical Instructions DFF JKFF RESD SETD Introduction These move logical instructions are available If you want to Use this instruction Available in Page these languages set the Q output to the state of D Flip Flop DFF structured text 360 the D input on a transition of the function bloc Clock input complement the Q and QNot JK Flip Flop JKFF structured text 362 outputs when the Clock input function bloc transitions use Set and Reset inputs to Reset Dominant RESD structured text 364 control latched outputs when the function bloc Reset input has precedence over the Set input use Set and Reset inputs to Set Dominant SETD structured text 366 control latched outputs when the function block Set input has precedence over the Reset input Publication 1756 RM006G EN P September 2010 359 Chapter 7 Move Logical Instructions DFF JKFF RESD SETD D Flip Flop DFF Operands DFF DFF tag DFF_O4 The DFF instruction sets the Q output to the state of the D input on a cleared to set transition of the Clock input The QNot output is set to the opposite state of the Q output Structured Text DFF tag FLIP_FLOP_D DFF structure Function Block DFF E D Flip Flop Operand We Format Description D ap DFF tag FLIP_FLOP_D DFF structure Clear QNot D Clock FLIP_FLOP_D Structure Input Parameter Data Type Description E
58. EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example The HPF instruction attenuates signals that occur below the configured cutoff frequency This instruction is typically used to filter low frequency noise or disturbances that originate from either electrical or mechanical sources You can select a specific order of the filter to achieve various degrees of attenuation Note that higher orders increase the execution time for the filter instruction Publication 1756 RMO06G EN P September 2010 299 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH The following graphs illustrate the affect of the various orders of the filter for a given cutoff frequency For each graph ideal asymptotic approximations are given with gain and frequency in logarithmic scales The actual response of the filter approaches these curves but does not exactly match these curves Filter Graph 1t order filter Gain 104 i i Frequency l rad sec log scale I l W ea 20d order filter Gain 104 2 i Frequency rad sec log scale l l Diem 3 order filter Gain 1 0 l 371 Frequency rad sec log scale l l a Lea 300 Publication 1756 RMO06G EN P September 2010 Filter Instructio
59. FALSE after the function block has been initialized and CV2InitReq is no longer TRUE Refer to Processing Faults on page 99 for more information on CV Initialize Request CV Health Good and CVEU Span Valid Refer to Autotuning the PIDE instruction on page 78 for more information on Initialization function blockFirstScan and Initialization OLCFirstRun CV3lnitializing BOOL Initialization mode indicator for CV3 Set TRUE when CV3lnitReg function blockFirstScan or OLCFirstRun are TRUE or ona TRUE to FALSE transition of CVHealth bad to good CV3lnitializing is set FALSE after the function block has been initialized and CV3InitReq is no longer TRUE Refer to Processing Faults on page 99 for more information on CV Initialize Request CV Health Good and CVEU Span Valid Refer to Autotuning the PIDE instruction on page 78 for more information on Initialization function blockFirstScan and Initialization OLCFirstRun CV1HAlarm BOOL CV1 high alarm indicator TRUE when the calculated value for CV1 gt 100 or CV1HLimit CV2HAlarm BOOL CV2 high alarm indicator TRUE when the calculated value for CV2 gt 100 or CV2HLimit CV3HAlarm BOOL CV3 high alarm indicator TRUE when the calculated value for CV3 gt 100 or CV3HLimit CV1LAlarm BOOL CV1 low alarm indicator TRUE when the calculated value for CV1 lt 0 or CV1LLimit CV2LAlarm BOOL CV2 low alarm indicator TRUE when the
60. Limiting The instruction stops the Term windup based on the state of the hold inputs Condition Action If HoldHigh is set and Term Term Term gt Term If HoldLow is set and Term Term erm lt Term 255 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN The instruction also stops integrator windup based on the HighLimit and LowLimit values Condition Action Integrator gt HighLimit Integrator HighLimit Integrator lt LowLimit Integrator LowLimit The instructions limits the value of Out based on the HighLimit and LowLimit values Condition Action HighLimit lt LowLimit Out LowLimit Term LowLimit HighLowLimslnv is set HighAlarm is set LowAlarm is set WldInput 0 Out gt HighLimit Out HighLimit Term Term HighAlarm is set Term gt HighLimit ITerm HighLimit Out lt LowLimit Out LowLimit Term Term LowAlarm is set Term lt LowLimit ITerm LowLimit Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Out 0 Out 0 The control algorithm is not executed The control algorithm is not executed instruction first run Out 0 Out 0 The control algorithm is not executed The control algorithm is not executed Enableln is cleared EnableOut is cleared the instruc
61. ModelTimeConstants always positive numbers ModelDeadtimes always positive numbers RespTimeConstants always positive numbers Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 Parameter Description Active 1st 2nd and 3rd CV for PV1 specify the order in which CV s will be used to and PV2 compensate for PV SP error TargetCV specify which CV will be driven to its target value CVTargetValues specify to which values should the control variable drive the individual CV s if selected as the TargetCV TargetRespTC specify the speed of CV s to approach the target values Por integrating process types such as level control and position control internal nonintegrating models are used to approximate the integrating process The Factor parameters are used to convert the identified integrating process models to nonintegrating internal models used for CV calculation This is necessary to provide for stable MMC execution The MMC function block can handle any combinations of PV1 and PV2 that are integrating or nonintegrating process types The function block uses first order lag with deadtime internal process models and first order filters total of up to 24 tuning parameters 6 models 4 parameters each to calculate the CV s Each CV is calculated such that each process variable PV follows a first order lag trajectory when approaching the setpoint va
62. OS Ds 18 Common Information for All Instructions 00000005 19 Conventions and Related Terms onon onnan nanana rara 19 Setand Cleat ereu e a Le Rant atta eae a ne EEEE 19 Relay ladder rung Gon dinOt iiiruapeb ote Satna ates 19 Function block states rrn ee eaea cence ene e ees 20 Chapter 1 THEO AUCH OLIN eet amei A o aa Rede a acs a a ls fee 23 Alata ALMY ese cae aE RR SERENE RETR Rea DR T 24 High high to low low alarm isos der gator stone ates bie ices 26 Rate of change alan 2h ia vanes eiaay wlevwws pial woy 26 Monitoring the ALM instruction 1 cde ee ee eek ees 27 Discrete 2 State Device CD 25D i atiy orn do Genk sae Ben ka ake kee 29 Monitoring the D2SD instruction 0 0 000 uena 32 Switching between Program control and Operator control 34 Commanded state in Program control 0 00000 34 Commanded state in Operator control 0 000 000 8 35 Hand mode or Override mode 6 6c eee 35 Outputstate 225 Sse tae T Ried Paes See eS SHEE A 36 Fault alarm conditions 0 0 0 cette eens 36 Mode alarm conditions 0 0 eee eens 37 Discrete 3 State Device D3SD 24 ited ue vena eee ae ea ee 38 Monitoring the D3SD instuciOiina a sain SAS 4 eee ay 43 Switching between Program control and Operator control 45 Commanded state in Program control 0 00 00000 46 Commanded state in Operator control 0 0 00008 46 Hand mode or Override mode 0 6c eee 47 Ou
63. Out State BOOL Output 1 state 0 input This value determines the value of Output when the device is in the 0 state Default is cleared Out1State1 BOOL Output 1 state 1 input This value determines the value of Output when the device is in the 1 state Default is cleared Out1State2 BOOL Output 1 state 2 input This value determines the value of Output when the device is in the 2 state Default is cleared Out2State0 BOOL Output 2 state 0 input This value determines the value of Output2 when the device is in the 0 state Default is cleared Out2State BOOL Output 2 state 1 input This value determines the value of Output2 when the device is in the 1 state Default is cleared Out2State2 BOOL Output 2 state 2 input This value determines the value of Output2 when the device is in the 2 state Default is cleared OverrideState DINT Override state input Set this input to indicate the state of the device when in Override mode Value Indicates 2 device should go to the 2 state 1 device should go to the 1 state 0 device should go to the 0 state An invalid value sets the appropriate bit in Status and prevents the instruction from entering the override state Valid 0 to 2 Default 0 40 Publication 1756 RMO06G EN P September 2010 Input Parameter FBOState0 Data Type BOO Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Description Feedback 0 state 0 inp
64. PID Operating Mode Description Cascade Ratio While in Cascade Ratio mode the instruction computes the change in CV The instruction regulates CV to maintain PV at either the SPCascade value or the SPCascade value multiplied by the Ratio value SPCascade comes from either the CVEU of a primary PID loop for cascade control or from the uncontrolled flow of a ratio controlled loop Select Cascade Ratio mode using either OperCasRatReq or ProgCasRatRea Set OperCasRatReg to request Cascade Ratio mode Ignored when ProgOper ProgQverrideReg ProgHandReq OperAutoReq or OperManualReg is set or when AllowCasRat is cleared Set ProgCasRatReg to request Cascade Ratio mode Ignored when ProgOper or AllowCasRat is cleared or when ProgOverrideReg ProgHandReg ProgAutoReq or ProgManualReg is set Auto While in Auto mode the instruction computes the change in CV The instruction regulates CV to maintain PV at the SP value If in program control SP SPProg if in Operator control SP SPOper Select Auto mode using either OperAutoReg or ProgAutoReq Set OperAutoReq to request Auto mode Ignored when ProgOper ProgOverrideReg ProgHandReg or OperManualReg is set Set ProgAutoReq to request Auto mode Ignored when ProgOper is cleared or when ProgOverrideReq ProgHandReg or ProgManualReq is set Manual While in Manual mode the instruction does not compute the change in CV The value of CV is determined by the control If in Program contro
65. PV1 The value of PV1 and SP1 that Valid maximum negative float corresponds to 0 span of the Process Variable If PVEUMax PV1EUMin lt PV1EUMax lt PVEUMin set bit in Status Refer to Processing Faults on page 99 PVSpaninv or Derauie 0 SPLimitsInv for details PV2EUMin REAL Minimum scaled value for PV2 The value of PV2 and SP2 that Valid maximum negative float corresponds to 0 span of the Process Variable If PVEUMax PV2EUMin lt PV2EUMax lt PVEUMin set bit in Status Refer to Processing Faults on page 99 PVSpaninv or uaa ee SPLimitsInv for details SP1Prog REAL SP1 Program value scaled in PV units SP1 is set to this value Valid SP1LLimit to SP1HLimit when Program control Default 0 0 204 Publication 1756 RMO06G EN P September 2010 MMC Input Parameter SP2Prog Type REAL Advanced Process Control Function Blocks IMC CC MMC Chapter 2 Description SP2 Program value scaled in PV units SP2 is set to this value when Program control Values Valid SP2LLimit to SP2HLimit Default 0 0 SP1Oper REAL SP1 Operator value scaled in PV units SP1 set to this value when Operator control If value of SPProg or SPOper lt SPLLimit or gt SPHLimit set bit in Status and limit value used for SP Refer to Current SP on page 88 Valid SP1LLimit to SP1HLimit Default 0 0 SP2Oper REAL SP2 Operator value scaled in PV units SP2 set to this value when Operator control Refe
66. ProgStartReq 1 TotalWaterFlow ProgResetReq AddWater TOT TotalWaterFlow RESD_01 Set AddWater RESD_01 Reset TotalWaterFlow TargetFlag Publication 1756 RMO06G EN P September 2010 135 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT WaterFlowR ate 136 ProgProgReq ProgOperReq RESD RESD_01 WaterSolenoidValve RESD_01 0Out Function Block RESD_04 RESD Esl Reset Dominant TotalWaterF low TOT Totalizer A WaterSolenoidValve ProgStartReq RunStop E ProgStopReq ProgResetDone D E ProgResetReq TargetFlag H TargetDev1Flag H TargetDev2Flag f9 Check for low input cutoff If dn lt LowInCutoff the instruction sets LowInCutoffFlag and makes In _1 0 0 Otherwise the instruction clears LowInCutoffFlag When the LowInCutoffFlag is set the operation mode is determined but totalization ceases When LowInCutoffFlag is cleared totalization continues that scan Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Operating modes The following diagram shows how the TOT instruction changes between Program control and Operator control OperOperReq is set when ProgProgReg is cleared ProgOperReq is set yy Program Control Op
67. Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOO Status 30 Invalid RTSTimeStamp value DeltaT Status 31 BOO Invalid DeltaT value Description The PI instruction uses the position form of the PI algorithm This means the Publication 1756 RMO06G EN P September 2010 gain terms are applied directly to the input signal rather than to the change in the input signal The PI instruction is designed to execute in a task where the scan rate remains constant In the non linear algorithm the proportional and integral gains vary as the magnitude of the input signal changes The PI instruction supports two non linear gain modes linear and parabolic In the linear algorithm the gains vary linearly as the magnitude of input changes In the parabolic algorithm the gains vary according to a parabolic curve as the magnitude of input changes The PI instruction calculates Out using this equation s Wld eee K S 251 Chapter 3 252 Drives Instructions INTG PI PMUL SCRV SOC UPDN Whenever the value computed for the output is invalid NAN or INF the instruction sets Out the invalid value and sets the arithmetic overflow status flag The internal parameters are not updated
68. Status3CV3 CVManLimiting is TRUE Limit value used for CV3 CV10verrideValuelnv BOOL CV10verrideValue 1 lt 0 or gt 100 Limit value used for CV1 Bit 4 of Status3CV1 CV20verrideValuelnv BOOL CV20verrideValue 2 lt 0 or gt 100 Limit value used for CV2 Bit 4 of Status3CV2 CV30verrideValuelnv BOOL CV30verrideValue 3 lt 0 or gt 100 Limit value used for CV3 Bit 4 of Status3CV3 CV1TrackValuelnv BOOL Entered CV1TrackValue lt 0 or gt 100 Limit value used for CV1 Bit 5 of Status3CV1 CV2TrackValuelnv BOOL Entered CV2TrackValue lt 0 or gt 100 Limit value used for CV2 Bit 5 of Status3CV2 CV3TrackValuelnv BOOL Entered CV3TrackValue lt 0 or gt 100 Limit value used for CV3 Bit 5 of Status3CV3 CV1EUSpaninv BOOL The span of CV1EU inValid CV1EUMax equals CV1EUMin Bit 6 of Status3CV1 CV2EUSpaninv BOOL The span of CV2EU inValid CV2EUMax equals CV2EUMin Bit 6 of Status3CV2 CV3EUSpaninv BOOL The span of CV3EU inValid CV3EUMax equals CV3EUMin Bit 6 of Status3CV3 CV1LimitsInv BOOL CVILLimit lt 0 CVIHLimit gt 100 or CV1HLimit lt CV1LLimit If Bit 7 of Status3CV1 CV1HLimit lt CV1LLimit limit CV1 by using CV1LLimit CV2LimitsInv BOOL CV2LLimit lt 0 CV2HLimit gt 100 or CV2HLimit lt CV2LLimit If Bit 7 of Status3CV2 CV2HLimit lt CV2LLimit limit CV2 by using CV2LLimit CV3LimitsInv BOOL CV3LLimit lt 0 CV3HLimit gt 100 or CV3HLimit lt CV3LLimit If Bit 7 of Status3CV3 CV3HLimit lt CV3LLimit limit CV3
69. Valid any float Default 1 0 ByPass BOOL Request to bypass the algorithm When ByPass is set the instruction sets Out In Default is cleared TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 292 Publication 1756 RM006G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Input Parameter Data Type Description OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred
70. Variable on page 94 and Updating the CVOper and CVProg Values on page 97 148 Publication 1756 RMO06G EN P September 2010 IMC Input Parameter CVOper Type REAL Advanced Process Control Function Blocks IMC CC MMC Description 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 lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 and Updating the CVOper and CVProg Values on page 97 Chapter 2 Valid and Default Values Valid 0 0 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 lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 CVTrackValue REAL CV track value When CVTrackReg 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 CVTrackReg is enabled and the IMC function block is in Auto
71. When TRUE CV3 will not be allowed to decrease in value This signal will typically be the CV3WindupLOut output from a secondary loop Refer to CV Windup Limiting on page 95 Default FALSE GainEUSpan BOOL ModelGain units in EU or of span CVx ModelGain units in EU or of span Set to interpret ModelGain as EU reset to interpret ModelGain as of Span Default FALSE FALSE Gain in of span CV1PV1ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta PV1 Delta CV1 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV Default FALSE CV2PV1ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta PV1 Delta CV2 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV Default FALSE CV3PV1ProcessGainSign 214 BOOL Used only for Autotuning Sign of the process gain Delta PV1 Delta CV3 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV Default FALSE Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function B
72. allows operator interfaces to work with these instructions by merely setting the desired mode request bit You don t have to program the operator interface to reset the request bits For example if an operator interface sets the OperAutoReq input to a PIDE instruction when the PIDE instruction executes it determines what the appropriate response should be and clears the OperAutoReq Program request inputs are not normally cleared by the instruction because these are normally wired as inputs into the instruction If the instruction clears these inputs the input would just get set again by the wired input There might be situations where you want to use other logic to set the Program requests in such a manner that you want the Program requests to be cleared by the instruction In this case you can set the ProgValueReset input and the instruction will always clear the Program mode request inputs when it executes 383 AppendixA Function Block Attributes In this example a rung of ladder logic in another routine is used to one shot latch a ProgAutoReq to a PIDE instruction when a pushbutton is pushed Because the PIDE instruction automatically clears the Program mode requests you don t have to write any ladder logic to clear the ProgAutoReq after the routine executes and the PIDE instruction will receive only one request to go to Auto every time the pushbutton is pressed When the TIC101AutoReq Pushbutton is pressed one shot latch Pr
73. an ELSE statement 398 Publication 1756 RMO06G EN P September 2010 Structured Text Programming Appendix B The following table summarizes different combinations of IF THEN ELSIF and ELSE If you want to And Then use this construct do something if or when conditions do nothing if conditions are false IF THEN argirue do something else if conditions are false IF THEN ESLE choose from alternative statements do nothing if conditions are false IF THEN ELSIF or groups of statements based on input conditions assign default statements if all IF THEN ELSIF ELSE conditions are false Arithmetic Status Flags not affected Fault Conditions none Example 1 IF THEN If you want this Enter this structured text IF rejects gt 3 then IF rejects gt 3 THEN conveyor off 0 conveyor 0 alarm on 1 alarm 1 END_IF Example 2 IF THEN ELSE If you want this Enter this structured text If conveyor direction contact forward 1 then IF conveyor direction THEN light off light 0 Otherwise light on ELSE light 1 END IF The tells the controller to clear light whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step ot use the action to call a structured text routine via a JSR instruction Publication 1756 R
74. and feedback Valid any float Default 0 0 Initialize BOOL The instruction initialization command When set Out and internal integrator are set equal to the value of InitialValue Default is cleared InitialValue REAL The initial value input When Initialize is set Out and integrator are set to the value of InitialValue The value of InitialValue is limited using HighLimit and LowLimit Valid any float Default 0 Kp 248 REAL The proportional gain This affects the calculated value for both the proportional and integral control algorithms If invalid the instruction clamps Kp at the limits and sets the appropriate bit in Status Valid any float gt 0 0 Default minimum positive float Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Input Parameter Data Type Description Wild REAL The lead frequency in radians second This affects the calculated value of the integral control algorithm If invalid the instruction clamps Wld at the limits and sets the appropriate bit in Status Valid see the Description section below for valid ranges Default 0 0 HighLimit REAL The high limit value This is the maximum value for Out If HighLimit lt LowLimit the instruction sets HighAlarm and LowAlarm sets the appropriate bit in Status and sets Out LowLimit Valid LowLimit lt HighLimit lt maximum positive fl
75. and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In1 REAL The first input to be summed Valid any float Default 0 0 Gain1 REAL Gain for the first input Valid any float Default 1 0 Select1 BOOL Selector signal for the first input Default is cleared In2 REAL The second input to be summed Valid any float Default 0 0 Gain2 REAL Gain for the second input Valid any float Default 1 0 Select2 BOOL Selector signal for the second input Default is cleared Publication 1756 RMO06G EN P September 2010 341 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Input Parameter In3 Data Type REAL Description The third input to be summed Valid any float Default 0 0 Gain3 REAL Gain for the third input Valid any float Default 1 0 Select3 BOOL Selector signal for the third input Default is cleared In4 REAL The fourth input to be summed Valid any float Default 0 0 Gain4 REAL Gain for the fourth input Valid any float Default 1 0 Select4 BOOL Selector signal for the fourth input Default is cleared Ind REAL The fifth input to be summed Valid any float Default 0 0 Gaind REAL Gain for the fifth input Valid any float Default 1 0 Select5 BOOL Selector sig
76. are not updated The AtuneStatus parameter identifies the reason for the abort MMC Function Block Model Initialization A model initialization occurs e During First Scan of the block e When the ModelInit request parameter is set e When DeltaT changes You may need to manually adjust the internal model parameters or the response time constants You can do so by changing the appropriate parameters and setting the appropriate ModelInit bit The internal states of the function block will be initialized and the bit will automatically reset For example if you modify the model for CV2 PV1 model set the CV2PV1ModelInit parameter to TRUE to initialize the CV2 PV1 internal model parameters and for the new model to take effect Publication 1756 RMO06G EN P September 2010 MMC_0O4 hint C Mo dular Multivariable Control oo oe cCVIEUD oo g Pv2 CV2EUD oo SP1Prog CV3EU Poo q SP2Prog SP10 oo g CV1Prog sP2p 0 g CV2Prog ProgOper D 0 g CV3Prog CV 1Auto Po E ProgProgReq CV 2Auto Pa o ProgOperReq CV3Aute D 0 E ProgCV 1AutoReg CV1iManual D 0 E ProgCV 2AutoReg CV2Manual D 0 E ProgCV3AutoReg CV3Manual Po E ProgCV Manual Req CV1Overide Po E ProgCV 2ManualReq CV2Overide D 0 E ProgCV3ManualReq CV3Overide D E ProgCV 10verride Req ProgCV20verride Req q ProgCV30verride Req Publication 1756 RM006G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Function Bl
77. auto tuning for CV2 PV2 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV3PV2Aborted BOOL Set True when auto tuning for CV3 PV2 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV1PV1Status DINT Bit mapped status of autotune for CV1 PV1 A value of 0 indicates that no faults have occurred AtuneCV2PV1Status DINT Bit mapped status of autotune for CV2 PV1 A value of 0 indicates that no faults have occurred AtuneCV3PV1Status DINT Bit mapped status of autotune for CV3 PV1 A value of 0 indicates that no faults have occurred AtuneCV1PV2Status DINT Bit mapped status of autotune for CV1 PV2 A value of 0 indicates that no faults have occurred AtuneCV2PV2Status DINT Bit mapped status of autotune for CV2 PV2 A value of 0 indicates that no faults have occurred AtuneCV3PV2Status DINT Bit mapped status of autotune for CV3 PV2 A value of 0 indicates that no faults have occurred AtuneCV1PV1Fault BOOL CV1 PV1 Autotune has generated any of the following faults Bit 0 of AtuneCV1PV1 Status AtuneCV2PV1Fault BOOL CV2 PV1 Autotune has generated any of the following faults Bit 0 of AtuneCV2PV1 Status AtuneCV3PV1Fault BOOL CV3 PV1 Autotune has generated any of the following faults Bit 0 of AtuneCV3PV1 Status AtuneCV1PV10utOfLimit BOOL Either PV1 or the deadtime step ahead prediction of PV1 Bit 1 of AtuneCV1PV1Status exceeds PV1TuneLimit during C
78. bare Meare benno 352 Moving Standard Deviation MSTD 0 00 cee 354 Initializing the standard deviation algorithm 356 Chapter 7 Tatrod ctonas vek ssania rere ener ees Ser tor area erent 359 D Flip Flop DFP sic ccd wien soba today aetackallwlle aaa n i 360 JK Flip Flop KFF cane a a Re a a a A AA 362 Reset Dominant RESD joss i oS ie Pe Oe 364 Set Dominant SETY reaa Pian Pie aes Seta ee da Sp a a eee eae 366 Publication 1756 RMO06G EN P September 2010 Function Block Attributes Structured Text Programming Publication 1756 RMO06G EN P September 2010 Table of Contents Appendix A Tntr d ctono gi ssi eana E oa Ge ie a ee oe EU te eee 369 Choose the Function Block Elements 5 c025 h0sa0e2 owas w ea bos 369 Tatchine age sa dara ead na eee ae eS 370 Order of ERC CHURN ressadas i E aun eM aa a at aa wailed lS 372 ResOWye a ToO rea iiie i a ee fey a leas aA hes ed 373 Resolve Data Flow Between Two Blocks 374 Create a One Sean Delayed a0 uty ceohawiaa nad de snes 375 SUMPAY a oad iss dae eke a RS a a ees wg Ras BES a 375 Function Block Responses to Overflow Conditions 376 Timing Modessa sasaes Seve Seat a eee and ha E ai a rae 377 Common instruction parameters for timing modes 378 Overview OF timing modes si MS canteen ES ates 380 Prostam Operator Control taste bs ca ea miethinw honed eaheasg 381 Appendix B EPOCH ON 5 s bape ces att leh dp kA st call
79. calculated value for CV2 lt 0 or CV2LLimit CV3LAlarm BOOL CV3 low alarm indicator TRUE when the calculated value for CV3 lt 0 or CV3LLimit CV1ROCPosAlarm BOOL CV1 rate of change alarm indicator TRUE when the calculated rate of change for CV1 exceeds CV1ROCPosLimit 226 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Output Parameter Type Description Values CV2ROCPosAlarm BOOL CV2 rate of change alarm indicator TRUE when the calculated rate of change for CV2 exceeds CV2ROCPosLimit CV3ROCPosAlarm BOOL CV3 rate of change alarm indicator TRUE when the calculated rate of change for CV3 exceeds CV3ROCPosLimit CV1ROCNegAlarm BOOL CV1 rate of change alarm indicator TRUE when the calculated rate of change for CV1 exceeds CV1ROCNegLimit CV2ROCNegAlarm BOOL CV2 rate of change alarm indicator TRUE when the calculated rate of change for CV1 exceeds CV1ROCNegLimit CV3ROCNegAlarm BOOL CV3 rate of change alarm indicator TRUE when the calculated rate of change for CV1 exceeds CV1ROCNegLimit SP1 REAL Current setpoint 1 value The value of SP1 is used to control CV when in the Auto or the PV1 Tracking mode scaled in PV1 units Refer to Selecting the Setpoint on page 87 SP2 REAL Current setpoint 2 value The value of SP2 is used to control CV when in the Auto or the PV2 Tracking mode scaled in PV2 units Refer to S
80. change ROC alarm compares the change of the input over the ROCPeriod to the rate of change limits The ROCPeriod provides a type of deadband for the rate of change alarm For example define an ROC alarm limit of 2 F second with a period of execution of 100 ms If you use an analog input module with a resolution of 1 F every time the input value changes an ROC alarm is generated because the instruction calculates an effective rate of 10 F second However enter an ROCPeriod of 1 second and the instruction only generates an alarm if the rate truly exceeds the 2 F second limit The ROC alarm calculates the rate of change as ROC In Now In EndofpreviousROCPeriod ROCPeriod Publication 1756 RMO06G EN P September 2010 Condition prescan Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 The instruction performs this calculation when the ROCPeriod expires Once the instruction calculates the ROC it determines alarms as ROC gt ROCPosLim ROCPosAlarm false lt ROCPosAlarm true ROC lt ROCPosLim ROC lt ROCNegLim ROCPNegAlarm false ROCPNegAlarm true ROC gt ROCNegLim Monitoring the ALM instruction There is an operator faceplate available for the ALM instruction For more information see appendix Function Block Faceplate Controls Arithmetic Status Flags Arithmetic status flags are
81. cleared set cleared andOStatus is cleared and1Status is set and2Status is cleared Com Com Com set set cleared cleared andOStatus is set and1Status is cleared and2Status is cleared Com Com Com m m m m m m m m If more than one HandFB input is set the instruction sets the appropriate bit in Status and if Hand is set the instruction holds the previous state Output state The D3SD output state is based on the state of the command status CommandStatus Command0Status is set Output state Out0 Out0State0 Out Out1State0 Out2 Out2State0 CommandO0Status is set and FBO FBOState0 and FB1 FB1State0 and FB2 FB2State0 and FB3 FB3Stated stop and clear the fault timer DeviceDState is set Command Status is set Out0 Out0State1 Out Out1State1 Out2 Out2State1 Command Status is set and FBO FBOState1 and FB1 FB1State1 and FB2 FB2State1 and FB3 FB3State1 stop and clear the fault timer Device1 State is set Command2Status is set Out0 Out0State2 Out Out1State2 Out2 Out2State2 Command2Status is set and FBO FBOState2 and FB1 FB1State2 and FB2 FB2State2 and FB3 FB3State2 stop and clear the fault timer Device2State is set Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Fault alarm condition resul
82. compares the change in the value of PV over the PVROCPeriod against the PV positive and negative rate of change limits The PVROCPeriod provides a type of deadband for the rate of change alarm For example if you use a ROC alarm limit of 2 F second with a period of execution of 100 ms and an analog input module with a resolution of 1 F then every time the input value changes a ROC alarm is generated because the instruction sees a rate of 10 F second However by entering a PVROCPeriod of at least 1 sec the ROC alarm is only generated if the rate truly exceeds the 2 F second limit The ROC calculation is only performed when the PVROCPeriod has expired The rate of change is calculated as ElapsedROCPeriod ElapsedTimeSinceLastExecution ElapsedROCPeriod If ElapsedROCPeriod gt PVROCPeriod then This value Is PVROC PV PVROC _ PVROCPeriod PVROC 1 PVROC _ PV ElapsedROCPeriod ElapsedROCperiod 0 Once PVROC has been calculated the PV ROC alarms are determined as follows PVROC gt PVROCPosLimit PVROC lt PVROCPosLimit PVROCPosAlarm is cleared PVROCPosAlarm is set PVROC lt PVROCNegLimit PVROC gt PVROCNegLimit PVROCNegAlarm is cleared PVROCNegAlarm a is set 1 During instruction first scan the instruction clears the PV ROC alarm outputs The instruction also clears the PVROC alarm outputs and disables the PV ROC alarming algorithm
83. for example 2 3 the controller stores the value using 32 bits If you enter a value in a radix other than decimal such as binary or hexadecimal and do not specify all 32 bits the controller places a zero in the bits that you do not specify zero fill EXAMPLE Zeto filling of immediate values tS E 16 ffff 1 16 0000 ffff 65535 8 1234 668 16 0000 029c 668 2 1010 10 16 0000 000a 10 415 Appendix Common Attributes Data Conversions Data conversions occur when you mix data types in your programming When programming in Conversions can occur when relay ladder logic mix data types for the parameters within one instruction function block you wire two parameters that have different data types Instructions execute faster and require less memory if all the operands of the instruction use e the same data type e an optimal data type In the Operands section of each instruction in this manual a bold data type indicates an optimal data type The DINT and REAL data types are typically the optimal data types Most function block instruction only support one data type the optimal data type for its operands If you mix data types and use tags that are not the optimal data type the controller converts the data according to these rules e Are any of the operands a REAL value lf Then input operands for example source tag in an expression limit convert to Yes
84. for Autotuning Sign of the process gain Delta PV Delta Default FALSE CV1 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV CV2ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta PV Delta Default FALSE CV2 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV CV3ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta PV Delta Default FALSE CV3 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV Process Type DINT Process type selection 1 Integrating O non integrating Default FALSE 178 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 CC Input Parameter Data Type Description Values CV1ModelGain REAL The internal model gain parameter for CV1 Enter a positive or valid maximum negative float negative gain depending on process direction gt maximum positive float CV1ModelGain for Model Gain is 1 QNAN or 1 4IND Not A Default 0 0 Number
85. i baia a a e Ot ern nT ere ener Renee 419 DINTO SINTOrIN ei ona hd ae sheets iaa pa 419 REAL toam eget i rssisateidreerippaans iioi were ieia 420 Appendix D Titroducton srs Bi hs 33 Sas REESE ORAS AEE i paia 421 Configuring general properties wiki rid nes kv ide ee eann ake ko 422 Configuring display properties vir jackie os ao teow se 423 Configuring Font Properties ih wien ia hae Pee fae oe een aS 424 Configuring Location Properties s adomct iain Ni akeh iaeeid 425 ALM GOTO les aiae epa ona hdd ena a biaia dans 426 ESEL C ntrOl Asserts aah anaE AE a a E dc E E E tele 428 TOT Control Sosa cau E E EE ERE SEEE EE UDA i 429 RMPS Controle Sg ahd aS e EE e E NE a e A 431 D2SD Cortfol sredoredoni ad tkiva rtra t enio aoea A 434 DISD Controla iea eE E E E aia EEEE E EAN 436 PIDE Controll je actrees it o OET aa Seng a UN AE A Ea 438 Publication 1756 RM006G EN P September 2010 Where to Find an Instruction If the locator lists a page number Instruction Locator Use this locator to find the reference details about Logix instructions the grayed out instructions are available in other manuals This locator also lists which programming languages are available for the instructions The instruction is documented in this manual general Logix5000 Controllers General Instructions Reference Manual publication 1756 RM003 motion Logix5000 Controllers Motion Instructions Reference Manual publication 1756 RMO007 phase Log
86. in radians second If WLead lt minimum or WLead gt maximum the instruction sets the appropriate bit in Status and limits WLead If the WLag WLead ratio gt maximum ratio the instruction sets the appropriate bit in Status and limits WLag Valid see Description section below for valid ranges Default 0 0 WLag REAL The lag corner frequency in radians second If WLag lt minimum or WLag gt maximum the instruction sets the appropriate bit in Status and limits WLag If the WLag WLead ratio gt maximum ratio the instruction sets the appropriate bit in Status and limits WLag Valid see Description section below for valid ranges Default 0 0 ZetaLead REAL Second order lead damping factor Only used when Order 2 If ZetaLead lt minimum or ZetaLead gt maximum the instruction sets the appropriate bit in Status and limits ZetaLead Valid 0 0 to 4 0 Default 0 0 302 Publication 1756 RMO06G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Input Parameter Data Type Description ZetaLag REAL Second order lag damping factor Only used when Order 2 If ZetaLag lt minimum or ZetaLag gt maximum the instruction sets the appropriate bit in Status and limits ZetaLag Valid 0 05 to 4 0 Default 0 0 Order REAL Order of the filter Selects the first or second order filter algorithm If invalid the instruction sets the appropr
87. in turn affects any subsequent instruction input instruction output instruction Ne rung in rung out condition condition 19 Preface If the rung in condition to an input instruction is true the controller evaluates the instruction and sets the rung out condition based on the results of the instruction If the instruction evaluates to true the rung out condition is true if the instruction evaluates to false the rung out condition is false The controller also prescans instructions Prescan is a special scan of all routines in the controller The controller scans all main routines and subroutines during prescan but ignores jumps that could skip the execution of instructions The controller executes all FOR loops and subroutine calls If a subroutine is called more than once it is executed each time it is called The controller uses prescan of relay ladder instructions to reset non retentive I O and internal values During prescan input values are not current and outputs are not written The following conditions generate prescan e Toggle from Program to Run mode e Automatically enter Run mode from a power up condition Prescan does not occur for a program when e The program becomes scheduled while the controller is running e The program is unscheduled when the controller enters Run mode Function block states The controller evaluates function block instructions based on the state of different c
88. incrementally averages samples from 1 to the NumberOfSamples value For example NumberOfSamples 3 UseWeights is set Scan 1 Out In Weight Scan 2 Out n Weight In _ Weight Scan 3 Out n Weight In _ Weighty Inp 2 Weight NumberOfSamples 3 UseWeights is cleared Scan 1 Out In 1 Scan 2 Out n In 1 2 Scan 3 Out dn In In _2 NumberOfSamples Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none 348 Publication 1756 RMO06G EN P September 2010 Statistical Instructions MAVE MAXC MINC MSTD Chapter 6 Condition prescan Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan If InFault is cleared the instruction initializes the algorithm and continues If InFault is cleared the instruction initializes the algorithm and continues instruction first run If InFault is cleared the instruction initializes the algorithm and continues If InFault is cleared the instruction initializes the algorithm and continues Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example Each scan the instruction pl
89. instruction OutNot BOOL The inverted output of the instruction Description The following diagram illustrates how the RESD instruction operates Set is set and Reset is cleared Out is cleared Out is set OutNot is set Reset Is set OutNot is cleared Arithmetic Status Flags not affected 364 Publication 1756 RMO06G EN P September 2010 Move Logical Instructions DFF JKFF RESD SETD Chapter 7 Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan No action taken No action taken instruction first run Out is cleared OutNot is set Out is cleared OutNot is set Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example When Set is set Out is set when Reset is set Out is cleared Reset has Publication 1756 RMO06G EN P September 2010 precedence over Set Structured Text ESD 01 Set RI RESD 01 Reset RESD RESD_ 01 set input reset input output RESD 01 Out not_output RESD 01 OutNot Function Block 0 set_input P E reset_input oo RESD_01 RESD Wj Reset Dominant Set Res
90. instruction only executes on a scan when tag_xic transitions from cleared to set The ABL instruction does not execute when tag_xic stays set or when ag_xic is cleared ABL ASCII Test For Buffer Line 396 JE Channel 0 N gt SerialPort Control serial_control F gt Character Count 0e In structured text if you write this example as IF tag_xic THEN ABL 0 serial_ control END IF the ABL instruction will execute every scan that tag_xic is set not just when tag_xic transitions from cleared to set Publication 1756 RMO06G EN P September 2010 Structured Text Programming Appendix B If you want the ABL instruction to execute only when tag_xic transitions from cleared to set you have to condition the structured text instruction Use a one shot to trigger execution osri_1 InputBit tag xic OSRI osri_1 IF osri_ 1 OutputBit THEN ABL 0 serial_ control END IF Constructs Constructs can be programmed singly or nested within other constructs If you want to Use this construct Available in these languages Page do something if or when specific IF THEN structured text 398 conditions occur select what to do based on a numerical value CASE OF structured text 401 do something a specific number of times before FOR DO structured text 404 doing anything else keep doing something as long as certain WHILE DO structured text 407 conditions are true
91. invalid the Output Parameter Data Type instruction limits the value and sets the appropriate bit in Status Valid 1 000 000 to 1 000 000 Default 100 000 Description EnableOut BOOL Enable output Out REAL The instruction s Out If the Out calculation overflows Out is forced to and the appropriate bit in Status is set Arithmetic status flags are set for this output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred WordSizelnv Status 1 BOOL Invalid WordSize value OutOverflow Status 2 BOOL The internal output calculation overflowed LostPrecision BOOL Out lt 2 4 or Out gt 224 When the instruction converts Out from an integer to a real value Status 3 data is lost if the result is greater than 224 because the REAL data type is limited to 224 MultiplierInv BOOL Invalid Multiplier value Status 4 Publication 1756 RMO06G EN P September 2010 261 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Description The PMUL instruction operates in Relative or Absolute mode In Relative mode the instruction s output is the differentiation of the input from scan to scan multiplied by the Multiplier 100 000 In Relative mode the instruction saves any remainder af
92. is cleared OperResetReq BOOL The operator reset request input Set by the operator interface to request totalization to reset The instruction clears this input Default is cleared ProgValueReset BOOL Reset program control values When set clear all the program request inputs each execution of the instruction Default is cleared TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 2 Default 0 OversampleDT REAL Execution time for oversample mode Valid 0 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 32 767 ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 32 767 ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Total REAL The totalized value if In Arithmetic status flags are set for this output OldTotal REAL The value of the total before a reset occurred You can monitor this value to read the exact total just before the last reset ProgOper BOOL Program operator control indicator Set when in Program control Cleared when in Operator control RunStop BOOL The indicator of the operational state of the totalizer Set when the TOT instruction is running Cleared when the TOT instruction is stopped ProgResetDone BOOL The
93. is cleared ResetValue REAL The reset value for instruction The instruction sets Out ResetValue as long as Reset is set Valid any float Default 0 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output Description The MAXC instruction executes this algorithm Condition Action Reset is set Out ResetValue Out ResetValue Reset is cleared Out In when In gt Out Out Out when In lt Out Out Out 350 Publication 1756 RMO06G EN P September 2010 Statistical Instructions MAVE MAXC MINC MSTD Chapter 6 Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Execution Condition Action Action prescan No action taken No action taken instruction first scan Out In Out In instruction first run Out In Out In Enableln is cleared EnableOut is cleared the instruction na does nothing and the outputs are not updated Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example If Reset is set the instruction sets Out ResetValue If Reset is cleared the instruction sets Out In when In gt Out _ Otherwise the instruction sets Out Out _ Structured Text MAXC_01 In MAXC_01 Reset inp
94. limits the CV value Valid 0 0 100 0 Default 0 0 CVSetPrevious BOOL Request to use CVPrevious If set CV CVPrevious Default is cleared CVManLimiting BOOL Limit CV in manual mode request If Manual mode and CVManLimiting is set CV is limited by the CVHLimit and CVLLimit values Default is cleared CVEUmaximum REAL maximumimum value for CVEU The value of CVEU which corresponds to 100 CV If CVEUmaximum CVEUMin the instruction sets the appropriate bit in Status Valid any float Default 100 0 CVEUMin REAL Minimum value of CVEU The value of CVEU which corresponds to 0 CV If CVEUmaximum CVEUMin the instruction sets the appropriate 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 Cascade Ratio mode or Manual mode if CVManLimiting is set If CVHLimit gt 100 or lt CVLLimit the instruction sets the appropriate bit in Status If CVHLimit lt CVLLimit the instruction limits CV using the value of CVLLimit Valid CVLLimit lt CVHLimit lt 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 Cascade Ratio mode or Manual mode if CVManLimiting is set If CVLLimit lt 0 or CVHLimit lt CVLLimit the instruction sets the appropriate bit in Status If CVHLimit lt CVLLimit the instruction limits CV using t
95. negative float lt corresponds to 0 span of the Process Variable If PVEUMax PYEUMin lt PVEUMax lt PVEUMin set bit in Status Default 0 0 Refer to Processing Faults on page 99 PVSpanInv or SPLimitsInv for details SPProg REAL SP Program value scaled in PV units SP is set to this value Valid SPLLimit to SPHLimit when in Program control Refer to Current SP on page 88 Default 0 0 If value of SPProg or SPOper lt SPLLimit or gt SPHLimit set bit in Status and limit value used for SP SPOper REAL SP Operator value scaled in PV units SP set to this value Valid SPLLimit to SPHLimit when in Operator control Refer to Current SP on page 88 Default 0 0 If value of SPProg or SPOper lt SPLLimit or gt SPHLimit set bit in Status and limit value used for SP SPCascade REAL SP Cascade value scaled in PV units If CascadeRatio mode Valid SPLLimit to SPHLimit and UseRatio is FALSE then SP is set to this value typically this will be CVEU of a primary loop If CascadeRatio mode and Default 0 0 UseRatio is TRUE then SP is set to this value times Ratio Refer to Cascade ratio SP on page 87 and Current SP on page 88 If value of SPCascade lt SPLLimit or gt SPHLimit set bit in Status and limit value used for SP 146 Publication 1756 RMO06G EN P September 2010 IMC Input Parameter SPHLimit Type REAL Advanced Process Control Function Blocks IMC CC MMC Description SP high limit value scaled i
96. of CVHealth bad to good CV2Initializing is set FALSE after the function block has been initialized and CV2InitReq is no longer TRUE Refer to Instruction First Scan on page 80 CV3lnitializing BOO L Initialization mode indicator for CV3 Set TRUE when CV3lnitReq function blockFirstScan or OLCFirstRun are TRUE or on a TRUE to FALSE transition of CVHealth bad to good CV3lnitializing is set FALSE after the function block has been initialized and CV3InitReq is no longer TRUE Refer to Instruction First Scan on page 80 CV1HAlarm BOO CV1 high alarm indicator TRUE when the calculated value for CV1 gt 100 or CVIHLimit CV2HAlarm BOO CV2 high alarm indicator TRUE when the calculated value for CV2 gt 100 or CV2HLimit CV3HAlarm BOO CV3 high alarm indicator TRUE when the calculated value for CV3 gt 100 or CV3HLimit CV1LAlarm BOO CV1 low alarm indicator TRUE when the calculated value for CV1 lt 0 or CViLLimit CV2LAlarm BOO CV2 low alarm indicator TRUE when the calculated value for CV2 lt 0 or CV2LLimit CV3LAlarm BOO CV3 low alarm indicator TRUE when the calculated value for CV3 lt 0 or CV3LLimit CV1ROCPosAlarm BOO CV1 rate of change alarm indicator TRUE when the calculated rate of change for CV1 exceeds CV1ROCPosLimit CV2ROCPosAlarm Publication 1756 RMO06G EN P BOO September 201 0 CV2 rate of c
97. of tagA to 50 9 the second IREF wired into Block_02 will still use a value of 25 4 when Block_02 executes this scan The new tagA value of 50 9 will not be used by any IREFs in this routine until the start of the next scan Block_04 Block_02 tagA Publication 1756 RM006G EN P September 2010 371 AppendixA Function Block Attributes Order of Execution 372 The RSLogix 5000 programming software automatically determines the order of execution for the function blocks in a routine when you e verify a function block routine e verify a project that contains a function block routine e download a project that contains a function block routine You define execution order by wiring function blocks together and indicating the data flow of any feedback wires if necessary If function blocks are not wired together it does not matter which block executes first There is no data flow between the blocks If you wire the blocks sequentially the execution order moves from input to output The inputs of a block require data to be available before the controller can execute that block For example block 2 has to execute before block 3 because the outputs of block 2 feed the inputs of block 3 e eB q es iaA TF Execution order is only relative to the blocks that are wired together The following example is fine because the two groups of blocks are not wired toget
98. on Since the input data word of a 1771 I O module is an INT tag it is easiest to use a 16 bit constant value EXAMPLE Mixing an INT tag with an immediate value Since remote_rack_1 I Data 0 is an INT tag the value to check it against is also entered as an INT tag EQU Equal Source emote_rack_1 I Pata 0 2 1111_1111_1111_1111 Source B int_ 2 1111_1111_ 1111 1111 42093 EXAMPLE Mixing an INT tag with an immediate value Since remote_rack_1 I Data 0 is an INT tag the value to check it against first moves into int_0 also an INT tag The EQU instruction then compares both tags MOV EQU Move Equal Sourc 1111_1111_1111_1 111 Source Femote_rack_1 1 Data 0 2 1111_1111_1111 11111 Dest int_ Source B Int 2 1111_1111_1111_11111 2 1111_1111_1111_11111 eae 418 Publication 1756 RMO06G EN P September 2010 Common Attributes Appendix C Integer to REAL The controller stores REAL values in IEEE single precision floating point number format It uses one bit for the sign of the value 23 bits for the base value and eight bits for the exponent 32 bits total If you mix an integer tag SINT INT or DINT and a REAL tag as inputs in the same instruction the controller converts the integer value to a REAL value before the instruction executes e A SINT or INT value always converts to the same REAL value e A DINT value may not convert to the same REAL value
99. over Derivative DERV structured text 292 time in per second units function bloc filter input frequencies that are below the High Pass Filter HPF structured text 296 cutoff frequency function bloc filter with a pole pair and a zero pair Second Order Lead Lag structured text 302 LDL2 function bloc filter input frequencies that are above the Low Pass Filter LPF structured text 308 cutoff frequency function bloc filter input frequencies that are at the notch Notch Filter NTCH structured text 314 frequency Publication 1756 RMO06G EN P September 2010 function bloc 291 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Derivative DERV Operands DERV DERV_tag DERV_04 DERY aj Derivative ByP ass Out D The DERV instruction calculates the amount of change of a signal over time in per second units Structured Text DERV tag DERIVATIVE structure DERV structure Function Block DERV tag DERIVATIVE structure DERV structure DERIVATIVE Structure Input Parameter Enableln Data Type BOOL Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REAL The analog signal input to the instruction Valid any float Default 0 0 Gain REAL Derivative multiplier
100. parameters or the response time constants You can do so by changing the appropriate parameters and setting the appropriate Modellnit bit The internal states of the function block will be initialized and the bit will automatically reset For example if you modify the IMC function block Model Gain for CV PV set the ModelInit parameter to TRUE to initialize the CV PV internal model parameters and for the new model gain to take effect Publication 1756 RMO06G EN P September 2010 g SP Cascade c RatioProg Pro gPro gReq ProgOp erReq ProgCasRatReq Pro gAutoReq E ProgManualReg Pro gOwe ride Req ProgHandReq Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 IMC Function Block Structure Structured Text IMC IMC_tag IMC tag Internal Model Control IMC structure Function Block IMC tag Internal Model Control IMC structure IMPORTANT Whenever an APC block detects a change in Delta Time DeltaT a Modellnit will be performed For this reason the blocks should only be run in one of the TimingModes in which DeltaT will be constant e TimingMode 0 Periodic while executing these function blocks in a Periodic Task e 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 Modellnit The following TimingMode settin
101. photoeye is off while photoeye2 is on then IF photoeyel XOR photoeye2 THEN BOOLtag expression2 expressionl amp 394 If photoeye and photoeye2 are BOOL tags openis a BOOL tag and your specification says lf photoeyel and photoeye2 are both on set open to true open photoeyel amp photoeye2 Publication 1756 RMO06G EN P September 2010 Structured Text Programming Use bitwise operators Appendix B Bitwise operators manipulate the bits within a value based on two values For Use this operator Optimal Data Type bitwise AND amp AND DINT bitwise OR OR DINT bitwise exclusive OR XOR DINT bitwise complement NOT DINT For example Use this format Example For this situation You d write valuel operator value2 If input input2 and result are DINT tags and your resultl inputl AND specification says Calculate the bitwise result of input2 input and input2 Store the result in resu t Determine the order of execution The operations you write into an expression are performed in a prescribed order not necessarily from left to right e Operations of equal order are performed from left to right e If an expression contains multiple operators or functions group the conditions in parenthesis This ensures the correct order of execution and makes it easier to read the expression Order Operation function pae
102. request CascadeRatio mode The function block will reset this parameter to FALSE Refer to Operating modes on page 86 and Cascade ratio SP on page 87 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 Refer to Operating modes on page 86 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 Refer to Operating modes on page 86 Default FALSE ProgValueReset BOOL Reset Program control values When TRUE the Prog_xxx_Req inputs are reset to FALSE e When TRUE and Program control set SPProg equal to SP and CVProg equal to CV e When ProgValueReset is TRUE the function block resets this parameter to FALSE Refer to Operating modes on page 86 for details Publication 1756 RMO06G EN P September 2010 Default FALSE 153 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC IMC Input Parameter Type Description Valid and Default Values TimingMode DINT Selects Time Base Execution mode Valid 0 2 Value Description Default 0 0 Periodic mode 1 Oversample mode 2 Real time sampling mode Valid 0 2 Default 0 For more information about timing modes see Appendix Func
103. specified jerk rate You can configure the SCRV instruction to produce an S Curve profile or a Ramp profile for a step input 270 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 SCRV Profile Description S Curve profile To produce an S Curve profile set JerkRate such that JerkRate DeltaT lt AccelRate and or DecelRate In S Curve profile mode the SCRV instruction ensures that the rate never changes more than the specified JerkRate The algorithm used to produce the S Curve profile is designed to produce a smooth symmetric S Curve for a step input A trapezoidal integration of Out is incorporated to facilitate this As a result changes in Rate will be less than JerkRate during portions of the profile When a step change occurs on the input rate is increased to the programmed AccelRate or DecelRate The AccelRate or DecelRate is maintained until a point at which rate must begin decreasing in order for the output to reach input when rate reaches zero In some cases depending on the values of acceleration deceleration and jerk the acceleration rate or deceleration rate might not be reached before the rate must begin decreasing by jerk rate For very small step changes the SCRV instruction will not attempt to produce an S profile In this mode the entire step will be output and Rate will reflect the change in output This behavior will occur if Out In and the next
104. step change to In can be output with a rate less than or equal to the programmed JerkRate The SCRV instruction supports an algebraic ramp and an absolute value ramp For an algebraic ramp the acceleration condition is defined by an input that is becoming more positive and the deceleration condition is defined by an input that is becoming more negative For an absolute value ramp the acceleration condition is defined by an input moving away from zero and the deceleration condition is defined by an input moving towards zero Ramp profile To produce a Ramp profile set JerkRate such that JerkRate DeltaT gt AccelRate and or DecelRate In Ramp Profile mode the SCRV instruction always produces a rate of change equal to the programmed AccelRate or DecelRate until the difference between Out and In requires less then AccelRate or DecelRate to reach endpoint HoldMode 0 operates the same as HoldMode 1 When HoldEnable is set Out is immediately held and Rate becomes zero Publication 1756 RMO06G EN P September 2010 271 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN The following diagram illustrates how the instruction modifies Out Initialize is cleared and Hold is set Initialize is set q Initialize is set Initialize and Hold are cleared p initialize instruction Initialize and Hold are cleared hold Out Initialize is cleared and Hold is set calculate Out and Rate
105. still controlling the process This is useful in multiloop selection schemes where you want the CC function block to follow the output of a different controlling algorithm where you would connect the output of the controlling algorithm into the CV2TrackValue Valid 0 0 100 0 Default 0 0 CV3TrackValue REAL CV3 track value When CVTrackReg is enabled and the CC function block is in Manual mode the CV3TrackValue will be ignored and the CC internal model will update its historical data with the CV30per or CV3Prog value When CVTrackReq is enabled and the CC function block is in Auto the internal model will update its historical data based on the value of CV3TrackValue The CV3 in this case will be allowed to move as if the CC function block was still controlling the process This is useful in multiloop selection schemes where you want the CC function block to follow the output of a different controlling algorithm where you would connect the output of the controlling algorithm into the CV3TrackValue Valid 0 0 100 0 Default 0 0 CVManLimiting BOOL Limit CV n where n can be 1 2 or 3 in Manual mode If Manual mode and CVManLimiting is TRUE CV n will be limited by the CV n HLimit and CV n LLimit values Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 Default FALSE CV1EUMax REAL Maximum value for CV1EU The value of CV1EU that corresponds to 1
106. taken instruction first scan No action taken No action taken instruction first scan No action taken No action taken Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan 124 No action taken No action taken Example The SCL instruction is typically used with analog input modules that do not support on board scaling to floating point engineering units In this example the SCL instruction scales an analog input from a 1771 IFE module The instruction places the result in Out which is used by an ALM instruction Structured Text SCL _01 In InputOFrom17711IFE SCL SCL_01 ALM 01 In SCL _01 0Out ALM ALM 01 Function Block InputOFrom1774IFE SCL_o1 ALM_04 ALM LJ Alarm HHAlarm HAlarm LAlarm LLAlarm ROCPosAlarm DUVET ROCNegAlarm Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Split Range Time The SRTP instruction takes the 0 100 output of a PID loop and drives heating and cooling digital output contacts with a periodic pulse This Proportional SRTP instruction controls applications such as barrel temperature control on extrusion machines
107. the Worldwide Locator at http www rockwellautomation com support americas phone_en html or contact Canada your local Rockwell Automation representative New Product Satisfaction Return Rockwell Automation tests all of its products to ensure that they are fully operational when shipped from the manufacturing facility However if your product is not functioning and needs to be returned follow these procedures United States Contact your distributor You must provide a Customer Support case number call the phone number above to obtain one to your distributor to complete the return process Outside United States Please contact your local Rockwell Automation representative for the return procedure Documentation Feedback Your comments will help us serve your documentation needs better If you have any suggestions on how to improve this document complete this form publication RA DU002 available at http www rockwellautomation com literature Rockwell Otomasyon Ticaret A S Kar Plaza Merkezi E Blok Kat 6 34752 erenk y stanbul Tel 90 216 5698400 www rockwellautomation com Power Control and Information Solutions Headquarters Americas Rockwell Automation 1201 South Second Street Milwaukee WI 53204 USA Tel 1 414 382 2000 Fax 1 414 382 4444 Europe Middle East Africa Rockwell Automation Vorstlaan Boulevard du Souverain 36 1170 Brussels Belgium Tel 32 2 663 0600 Fax 32 2 663 0640 Asi
108. the instruction clears the input each execution Default is cleared ProgAutoReq BOOL Program auto mode request Set by the user program to request Auto mode When ProgValueReset is set the instruction clears the input each execution Default is cleared ProgManualReq BOOL Program manual mode request Set by the user program to request Manual mode When ProgValueReset Is set the instruction clears the input each execution Default is cleared ProgOverrideReq BOOL Program override mode request Set by the user program to request Override mode When ProgValueReset is set the instruction clears the input each execution Default is cleared ProgHandReq BOOL Program hand mode request Set by the user program to request Hand mode This value is usually read as a digital input from a hand auto station When ProgValueReset is set the instruction clears the input each execution Default is cleared OperProgReq BOOL Operator program request Set by the operator interface to request Program control The instruction clears this input each execution Default is cleared OperOperReq BOOL Operator operator request Set by the operator interface to request Operator control The instruction clears this input each execution Default is cleared OperCasRatReq BOOL Operator cascade ratio mode request Set by the operator interface to request Cascade Ratio mode The instruction clears this input each execution Default is cleared OperAutoReq BOOL Operato
109. the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken Publication 1756 RMO06G EN P September 2010 No action taken 305 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Example The LDL2 instruction can attenuate between two frequencies or can amplify between two frequencies depending on how you configure the instruction Since the Lead and Lag frequencies can be set to values that are larger or smaller than each other this instruction may behave as a Lead Lag block or as a Lag Lead block depending on which frequency is configured first Note that higher orders increase the execution time for the filter instruction Filter Graph 15t order lead lag Gain OLead lt Lag 1 0 Frequency rad sec log scale 2 4 order lead lag Gain Lead lt ag 10 i Frequency Ou O rad sec log scale st K 1 order lead lag Gain Lag lt lead 1 0 ck 1 Frequency rad sec log scale 2 4 order lead lag Gain Lag lt OLead 10 oasis Frequency rad sec log scale l l i f I I l l l 0 306 Publication 1756 RMO06G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Structured Text iDL2 01 In frequency input iDL2 01 WLead Lead
110. the non linear gain mode selected by ParabolicLinear to compute the actual proportional and integral gains When cleared the instruction disables the non linear gain mode and uses the Kp and Wld values as the proportional and integral gains Default is cleared ParabolicLinear BOOL Selects the non linear gain mode The modes are linear or parabolic When set the instruction uses the parabolic gain method of y a x b to calculate the actual proportional and integral gains If cleared the instruction uses the linear gain method of y a x b Default is cleared TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the PI algorithm Arithmetic status flags are set for this output HighAlarm BOOL The maximum limit alarm indicator Set when the calculated value for Out gt HighLimit and the output and integrator are clamped at HighLimit LowAlarm BOOL The min
111. three terms proportional integral and derivative at the same time where PIDE term Description CV control variable E error in percent of span At update time in seconds used by the loop Ke controller gain Ti integral time constant in minutes per repeat a larger value of T causes a slower integral response It takes T minutes for the integral term to repeat the action of the proportional term in response to a step change in error Tp derivative time in constant in minutes Determining which algorithm to use When the PIDE parameter DependIndepend is cleared the parameters PGain IGain and DGain represent Kp Ky and Kp When DependIndepend is set the parameters PGain IGain and DGain represent K Ty and Tp The PIDE equations above are representative of the algorithms used by the PIDE instruction You can substitute the change in error values for the change in PV in percent of span for the proportional and derivative terms by manipulating the parameters PVEProportional and PVEDerivative By default the PIDE instruction uses the change in error for the proportional term and the change in PV for the derivative term This eliminates large derivative spikes on changes in setpoint Publication 1756 RMO06G EN P September 2010 77 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT You can convert the gains used between the different PIDE algorith
112. to 100 and CVEUMin corresponds to 0 This output is typically used to control an analog output module or a secondary loop Arithmetic flags will be set for this output 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 Refer to Selecting the Control Variable on page 94 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 CVHealth bad to good CVInitializing is set FALSE after the function block has been initialized and CVInitReq is no longer TRUE Refer to Execution on page 80 Instruction First Scan CVHAlarm BOOL CV high alarm indicator TRUE when the calculated value for CV gt 100 or CVHLimit CVLAlarm BOOL CV low alarm indicator TRUE when the calculated value for CV lt 0 or CVLLimit CVROCPosAlarm CV rate of change alarm indicator TRUE when the calculated rate of change for CV exceeds CVROCPosLimit CVROCNegAlarm BOOL CV rate of change alarm indicator TRUE when the calculated rate of chang
113. unlatch Publication 1756 RMO06G EN P September 2010 FaultAlarm set FaultAlmUnlatch or clear FaultAlarmLatch Default is cleared 39 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description FaultAlmUnLatch BOOL Fault alarm unlatch input Set this input when FaultAlarmLatch is set to unlatch FaultAlarm The instruction clears this input Default is cleared OverrideOnlInit BOOL Override on initialization request If this bit is set then during instruction first scan the instruction is placed in Operator control with Override set and Hand cleared If ProgHandReq is set then Override is cleared and Hand is set Default is cleared OverrideOnFault BOOL Override on fault request Set this value if the device should go to Override mode and enter the OverrideState on a fault alarm After the fault alarm is removed the instruction is placed in Operator control Default is cleared OutOState0 BOOL Output 0 state 0 input This value determines the value of Output0 when the device is in the 0 state Default is cleared OutOState1 BOOL Output 0 state 1 input This value determines the value of Output0 when the device is in the 1 state Default is cleared Out0State2 BOOL Output 0 state 2 input This value determines the value of Qutput0 when the device is in the 2 state Default is cleared
114. valid ranges Default maximum positive float WLead 278 REAL Second order lead corner frequency in radians second If the value is out of range the instruction limits the value and sets the appropriate bit in Status Valid see the Description section below for valid ranges Default 0 0 Publication 1756 RMO06G EN P September 2010 Input Parameter ZetaLead Data Type REAL Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Description Second order lead damping factor If the value is out of range the instruction limits the value and sets the appropriate bit in Status Valid 0 0 to 10 0 Default 0 0 HighLimit REAL The high limit value This is the maximum value for Out If HighLimit lt LowLimit the instruction sets HighAlarm and LowAlarm sets the appropriate bit in Status and sets Out LowLimit Valid LowLimit lt HighLimit lt maximum positive float Default maximum positive float LowLimit REAL The low limit value This is the minimum value for Out If HighLimit lt LowLimit the instruction sets HighAlarm and LowAlarm sets the appropriate bit in Status and sets Out LowLimit Valid maximum negative float lt LowLimit lt HighLimit Default maximum negative float HoldHigh BOOL The hold high command When set the value of the internal integrator is not allowed to increase in value Default is cleared HoldLow BOOL The hold low c
115. value optional BY increment If you don t specify an increment the loop increments by 1 DO lt statement gt IF bool_expression THEN EXIT lt q __________ If there are conditions when you want to optional exit the loop early use other statements END_IF such as an IF THEN construct to condition an EXIT statement END _ FOR 404 Publication 1756 RM006G EN P September 2010 Structured Text Programming Appendix B The following diagrams show how a FOR DO loop executes and how an EXIT statement leaves the loop early Done xnumber yes Done Xnumber yes ad of times ae of times no no statement 1 statement 1 statement 2 statement 2 statement 3 statement 3 statement 4 statement 4 sn ie yes ae y Exit _ rest of the routine ka no The FOR DO loop executes a specific To stop the loop before the count reaches the last number of times value use an EXIT statement v rest of the routine Arithmetic Status Flags not affected Fault Conditions A major fault will occur if Fault type Fault code the construct loops too long Example 1 If you want this Enter this structured text Clear bits 0 31 in an array of BOOLs For subscript 0 to 31 by 1 do 1 Initialize the subscript tag to 0 2 Clear array subscript For example when subscript 5 clear array 5 End_for 3 Add 1 to subscript 4 If subscript
116. valueN lt statement gt Use two periods to identify the range distinct values plus a range of values Arithmetic Status Flags not affected Fault Conditions none Example 402 valuea valueb valuel valueN lt statement gt Publication 1756 RMO06G EN P September 2010 Structured Text Programming Example If you want this Enter this structured text If recipe number 1 then CASE recipe number OF Ingredient A outlet 1 open 1 1 Ingredient A Ingredient B outlet 4 open 1 Ingredient B If recipe number 2 or 3 then 2 3 Ingredient A Ingredient A outlet 4 open 1 Ingredient B Ingredient B outlet 2 open 1 If recipe number 4 5 6 or 7 then 4 7 Ingredient A Ingredient A outlet 4 open 1 Ingredient B Ingredient B outlet 2 open 1 If recipe number 8 11 12 or 13 then 8 11 13 Ingredient A Ingredient A outlet 1 open 1 Ingredient B Ingredient B outlet 4 open 1 Otherwise all outlets closed 0 ELSE Ingredient A Outlet_1 0 Ingredient A Outliet 4 0 Ingredient B Outlet 2 0 Ingredient B Outlet 4 0 END_CASE Outlet_1 Outlet _4 Outlet _4 Outlet _2 Outlet_4 Outlet _2 Outlet_1 Outlet _4 Appendix B Sw Sealy a N sal calz ee Pale ee las The tells the controller to also clear the outlet tags whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This app
117. variable by entering the following four parameters Parameter Model Gain Description A nonzero number negative for direct acting control variable positive for reverse acting control variable Model Time Constant Always a positive number Model Deadtime Always a positive number Response Time Constant Always a positive number used to tune the response of the IMC control variable A smaller number gives a faster response At this point you have completed the basic configuration You did not configure the built in tuner The control variable is ready to be put online in either Auto or Manual mode For tuning use the default settings Refer to IMC Function Block Tuning on page 143 141 Chapter 2 142 Advanced Process Control Function Blocks IMC CC MMC 3 If you do not know the process model you need to identify the model and tune the control variable by using the built in tuner modeler for the control variable to operate correctly in the Auto mode The control variable uses a first order lag with deadtime internal process model and a first order filter total of four tuning parameters to calculate the CV The CV is calculated such that the process variable PV follows a first order lag trajectory when approaching the setpoint value Speed of response depends on the value of the response time constant The smaller that the response time constant is the faster the control variabl
118. when PVFaulted is set Publication 1756 RM006G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT PV Chapter 1 Converting the PV and SP Values to Percent The instruction converts PV and SP to a percent and calculates the error before performing the PID control algorithm The error is the difference between the PV and SP values When ControlAction is set the values of EPercent E and PVPIDPercent are negated before being used by the PID algorithm PV PVEUMin PVEUmaximum SP SP PVEUMin PVEUmaximum a 1 Output 11 12 2 PV SP PVPercent EPercent x100 l1 Output 11 Output p 1 12 11 x12 ize PV SP pp 12 x 100 SPPercent 1 gt l Output PVPIDPercent 11 x12 op 2 E o 1 Output gt Select set Output 11x12 Ll2 Select cleared Deviation Select Select multiplier based on state of ControlAction The values of EPercent E and PVPIDPercent are negated when ControlAction is set 1 PVPIDPercent and Deviation are internal parameters used by the PID control algorithm Publication 1756 RMO06G EN P September 2010 91 Chapter 1 92 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Deviation High Low Alarming Deviation is the differ
119. when in Auto mode or in Manual mode if CVManLimiting is TRUE otherwise limited by 0 and 100 Refer to Selecting the Control Variable on page 94 CV3 REAL Control variable 3 output This value will always be expressed as 0 100 CV3 is limited by CV3HLimit and CV3LLimit when in Auto mode or in Manual mode if CVManLimiting is TRUE otherwise limited by 0 and 100 Refer to Selecting the Control Variable on page 94 186 Publication 1756 RMO06G EN P September 2010 CC Output Parameter DeltaCV1 Data Type REAL Advanced Process Control Function Blocks IMC CC MMC Description Difference between the Current CV1 and the previous CV1 Current CV1 previous CV1 Values Chapter 2 DeltaCV2 REAL Difference between the Current CV2 and the previous CV2 Current CV2 previous CV2 DeltaCV3 REAL Difference between the Current CV3 and the previous CV3 Current CV3 previous CV3 CV Initializing BOO L Initialization mode indicator for CV1 Set TRUE when CV1InitReq are TRUE or on a TRUE to FALSE transition of CVHealth bad to good CV1 Initializing is set FALSE after the function block has been initialized and CV1InitReq is no longer TRUE Refer to Instruction First Scan on page 80 CV2Initializing BOO L Initialization mode indicator for CV2 Set TRUE when CV2InitReq function blockFirstScan or OLCFirstRun are TRUE or on a TRUE to FALSE transition
120. would be used to generate a bumpless transfer out of Hand mode If value of CV1HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 176 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 CC Input Parameter Data Type Description Values CV2HandFB REAL CV2 HandFeedback value CV2 set to this value when in Hand Valid 0 0 100 0 mode and CV2HandFBFault is FALSE good health This value would typically come from the output of a field mounted Default 0 0 hand auto station and would be used to generate a bumpless transfer out of Hand mode If value of CV2HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 CV3HandFB REAL CV3 HandFeedback value CV3 set to this value when in Hand Valid 0 0 100 0 mode and CV3HandFBFault is FALSE good health This value would typically come from the output of a field mounted Default 0 0 hand auto station and would be used to generate a bumpless transfer out of Hand mode If value of CV3HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 CV1HandFBFault BOOL CV1HandFB value bad health indicator If the CV1HandFB value is Default FALSE read from an analog in
121. 0 or lt CVLLimit or gt CVHLimit when CVManLimiting is set the instruction sets the appropriate bit in Status and limits the CV value Valid 0 0 100 0 Default 0 0 CVOper REAL CV operator manual value CV equals this value when in Operator Manual mode If not Operator Manual mode the instruction sets CVOper CV at the end of each instruction execution If CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is set the instruction sets the appropriate bit in Status and limits the CV value Valid 0 0 100 0 Default 0 0 CVOverride REAL CV override value CV equals this value when in override mode This value should correspond to a safe state output of the PID loop If CVOverride lt 0 or gt 100 the instruction sets the appropriate bit in Status and limits the CV value Valid 0 0 100 0 Default 0 0 66 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type Description C VPrevious REAL CV 1 value If CVSetPrevious is set CV equals this value CV is the value of CV from the previous execution CVPrevious is ignored when in manual override or hand mode or when CVInitializing is set If CVPrevious lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when in Auto or cascade ratio mode the instruction sets the appropriate bit in Status and
122. 0 125 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description maximumCoolln REAL maximumimum cool input Specify the percent of In that causes maximumimum cooling This is typically 0 for a heat cool loop Valid any float Default 0 0 MinCoolln REAL Minimum cool input Specify the percent of In that causes minimum cooling This is typically 50 for a heat cool loop Valid any float Default 50 0 maximumHeatTime REAL maximumimum heat time in seconds Specify the maximumimum time in seconds that a heating pulse can be on If the instruction calculates HeatTime to be greater than this value HeatTime is limited to maximumHeatTime If maximumHeatTime is invalid the instruction assumes a value of CycleTime and sets the appropriate bit in Status Valid 0 0 to CycleTime Default 0 0 MinHeatTime REAL Minimum heat time in seconds Specify the minimum time in seconds that a heating pulse can be on If the instruction calculates HeatTime to be less than this value HeatTime is set to zero If MinHeatTime is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid 0 0 to maximumHeatTime Default 0 0 maximumCoolTime REAL maximumimum cool time in seconds Specify the maximumimum time in seconds that a cooling pulse can be on If the instruction calculates CoolTime to be la
123. 00 CV1 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpaninv Publication 1756 RMO06G EN P September 2010 Valid any float Default 100 0 173 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Input Parameter Data Type Description Values CV2EUMax REAL Maximum value for CV2EU The value of CV2EU that corresponds Valid any float to 100 CV2 Default 100 0 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv CV3EUMax REAL Maximum value for CV3EU The value of CV2EU that corresponds Valid any float to 100 CV3 Default 100 0 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpantnv CV1EUMin REAL Minimum value of CV1EU The value of CV1EU that corresponds to Valid any float 0 CV1 Default 0 0 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CV2EUMin REAL Minimum value of CV2EU The value of CV2EU that corresponds to Valid any float 0 CV2 Default 0 0 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CV3EUMin REAL Minimum value of CV3EU The value of CV3EU that corresponds to Valid any float 0 CV3 Defaul
124. 0000001 DeltaT WLead second order LowLimit 0 00005 DeltaT HighLimit 0 77 DeltaT 304 Publication 1756 RM006G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Parameter Limitations WLead WLag ratio If WLead gt WLag no limitations If WLag gt WLead e no minimum limitation for WLag WLead e first order maximum for WLag WLead 40 1 and the instruction limits WLag to enforce this ratio e second order maximum for WLag WLead 10 1 and the instruction limits WLag to enforce this ratio ZetaLead second order LowLimit 0 0 only HighLimit 4 0 ZetaLag second order LowLimit 0 05 only HighLimit 4 0 Whenever the value computed for the output is invalid NAN or INF the instruction sets Out the invalid value and sets the arithmetic overflow status flag When the value computed for the output becomes valid the instruction initializes the internal parameters and sets Out In Arithmetic Status Flags Arithmetic status flags are set for the Out output Condition prescan Fault Conditions none Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan No action taken No action taken instruction first run The instruction sets Out In The control algorithm is not executed The instruction sets Out In The control algorithm is not executed Enableln is cleared EnableOut is cleared
125. 10 TOT Control Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Appendix D Totalizer Totalizer1 74 1059 gallons 0 gallons 4 gallons sec Dey 1 1 0 Reset Low Input Cutoff Active Status Ok Feature on control Mode Operator Stop Program Operator Start Stop Reset Detail Displays the Mode mode of the block Total value of Total Old Total value of the previous Total Input value of In Total Meter range of Total values Target Dev1 and Dev2 Tick Marks values of TargetDev1 and TagetDev2 Total Scale scale of the total meter The high part of the scale Target The low end of the scale Reset Program Button OperProgReq is set when you click this button Operator Button OperOperReq is set when you click this button Start Button OperStartReg is set when you click this button Stop Button OperStopReg is set when you click this button Reset Button OperResetReg is set when you click this button 429 Appendix D Function Block Faceplate Controls Feature on control Displays the Detail Button Detail Dialog pop up Totalizer Totalizerl Detail Ed gallons Target 100 Target Dev 1 10 Target Dev 2 ft Reset O 1l Low In Cutoff Low Input Cutoff Active statement Low Input Cutoff Active only when the LowInCutoffFlag is set Status all the status bits that are s
126. 100 PositionE UMax PositionEUMin 102 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 How the POSP instruction uses the internal cycle timer The instruction uses CycleTime to determine how often to recalculate the duration of Open and Close output pulses An internal timer is maintained and updated by DeltaT DeltaT is the elapsed time since the instruction last executed Whenever the internal timer equals or exceeds the programmed CycleTime cycle time expires the Open and Close outputs are recalculated You can change the CycleTime at any time If CycleTime 0 the internal timer is cleared OpenOut is cleared and CloseOut is cleared Producing output pulses The following diagram shows the three primary states of the POSP instruction OpenTime gt 0 Time OpenOut pulse Calculate Open Close pulse times p OpenOut set CloseQut cleared CycleTime expired OpenedFB set or invalid input PositionPercent gt 100 OpenTime expires PositionPercent gt SPPercent royroy sy CycleTime expired CycleTime expired CloseTime gt 0 Wait for next cycle OpenTime 0 and OpenOut cleared CloseTime 0 a CloseOut cleared ClosedFB set or invalid input PositionPercent lt 100 CloseTime expires PositionPercent gt SPPercent Time CloseO
127. 1756 RM006G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Output Parameter Data Type Description ZCDeadbandlinv BOOL ZCDeadband lt 0 The instruction disables zero crossing deadband Status1 25 PVDeadbandInv BOOL PVDeadband lt 0 Status1 26 PVROCLimitsInv BOOL PVROCPosLimit lt 0 PVROCNegLimit lt 0 or PVROCPeriod lt 0 Status1 27 DevHLLimitsInv BOOL Deviation high low limits invalid Low low limit lt 0 low limit lt 0 high limit lt 0 or Status1 28 high high limit lt 0 The instruction uses 0 for the invalid limit DevDeadbandInv BOOL Deviation deadband lt 0 The instruction uses a value of DevDeadband 0 Status1 29 Status2 DINT Timing status of the function block TimingModelnv BOOL Invalid TimingMode value Status2 27 For more information about timing modes see appendix Function Block Attributes RTSMissed BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second Status2 28 RTSTimelnv BOOL Invalid RTSTime value Status2 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status2 30 DeltaTInv Status2 31 BOOL Invalid DeltaT value Description The PID algorithm regulates the CV output in order to maintain the PV at the PID term proportional SP when the instruction executes in Cascade Ratio or Auto modes
128. 1_1111_1111 1 value by sign extension Converts to this 2 0000_0000_0000_0000_1111_1111_1111_1111 65535 value by zero fill Because immediate values are always zero filled the conversion of a SINT or INT value may produce unexpected results In the following example the comparison is false because Source A an INT converts by sign extension while Source B an immediate value is zero filled EQU Equal Source Aremote_rack_1 I Pata 0 2 1111_1111_1111_1111 Source BH1111_1111 1111 1 111 42093 417 Appendix Common Attributes If you use a SINT or INT tag and an immediate value in an instruction that converts data by sign extension use one of these methods to handle immediate values e Specify any immediate value in the decimal radix e If you are entering the value in a radix other than decimal specify all 32 bits of the immediate value To do so enter the value of the left most bit into each bit position to its left until there are 32 bits e Create a tag for each operand and use the same data type throughout the instruction To assign a constant value either Enter it into one of the tags Add a MOV instruction that moves the value into one of the tags e Use a MEQ instruction to check only the required bits The following examples show two ways to mix an immediate value with an INT tag Both examples check the bits of a 1771 I O module to determine if all the bits are
129. 2 5 2 1 6 2 1 5 2 1 4 1 1 4 1 1 5 2 1 6 2 2 5 2 IMPORTANT 420 The arithmetic status flags are set based on the value being stored Instructions that normally do not affect arithmetic status keywords might appear to do so if type conversion occurs because of mixed data types for the instruction parameters The type conversion process sets the arithmetic status keywords Publication 1756 RMO06G EN P September 2010 Appendix D Introduction Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls RSLogix 5000 programming software includes faceplates controls for some of the function block instructions These faceplates are Active X controls that you can use in RSView SE or RSView32 software or any other application that can act as an Active X container In the case of RSView SE software the faceplates communicate with the controller via RSLinx Enterprise software In the case of RSView 32 or other third party applications the faceplates communicate with the controller via the RSLinx OPC server IMPORTANT RSLogix 5000 programming software cannot be a container for the faceplates You must use software such as RSView SE or RSView 32 software as a container for the faceplates These instructions have faceplates Instruction Page Alarm ALM 426 Enhanced Select ESEL 428 Totalizer TOT 429 Ramp Soak RMPS 431 Discrete 2 State Device D2SD 434 Discrete 3 State
130. 3EUMin Bit 5 of Status3CV3 CV1LimitsInv BOOL CV1LLimit lt 0 CV1HLimit gt 100 or CV1HLimit lt CV1LLimit Bit 6 of Status3CV1 If CV1HLimit lt CV1LLimit limit CV1 by using CV1LLimit CV2LimitsInv BOOL CV2LLimit lt 0 CV2HLimit gt 100 or CV2HLimit lt CV2LLimit Bit 6 of Status3CV2 If CV2HLimit lt CV2LLimit limit CV2 by using CV2LLimit CV3LimitsInv BOOL CV3LLimit lt 0 CV3HLimit gt 100 or CV3HLimit lt CV3LLimit Bit 6 of Status3CV3 If CV3HLimit lt CV3LLimit limit CV3 by using CV3LLimit CV1ROCLimitInv BOOL Entered value lt 0 disables CV1 ROC limiting Bit 7 of Status3CV1 CV2ROCLimitInv BOOL Entered value lt 0 disables CV2 ROC limiting Bit 7 of Status3CV2 CV3ROCLimitInv BOOL Entered value lt 0 disables CV3 ROC limiting Bit 7 of Status3CV3 CV1HandFBlInv BOOL CV1HandFB 1 lt 0 or gt 100 Limit value used for CV1 Bit 8 of Status3CV1 CV2HandFBlnv BOOL CV2HandFB 2 lt 0 or gt 100 Limit value used for CV2 Bit 8 of Status3CV2 CV3HandFBlInv BOOL CV3HandFB 3 lt 0 or gt 100 Limit value used for CV3 Bit 8 of Status3CV3 CV1HandFBFaulted BOOL CV1 HandFB value health bad Bit 1 of Status3CV1 CV2HandFBFaulted BOOL CV2 HandFB value health bad Bit 1 of Status3CV2 CV3HandFBFaulted BOOL CV3 HandFB value health bad Bit 1 of Status3CV3 CV1PV1ModelGainInv BOOL CV1PV1ModelGain is 1 40NAN or 1 4IND Not A Number or Bit 9 of Status3CV1 1 Infinity o CV1PV2ModelGainInv BOOL CV1PV2Mod
131. 4096 in terms of the rotation of the resolver feedback device By understanding the true word size of the data that is being input from the feedback module the PMUL instruction views the data in a rotary fashion as shown in the following diagram 2047 2048 By knowing the word size of the data that is input to this block the PMUL instruction differentiates an output of 1 count as the input to the block moves from 2047 to 2048 instead of the mathematically calculated 4095 When applying this block it is important to note that the feedback data should not change by more than 1 2 the word size from one scan to the next if rotational direction is to be properly differentiated In the example above if the feedback device is moving in a clockwise direction such that at scan AV it reads 0 and then scan B it reads 2000 actual change in position is equivalent to 2096 counts in the clockwise direction However since these two values are more than 1 2 the words size or more than 2 the rotation of the physical device the PMUL instruction calculates that the feedback device rotated in the opposite direction and returns a value of 2000 instead of 2096 The third attribute of the pulse multiplier block is that it retains the fractional components from one scan to the next of any remainders that exist as a result of the Multiplier 100 000 scaling factor As each execution of the block is completed the remainder from the prev
132. 61 For the decimal value and hex code of a character see the back cover of this manual 393 Appendix B Structured Text Programming Use this format Use logical operators Logical operators let you check if multiple conditions are true or false The result of a logical operation is a BOOL value If the comparison is The result is true 1 false 0 Use the following logical operators For Use this operator Data Type logical AND amp AND BOOL logical OR OR BOOL logical exclusive OR XOR BOOL logical complement NOT BOOL For example Example For this situation You d write BOOLtag If photoeye is a BOOL tag and your specification IF photoeye THEN says If photoeye_7 is on then NOT BOOLtag If photoeye is a BOOL tag and your specification IF NOT photoeye THEN says If photoeye is off then expressionl amp expression2 If photoeye is a BOOL tag temp is a DINT tag and your specification says If photoeye is on and tempis less than 100 then IF photoeye amp THEN temp lt 100 expressionl ORexpression2 If photoeye is a BOOL tag temp is a DINT tag and your specification says If photoeye is on or temp is less than 100 then IF photoeye OR temp lt 100 THEN expressionl XOR expression2 If photoeye and photoeye2 are BOOL tags and your specification says If e photoeye is on while photoeye2 is off or e
133. 756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 The ParabolicLinear input selects the non linear gain mode If ParabolicLinear is cleared linear mode is selected If ParabolicLinear is set parabolic mode is selected To configure a particular shaping gain curve enter a shaping gain 0 0 10 0 for integral shaping a shaping gain 0 1 10 0 for proportional shaping and the input range over which shaping is to be applied Kp and Wld are multiplied by the calculated ShapeMultiplier to obtain the actual proportional and integral gains Entering a shaping gain of 1 0 disables the non linear algorithm that calculates the proportional or integral gain for the quadrant When the magnitude of In error is greater then InRange then the ShapeMultiplier equals the value computed when In was equal to InRange The following diagram illustrates the maximum and minimum gain curves that represent the parabolic and linear gain equations ShapeGain ShapeMinus A ShapePlus e ENER ShapeMultiplier R linear linear parabolic parabolic InputRange InputRange x 1 x 1 Publication 1756 RM006G EN P September 2010 253 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN The instruction calculates the value for Out using these equations Value Equations Kp shaping gain multiplier If In gt 0 then KpShapeGain ShapeKpPlus KpRange KpInRange
134. BOOL Program Hand mode request for CV3 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 Refer to Operating modes on page 86 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 Refer to Operating modes on page 86 Default FALSE OperOperReq BOOL Operator Operator Request Set TRUE by the operator interface to request Operator control The function block resets this parameter to FALSE Refer to Operating modes on page 86 Default FALSE OperCV1AutoReq BOOL Operator Auto mode request for CV1 Set TRUE by the operator interface to request Auto mode The function block resets the input to FALSE Refer to Operating modes on page 86 Default FALSE OperCV2AutoReq BOOL Operator Auto mode request for CV2 Set TRUE by the operator interface to request Auto mode The function block resets the input to FALSE Refer to Operating modes on page 86 Default FALSE OperCV3AutoReq BOOL Operator Auto mode request for CV3 Set TRUE by the operator interface to request Auto mode The function block resets the input to FALSE Refer to Operating modes on page 86 Default FALSE OperCV1ManualReq BOOL Operator Manual mode request for CV1 Set TRUE by the ope
135. Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 InFault BOOL Bad health indicator for the input If the input value is read from an analog input then InFault is controlled by fault status on the analog input If set InFault indicates that the input signal has an error the instruction sets the appropriate bit in Status the control algorithm is not executed and Out is held Default is cleared Cleared good health Deadtime REAL Deadtime input to the instruction Enter the deadtime in seconds If this value is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid 0 0 to StorageArray size DeltaT Default 0 0 Gain REAL Gain input to the instruction The value of In is multiplied by this value This allows simulation of a process gain Valid any float Default 1 0 Bias REAL Publication 1756 RMO06G EN P September 2010 Bias input to the instruction The value of In multiplied by the Gain is added to this value This allows simulation of an ambient condition Valid any float Default 0 0 51 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Paramet
136. C CC MMC Chapter 2 CC Output Parameter Data Type Description Values CV2DTTuned REAL The calculated value of the internal model deadtime for CV2 after tuning is completed CV3DTTuned REAL The calculated value of the internal model deadtime for CV3 after tuning is completed CV1RespTCTuneds REAL The calculated value of the control variable time constant in slow response speed for CV1 after tuning is completed CV2RespTCTuneds REAL The calculated value of the control variable time constant in slow response speed for CV2 after tuning is completed CV3RespTCTuneds REAL The calculated value of the control variable time constant in slow response speed for CV3 after tuning is completed CV1RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV1 after tuning is completed CV2RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV2 after tuning is completed CV3RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV3 after tuning is completed CV1RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV1 after tuning is completed CV2RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV2 after tuning is completed CV3RespTCTunedF REAL The calculated value of the control variable time constant in fast
137. C MINC MSTD Chapter 6 Condition Execution Function Block Action Structured Test Action prescan No action taken No action taken instruction first scan If InFault is cleared the instruction initializes the algorithm and continues If InFault is cleared the instruction initializes the algorithm and continues instruction first run If InFault is cleared the instruction initializes the algorithm and continues If InFault is cleared the instruction initializes the algorithm and continues Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example Each scan that SampleEnable is set the instruction places the value of In into array storage calculates the standard deviation of the values in array storage and places the result in Out Structured Text MSTD_01 In input_value MSTD_01 Sample enabl enable sample MSTD MSTD_01 stand_dev deviation MSTD 01 Out Function Block Publication 1756 RMO06G EN P September 2010 MSTD_01 MSTD Moving Standard Deviation Pa ij deviation SampleEnable StorageArray 357 Chapter 6 Statistical Instructions MAVE MAXC MINC MSTD Notes 358 Publication 1756 RMO06G
138. CLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Change Limiting on page 96 Publication 1756 RMO06G EN P September 2010 float Default 0 0 211 Chapter 2 MMC Input Parameter CV1ROCNegLimit Type REAL Advanced Process Control Function Blocks IMC CC MMC Description CV1 rate of change limit in percent per second Rate of change limiting is only used when in Auto mode or in Manual mode if CVManLimiting is TRUE A value of zero disables CV1 ROC limiting If value of CVROCLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Change Limiting on page 96 Values Valid 0 0 to maximum positive float Default 0 0 CV2ROCNegLimit REAL CV2 rate of change limit in percent per second Rate of change limiting is only used when in Auto mode or in Manual mode if CVManLimiting is TRUE A value of zero disables CV2 ROC limiting If value of CVROCLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Change Limiting on page 96 Valid 0 0 to maximum positive float Default 0 0 CV3ROCNegLimit REAL CV3 rate of change limit in percent per second Rate of change limiting is only used when in Auto mode or in Manual mode if CVManLimiting is TRUE A value of zero disables CV3 ROC limiting If value of CVROCLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Chan
139. CRV SOC UPDN Description The UPDN instruction follows these algorithms Condition Action Hold is cleared and Initialize is cleared AccumValue AccumValue _ InPlus InMinus Out AccumValue Hold is set and Initialize is cleared AccumValue AccumValue _ Out AccumValue Initialize is set AccumValue InitialValue Out AccumValue Arithmetic Status Flags Arithmetic status flags are set for the Out output Condition prescan Fault Conditions none Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan No action taken No action taken instruction first run AccumValue 0 0 AccumValue 0 0 Enableln is cleared and the outputs are not updated EnableOut is cleared the instruction does nothing na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan 288 No action taken No action taken Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Example The UPDN instruction integrates counts from one scan to the next This instruction can be used for simple positioning applications or for other types of applications where simple integration is required to create an accumulated value from a process s differentiated feedback signal
140. CV equals this value when in Hand mode and HandFBFault is cleared good health This value typically comes from the output of a field mounted hand auto station and is used to generate a bumpless transfer out of hand mode If HandFB lt 0 or gt 100 the instruction sets the appropriate bit in Status and limits the 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 is typically controlled by the status of the analog input channel When set HandFBFault indicates an error on the input module and the instruction sets the appropriate bit in Status Default is cleared good health WindupHIn BOOL Windup high request When set the CV cannot integrate in a positive direction This signal is typically obtained from the WindupHOut output from a secondary loop Default is cleared WindupLIn BOOL Windup low request When set the CV cannot integrate in a negative direction This signal is typically obtained from the WindupLOut output from a secondary loop Default is cleared ControlAction BOOL Control action request Set to calculate error as E PV SP clear to calculate error as E SP PV Default is cleared DependIndepend BOOL Dependent independent control request When set use the dependent form of the PID equation when cleared use the independent form of the equations Default is cleared
141. CV p1 is set equal to CVPrevious This lets you preset CV p1 to a specified value before computing the value of CV CalculatedCV CV _ APTerm AlTerm ADTerm PIDE Algorithms The PIDE instruction uses a velocity form PID algorithm similar to that used in most DCS systems Some advantages to a velocity form algorithm include e bumpless adaptive gain changes You can change gains on the fly without initializing the algorithm e multi loop control schemes You can implement cross limiting between loops by manipulating the CV 1 term Independent Gains Form CV CV K AE L En 60K n n E 2E ft In this form of the algorithm each term of the algorithm proportional integral and derivative has a separate gain Changing one gain only affects that term and not any of the others where PIDE term Description CV control variable E error in percent of span At update time in seconds used by the loop Kp proportional gain Ki integral gain in min a larger value of K causes a faster integral response Kp derivative gain in minutes 76 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Dependent Gains Form EE EV O A E EN hee 607 At This form of the algorithm changes the proportional gain into a controller gain By changing the controller gain you change the action of all
142. CV will not be allowed to Default FALSE increase in value This signal will typically be the WindupHOut output from a secondary loop Refer to CV Windup Limiting on page 95 WindupLIn BOOL Windup low request When TRUE CV will not be allowed to Default FALSE decrease in value This signal will typically be the WindupLOut output from a secondary loop Refer to CV Windup Limiting on page 95 GainEUSpan BOOL ModelGain units in EU or as of span Default FALSE CV ModelGain units in EU or of span Set to interpret TRUE Gain in EU ModelGain as EU reset to interpret ModelGain as of Span FALSE Gain in of span ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta Default FALSE PV Delta CV e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV Process Type DINT Process type selection 1 Integrating O non integrating Default 0 ModelGain REAL The internal model gain parameter Enter a positive or negative valid maximum negative float gt gain depending on process direction maximum positive float ModelGain is 1 4QNAN or 1 IND Not A Number Default 0 0 or 1 Infinity 00 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 po
143. CV1ModelGain INF or NAN set bit in Status or INF or Default 0 0 NAN CV1PV1ModelTC REAL The internal model time constant for CV1 PV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV2PV1ModelTC REAL The internal model time constant for CV2 PV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV3PV1ModelTC REAL The internal model time constant for CV3 PV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV1PV2ModelTC REAL The internal model time constant for CV1 PV2 in seconds Valid 0 0 to maximum positive float Default 0 0 CV2PV2ModelTC REAL The internal model time constant for CV2 PV2 in seconds Valid 0 0 to maximum positive float Default 0 0 CV3PV2ModelTC REAL The internal model time constant for CV3 PV2 in seconds Valid 0 0 to maximum positive float Default 0 0 CV1PV1ModelDT REAL The internal model deadtime for CV1 PV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV2PV1ModelDT REAL The internal model deadtime for CV2 PV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV3PV1ModelDT REAL The internal model deadtime for CV3 PV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV1PV2ModelDT REAL The internal model deadtime for CV1 PV2 in seconds Valid 0 0 to maximum positive float Default 0 0 CV2PV2ModelDT REAL The internal model deadtime for CV2 PV2 in seconds
144. CV1Modellnit BOOL Internal model initialization switch for CV1 Default FALSE Refer to CC Function Block Tuning on page 165 CV2Modellnit BOOL Internal model initialization switch for CV2 Default FALSE Refer to CC Function Block Tuning on page 165 CV3Modellnit REAL Internal model initialization switch for CV3 Default FALSE Refer to CC Function Block Tuning on page 165 Factor BOOL Non integrating model approximation factor Only used for Default 100 integrating process types AtuneCV1Start BOOL Start Autotune request for CV1 Set True to initiate auto tuning of Default FALSE the CV1 output Ignored when CV1 is not in Manual mode The function block resets the input to FALSE AtuneCV2Start BOOL Start Autotune request for CV2 Set True to initiate auto tuning of Default FALSE the CV2 output Ignored when CV2 is not in Manual mode The function block resets the input to FALSE AtuneCV3Start BOOL Start Autotune request for CV3 Set True to initiate auto tuning of Default FALSE the CV3 output Ignored when CV3 is not in Manual mode The function block resets the input to FALSE AtuneCV1UseModel BOOL Use Autotune model request for CV1 Set True to replace the Default FALSE current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE AtuneCV2UseModel BOOL Use Autotune model request for CV2 Set True to re
145. CV3 Set True to initiate auto tuning of the CV3 output for both PV1 and PV2 Ignored when CV3 output is not in Manual mode The function block resets the input to FALSE Default FALSE AtuneCV1PV1UseModel BOOL Use Autotune model request for CV1 PV1 Set True to replace the current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE Publication 1756 RMO06G EN P September 2010 Default FALSE 223 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Input Parameter Type Description Values AtuneCV2PV1UseModel BOOL Use Autotune model request for CV2 PV1 Set True to Default FALSE replace the current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE AtuneCV3PV1UseModel BOOL Use Autotune model request for CV3 PV1 Set True to Default FALSE replace the current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE AtuneCV1PV2UseModel BOOL Use Autotune model request for CV1 PV2 Set True to Default FALSE replace the current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE AtuneCV2PV2UseModel BOOL Use Autotune model request for CV2 PV2 Set True to Default FALSE replace the current model parameters with the calculated Autotune model paramete
146. CommandOStatus 5 Command1 Status Command2Status F FaultAlarm 5 ModeAlarm D ProgOper Override D Handi The D3SD instruction controls a discrete device having three possible states such as fast slow off forward stop reverse Structured Text Operand Type Format D3SD tag DISCRETE_3STATE structure Function Block Operand Type Format D3SD tag DISCRETE_3STATE structure DISCRETE_3STATE Structure Description D3SD structure Description D2SD structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes ProgOCommand BOOL Program state 0 command This input determines the device state when the device is in Program control If set the device is commanded to the 0 state Default is cleared Prog Command BOOL Program state 1 command This input determines the device state when the device is in Program control If set the device is commanded to the 1 state Default is cleared Prog2Command BOOL Program state 2 command This input determines the device state when the device is in Program control If set the device is commanded to the 2 state Default is cleared 38 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL
147. D structure PIDE structure Structured text does not support the autotune tag that is available in function block Function Block Operand Type Format Description PIDE tag PIDE_ENHANCED structure PIDE structure autotune tag PIDE_AUTOTUNE structure optional autotune structure see page 11 78 Publication 1756 RMO06G EN P September 2010 Input Parameter Enableln Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Data Type BOOL Chapter 1 PID_ ENHANCED Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes 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 is normally controlled by the analog input fault status When PVFault is set it indicates that the input signal has an error Default is cleared good health PVEUmaximum REAL maximumimum scaled value for PV The value of PV and SP which corresponds to 100 percent span of the Process Variable Valid PVEUMin lt PVEUmaximum lt maximumimum positive float Default 100 0 PVEUMin REAL Minimum scaled value for PV The value of PV and SP which c
148. DevHLimit DevDeadband DevLAlarm BOOL Deviation low alarm indicator Set when PV lt SP DevLLimit Cleared when PV gt SP DevLLimit DevDeadband DevLLAlarm BOOL Deviation low low alarm indicator Set when PV lt SP DevLLLimit Cleared when PV gt SP DevLLLimit DevDeadband ProgOper BOOL Program operator control indicator Set when in Program control Cleared when in Operator control CasRat BOOL Cascade ratio mode indicator Set when in the Cascade Ratio mode Auto BOOL Auto mode indicator Set when in the Auto mode Manual BOOL Manual mode indicator Set when in the Manual mode Override BOOL Override mode indicator Set when in the Override mode Hand BOOL Hand mode indicator Set when in the Hand mode DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block Publication 1756 RMO06G EN P September 2010 73 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Output Parameter Data Type Description InstructFault BOOL The instruction detected one of the following execution errors This is not a minor or major Status1 0 controller error Check the remaining status bits to determine what occurred PVFaulted Status1 1 BOOL Process
149. EUMin Minimum scaled value for PV SPHLimit SP high limit value scaled in PV units SPLLimit SP low limit value scaled in PV units CV1InitValue an initial value of the control variable CV1 output CV2InitValue an initial value of the control variable CV2 output CV3InitValue an initial value of the control variable CV3 output If you have the process models available you can intuitively tune the CC control variable by entering the following parameters Parameter ModelGains Description nonzero numbers negative for direct acting control variable positive for reverse acting control variable ModelTimeConstants always positive numbers ModelDeadtimes always positive numbers ResponseTimeConstants always positive numbers Active 1st 2nd and 3rd CV specify the order in which CV s will be used to compensate for PV SP error Target 1st 2nd and 3rd CV specify the priorities in which CV s will be driven to their respective target values CVTargetValues specify to which values should the control variable drive the individual CV s TargetRespTC specify the speed of CV s to approach the target values 161 Chapter 2 162 Advanced Process Control Function Blocks IMC CC MMC The function block behaves in a defined way for any combination of CV Active and Target lists and CV Auto Manual modes The function block attempts to accomplish these goals in the following order of priorit
150. EUMin to SP1HLimit Default 0 0 205 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Input Parameter Type Description Values SP2LLimit REAL SP2 low limit value scaled in PV units Valid PV2EUMin to SP2HLimit Refer to SP High Low Limiting on page 88 Default 0 0 e f SPLLimit lt PVEUMin or SPHLimit gt PVEUMax set bit in Status e f SPHLimit lt SPLLimit set bit in Status and limit SP by using the value of SPLLimit Refer to Processing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling CV1Fault BOOL Control variable 1 bad health indicator If CV1EU controls an Default FALSE analog output then CV1Fault will normally come from the analog output s fault status FALSE Good Health If CVFault is TRUE it indicates an error on the output module set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpaninv for details on fault handling CV2Fault BOOL Control variable 2 bad health indicator If CV2EU controls an Default FALSE analog output then CV2Fault will normally come from the analog output s fault status FALSE Good Health If CVFault is TRUE it indicates an error on the output module set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpaninv for details on fault handling CV3Fault BOOL Control variable 3 bad health indicator If CV3EU controls an Defau
151. EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output Description The SEL instruction operates as follows Condition Action Selectorin is set Out In2 Selectorin is cleared Out In1 Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Publication 1756 RMO06G EN P September 2010 337 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Execution Condition Function Block Action prescan No action taken instruction first scan No action taken instruction first run No action taken Enableln is cleared EnableOut is cleared Enableln is set The instruction executes EnableOut is set postscan No action taken Example The SEL instruction selects In1 or In2 based on SelectorIn If SelectorIn is set the instruction sets Out In2 If SelectorIn is cleared the instruction sets Out In1 SEL_04 0 0 analog_input1 analog_input2 i 0 0 Out 1___ selected_result rE Selectorin a select_mode Si ma 338 Publication 1756 RM006G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Selected Negate SNEG The SNEG instruction uses a digital input to select between the input value and the negative of the input value Operands SNEG SNEG tag Structured Text SNEG tag SE
152. FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Operands TOT TOT tag Chapter 1 The TOT instruction provides a time scaled accumulation of an analog input value Structured Text TOT tag TOTALIZER TOT structure Function Block tg TOT_01 TOT Ea din toil TOT tag TOTALIZER TOT structure E ProgProgReq OldTotal D Q ProgOperReq ProgOper D E ProgStatReq RunStop 9 E ProgStopReq ProgResetDone D E ProgResetReq TargetFlag D TargetDev1Flag H TargetDev2Flag D TOTALIZER Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 InFault BOOL Bad health indicator of In If set it indicates that the input signal has an error the instruction Publication 1756 RMO06G EN P September 2010 sets the appropriate bit in Status the control algorithm is not executed and Total is not updated Default is cleared 131 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description TimeBase DINT The timebase input The time base of the totalization based on the In engineering units Value Description 0 seconds 1 minutes 2 hours 3 days For ex
153. Fault BOO CV3LimitsInv and CVManLimiting are True at start of CV3 Autotuning or during CV3 Autotuning When True CV3 Autotuning is not started or is aborted Bit 5 of AtuneCV3Status AtuneCV1InitFault BOO CV Initializing is True at start of CV1 Autotuning or during CV1 Autotuning When True CV1 Autotuning is not started or is aborted Bit 6 of AtuneCV1Status AtuneCV2InitFault 192 BOO CV2Initializing is True at start of CV2 Autotuning or during CV2 Autotuning When True CV2 Autotuning is not started or is aborted Bit 6 of AtuneCV2Status Publication 1756 RMO06G EN P September 2010 CC Output Parameter AtuneCV3lnitFault Data Type BOO Advanced Process Control Function Blocks IMC CC MMC Description CV3lnitializing is True at start of CV3 Autotuning or during CV3 Autotuning When True CV3 Autotuning is not started or is aborted Chapter 2 Values Bit 6 of AtuneCV3Status AtuneCV1EUSpanChanged BOO CVEUSpan or PVEUSpan changes during CV1 Autotuning When True CV1 Autotuning is aborted Bit 7 of AtuneCV1 Status AtuneCV2EUSpanChanged BOO CVEUSpan or PVEUSpan changes during CV2 Autotuning When True CV2 Autotuning is aborted Bit 7 of AtuneCV2Status AtuneCV3EUSpanChanged BOO CVEUSpan or PVEUSpan changes during CV3 Autotuning When True CV3 Autotuning is aborted Bit 7 of AtuneCV3Status AtuneCV1Changed BOO CV10per is
154. Hand is not the current mode set to Manual mode e PV high low PV rate of change and deviation high low alarm outputs are cleared e PID control algorithm is not executed e Set CV to value by determined by Program or Operator control and mode Manual Override or Hand PVSpanInv is set or SPLimitsInv is set e Disable the Auto and Cascade Ratio modes If Override or Hand is not the current mode set to Manual mode e Do not compute PV and SP percent e PID control algorithm is not executed e Set CV to value by determined by Program or Operator control and mode Manual Override or Hand RatioLimitsinv is set and CasRat is set and UseRatio is set e f not already in Hand or Override set to Manual mode e Disable the Cascade Ratio mode e Set CV to value determined by Program or Operator control and mode Manual Override or Hand TimingModelnv is set or RTSTimeStamplnv is set or DeltaTInv is set Publication 1756 RMO06G EN P September 2010 e f not already in Hand or Override set to Manual mode 99 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Position Proportional POSP Operands POSP POSP_ tag POSP_04 The POSP instruction opens or closes a device such as a motor operated valve by pulsing open or close contacts at a user defined cycle time with a pulse width proportional to the difference between the desired a
155. IDE Enhanced PID Enhanced PID Pv eve SPProg SPD o SPCascade Init Primary o RatioProg Windup HOut Po o CvProg WindupLOut 7 OFF P VHHAarm or l HandFB PVHAarm ProgProgReq P LAann b o ProgOperReq PVLLAarm Po E WWindup Hin Q ProgCasRatReq PVROCPosAam o q Windup Lin DevLAam be Prog utoReq PVROCNegAarm Ee l l c ProgProgReq DevLLAarm B ProghtanualReq DevHHAarm bs ProgOperReq ProgOper Po Prog Override Req DewHAarm Po ProgCasRat Req CasRat Po ProgHandReq DewLAarm Po E Progfuto Req Auto R DevLLAarm Po l l q ProghtanualReq Manual Po Prog Oper Po Prog Override Req Override fp CasRat p l ProgHandReq Hand L Auto Lp l l l AutotuneTag Manual bo Overide Hand he FutotuneTag LESSEE a al For a cascaded pair of loops to work correctly the secondary loop must have a faster process response than the primary loop This is because the secondary loop s process must be able to compensate for any upsets before these upsets affect the primary loop s process In this example if steam flow drops the steam flow must be able to increase as a result of the secondary controller s action before the liquid temperature is affected To set up a pair of cascaded PIDE instructions set the AllowCasRat input parameter in the secondary loop This allows the secondary loop to be placed into Cascade Ratio mode Next wire the CVEU from the primary loop into t
156. IDE POSP RMPS SCL SRTP TOT The D2SD output state is based on the state of the command status CommandStatus Output state cleared if OutReverse is cleared Out is cleared if OutReverse is set Out is set set if OutReverse is cleared Out is set if OutReverse is set Out is cleared cleared and the fault timer is stopped and cleared FBO FBOState0 and FB1 FB1Stated DeviceOState is set set and FBO FBOState1 and FB1 FB1State1 Fault alarm conditions the fault timer is stopped and cleared Device State is set The D2SD instruction checks for these fault alarm conditions Fault alarm condition resulting from device state was commanded to change but the feedback did not indicate that the desired state was actually reached within the FaultTime Rules Start the fault timer when CommandStatus CommandStatus Set FaultAlarm when fault timer is done and FaultTime gt 0 0 the device unexpectedly leaving a state according to the feedback without being commanded to Set FaultAlarm when fault timer is not timing and one of the following conditions is satisfied e CommandStatus is cleared and DeviceOState is cleared e CommandStatus is set and Device1State is Cleared FaultAlarm is cleared if one of the following conditions is met e CommandStatus is cleared and Device0State is set e CommandsStatus is set and DevicelState is set e FaultTime lt 0 FaultAlarm cannot be cl
157. IMC Function Block Model Initialization on page 144 Factor REAL Non integrating model approximation factor Only used for Default 100 integrating process types 154 Publication 1756 RMO06G EN P September 2010 IMC Input Parameter AtuneStart Type BOOL Advanced Process Control Function Blocks IMC CC MMC Chapter 2 Description 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 Valid and Default Values 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 Publication 1756 RMO06G EN P September 2010 Default FALSE 155 Chapter 2 IMC Output Parameter EnableOut Type BOOL Advanced Process Control Function Blocks IMC CC MMC IMC Function Block Output Parameter Descriptions The following table describes the output parameters in the IMC function block Description Enable Output Valid and Default Values CVEU REAL Scaled control variable output Scaled by using CVEUMax and CVEUMin where CVEUMax corresponds
158. IREF to specify input data for a function block instruction the data in that IREF is latched for the scan of the function block routine The IREF latches data from program scoped and controller scoped tags The controller updates all IREF data at the beginning of each scan E REF a p In this example the value of tagA is stored at the beginning of the routine s execution The stored value is used when Block_01 executes The same stored value is also used when Blcock_02 executes If the value of tagA changes during execution of the routine the stored value of tagA in the IREF does not change until the next execution of the routine Block_01 El q Block_02 ral 370 Publication 1756 RMO06G EN P September 2010 Function Block Attributes Appendix A This example is the same as the one above The value of tagA is stored only once at the beginning of the routine s execution The routine uses this stored value throughout the routine Block_01 Starting with RSLogix 5000 software version 11 you can use the same tag in multiple IREFs and an ORFF in the same routine Because the values of tags in IREFs are latched every scan through the routine all IREFs will use the same value even if an OREF obtains a different tag value during execution of the routine In this example if tagA has a value of 25 4 when the routine starts executing this scan and Block_01 changes the value
159. In InsUsed Override is cleared Selectedin index to the minimum input value SelectorMode 3 median select and Out median of In InsUsed Override is cleared Selectedin index to the median input value SelectorMode 4 average select and Out average of In InsUsed Override is cleared SelectedIn 0 Publication 1756 RMO06G EN P September 2010 Por SelectorMode 1 through 4 a bad health indication for any of the inputs causes that bad input to be disregarded in the selection For example if SelectorMode 1 high select and if In6 had the highest value but had bad health then the next highest input with good health is moved into the output 323 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM For high or low select mode if two inputs are equal and are high or low the instruction outputs the first found input For median select mode the median value always represents a value selected from the available inputs If more than one value could be the median the instruction outputs the first found input Monitoring the ESEL instruction There is an operator faceplate available for the ESEL instruction For more information see appendix Function Block Attributes Arithmetic Status Flags Arithmetic status flags are set for the Out output Condition prescan Fault Conditions none Execution Function Block Action No action taken Structured Text Action No action taken inst
160. In each subsequent scan the output is computed using the internal parameters from the last scan when the output was valid Operating in linear mode In linear mode the non linear gain mode is disabled The Kp and Wld values are the proportional and integral gains used by the instruction The instruction calculates the value for Out using these equations Value Equation Term WldInput WldInput Kp x Wld x a l x DeltaT ITerm _ where DeltaT is in seconds PTerm Kp x In Out ITerm PTerm with these limits on Wld LowLimit gt 0 0 0 77 DeltaT WldInput In HighLimit Operating in non linear mode In non linear mode the instruction uses the non linear gain mode selected by ParabolicLinear to compute the actual proportional and integral gains The gains specified by Kp and Wld are multiplied by 1 0 when In 0 Separate proportional and integral algorithms increase or decrease the proportional or integral gain as the magnitude of error changes These algorithms use the input range and shaping gain parameters to compute the actual proportional and integral gains Input range defines the range of In for example error over which the gain is shaped Input ranges are set by the two KpInRange and WldInRange Shaping gain defines the gain multiplier for the quadrant controlled by the shaping gain parameter Shaping gains are set by ShapeKpPlus ShapeKpMinus ShapeWldPlus and ShapeWldMinus Publication 1
161. In the example below Initial_ Position is set to zero while Differential_Position_Plus and Differential_Position_Minus take varying values over a period of time With this instruction InPlus and InMinus could also accept negative values Position_Integrated one task scan 20 H aaa Differential_Position_Plus 1 Differential_Position_Minus 0 Differential_Position_Plus 1 6 Differential_Position_Minus 3 Initialize_Position Initialize_Position Publication 1756 RMO06G EN P September 2010 289 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Structured Text Function Block Initialize_Position a Initial_Position Differential_Position_Plus D Differential_Position_Minus g q 290 UPDN 01 Initialize Initialize Position UPDN 01 InitialValue Initial Position UPDN 01 InPlus Differential Position Plus UPDN 01 InMinus Differential Position Minus UPDN UPDN 01 Position Integrated UPDN 01 0Out UPDN_04 UPDN EJ Up Down Accumulator Initialize Position_Integrated InitialValue InPlus InMinus Hold Publication 1756 RMO06G EN P September 2010 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Introduction These filter instructions are available If you want to Use this instruction Available in these languages Page calculate the amount of change of a signal
162. L CVOper lt 0 or CVOper gt 100 or CVOper lt CVLLimit or CVOper gt CVHLimit when Status 1 13 CVManLimiting is set The instruction limits the value for CV CVOverridelnv BOOL CVOverride lt 0 or CVOverride gt 100 The instruction limits the value for CV Status 1 14 CVPreviousInv BOOL CVPrevious lt 0 or CVPrevious gt 100 or lt CVLLimit or gt CVHLimit when in auto or Status 1 15 cascade ratio mode The instruction uses the limited value for CV 1 CVEUSpaninv BOOL Invalid CVEU span The instruction uses a value of CVEUmaximum CVEUMin Status1 16 CVLimitsInv BOOL CVLLimit lt 0 CVHLimit gt 100 or CVHLimit lt CVLLimit If CVHLimit lt CVLLimit the instruction Status1 17 limits CV using CVLLimit CVROCLimitInv BOOL CVROCLimit lt 0 The instruction disables ROC limiting Status1 18 FFInv Status1 19 BOOL FF lt 100 or FF gt 100 The instruction uses the limited value for FF FFPreviousInv BOOL FFPrevious lt 100 or FFPrevious gt 100 The instruction uses the limited value for FF 1 Status1 20 HandFBInv BOOL HandFB lt 0 or HandFB gt 100 The instruction uses the limited value for CV Status1 21 PGainInv Status1 22 BOOL PGain lt 0 The instruction uses a value of PGain 0 IGainInv Status1 23 BOOL IGain lt 0 The instruction uses a value of IGain 0 DGainInv Status1 24 BOOL DGain lt 0 The instruction uses a value of DGain 0 74 Publication
163. L Initialize program and operator values When set and in manual the instruction sets CurrentSegProg 0 CurrentSegOper 0 SoakTimeProg SoakTime 0 and SoakTimeOper SoakTime Q Initialize is ignored when in Auto or Hold mode The instruction clears this parameter Default is cleared ProgValueReset BOOL Reset program control values When set the instruction clears ProgProgReg ProgOperRegq ProgAutoRegq ProgHoldReg and ProgManualReq Default is cleared Input Parameter Data Type Description EnableOut BOOL Enable output Out REAL The output of the ramp soak instruction Arithmetic status flags are used for this output CurrentSeg DINT Current segment number Displays the current segment number in the ramp soak cycle Segments start numbering at 0 SoakTimeLeft REAL Soak time left Displays the soak time remaining for the current soak GuarRampOn BOOL Guaranteed ramp status Set if the Guaranteed Ramp feature is in use and the ramp is temporarily suspended because the PV differs from the output by more than the RampDeadband GuarSoakOn BOOL Guaranteed soak status Set if the Guaranteed Soak feature is in use and the soak timer is cleared because the PV differs from the output by more than the SoakDeadband ProgOper BOOL Program Operator control indicator Set when in Program control Cleared when in Operator control Auto BOOL Auto mode Set when the ramp soak is in Program Auto or Operator Auto mode Manual BOOL Manual mode Set
164. LECTABLE_NEGATE SNEG structure SNEG OA Function Block SNEG eal Selectable Negate Operand Type Format _ Description is SNEG tag SELECTABLE_NEGATE structure SNEG structure NegateEnable SELECTABLE_NEGATE Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction NegateEnable BOOL Negate enable When NegateEnable is set the instruction sets Out to the negative value See is set Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output Description The SNEG instruction operates as follows Condition Action NegateEnable is set Out In NegateEnable is cleared Out In Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Publication 1756 RMO06G EN P September 2010 339 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan No action taken No action taken instruction first run No action taken No act
165. LLimit to maximumimum positive float Default 1 0 RatioLLimit REAL Ratio low limit value Limits the value of Ratio obtained from RatioProg or RatioOper If RatioLLimit lt 0 the instruction sets the appropriate bit in Status and limits the value to zero If RatioHLimit lt RatioLLimit the instruction sets the appropriate bit in Status and limits Ratio 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 normally comes from the analog output s fault status When set CVFault indicates an error on the output module and the instruction sets the appropriate bit in Status Default is cleared good health CVInitReq BOOL CV initialization request This signal is normally controlled by the In Hold status on the analog output module controlled by CVEU or from the InitPrimary output of a secondary PID loop Default is cleared CVInitValue REAL CVEU initialization value scaled in CVEU units When CVInitializing is set CVEU CVInitValue and CV equals the corresponding percentage value CVInitValue comes from the feedback of the analog output controlled by CVEU or from the setpoint of a secondary loop Instruction initialization is disabled when CVFaulted or CVEUSpanInv is set Valid any float Default 0 0 CVProg REAL CV program manual value CV equals this value when in Program Manual mode If CVProg lt 0 or gt 10
166. LTIPLEXER structure MUX structure MULTIPLEXER Structure Description Enable input If cleared the instruction does not execute and outputs are not updated Default is set In REAL The first analog signal input to the instruction Valid any float Default 0 0 In2 REAL The second analog signal input to the instruction Valid any float Default 0 0 In3 REAL The third analog signal input to the instruction Valid any float Default 0 0 In4 REAL The fourth analog signal input to the instruction Valid any float Default 0 0 Ind REAL The fifth analog signal input to the instruction Valid any float Default 0 0 In6 330 REAL The sixth analog signal input to the instruction Valid any float Default 0 0 Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Input Parameter Data Type Description In7 REAL The seventh analog signal input to the instruction Valid any float Default 0 0 In8 REAL The eighth analog signal input to the instruction Valid any float Default 0 0 Selector DINT The selector input to the instruction This input determines which of the inputs 1 8 is moved into Out If this value is invalid which includes 0 the instruction sets the appropriate bit in Status and holds Out at its current value Valid 1 to 8 Default
167. MO06G EN P September 2010 399 Appendix B Structured Text Programming 400 Example 3 IF THEN ELSIF If you want this If sugar low limit switch low on and sugar high limit IF Sugar Low amp Sugar High THEN switch not high on then inlet valve open on Enter this structured text Sugar Inlet 1 Until sugar high limit switch high off ELSIF NOT Sugar High THEN Sugar Inlet 0 END IF Example 4 If you want this If tank temperature gt 100 then pump slow The tells the controller to clear Sugar Inlet whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction IF THEN ELSIF ELSE Enter this structured text IF tank temp gt 200 THEN pump fast 1 pump slow 0 pump off 0 If tank temperature gt 200 ELSIF tank temp gt 100 THEN then pump fast pump fast 0 pump slow 1 pump off 0 otherwise pump off LSE pump fast 0 pump slow 0 pump off 1 END IF Publication 1756 RM006G EN P September 2010 Structured Text Programming Appendix B CASE OF Use CASE to select what to do based on a numerical value Operands Structured Text CASE numeric_expre
168. ManualAfterInit BOOL Manual mode after initialization request Default FALSE e When TRUE the appropriate CV n where n can be 1 2 or 3 will be placed in Manual mode when CV n Initializing is set TRUE unless the current mode is Override or Hand e When ManualAfterlnit is FALSE the CV n mode will not be changed Refer to Execution on page 80 CVInitReq ProgProgReq BOOL Program Program Request Default FALSE e Set TRUE by the user program to request Program control Ignored if ProgOperReq is TRUE Holding this TRUE and ProgOperReg FALSE can be used to lock the function block into program control e When ProgValueReset is TRUE the function block resets the input to FALSE Refer to Switching between Program control and Operator control on page 114 ProgOperReq BOOL Program Operator Request Default FALSE Set TRUE by the user program to request Operator control Holding this TRUE can be used to lock the function block into operator control If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 ProgCV1AutoReq BOOL Program Auto mode request for CV1 Default FALSE Set TRUE by the user program to request Auto mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 ProgCV2AutoReq BOOL Program Auto mode request for CV2 Default FALSE Set TRUE by the user program to request Auto mod
169. PV scaled in PV units per seconds Enter 0 0 to disable negative PVROC alarm checking If PVROCNegLimit lt 0 the instruction sets the appropriate bit in Status and disables negative PVROC checking Valid 0 0 to maximumimum positive float Default 0 0 69 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description PVROCPeriod REAL PV rate of change sample period The time period in seconds over which the rate of change for PV is evaluated Enter 0 to disable PVROC alarm checking If PVROCPeriod lt 0 0 the instruction sets the appropriate bit in Status and disables positive and negative PVROC checking Valid any float gt 0 0 Default 0 0 seconds DevHHLimit REAL Deviation high high alarm limit value scaled in PV units Deviation is the difference in value between the process variable PV and the setpoint SP Deviation alarming alerts the operator to a discrepancy between the process variable and the setpoint value If DevHHLimit lt 0 0 the instruction sets the appropriate bits in Status and sets DevHHLimit 0 0 Valid 0 0 to maximumimum positive float Default maximumimum positive float DevHLimit REAL Deviation high alarm limit value scaled in PV units Deviation is the difference in value between the process variable PV and the setpoint SP Deviation alarming alerts the operator to a discrepancy between the proces
170. PVEUMin The slider is confined to SPHLimit and SPLLimit by its channel which may not completely cover the PV Range ROC Alarm Indicator status of PVROCPosAlarm and PVROCNegAlarm Ratio value of Ratio This display is only shown if both the AllowCasRat and UseRatio bits are set SP value of the SP The user may enter the new SP in this edit as well PV value of PV CV Slider value of CV The limits of the slider are 0 to 100 CV value of CV Program Button OperProgReq is set when you click this button Operator Button OperOperReq is set when you click this button Cas Rat Button OperCasRatReg is set when you click this button 438 Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Appendix D Feature on control Displays the Auto Button OperAutoReq is set when you click this button Manual Button OperManualReq is set when you click this button Detail Button Detail Dialog pop up Enhanced PID Pid Detail gallons 9 PY HiHi Limit 90 Dev HiHi Limit PY Hi Limit 80 Dev Hi Limit PY Lo Limit 20 Dev Lo Limit PY LoLo Limit 10 Dev LoLo Limit PY Deadband 0 Dev Deadband PY ROC Pos Limit gallons sec PY ROC Neg Limit gallons sec PY ROC Period sec o 3 D D m s So h L x CV Hi Limit _ CV Lo Limit a CV ROC Limit sec 0 ZC Deadband gallons 1 a PY Tracking Tune Button Tun
171. Program Hold mode The array must be at least as large as NumberOfSegs valid 0 0 to 71582 0 minutes The operands are the same as for the structured text RMPS instruction 107 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT RAMP_ SOAK Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes PV REAL The scaled analog temperature signal input to the instruction Valid any float Default 0 0 PVFault BOOL Bad health indicator of PV If set the input is invalid the instruction is placed in Program Hold or Operator Manual mode and the instruction sets the appropriate bit in Status Default is cleared NumberOfSegs DINT Number of segments Specify the number of ramp soak segments used by the instruction The arrays for RampValue SoakValue and SoakTime must be at least as large as NumberOfSegs If this value is invalid the instruction is placed into Operator Manual or Program Hold mode and the instruction sets the appropriate bit in Status Valid 1 to minimum size of RampValue SoakValue or SoakTime arrays Default 1 ManHoldAftlnit BOOL Manual Hold after initialization If set the ramp soak is in Operator Manual or Program Hold mode af
172. Program Operator Request Default FALSE e Set TRUE by the user program to request Operator control e Holding this TRUE can be used to lock the function block into operator control e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Switching between Program control and Operator control on page 114 ProgCV1AutoReq BOOL Program Auto mode request for CV1 Default FALSE e Set TRUE by the user program to request Auto mode e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV ProgCV2AutoReq BOOL Program Auto mode request for CV2 Default FALSE e Set TRUE by the user program to request Auto mode e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV ProgCV3AutoReq BOOL Program Auto mode request for CV3 Default FALSE e Set TRUE by the user program to request Auto mode e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV ProgCV1ManualReq BOOL Program Manual mode request for CV1 Default FALSE e Set TRUE by the user program to request Manual mode e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV ProgCV2ManualReq BOOL Program Manual mode request for CV2 Default FALSE e Set TRUE by the user program to request Manual mode e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV ProgCV3ManualReq BOOL Progr
173. REALs No DINTs e After instruction execution the result a DINT or REAL value converts to the destination data type if necessary You cannot specify a BOOL tag in an instruction that operates on integer or REAL data types Because the conversion of data takes additional time and memory you can increase the efficiency of your programs by e using the same data type throughout the instruction e minimizing the use of the SINT or INT data types In other words use all DINT tags or all REAL tags along with immediate values in your instructions The following sections explain how the data is converted when you use SINT ot INT tags or when you mix data types 416 Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 SINT or INT to DINT Common Attributes Appendix C For those instructions that convert SINT or INT values to DINT values the Operands sections in this manual identify the conversion method This conversion method Sign extension Converts data by placing the value of the left most bit the sign of the value into each bit position to the left of the existing bits until there are 32 bits Zero fill zeroes to the left of the existing bits until there are 32 bits The following example shows the results of converting a value using sign extension and zero fill This value 2 1111_1111_1111_1111 1 Converts to this 2 1111_1111_1111_1111_1111_111
174. RTSTime DINT Module update period for real time sampling timing The expected DeltaT update period is in milliseconds The update period is normally the value that was used to configure the module s update time If invalid the instruction sets the appropriate bit in Status and disables RTSMissed checking valid 1 to 32 767ms default 1 RTSTimeStamp DINT Module time stamp value for real time sampling timing The time stamp value that corresponds to the last update of the input signal This value is used to calculate Delta If invalid the instruction sets the appropriate bit in Status disables execution of the control algorithm and disables RTSMissed checking valid 1 32 767 ms wraps from 32767 0 1 count 1 ms default 0 Output parameters Output Parameter Data Type Description DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Periodic DeltaT task scan rate if task is Periodic task DeltaT elapsed time since previous instruction execution if task is Event or Continuous task Oversample DeltaT OversampleDT Real Time Sampling DeltaT RTSTimeStamp RTSTimeStamp 1 Status DINT Status of the function block TimingModelnv BOOL Invalid TimingMode value Status 27 RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value
175. RUE by the user program to request Override mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Default FALSE ProgCV20verrideReq BOOL Program Override mode request for CV2 Set TRUE by the user program to request Override mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Default FALSE ProgCV3Q0verrideReq BOOL Program Override mode request for CV3 Set TRUE by the user program to request Override mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Publication 1756 RMO06G EN P September 2010 Default FALSE 219 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Input Parameter ProgCV1HandReq Type BOOL Description Program Hand mode request for CV1 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 Refer to Operating modes on page 86 Values Default FALSE ProgCV2HandReq BOOL Program Hand mode request for CV2 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 Refer to Operating modes on page 86 Default FALSE ProgCV3HandReq
176. Ratio high alarm indicator Set when Ratio gt RatioHLimit RatioLAlarm BOOL Ratio low alarm indicator Set when Ratio lt RatioLLimit ZCDeadbandOn BOOL Zero crossing deadband indicator When set the value of CV does not change If ZCOff is set then ZCDeadbandOn is set when E is within the ZCDeadband range If ZCOff is cleared then ZCDeadbandOn is set when E crosses zero and remains within the ZCDeadband range ZCDeadbandOn is cleared when E exceeds the deadband range or when ZCDeadband 0 PVHHAlarm BOOL PV high high alarm indicator Set when PV gt PVHHLimit Cleared when PV lt PVHHLimit PVDeadband PVHAlarm BOOL PV high alarm indicator Set when PV gt PVHLimit Cleared when PV lt PVHLimit PVDeadband PVLAlarm BOOL PV low alarm indicator Set when PV lt PVLLimit Cleared when PV gt PVLLimit PVDeadband PVLLAlarm BOOL PV low low alarm indicator Set when PV lt PVLLLimit Cleared when PV gt PVLLLimit PVDeadband PVROCPosAlarm BOOL PV positive rate of change alarm indicator Set when calculated PV rate of change gt PVROCPosLimit PVROCNegAlarm BOOL PV negative rate of change alarm indicator Set when calculated PV rate of change lt PVROCNegLimit x 1 DevHHAlarm BOOL Deviation high high alarm indicator Set when PV gt SP DevHHLimit Cleared when PV lt SP DevHHLimit DevDeadband DevHAlarm BOOL Deviation high alarm indicator Set when PV gt SP DevHLimit Cleared when PV lt SP
177. Reference Manual Allen Bradley Logix5000 Controllers Advanced Process Control and Drives Instructions Catalog Numbers 1756 Lx 1769 Lx 1789 Lx 1794 Lx PowerFlex 700 Allen Bradley Rockwell Software Automation Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment Safety Guidelines for the Application Installation and Maintenance of Solid State Controls publication SGI 1 1 available from your local Rockwell Automation sales office or online at http www rockwellautomation com literature describes some important differences between solid state equipment and hard wired electromechanical devices Because of this difference and also because of the wide variety of uses for solid state equipment all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable In no event will Rockwell Automation Inc be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment The examples and diagrams in this manual are included solely for illustrative purposes Because of the many variables and requirements associated with any particular installation Rockwell Automation Inc cannot assume responsibility or liability for actual use based on the examples and diagrams No patent liability is assumed by Rockwell Automation Inc with resp
178. SP RMPS SCL SRTP TOT Output Parameter Data Type Description CycleTimelnv BOOL Invalid CycleTime value The instruction uses zero Status 1 OpenRatelnv BOOL Invalid OpenRate value The instruction uses zero Status 2 CloseRatelnv BOOL Invalid CloseRate value The instruction uses zero Status 3 maximumOnTimelnv BOOL Invalid maximumOnTime value The instruction uses the CycleTime value Status 4 MinOnTimelnv BOOL Invalid MinOnTime value The instruction uses zero Status 5 Deadtimelnv Status 6 BOOL Invalid Deadtime value The instruction uses zero PositionPctinv BOOL The calculated PositionPercent value is out of range Status 7 SPPercentlnv BOOL The calculated SPPercent value is out of range Statius 8 PositionSpaninv BOOL PositionEUmaximum PositionEUMin Status 9 Description The POSP instruction usually receives the desired position setpoint from a PID instruction output Scaling the position and set point values The PositionPercent and SPPercent outputs are updated each time the instruction is executed If either of these values is out of range less than 0 or greater than 100 the appropriate bit in Status is set but the values are not limited The instruction uses these formulas to calculate whether the values are in range Position PositionEUMin PositionPercent x 100 PositionEUMax PositionEUMin SP PositionEUMin SPPercent Fe pe
179. SRTP TOT Chapter 1 Input Parameter Data Type Description OperOReq BOOL Operator state 0 request Set by the operator interface to place the device into the 0 state when the device is in Operator control Default is cleared Oper1Req BOOL Operator state 1 request Set by the operator interface to place the device into the 1 state when the device is in Operator control Default is cleared Oper2Req BOOL Operator state 2 request Set by the operator interface to place the device into the 2 state when the device is in Operator control Default is cleared StateOPerm BOOL State 0 permissive Unless in Hand or Override mode this input must be set for the device to enter the 0 state This input has no effect if the device is already in the 0 state Default is set State1 Perm BOOL State 1 permissive Unless in Hand or Override mode this input must be set for the device to enter the 1 state This input has no effect if the device is already in the 1 state Default is set State2Perm BOOL State 2 permissive Unless in Hand or Override mode this input must be set for the device to enter the 2 state This input has no effect if the device is already in the 2 state Default is set FBO BOOL The first feedback input available to the instruction Default is cleared FB1 BOOL The second feedback input available to the instruction Default is cleared FB2 BOOL The third feedback input available to the in
180. Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value Publication 1756 RMO06G EN P September 2010 379 AppendixA Function Block Attributes TimingMode 0 C Periodic timing i v Determine task type v C Periodic task v Overview of timing modes The following diagram shows how an instruction determines the appropriate timing mode 4 Determine time base mode TimingMode 1 v 4 Oversample timing D v TimingMode 2 4 Real time timing DeltaT OversampleDT If DeltaT lt 0 or DeltaT gt 4194 303 secs the instruction sets DeltaT 0 0 and sets the appropriate bit in Status If DeltaT gt 0 the instruction executes DeltaT RTSTimeStamp RTSTimeStampy lf DeltaT gt 0 the instruction executes If RTSTIME DeltaT gt 1 the instruction sets RTSMissed bit in Status 4 Event or Continuous task gt v DeltaT task scan time If DeltaT gt 0 the instruction executes DeltaT elapsed time since last execution If DeltaT gt 0 the instruction executes 380 Publication 1756 RM006G EN P September 2010 Program Operator Control Publication 1756 RMO06G EN P September 2010 Function Block Attributes Appendix A Several instructions support the concept of Program Operator control
181. Target lt 0 or gt 100 Bit 17 of Status3CV2 CV3TargetInv BOOL Entered value for CV3 Target lt 0 or gt 100 Bit 17 of Status3CV3 CV2PV1 ModelGainInv BOOL Entered value for CV2 PV1 Model Gain is 1 4QNAN or 1 IND Bit 9 of Status3CV2 Not A Number or 1 Infinity 00 CV2PV2ModelGainInv BOOL Entered value for CV2 PV2 Model Gain is 1 QNAN or 1 4IND Bit 10 of Status3CV2 Not A Number or 1 Infinity 00 CV1PV1ModelTClInv BOOL Entered value for CV2 PV1 Model Time Constant lt 0 Bit 11 of Status3CV2 CV1PV2ModelTClInv BOOL Entered value for CV2 PV2 Model Time Constant lt 0 Bit 12 of Status3CV2 CV3PV1 ModelGainInv BOOL Entered value for CV3 PV1 Model Gain is 1 QNAN or 1 IND Bit 9 of Status3CV3 Not A Number or 1 Infinity 00 CV3PV2ModelGainInv BOOL Entered value for CV3 PV2 Model Gain is 1 QNAN or 1 4IND Bit 10 of Status3CV3 Not A Number or 1 Infinity 00 CV3PV1ModelTClinv BOOL Entered value for CV3 PV1 Model Time Constant lt 0 Bit 11 of Status3CV3 CV3PV2ModelTClInv BOOL Entered value for CV3 PV2 Model Time Constant lt 0 Bit 12 of Status3CV3 CV3PV1ModelDTInv BOOL Entered value for CV3 PV1 Model Deadtime lt 0 Bit 13 of Status3CV3 CV3PV2ModelDTInv BOOL Entered value for CV3 PV2 Model Deadtime lt 0 Bit 14 of Status3CV3 CV3PV1RespTCinv BOOL Entered value for CV3 PV1 Response Time Constant lt 0 Bit 15 of Status3CV3 CV3PV2RespTCinv BOOL Entered value for CV3 PV2 Re
182. The HPF instruction is designed to execute in a task where the scan rate remains constant The HPF instruction uses these equation When The instruction uses this transfer function Order 1 S s Order 2 2 S 2 2 Ss J2xsxot o Order 3 3 S 3 2 2 3 s 2xs x 2xsx o with these parameters limits where DeltaT is in seconds Parameter Limitations WLead first order LowLimit 0 0000001 DeltaT WLead second order LowLimit 0 00005 DeltaT WLead third order LowLimit 0 001 DeltaT HighLimit 0 77 DeltaT Whenever the value computed for the output is invalid NAN or INF the instruction sets Out the invalid value and sets the arithmetic overflow status flag When the value computed for the output becomes valid the instruction initializes the internal parameters and sets Out In 298 Publication 1756 RMO06G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Arithmetic Status Flags Arithmetic status flags are set for the Out output Condition prescan Fault Conditions none Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan No action taken No action taken instruction first run The instruction sets Out In The control algorithm is not executed The instruction sets Out In The control algorithm is not executed Enableln is cleared
183. These instructions include e Enhanced Select ESEL e Totalizer TOT e Enhanced PID PIDE e Ramp Soak RMPS e Discrete 2 State Device D2SD e Discrete 3 State Device D3SD Program Operator control lets you control these instructions simultaneously from both your user program and from an operator interface device When in Program control the instruction is controlled by the Program inputs to the instruction when in Operator control the instruction is controlled by the Operator inputs to the instruction Program or Operator control is determined by using these inputs Input Description ProgProgReq A program request to go to Program control ProgOperReq A program request to go to Operator control OperProgReq An operator request to go to Program control OperOperReq An operator request to go to Operator control To determine whether an instruction is in Program or Control control examine the ProgOper output If ProgOper is set the instruction is in Program control if ProgOper is cleared the instruction is in Operator control Operator control takes precedence over Program control if both input request bits are set For example if ProgProgReq and ProgOperReq are both set the instruction goes to Operator control 381 Appendix A Function Block Attributes The Program request inputs take precedence over the Operator request inputs This provides the capability to use the ProgProgReq and ProgO
184. Time 0 OperReaInv Status 2 BOOL Both operator state request bits are set Description The D2SD instruction controls a discrete device which has only two possible states such as on off open closed Typical discrete devices of this nature include motors pumps and solenoid valves Monitoring the D2SD instruction Arithmetic Status Flags Condition prescan Fault Conditions There is an operator faceplate available for the D2SD instruction For more information see appendix Function Block Attributes none Execution Function Block Action No action taken Arithmetic status flags are not affected Structured Text Action No action taken instruction first scan The fault timer is cleared ModeAlarm is cleared All the operator request inputs are cleared If ProgValueReset is set all the program request inputs are cleared When OverrideOnlInit is set ProgOper is cleared Operator control If ProgHandReg is cleared and OverrideOnInit is set clear Hand and set Override Override mode If ProgHandReg is set set Hand and clear Override Hand mode instruction first run ProgOper and CommandsStatus are cleared ProgOper and CommandsStatus are cleared Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes p
185. Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 InFault BOOL Bad health indicator for the input If In is read from an analog input then InFault is normally controlled by fault status on the analog input When set InFault indicates that the input signal has an error the instruction sets the appropriate bit in Status and the instruction holds Out at its current value When InFault transitions from set to cleared the instruction initializes the averaging algorithm and continues executing Default is cleared 346 Publication 1756 RMO06G EN P September 2010 Statistical Instructions MAVE MAXC MINC MSTD Chapter 6 Input Parameter Data Type Description Initialize BOOL Initialize input to the instruction When set the instruction holds Out In except when InFault is set in which case the instruction holds Out at its current value When Initialize transitions from set to cleared the instruction initializes the averaging algorithm and continues executing Default is cleared SampleEnable BOOL Enable for taking a sample of In When set the instruction enters the value of In into the storage array and calculates a new Out value When SampleEnable is
186. U REAL Scaled control variable output Scaled using CVEUmaximum and CVEUMin where CVEUmaximum corresponds to 100 and CVEUMin corresponds to 0 This output typically controls an analog output module or a secondary loop Arithmetic flags are set for this output CVEU CV x CVEUSpan 100 CVEUMin CVEU span calculation CVEUSpan CVEUmaximum CVEUMin CV REAL Control variable output This value is expressed as 0 100 CV is limited by CVHLimit and CVLLimit when in auto or cascade ratio mode or manual mode if CVManLimiting is set Otherwise this value is limited by 0 and 100 Arithmetic flags are set for this output CVInitializing BOOL 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 CVHAlarm BOOL CV high alarm indicator Set when the calculated value of CV gt 100 or CVHLimit CVLAlarm BOOL CV low alarm indicator Set when the calculated value of CV lt 0 or CVLLimit CVROCAlarm BOOL CV rate of change alarm indicator Set when the calculated rate of change for CV exceeds CVROCLimit SP REAL Current setpoint value The value of SP is used to control CV when in Auto or Cascade Ratio mode SPPercent REAL The value of SP expressed in percent of span of PV SPPercent SP PVEUMin x 100 PVSpan PV Span calculation PVSpan
187. V1 PV1 Autotuning When True CV1 PV1 Autotuning is aborted 232 Publication 1756 RMO06G EN P September 2010 MMC Output Parameter AtuneCV2PV1OutOfLimit Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description Either PV1 or the deadtime step ahead prediction of PV1 exceeds PV1TuneLimit during CV2 PV1 Autotuning When True CV2 PV1 Autotuning is aborted Chapter 2 Values Bit 1 of AtuneCV2PV1Status AtuneCV3PV10utOfLimit BOOL Either PV1 or the deadtime step ahead prediction of PV1 exceeds PV1TuneLimit during CV3 PV1 Autotuning When True CV3 PV1 Autotuning is aborted Bit 1 of AtuneCV3PV1Status AtuneCV1PV1Modelnv BOOL The MMC mode was not Manual at start of Autotuning or the MMC mode was changed from Manual during CV1 PV1 Autotuning When True CV1 PV1 Autotuning is not started or is aborted Bit 2 of AtuneCV1PV1Status AtuneCV2PV1Modelnv BOOL The MMC mode was not Manual at start of Autotuning or the MMC mode was changed from Manual during CV2 PV1 Autotuning When True CV2 PV1 Autotuning is not started or is aborted Bit 2 of AtuneCV2PV1 Status AtuneCV3PV1Modelnv BOOL The MMC mode was not Manual at start of Autotuning or the MMC mode was changed from Manual during CV3 PV1 Autotuning When True CV3 PV1 Autotuning is not started or is aborted Bit 2 of AtuneCV3PV1Status AtuneCV1PV1WindupFault BOOL CV1WindupHIn
188. V2Initializing is TRUE set CV2EU equal to CV2InitValue and CV2 to the corresponding percentage value CV2InitValue will normally come from the feedback of the analog output controlled by CV2EU or from the setpoint of a secondary loop The instruction initialization is disabled when CVFaulted or CVEUSpaninv are TRUE Refer to Instruction First Scan on page 80 Valid any float Default 0 0 CV3lnitValue REAL CV3EU initialization value scaled in CV3EU units When CV3lnitializing is TRUE set CV3EU equal to CV3lnitValue and CV3 to the corresponding percentage value CV3lnitValue will normally come from the feedback of the analog output controlled by CV3EU or from the setpoint of a secondary loop The instruction initialization is disabled when CVFaulted or CVEUSpaninv are TRUE Refer to Instruction First Scan on page 80 Valid any float Default 0 0 CV1Prog REAL CV1 Program Manual value CV1 is set to this value when in Program control and Manual mode Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 CV2Prog REAL CV2 Program Manual value CV2 is set to this value when in Program control and Manual mode Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 CV3Prog REAL CV3 Program Manual value CV3 is set to this value when in Program control and Manual mode Refer to Selecting the Control Variab
189. V2WindupLOut BOOL CV2 Windup low indicator TRUE when either a SP or CV2 low limit has been reached This signal will typically be used by the WindupLIn input to limit the windup of the CV2 output on a primary loop Refer to Primary Loop Control on page 98 CV3WindupLOut BOOL CV3 Windup low indicator TRUE when either a SP or CV3 low limit has been reached This signal will typically be used by the WindupLIn input to limit the windup of the CV3 output on a primary loop Refer to Primary Loop Control on page 98 ProgOper BOOL Program Operator control indicator TRUE when in Program control FALSE when in Operator control Refer to Switching between Program control and Operator control on page 114 CV1Auto BOOL Auto mode indicator for CV1 TRUE when CV1 in the Auto mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV2Auto BOOL Auto mode indicator for CV2 TRUE when CV2 in the Auto mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV3Auto BOOL Auto mode indicator for CV3 TRUE when CV3 in the Auto mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV1Manual BOOL Manual mode indicator for CV1 TRUE when CV1 in the Manual mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on
190. V3Prog 3 lt 0 or gt 100 or lt CV3LLimit or gt CV3HLimit when Bit 2 of Status3CV3 CVManLimiting is TRUE Limit value used for CV3 Publication 1756 RMO06G EN P September 2010 237 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Output Parameter Type Description Values CV10perinv BOOL CV1Oper 1 lt 0 or gt 100 or lt CV1LLimit or gt CV1HLimit when Bit 3 of Status3CV1 CVManLimiting is TRUE Limit value used for CV1 lt lt 2 CV20perlnv BOOL CV2Oper 2 lt 0 or gt 100 or lt CV2LLimit or gt CV2HLimit when Bit 3 of Status3CV2 CVManLimiting is TRUE Limit value used for CV2 CV30perlnv BOOL CV30per 3 lt 0 or gt 100 or lt CV3LLimit or gt CV3HLimit when Bit 3 of Status3CV3 CVManLimiting is TRUE Limit value used for CV3 CV10verrideValuelnv BOOL CV10verrideValue 1 lt 0 or gt 100 Limit value used for CV1 Bit 4 of Status3CV1 CV20verrideValuelnv BOOL CV2OverrideValue 2 lt 0 or gt 100 Limit value used for CV2 Bit 4 of Status3CV2 CV30verrideValuelnv BOOL CV30verrideValue 3 lt 0 or gt 100 Limit value used for CV3 Bit 4 of Status3CV3 CV1EUSpaninv BOOL The span of CV1EU invalid CV1EUMax equals CV1EUMin Bit 5 of Status3CV1 CV2EUSpaninv BOOL The span of CV2EU invalid CV2EUMax equals CV2EUMin Bit 5 of Status3CV2 CV3EUSpaninv BOOL The span of CV3EU invalid CV3EUMax equals CV
191. Valid 0 0 to maximum positive float Default 0 0 216 Publication 1756 RMO006G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Input Parameter Type Description Values CV3PV2ModelDT REAL The internal model deadtime for CV3 PV2 in seconds Valid 0 0 to maximum positive float Default 0 0 CV1PV1RespTC REAL The tuning parameter that determines the speed of the Valid 0 0 to maximum positive control variable action for CV1 PV1 in seconds float Default 0 0 CV2PV1RespTC REAL The tuning parameter that determines the speed of the Valid 0 0 to maximum positive control variable action for CV2 PV1 in seconds float Default 0 0 CV3PV1RespIC REAL The tuning parameter that determines the speed of the Valid 0 0 to maximum positive control variable action for CV3 PV1 in seconds float Default 0 0 CV1PV2RespTC REAL The tuning parameter that determines the speed of the Valid 0 0 to maximum positive control variable action for CV1 PV2 in seconds float Default 0 0 CV2PV2RespIC REAL The tuning parameter that determines the speed of the Valid 0 0 to maximum positive control variable action for CV2 PV2 in seconds float Default 0 0 CV3PV2RespIC REAL The tuning parameter that determines the speed of the Valid 0 0 to maximum positive control variable action for CV3 PV2 in seconds float Default 0 0 PV1Act1s
192. When ControlAction is set the calculated value of EPercent and PVPIDPercent is negated before being used by the control algorithm The following table describes how the instruction calculates the PID terms How calculated The proportional term is calculated using e PV when PVEProportional is set or e Error when PVEProportional is cleared Set PGain 0 to disable proportional control integral The integral term is calculated using Error Set Gain 0 to disable integral control Also setting PGain 0 when Dependindepend is set will disable integral control derivative The derivative term is calculated using Publication 1756 RMO06G EN P September 2010 e PV when PVEDerivative is set or e Error when PVEDerivative is cleared Set DGain 0 to disable derivative control Also setting PGain 0 when DependIndepend is set will disable derivative control Derivative smoothing is enabled when DSmoothing is set and disabled when DSmoothing is cleared Derivative smoothing causes less CV output jitter as a result of a noisy PV signal but also limits the effectiveness of high derivative gains 75 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Computing CV The PID control algorithm computes the value for CV by summing Delta PTerm Delta ITerm Delta DTerm and CV from the previous execution of the instruction for example CV _1 When CVSetPrevious is set
193. X XY lt n gt Size where XY lt n gt Size gt 1 and is a number of points in the piece wise linear curve and where n is 1 or 2 for the table selected You must create sorted X axis elements in the X arrays The Select input determines which table to use for the instruction When the instruction is executing on one table you can modify the values in the other table Change the state of Select to execute with the other table Before calculating Out the X axis parameters are scanned If they are not sorted in ascending order the appropriate bit in Status is set and Out remains unchanged Also if XY1Size or XY2Size is invalid the instruction sets the appropriate bit in Status and leaves Out unchanged The instruction uses this algorithm to calculate Out based on In e When In lt X 1 set Out Y 1 e When In gt X XY lt n gt Size set Out Y XY lt n gt Size e When X n lt In lt X n 1 calculate Out Y n 1 Yn X n 1 Xn In Xn Yn Arithmetic Status Flags Arithmetic status flags are set for the Out output 58 Publication 1756 RMO06G EN P September 2010 Condition prescan Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Fault Conditions Execution Function Block Action No action taken none Structured Text Action No action taken Chapter 1 instruction first scan No action taken No action taken instruction first run No act
194. _PROP 100 PROP_INT 248 PULSE_MULTIPLIER 260 RAMP_SOAK 108 RATE_LIMITER 333 S_CURVE 268 SCALE 121 SEC_ORDER_CONTROLLER 278 SELECT 337 SELECT_ENHANCED 320 445 Index SELECTABLE_NEGATE 339 SELECTABLE_SUMMER 341 UP_DOWN_ACCUM 287 T timing modes 377 TOT 131 Totalizer 131 446 U unresolved loop function block diagram 373 UP_DOWN_ACCUM structure 287 Up Down Accumulator 287 UPDN 287 Publication 1756 RMO06G EN P September 2010 Rockwell Automation Support Rockwell Automation provides technical information on the Web to assist you in using its products At http www rockwellautomation com support you can find technical manuals a knowledge base of FAQs technical and application notes sample code and links to software service packs and a MySupport feature that you can customize to make the best use of these tools For an additional level of technical phone support for installation configuration and troubleshooting we offer TechConnect support programs For more information contact your local distributor or Rockwell Automation representative or visit http www rockwellautomation com support Installation Assistance If you experience a problem within the first 24 hours of installation review the information that is contained in this manual You can contact Customer Support for initial help in getting your product up and running United States or Canada 1 440 646 3434 Outside United States or Use
195. a DINT tag and your specification says If temp is less than 100 then You d write IF temp lt 100 THEN stringtagl operator stringtag2 If bar_code and dest are string tags and your specification says If bar_code equals dest then IF bar_code dest THEN charl operator char2 To enter an ASCII character directly into the expression enter the decimal value of the character If bar_code is a string tag and your specification says If bar_code DATA O equals A then IF bar _code DATA 0 65 THEN bool tag bool expressions Publication 1756 RMO06G EN P September 2010 If count and length are DINT tags done is a BOOL tag and your specification says If count is greater than or equal to ength you are done counting How Strings Are Evaluated done count gt length The hexadecimal values of the ASCII characters determine if one string is less than or greater than another string e When the two strings are sorted as in a telephone directory the order of the strings determines which one is greater ASCII Characters Hex Codes Jab 31 61 62 i Ag Tb 31962 z r 4 S e A 4 s a AB 41 42 AB lt B e t p 7 B 42 r a 61 a gt B Y ab 61 62 Strings are equal if their characters match e Characters are case sensitive Upper case A 41 is not equal to lower case a
196. a Pacific Rockwell Automation Level 14 Core F Cyberport 3 100 Cyberport Road Hong Kong Tel 852 2887 4788 Fax 852 2508 1846 Publication 1756 RMO06G EN P September 2010 Supersedes Publication 1756 RMOO6F EN P September 2008 Copyright 2010 Rockwell Automation Inc All rights reserved Printed in the U S A AB Allen Bradley Logix5000 Controllers Process and Drives Instructions Reference Manual
197. a Program Manual mode na na na na set cleared cleared na Program Hold mode na na na na na set na na Example In this example the RMPS instruction drives the setpoint of a PIDE Publication 1756 RMO06G EN P September 2010 instruction When the PIDE instruction is in Cascade Ratio mode the output of the RMPS instruction is used as the setpoint The PV to the PIDE instruction can be optionally fed into the PV input of the RMPS instruction if you want to use guaranteed ramping and or guaranteed soaking In this example the AutoclaveRSSoak Value AutoclaveRSSoakTime and AutoclaveRSRamp Value arrays are REAL arrays with 10 elements to allow up to a 10 segment RMPS profile Structured Text AutoclaveRS PV AutoclaveTemp RMPS AutoclaveRS AutoclaveRSRampValue AutoclaveRSSoakValue AutoclaveRSSoakTime AutoclaveTempController PV AutoclaveTemp AutoclaveTempController SPCascade AutoclaveRS Out PIDE AutoclaveTempController SteamValve AutoclaveTempController CVEU 113 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Autoclave Temp D T Function Block Autoclave TempController AutoclaveRS RMPS E Ramp Soak gPY Out C CurrentSegProg CurrentSeg d OutProg SoakTimeLeftt Q SoakTimeProg GuarRampOn ProgProgReq GuarSoakOn ProgOperReq ProgOper E ProgAutoReg Auto E Prog anualReq Manual ProgHo
198. able shows how the D3SD instruction determines whether to operate in Hand or Override mode ProgHandReg ProgOverrideReq FaultAlarm and Description OverrideOnFault set either either Hand mode Hand is set Override is cleared cleared set either Override mode Hand is cleared Override is set cleared either set Override mode Publication 1756 RMO06G EN P September 2010 Hand is cleared Override is set When Override is set it takes precedence over Program and Operator control The following table describes how the Override mode affects the commanded state Override Override State Description set 2 CommandO0Status is cleared Command Status is cleared Command2Status is set set 1 CommandOStatus is cleared Command1Status is set Command2Status is cleared set 0 CommandO0Status is set Command Status is cleared Command2Status is cleared If OverrideState is invalid the instruction sets the appropriate bit in Status and does not enter the override state 47 Chapter 1 48 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Hand set HandFBO cleared When Hand is set it takes precedence over Program and Operator control The following table describes how the hand mode affects the commanded state HandFB1 cleared set HandFB2 Description CommandOStatus is cleared Command Status is cleared Command2Status is set set
199. aces input_value in array storage The instruction calculates the average of the values in array storage optionally using the weight values in array weight and places the result in Out Structured Text MAVE 03 In input_value MAVE MAVE 03 ave_storage ave weight ave _ result MAVE 03 Out Function Block 9 0 input_value J In StorageArray WeightArray MAVE_03 MAWE NF Moving Average 0 0 s Out ave_result ave_storage ave_weight Publication 1756 RMO06G EN P September 2010 349 Chapter 6 Maximum Capture MAXC Operands MAXC MAXC_tag MAXC_O4 MAXC ES Maximum Capture gin Out E Reset g ResetValue Statistical Instructions MAVE MAXC MINC MSTD The MAXC instruction finds the maximum of the Input signal over time Structured Text MAXC tag MAXIMUM_CAPTURE MAXC structure Function Block MAXC tag MAXIMUM_CAPTURE structure MAXC structure MAXIMUM_CAPTURE Structure Input Parameter Data Type Description Enableln BOOL Function BLOCK If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 Reset BOOL Request to reset control algorithm The instruction sets Out ResetValue as long as Reset is set Default
200. acts two inputs into an accumulated U PD N value Operands UPDN UPDN_tag Structured Text UPDN tag UP_LDOWN_ACCUM UPDN structure UPDN_01 Function Block UPDN Ey Up Down Accumulator ee e Rene S UPDN tag UP_DOWN_ACCUM structure UPDN structure In linus UP_DOWN_ACCUM Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes Initialize BOOL The initialize input request for the instruction When Initialize is set the instruction sets Out and the internal accumulator to InitialValue Default is cleared Initial Value REAL The initialize value of the instruction Valid any float Default 0 0 InPlus REAL The input added to the accumulator Valid any float Default 0 0 InMinus REAL The input subtracted from the accumulator Valid any float Default 0 0 Hold BOOL The hold input request for the instruction When Hold is set and Initialize is cleared Out is held Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The output of the instruction Arithmetic status lags are set for this output Publication 1756 RMO06G EN P September 2010 287 Chapter 3 Drives Instructions INTG PI PMUL S
201. alarm only turns on when in Operator control the program tries to change the state of the device from the operator s commanded state The alarm does not turn on if an operator places a device in Operator control and changes the mode The D3SD instruction checks for mode alarm conditions using these rules ModeAlarm When set Prog2Command Prog2Command and Prog2Command Command2Status or ProgiCommand ProgiCommand and ProgiCommand Commandi Status or ProgOCommand ProgOCommand and Prog0Command CommandOStatus cleared Prog2Command Command2Status and ProgiCommand Command Status and ProgOCommand CommandO0Status or the device is in override hand or program control mode 50 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Deadtime DEDT Operands DEDT DEDT_tag storage DEDT_04 DEDT ij Deadtime In StorageArray Input Parameter Data Type Enableln BOOL The DEDT instruction performs a delay of a single input You select the amount of deadtime delay Structured Text Operand Type Format Description DEDT tag DEADTIME structure DEDT structure storage REAL array deadtime buffer Function Block Operand Type Format Description DEDT tag DEADTIME structure DEDT structure storage REAL array deadtime buffer DEADTIME Structure Description Function
202. alid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred WLeadinv Status 1 BOOL WLead lt minimum value or WLead gt maximum value Orderlnv Status 2 BOOL Invalid Order value TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value Publication 1756 RMO06G EN P September 2010 297 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Description The HPF instruction uses the Order parameter to control the sharpness of the cutoff
203. alized function block that is used in applications where energy is transferred between two sections through a spring mass system Typically in these types of applications the frequency response of the process itself can be characterized as shown in the bode diagram A below The SOC instruction implements a first order lag filter followed by a PID controller to implement a transfer function with an integration a second order zero lead and a first order pole lag With this instruction PID tuning is simplified because the regulating terms are arranged so that you have WLead and ZLead as inputs to the SOC instruction rather than Kp Ki and Kd values The transfer function for the SOC instruction is DRE xS pin 1 tee ara oO read Lead s z 1 rag H s Publication 1756 RMO06G EN P September 2010 283 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Diagram A Process characteristics Diagram B Second order controller 1 Wig 2s second order lead Wi ead system natural frequency moves gain from 1 to 1 The SOC instruction can be used in a torque or tension regulating application where a load cell or force transducer is used as feedback and the output of the regulating scheme operates directly on the torque current minor loop of the drive In many such applications the controlled system may be mechanically under damped and have a natural frequency which is difficult to stabilize as it beco
204. alog_input2 Q In2 Selectedin Po mg In ProgOper 0 0 o analog_input3 D g In4 Override D g Ind 4 meg SelectorMode d ProgSelector E ProgProgReq E ProgOperReq ProgOverrideReq 325 326 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM ic Switching between Program control and Operator control The following diagram shows how the ESEL instruction changes between Program control and Operator control User program sets ProgOperReq Request takes precedence and is always granted p Operator sets OperOperReq Request is granted if ProgProgReq is cleared Program Control E p Request is granted if ProgOperReq is cleared User program sets ProgProgReq Operator Control Operator sets OperProgReq Request is granted if ProgOperReg is cleared S 1 You can lock the instruction in Operator control mode by leaving ProgOperReq set 2 You can lock the instruction in Program control mode by leaving ProgProgReq set while ProgOperReg is cleared Por more information on program and operator control see page A 381 Publication 1756 RMO06G EN P September 2010 High Low Limit HLL Operands HLL HLL tag Input Parameter Enableln HLL_04 H L Limit HighAlarm LowAlarm Data Type BOOL Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 The HLL instruction limits an analog input between two valu
205. am Manual mode request for CV3 Default FALSE e Set TRUE by the user program to request Manual mode e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV ProgCV10verrideReq BOOL Program Override mode request for CV1 Default FALSE e Set TRUE by the user program to request Override mode e f value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Publication 1756 RMO06G EN P September 2010 181 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Input Parameter Data Type Description Values ProgCV2OverrideReq BOOL Program Override mode request for CV2 Default FALSE e Set TRUE by the user program to request Override mode e lf value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 ProgCV30verrideReq BOOL Program Override mode request for CV3 Default FALSE e Set TRUE by the user program to request Override mode e If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 ProgCV1HandReq BOOL Program Hand mode request for CV1 Default FALSE 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 Refer to Operating modes on page 86 ProgCV2HandReq BOOL Program Hand
206. ample use TimeBase minutes if In has units of gal min If this value is invalid the instruction sets the appropriate bit in Status and does not update the Total For more information about timing modes see appendix Function Block Attributes Valid 0 3 Default 0 Gain REAL The multiplier of the incremental totalized value The user can use the Gain to convert the units of totalization For example use the Gain to convert gal min to a total in barrels Valid any float Default 1 0 ResetValue REAL The reset value input The reset value of Total when OperResetReq or ProgResetReq transitions from cleared to set Valid any float Default 0 0 Target REAL The target value for the totalized In Valid any float Default 0 0 TargetDev1 REAL The large deviation pre target value of the Total compared to the Target This value is expressed as a deviation from the Target Valid any float Default 0 0 TargetDev2 REAL The small deviation pre target value of the Total compared to the Target This value is expressed as a deviation from the Target Valid any float Default 0 0 LowlnCutoff REAL The instruction low input cutoff input When the In is at or below the LowlnCutoff value totalization ceases Valid any float Default 0 0 ProgProgReq BOOL Program program request Set to request Program control Ignored if ProgOperReq is set Holding this set and ProgOperReg cleared locks the instruction
207. anged until the next ramp soak segment is started The soak cycle holds the output at the SoakValue for a programmed amount of time before proceeding to the next segment The amount of time the output is to soak is programmed in the SoakTime parameters Publication 1756 RMO06G EN P September 2010 119 Chapter 1 120 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Each segment has a SoakValue and SoakTime Soaking begins when Out is ramped to the current segment s Soak Value SoakTimeLeft represents the time in minutes remaining for the output to soak During ramping SoakTimeLeft is set to the current segment s SoakTime Once ramping is complete SoakTimeLeft is decreased to reflect the time in minutes remaining for the current segment SoakTimeLeft 0 when SoakTime expires Guaranteed soaking Set the input GuarSoak to enable guaranteed soaking When enabled the instruction monitors the difference between Out and PV If the difference is outside of the SoakDeadband timing of the soak cycle is suspended and the internal soak timer is cleared When the difference between Out and PV returns to within the deadband timing resumes The output GuarSoak is set when timing is held due to guaranteed soaking being in effect Publication 1756 RMO06G EN P September 2010 Scale SCL Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapte
208. application publication 1756 RM085 These publications address the Logix5000 family of controllers Publication Logix5000 Controllers Quick Start publication 1756 0S001 Description This quick start provides a visual step by step overview of the basic steps you need to complete to get you controller configured and running Logix5000 Controllers Design Considerations Reference Manual publication 1756 OR107 This design reference provides considerations when planning and implementing a Logix5000 control system Logix5000 Controllers Design Considerations Reference Manual publication 1756 RMO094 This system reference provides a high level listing of configuration information controller features and instructions ladder relay function block diagram and structured text Logix5000 Controllers Common Procedures publication 1756 PM001 Who Should Use This document provides a programmer instruction for a Logix based controller This Manual This common procedures manual explains the common features and functions of all Logix5000 controllers with details about each available You should already be familiar with how the Logix based controller stores and processes data Novice programmers should read all the details about an instruction before using the instruction Experienced programmers can refer to the instruction information to verify details Publication 1756 RM006G EN P Septemb
209. ariable on page 94 CV3Hand BOOL Hand mode indicator for CV3 TRUE when CV3 in the Hand mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 DeltaT REAL Elapsed time between updates in seconds Refer to Processing Faults on page 99 CV1StepSizeUsed REAL Actual CV1 step size used for tuning CV2StepSizeUsed REAL Actual CV2 step size used for tuning CV3StepSizeUsed REAL Actual CV3 step size used for tuning CV1GainTuned REAL The calculated value of the internal model gain for CV1 after tuning is completed CV2GainTuned REAL The calculated value of the internal model gain for CV2 after tuning is completed CV3GainTuned REAL The calculated value of the internal model gain for CV3 after tuning is completed CV1TCTuned REAL The calculated value of the internal model time constant for CV1 after tuning is completed CV2TCTuned REAL The calculated value of the internal model time constant for CV2 after tuning is completed CV3TCTuned REAL The calculated value of the internal model time constant for CV3 after tuning is completed CV1DTTuned REAL The calculated value of the internal model deadtime for CV1 after tuning is completed 190 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IM
210. arithmetic overflow status flag When the value computed for the output becomes valid the instruction initializes the internal parameters and sets Out In 310 Publication 1756 RMO06G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Arithmetic Status Flags Arithmetic status flags are set for the Out output Condition prescan Fault Conditions none Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan No action taken No action taken instruction first run The instruction sets Out In The control algorithm is not executed The instruction sets Out In The control algorithm is not executed Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example The LPF instruction attenuates signals that occur above the configured cutoff frequency This instruction is typically used to filter out high frequency noise or disturbances that originate from either electrical or mechanical sources You can select a specific order of the filter to achieve various degrees of attenuation Note that higher orders increase the execution time for the instruction Publication
211. art parameter The tuner starts collecting PV and CV data for noise calculation Publication 1756 RMO06G EN P September 2010 201 Chapter 2 202 Advanced Process Control Function Blocks IMC CC MMC 3 After collecting 60 samples 60 DeltaT period the tuner adds StepSize to the CV After successfully collecting the PV data as a result of the CV step change the CV assumes its value before the step change and the AtuneStatus GainTuned TCTuned DT Tuned and RespTCTuned parameters are updated 4 Set the appropriate AtuneUseModel parameter to copy the tuned parameters to the model parameters The function block then resets the AtuneUseModel parameter After a successful AutoTuneDone the Atune parameter is set to one 1 Tuning completed successfully To identify models and to calculate response time constants for all six CV PV processes run the tuner up to three times to obtain CV1 PV2 CV2 PV2 and CV3 PV2 models and tuning respectively After each run two process models are identified CV PV1 and CV PV2 two process variables respond as a result of one CV step change MMC Function Block Tuning Errors If an error occurs during the tuning procedure the tuning is aborted and an appropriate AtuneStatus bit is set Also a user can abort the tuning by setting the AtuneAbort parameter After an abort the CV assumes its value before the step change and the GainTuned TCTuned DTTuned and RespTCTuned parameters
212. as In is selected 8 Out Un x Gain Bias 1 n Arithmetic status flags are set for the Out output none Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan No action taken No action taken instruction first run No action taken No action taken Enableln is cleared EnableOut is cleared the instruction na does nothing and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableQut is set The instruction executes postscan No action taken No action taken 343 Chapter 5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM 344 Example The values of Select1 and Select2 determine whether to select analog_input1 and analog _input2 respectively The instruction then adds the selected inputs and places the result in Out Structured Text SSUM_01 In1l analog inputl SSUM_01 Selectl selectl SSUM_01 In2 analog input2 SSUM_01 Select2 select2 SSUM SSUM_01 selected add SSUM 01 0ut Function Block SSUM_01 SSUM mj Selected Summer analog_input1 0 0 a Q In4 Out D g selected_add selecti gt E Seleti Publication 1756 RM006G EN P September 2010 Chapter 6 Statistical Instructions MAVE MAXC MINC MSTD Introduction These statistical instructions are available
213. at start of CV1 Autotuning or during CV1 Autotuning When True CV1 Autotuning is not started or is aborted Bit 3 of AtuneCV1Status AtuneCV2WindupFault BOO CV2WindupHIn or CV2WindupLIn is True at start of CV2 Autotuning or during CV2 Autotuning When True CV2 Autotuning is not started or is aborted Bit 3 of AtuneCV2Status AtuneCV3WindupFault BOO CV3WindupHin or CV3WindupLIn is True at start of CV3 Autotuning or during CV3 Autotuning When True CV3 Autotuning is not started or is aborted Bit 3 of AtuneCV3Status AtuneCV1StepSize0 BOO CV1StepSizeUsed 0 at start of CV1 Autotuning When True CV1 Autotuning is not started Bit 5 of AtuneCV1 Status Bit 3 of AtuneCV1Status AtuneCV2StepSize0 BOO CV2StepSizeUsed 0 at start of CV2 Autotuning When True CV2 Autotuning is not started Bit 4 of AtuneCV2Status AtuneCV3StepSize0 BOO CV3StepSizeUsed 0 at start of CV3 Autotuning When True CV3 Autotuning is not started Bit 4 of AtuneCV3Status AtuneCV1LimitsFault BOO CV1LimitsInv and CVManLimiting are True at start of CV1 Autotuning or during CV1 Autotuning When True CV1 Autotuning is not started or is aborted Bit 5 of AtuneCV1Status AtuneCV2LimitsFault BOO CV2LimitsInv and CVManLimiting are True at start of CV2 Autotuning or during CV2 Autotuning When True CV2 Autotuning is not started or is aborted Bit 5 of AtuneCV2Status AtuneCV3Limits
214. ata Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL Request to initialize filter control algorithm When set the instruction sets Out In Default is cleared WLead REAL The lead frequency in radians second If WLead lt minimum or WLead gt maximum the instruction sets the appropriate bit in Status and limits WLead Valid see Description section below for valid ranges Default 0 0 Order REAL Order of the filter Order controls the sharpness of the cutoff If Order is invalid the instruction sets the appropriate bit in Status and uses Order 1 Valid 1 to 3 Default 1 TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 296 Publication 1756 RM006G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Input Parameter Data Type Description OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode V
215. ate 0 e SPPercent is invalid OpenOut and CloseOut will not be pulsed if SPPercent equals PositionPercent Both OpenTime and CloseTime will be cleared 104 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Arithmetic Status Flags Arithmetic status flags are set for the PositionPercent output Condition prescan Fault Conditions none Execution Function Block Action OpenOut and CloseOut are cleared Opentime 0 CloseTime 0 Structured Text Action OpenOut and CloseOut are cleared OpenTime 0 CloseTime 0 instruction first scan The internal cycle timer is reset The instruction calculates OpenTime and Close Time The internal cycle timer is reset The instruction calculates OpenTime and Close Time instruction first run No action taken No action taken Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example In this example the POSP instruction opens or closes a motor operated valve based on the CVEU output of the PIDE instruction The actual valve position is wired into the Position input and optional limit switches which show if the valv
216. atus When True CV1 PV1 Autotuning is aborted AtuneCV2PV1EUSpanChanged BOOL CVEUSpan or PVEUSpan changes during CV2 PV1 Autotuning Bit 7 of AtuneCV2PV1 Status When True CV2 PV1 Autotuning is aborted AtuneCV3PV1EUSpanChanged BOOL CVEUSpan or PVEUSpan changes during CV3 PV1 Autotuning Bit 7 of AtuneCV3PV1 Status When True CV3 PV1 Autotuning is aborted AtuneCV1PV1Changed BOOL CV10per is changed when in Operation control or CV1Progis Bit 8 of AtuneCV1PV1Status changed when in Program control or CV1 becomes high low or ROC limited during CV1 PV1 Autotuning When True CV1 PV1 Autotuning is aborted AtuneCV2PV1 Changed BOOL CV2Oper is changed when in Operation control or CV2Progis Bit 8 of AtuneCV2PV1Status changed when in Program control or CV2 becomes high low or ROC limited during CV2 PV1 Autotuning When True CV2 PV1 Autotuning is aborted AtuneCV3PV1Changed BOOL CV30per is changed when in Operation control or CV3Progis Bit 8 of AtuneCV3PV1Status changed when in Program control or CV3 becomes high low or ROC limited during CV3 PV1 Autotuning When True CV3 PV1 Autotuning is aborted AtuneCV1PV1 Timeout BOOL Elapsed time is greater then PV1AtuneTimeLimit since step test Bit 9 of AtuneCV1PV1 Status is started When True CV1 PV1 Autotuning is aborted AtuneCV2PV1 Timeout BOOL Elapsed time is greater then PV1AtuneTimeLimit since step test Bit 9 of AtuneCV2PV1 Status is started When True CV2 PV1 Autotuning is aborted
217. atus 0 BOOL The instruction detected one of the following execution errors This is not a minor or major 126 controller error Check the remaining status bits to determine what occurred Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Output Parameter Data Type Description CycleTimelnv BOOL Invalid CycleTime value The instruction uses zero Status 1 maximumHeatTimelnv BOOL Invalid maximumHeatTime value The instruction uses the CycleTime value Status 2 MinHeatTimelnv BOOL Invalid MinHeatTime value The instruction uses zero Status 3 maximumCoolTimelnv BOOL Invalid maximumCoolTime value The instruction uses the CycleTime value Status 4 MinCoolTimelnv BOOL Invalid MinCoolTime value The instruction uses zero Status 5 HeatSpaninv BOOL maximumHeatln MinHeatln Status 6 CoolSpaninv Status 7 BOOL maximumCoolln MinCoolln Publication 1756 RMO06G EN P September 2010 Description The length of the SRTP pulse is proportional to the PID output The instruction parameters accommodate heating and cooling applications Using the internal cycle timer The instruction maintains a free running cycle timer that cycles from zero to the programmed CycleTime The internal timer is updated by DeltaT DeltaT is the elapsed time since the instruction last executed This t
218. atus of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred DeadbandInv BOOL Invalid Deadband value Status 1 ROCPosLimitlnv BOOL Invalid ROCPosLimit value Status 2 ROCNegLimitinv BOOL Invalid ROCNegLimit value Status 3 ROCPeriodInv BOOL Invalid ROCPeriod value Status 4 Publication 1756 RMO06G EN P September 2010 Description 25 Chapter 1 HHAlarm false LLAlarm false 26 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT In gt HHLim The ALM instruction provides alarm indicators for high high high low low low rate of change positive and rate of change negative An alarm deadband is available for the high high to low low alarms A user defined period for performing rate of change alarming is also available High high to low low alarm The high high and low low alarm algorithms compare the input to the alarm limit and the alarm limit plus or minus the deadband In gt HLim B HHAlarm HAlarm p HAlarm true false pe true In lt HHLim Deadband In lt HLim Deadband n lt LLLim In lt LLim B LLAlarm LAlarm p LAlarm true false a true In gt LLLim Deadband In gt LLim Deadband Rate of change alarm The rate of
219. ault 0 0 hand auto station and would be used to generate a bumpless transfer out of Hand mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 CV1HandFBFault BOOL CV1HandFB value bad health indicator If the CV1HandFB Default FALSE value is read from an analog input then CV1HandFBFault will normally be controlled by the status of the analog input FALSE Good Health channel If HandFBFault is TRUE it indicates an error on the input module set bit in Status CV2HandFBFault BOOL CV2HandFB value bad health indicator If the CV2HandFB Default FALSE value is read from an analog input then CV2HandFBFault will normally be controlled by the status of the analog input FALSE Good Health channel If HandFBFault is TRUE it indicates an error on the input module set bit in Status CV3HandFBFault BOOL CV3HandFB value bad health indicator If the CV3HandFB Default FALSE value is read from an analog input then CV3HandFBFault will normally be controlled by the status of the analog input FALSE Good Health channel If HandFBFault is TRUE it indicates an error on the input module set bit in Status CV1Target REAL Target value for control variable output 1 Valid 0 0 100 0 Default 0 0 CV2Target REAL Target value for control variable output 2 Valid 0 0 100 0 Default 0 0 CV3Target REAL Target value for control variable output 3 Vali
220. ault status FALSE Good Health If CVFault is TRUE it indicates an error on the output module set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CVInitReq BOOL CV initialization request While TRUE set CVEU to the value of Default FALSE 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 Refer to Processing Faults on page 99 CVInitValue REAL CVEU initialization value scaled in CVEU units When Valid any float CVInitializing is TRUE set CVEU equal to CVInitValue and CV to the corresponding percentage value CVInitValue will normally Default 0 0 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 Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CVProg REAL CV Program Manual value CV is set to this value when in Valid 0 0 100 0 Program control and Manual mode Default 0 0 Refer to Selecting the Control Variable on page 94 If value of CVProg or CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Selecting the Control
221. aulted BOOL Control variable CV3 health bad Bit 0 of Status3CV3 CV1HandFBFaulted BOOL CV1 HandFB value health bad Bit 1 of Status3CV1 CV2HandFBFaulted BOOL CV2 HandFB value health bad Bit 1 of Status3CV2 CV3HandFBFaulted BOOL CV3 HandFB value health bad Bit 1 of Status3CV3 CV1Proginv BOOL CV1Prog 1 lt 0 or gt 100 or lt CV1LLimit or gt CV1HLimit when Bit 2 of Status3CV1 CVManLimiting is TRUE Limit value used for CV1 CV2Proginv BOOL CV2Prog 2 lt 0 or gt 100 or lt CV2LLimit or gt CV2HLimit when Bit 2 of Status3CV2 CVManLimiting is TRUE Limit value used for CV2 CV3Proginv BOOL CV3Prog 3 lt 0 or gt 100 or lt CV3LLimit or gt CV3HLimit when Bit 2 of Status3CV3 CVManLimiting is TRUE Limit value used for CV3 CV10perinv BOOL CV10per 1 lt 0 or gt 100 or lt CVILLimit or gt CVIHLimit when Bit 3 of Status3CV1 CVManLimiting is TRUE Limit value used for CV1 CV20perInv BOOL CV20per 2 lt 0 or gt 100 or lt CV2LLimit or gt CV2HLimit when Bit 3 of Status3CV2 CVManLimiting is TRUE Limit value used for CV2 194 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 CC Output Parameter Data Type Description Values CV30perlnv BOOL CV30per 3 lt 0 or gt 100 or lt CV3LLimit or gt CV3HLimit when Bit 3 of
222. bloc Publication 1756 RMO06G EN P September 2010 319 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Enhanced Select ESEL Operands ESEL ESEL tag ESEL_01 g In6 g ProgSelector Ej ProgProgReq E ProgOperReq Input Parameter Enableln ESEL E ProgOverrideReq Enhanced Select Out Selectedin ProgOper Override E Data Type BOOL The ESEL instruction lets you select one of as many as six inputs Selection options include e manual select either by operator or by program e high select e low select e median select e average mean select Structured Text ESEL tag SELECT_ ENHANCED ESEL structure Function Block ESEL tag SELECT_ENHANCED ESEL structure SELECT_ENHANCED Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REA The first analog signal input to the instruction Valid any float Default 0 0 In2 REA The second analog signal input to the instruction Valid any float Default 0 0 In3 320 REA The third analog signal input to the instruction Valid any float Default 0 0 Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5
223. by using CV3LLimit CV1ROCLimitInv BOOL CV1ROCLimit lt 0 disables CV1 ROC limiting Bit 8 of Status3CV1 CV2ROCLimitInv BOOL CV2ROCLimit lt 0 disables CV2 ROC limiting Bit 8 of Status3CV2 CV3ROCLimitInv BOOL CV3ROCLimit lt 0 disables CV3 ROC limiting Bit 8 of Status3CV3 CV1HandFBInv BOOL CViHandFB 1 lt 0 or gt 100 Limit value used for CV1 Bit 9 of Status3CV1 CV2HandFBInv BOOL CV2HandFB 2 lt 0 or gt 100 Limit value used for CV2 Bit 9 of Status3CV2 CV3HandFBInv BOOL CV3HandFB 3 lt 0 or gt 100 Limit value used for CV3 Bit 9 of Status3CV3 CV1ModelGainInv BOOL CV1ModelGain is 1 0NAN or 1 4IND Not A Number or 1 Bit 10 of Status3CV1 Infinity 00 CV2ModelGainInv BOOL CV2ModelGain is 1 4QNAN or 1 4IND Not A Number or 1 Bit 10 of Status3CV2 Infinity 00 CV3ModelGainInv BOOL CV3ModelGain is 1 QNAN or 1 4IND Not A Number or 1 Bit 10 of Status3CV3 Infinity CV1ModelTClnv BOOL CV1 Model Time Constant CV1ModelTC lt 0 Bit 11 of Status3CV1 CV2ModelTClnv BOOL CV2 Model Time Constant CV2ModelTC lt 0 Bit 11 of Status3CV2 CV3ModelTClnv BOOL CV3 Model Time Constant CV3ModelTC lt 0 Bit 11 of Status3CV3 CV1ModelDTInv BOOL CV1 Model Deadtime CV1ModelDT lt 0 Bit 12 of Status3CV1 CV2ModelDTInv BOOL CV2 Model Deadtime CV2ModelDT lt 0 Bit 12 of Status3CV2 CV3ModelDTInv BOOL CV3 Model Deadtime CV3ModelDT lt 0 Bit 12 of Status3CV3 CV1RespTClnv BOOL CV1 Response Time Constant CV1RespTC lt 0
224. calculated value of the control variable time constant in medium response speed for CV3 PV2 after tuning is completed CV1PV1RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV1 PV1 after tuning is completed CV2PV1RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV2 PV1 after tuning is completed CV3PV1RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV3 PV1 after tuning is completed CV1PV2RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV1 PV2 after tuning is completed CV2PV2RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV2 PV2 after tuning is completed CV3PV2RespTCTunedF REAL The calculated value of the control variable time constant in fast response speed for CV3 PV2 after tuning is completed AtuneCV1PV10n BOOL Set True when auto tuning for CV1 PV1 has been initiated AtuneCV2PV10n BOOL Set True when auto tuning for CV2 PV1 has been initiated AtuneCV3PV10n BOOL Set True when auto tuning for CV3 PV1 has been initiated AtuneCV1PV1Done BOOL Set True when auto tuning for CV1 PV1 has completed successfully AtuneCV2PV1Done BOOL Set True when auto tuning for CV2 PV1 has completed successfully AtuneCV3PV1Done BOOL Set True when auto
225. cessing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling CV1Fault BOOL Control variable 1 bad health indicator If CV1EU controls an Default FALSE analog output then CV1Fault will normally come from the analog output s fault status FALSE Good Health If CV1 Fault is TRUE it indicates an error on the output module set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CV2Fault BOOL Control variable 2 bad health indicator If CV2EU controls an Default FALSE analog output then CV2Fault will normally come from the analog output s fault status FALSE Good Health If CV2Fault is TRUE it indicates an error on the output module set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CV3Fault BOOL Control variable 3 bad health indicator If CV3EU controls an Default FALSE analog output then CV3Fault will normally come from the analog output s fault status FALSE Good Health If CV3Fault is TRUE it indicates an error on the output module set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CV1InitReq BOOL CV1 initialization request While TRUE set CV1EU to the value of Default FALSE CVInitValue This signal will normally be controlled by the In Hold status on the analog output module controlled by CV1EU or from the I
226. ch the SCL instruction converts to 0 100 gpm floating point without a loss of resolution This scaled value could then be used as an input to other instructions The SCL instruction uses this algorithm to convert unscaled input into a scaled value Out In InRawMin x eL don LAE InEUMin InRawMax InRawMi 122 Publication 1756 RM006G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Alarming Once the instruction calculates Out the maximumAlarm and MinAlarm are determined as follows In gt InRawmaximum maximumAlarm set maximumAlarm cleared In lt InRawMin In lt InRawmaximum maximumAlarm set MinAlarm cleared f In gt InRawMin Limiting Limiting is performed on Out when Limiting is set The instruction sets Out InEUmaximum when In gt InRawmaximum The instruction sets Out InEUMin when In lt InRawMin Limiting set In gt InRawmaximum Out InEUmaximum Limiting set Out InEUMin In lt InRawMin Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Publication 1756 RMO06G EN P September 2010 123 Chapter 1 Condition Execution Function Block Action Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Structured Text Action prescan No action taken No action
227. changed All the operator request inputs are cleared If ProgValueReset set all the program request inputs are cleared All the PV high low PV rate of change and deviation high low alarm outputs are cleared 9 If CVInitReq is cleared CVInitializing is cleared instruction first run ProgOper is cleared ProgOper is cleared The instruction changes to manual mode The instruction changes to manual mode Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan 80 No action taken No action taken When CVInitReg is set or during instruction first scan or on a set to cleared transition of CVFault bad to good the instruction initializes the CVEU and CV outputs to the value of CVInitValue If the timing mode is not oversample and EnableIn transitions from cleared to set the instruction initializes the CVEU and CV values CVInitialization is cleared after the initialization and when CVInitReq is cleared The CVInitValue normally comes from the analog output s readback value The CVInitReq value normally comes from the In Hold status bit on the analog output controlled by CVEU The initialization procedure is performed to avoid a bump at startup in the output signal being sent to the field device The instruction do
228. changed when in Operation control or CV1Prog is changed when in Program control or CV1 becomes high low or ROC limited during CV1 Autotuning When True CV1 Autotuning is aborted Bit 8 of AtuneCV1 Status AtuneCV2Changed BOO L CV2Oper is changed when in Operation control or CV2Prog is changed when in Program control or CV2 becomes high low or ROC limited during CV2 Autotuning When True CV2 Autotuning is aborted Bit 8 of AtuneCV2Status AtuneCV3Changed BOO L CV30per is changed when in Operation control or CV3Prog is changed when in Program control or CV3 becomes high low or ROC limited during CV3 Autotuning When True CV3 Autotuning is aborted Bit 8 of AtuneCV3Status AtuneCV1Timeout BOO Elapsed time is greater then AtuneTimeLimit since step test is started When True CV1 Autotuning is aborted Bit 9 of AtuneCV1 Status AtuneCV2Timeout BOO Elapsed time is greater then AtuneTimeLimit since step test is started When True CV2 Autotuning is aborted Bit 9 of AtuneCV2Status AtuneTimeoutCV3 BOO Elapsed time is greater then AtuneTimeLimit since step test is started When True CV3 Autotuning is aborted Bit 9 of AtuneCV3Status AtuneCV1PVNotSettled BOO The PV is changed too much to Autotune for CV1 When True CV1 Autotuning is aborted Wait until PV is more stable before autotuning CV1 Bit 10 of AtuneCV1 Status AtuneCV2PVNotSettled BOO The PV i
229. ck Tuning on page 165 164 Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 If you do not know the process models you need to identify the models and tune the function block by using the built in tuner modeler for the function block to operate correctly in the Auto mode The function block uses first order lag with deadtime internal process models and first order filters total of up to twelve tuning parameters to calculate the CV s Each CV is calculated such that the process variable PV follows a first order lag trajectory when approaching the setpoint value Speed of response depends on the value of the response time constants The smaller the response time constants the faster the control variable response will be The response time constants should be set such that the PV reaches the setpoint in reasonable time based on the process dynamics The larger the response time constants are the slower the control variable response will be but the control variable also becomes more robust See the tuning section for more details In the Manual mode the control variables CV are set equal to the operator entered or program generated CVnOper or CVnProg parameters For the Manual to Auto mode bumpless transfer and for safe operation of the control variable the CV rate of change limiters are implemented such that CV s cannot mov
230. cleared Command1Status is set Command2Status is cleared set cleared cleared set either either CommandOStatus is set Command Status is cleared Command2Status is cleared If more than one program command input is set e the instruction sets the appropriate bit in Status e if Override and Hand are cleared the instruction holds the previous state Commanded state in Operator control The following table describes how the D3SD instruction operates when in Operator control Oper0Req OperiReq Oper2Req State0 State State2 Description Perm Perm Perm cleared cleared set either either set CommandOStatus is cleared Command Status is cleared Command2Status is set cleared set cleared either set either CommandOStatus is cleared Command1Status is set Command2Status is cleared set cleared cleared set either either CommandO0Status is set Command Status is cleared Command2Status is cleared 46 If more than one operator command input is set e the instruction sets the appropriate bit in Status e if Override and Hand are cleared the instruction holds the previous state After every instruction execution the instruction e clears all the operator request inputs if ProgValueReset is set clears all the program request inputs Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Hand mode or Override mode Chapter 1 The following t
231. cleared and Initialize is cleared the instruction holds Out at its current value Default is set NumberOfSamples DINT The number of samples to be used in the calculation If this value is invalid the instruction sets the appropriate bit in Status and holds Out at its current value When NumberOfSamples becomes valid again the instruction initializes the averaging algorithm and continues executing Valid 1 to minimum size of StorageArray or WeightArray if used Default 1 UseWeights BOOL Averaging scheme input to the instruction When set the instruction uses the weighted method to calculate the Out When cleared the instruction uses the uniform method to calculate Out Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred InFaulted Status 1 BOOL In health is bad InFault is set NumberOfSamplnv BOOL NumberOfSamples invalid or not compatible with array size Status 2 Description The MAVE instruction calculates a weighted or non weighted moving average Publication 1756 RMO06G EN P September 2010 of the input signal The NumberOfSamples specifies t
232. control Refer to Cascade ratio SP on page 87 If RatioProg or RatioOper lt RatioLLimit or gt RatioHLimit set bit in Status and limit value used for Ratio Refer to Selecting the Setpoint on page 87 CascadeRatio SP for details 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 lt 0 set bit in Status and limit to zero If RatioHLimit lt RatioLLimit set bit in Status and limit Ratio by using the value of RatioLLimit Refer to Cascade ratio SP on page 87 Publication 1756 RMO06G EN P September 2010 Valid RatioLLimit to maximum positive float Default 1 0 147 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC IMC Input Parameter Type Description Valid and Default Values RatioLLimit REAL Ratio low limit value no units for example scalar Valid 0 0 to RatioHLimit Limits the value of Ratio obtained from RatioProg or RatioOper Default 1 0 If RatioLLimit lt 0 set bit in Status and limit to zero If RatioHLimit lt RatioLLimit set bit in Status and limit Ratio by using the value of RatioLLimit Refer to Cascade ratio SP on page 87 CVFault BOOL Control variable bad health indicator If CVEU controls an Default FALSE analog output then CVFault will normally come from the analog output s f
233. ctions that specify special functionality such as reinitialzation when EnableIn toggles from cleared to set For function block instructions with time base parameters whenever the timing mode is Oversample the instruction always resumes were it left off when EnableIn toggles from cleared to set If the EnableIn parameter is not wired the instruction always executes as normal and EnableIn remains set If you clear EnableIn it changes to set the next time the instruction executes IMPORTANT When programming in function block restrict the range of engineering units to 10 gt because internal floating point calculations are done using single precision floating point Engineering units outside of this range may result in a loss of accuracy if results approach the limitations of single precision floating point 10 9 8 21 Preface Notes 22 Publication 1756 RMO06G EN P September 2010 Chapter 1 Introduction Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT These process control instruction are available in structured text and function block programming languages If you want to Use this instruction Page provide alarming for any analog signal Alarm ALM 24 control discrete devices such as solenoid valves Discrete 2 State Device 29 pumps and motors that
234. cts time base execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode Valid 0 to 2 Default 0 For more information about timing modes see Appendix Function Block Attributes Publication 1756 RM006G EN P September 2010 Valid 0 2 Default 0 183 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Input Parameter Data Type Description Values OversampleDT REAL Execution time for Oversample mode Valid 0 4194 303 seconds Default 0 RTSTime DINT Module update period for Real Time Sampling mode Valid 1 32 767 1 count 1 ms RTSTimestamp DINT Module time stamp value for Real Time Sampling mode Valid 0 32 767 wraps from 32 767 0 1 count 1 ms PVTuneLimit REAL PV tuning limit scaled in PV units When Autotune is running and Valid any float predicted PV exceeds this limit the tuning will be aborted Default 0 AtuneTimeLimit REAL Maximum time for autotune to complete following the CV step Valid range any float gt 0 change When autotune exceeds this time the tuning will be aborted Default 60 minutes NoiseLevel DINT An estimate of the noise level expected on the PV to compensate Range 0 2 for it during tuning The selections are 0 low 1 medium 2 high Default 1 CV1StepSize REAL CV1 step size in percent for the tuning step test Step size is Range 100 100 directly added to
235. d 0 0 100 0 Default 0 0 CV1WindupHin BOOL CV1 Windup high request When TRUE CV1 will not be Default FALSE allowed to increase in value This signal will typically be the CV1WindupHOut output from a secondary loop Refer to CV Windup Limiting on page 95 CV2WindupHin BOOL CV2 Windup high request When TRUE CV2 will not be Default FALSE allowed to increase in value This signal will typically be the CV2WindupHOut output from a secondary loop Refer to CV Windup Limiting on page 95 Publication 1756 RMO06G EN P September 2010 213 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Input Parameter CV3WindupHIn Type BOOL Description CV3 Windup high request When TRUE CV3 will not be allowed to increase in value This signal will typically be the CV3WindupHOut output from a secondary loop Refer to CV Windup Limiting on page 95 Values Default FALSE CV1WindupLIn BOOL CV1 Windup low request When TRUE CV1 will not be allowed to decrease in value This signal will typically be the CV1WindupLOut output from a secondary loop Refer to CV Windup Limiting on page 95 Default FALSE CV2WindupLIn BOOL CV2 Windup low request When TRUE CV2 will not be allowed to decrease in value This signal will typically be the CV2WindupLOut output from a secondary loop Refer to CV Windup Limiting on page 95 Default FALSE CV3WindupLIn BOOL CV3 Windup low request
236. d PVEUMax lt PVEUMin Bit 4 of Status1 SPProginv BOOL SPProg lt SPLLimit or gt SPHLimit Limit value used for SP Bit 5 of Status1 SPOperlnv BOOL SPOper lt SPLLimit or gt SPHLimit Limit value used for SP Bit 6 of Status1 SPCascadelnv BOOL SPCascade lt SPLLimit or gt SPHLimit Limit value used for SP Bit 7 of Status SPLimitsInv BOOL Limits invalid SPLLimit lt PVEUMin SPHLimit gt PVEUMax or Bit 8 of Status1 SPHLimit lt SPLLimit If SPHLimit lt SPLLimit then limit value using SPLLimit RatioLimitsInv BOOL Ratio high low limits invalid low limit lt 0 or high limit lt low _ Bit 9 of Status1 limit RatioProginv BOOL RatioProg lt RatioLLimit or gt RatioHLimit Limit value used for Bit 10 of Status1 Ratio RatioOperinv BOOL RatioOper lt RatioLLimit or gt RatioHLimit Limit value used for Bit 11 of Status1 Ratio Publication 1756 RMO06G EN P September 2010 159 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC IMC Output Parameter Type Description Valid and Default Values CVProginv BOOL CVProg lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when Bit 12 of Status CVManLimiting is TRUE Limit value used for CV CVOperlnv BOOL CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when Bit 13 of Status1 CVManLimiting is TRUE Limit value used for CV CVOverrideValuelnv BOOL CVOverrideValue lt
237. d the instruction clamps KpInRange at the limits and sets the appropriate bit in Status Not used when NonLinearMode is cleared Valid any float gt 0 0 Default maximum positive float ShapeWldPlus REAL The positive Wid shaping gain multiplier Used when In is 0 If invalid the instruction clamps ShapeWldPlus at the limits and sets the appropriate bit in Status Not used when NonLinearMode is cleared Valid 0 0 to 10 0 Default 1 0 ShapeWldMinus REAL The negative Wld shaping gain multiplier Used when In is lt 0 If invalid the instruction Publication 1756 RMO06G EN P September 2010 clamps ShapeWldMinus at the limits and sets the appropriate bit in Status Not used when NonLinearMode is cleared Valid 0 0 to 10 0 Default 1 0 249 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Input Parameter Data Type Description WldInRange REAL The integral gain shaping range Defines the range of In error over which integral gain increases or decreases as a function of the ratio of In WidInRange When In gt WidInRange the instruction limits In to WidInRange when calculating integral error If invalid the instruction clamps WldInRange at the limits and sets the appropriate bit in Status Not used when NonLinearMode is cleared Valid any float gt 0 0 Default maximum positive float NonLinearMode BOOL Enable the non linear gain mode When set the instruction uses
238. d SP Values to Percent on page 91 EPercent REAL The error expressed as a percent of span Refer to Converting the PV and SP Values to Percent on page 91 CV1WindupHOut BOOL CV1 Windup high indicator TRUE when either a SP high or CV1 high low limit has been reached This signal will typically be used by the WindupHIn input to limit the windup of the CV1 output on a primary loop Refer to Primary Loop Control on page 98 CV2WindupHOut BOOL CV2 Windup high indicator TRUE when either a SP high or CV2 high low limit has been reached This signal will typically be used by the WindupHIn input to limit the windup of the CV2 output on a primary loop Refer to Primary Loop Control on page 98 CV3WindupHOut BOOL CV3 Windup high indicator TRUE when either a SP high or CV3 high low limit has been reached This signal will typically be used by the WindupHIn input to limit the windup of the CV3 output on a primary loop Refer to Primary Loop Control on page 98 188 Publication 1756 RMO06G EN P September 2010 CC Output Parameter CV1WindupLOut Data Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description CV1 Windup low indicator TRUE when either a SP or CV1 low limit has been reached This signal will typically be used by the WindupLIn input to limit the windup of the CV1 output ona primary loop Refer to Primary Loop Control on page 98 Values Chapter 2 C
239. d to set the CV3LAlarm Valid 0 0 CV3LLimit lt output It is also used for limiting CV3 when in Auto mode or CV3HLimit in Manual mode if CVManLimiting is TRUE Default 0 0 e f CVLLimit lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status e f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 CV1ROCPosLimit REAL CV1 rate of change limit in percent per second Rate of Valid 0 0 to maximum positive change limiting is only used when in Auto mode or in Manual float mode if CVManLimiting is TRUE A value of zero disables CV1 ROC limiting Default 0 0 If value of CVROCLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Change Limiting on page 96 CV2ROCPosLimit REAL CV2 rate of change limit in percent per second Rate of Valid 0 0 to maximum positive change limiting is only used when in Auto mode or in Manual float mode if CVManLimiting is TRUE A value of zero disables CV2 ROC limiting Default 0 0 If value of CVROCLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Change Limiting on page 96 CV3ROCPosLimit REAL CV3 rate of change limit in percent per second Rate of Valid 0 0 to maximum positive change limiting is only used when in Auto mode or in Manual mode if CVManLimiting is TRUE A value of zero disables CV3 ROC limiting If value of CVRO
240. dEnable parameter If HoldMode is set when HoldEnable is set and Rate 0 the instruction holds Out constant In this situation the instruction holds Out as soon as HoldEnable is set the JerkRate is ignored and Out produces a corner in its profile If HoldMode is cleared when HoldEnable is set the instruction uses the JerkRate to bring Out to a constant value Out is held when Rate 0 Do not change HoldMode once HoldEnable is set because the instruction will ignore the change Default is cleared HoldEnable BOOL S Curve hold enable parameter When set Out is held When cleared Out moves from its current value until it equals In Default is cleared TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp Output Parameter EnableOut DINT Data Type BOOL Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Description Enable output S_Mode BOOL S_Mode Output When Jerk DeltaT lt Rate and Rate lt Accel or Decel S_Mode is set Otherwi
241. dband ZCOff is cleared ZCDeadband gt 0 E has crossed zero and E lt ZCDeadband 7CDeadBandOn ZCOff is set ZCDeadband gt 0 and E lt ZCDeadband ZCDeadBandOn is set i 1 is cleared En gt ZCDeadband CVh 1 Select set Output gt calculated CV Select cleared CV based on state of ZCDeadbandOn ZCDeadbandOn Select CV CV when ZCDeadbandOn is set 1 When ZCOff is cleared ZCDeadband gt 0 error has crossed zero for the first time for example E 0 and E lt 0orwhenE lt OandE gt 0 and E lt ZCDeadband the instruction sets ZCDeadbandOn 2 On the transition to Auto or Cascade Ratio mode the instruction sets E E The instruction disables the zero crossing algorithm and clears ZCDeadbandOn under these conditions e during instruction first scan e ZCDeadband lt 0 e Auto or Cascade Ratio is not the current mode e PVFaulted is set e PVSpanInv is set Publication 1756 RMO06G EN P September 2010 93 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Feedforward Control Compute CV by summing CV from the zero crossing algorithm with AFE The value of AFF FF FF When FFSetPrevious is set PF FFPrevious This lets you preset FF 1 to a specified value before the instruction calculates the value of AFE CV value based on the state of ZCDeadbandOn
242. dband calculation Default is cleared PVHHLimit REAL PV high high alarm limit value scaled in PV units Valid any float Default maximumimum positive float PVHLimit REAL PV high alarm limit value scaled in PV units Valid any float Default maximumimum positive float PVLLimit REAL PV low alarm limit value scaled in PV units Valid any float Default maximumimum negative float PVLLLimit REAL PV low low alarm limit value scaled in PV units Valid any float Default maximumimum negative float PVDeadband REAL PV alarm limit deadband value scaled in PV units Deadband is the delta value between the turn on and turn off value for each of the PV alarm limits If PVDeadband lt 0 0 the instruction sets the appropriate bit in Status and limits PVDeadband to zero Valid 0 0 to maximumimum positive float Default 0 0 PVROCPosLimit REAL PV positive rate of change alarm limit The limit value for a positive increasing change in PV scaled in PV units per seconds Enter 0 0 to disable positive PVROC alarm checking If PVROCPosLimit lt 0 0 the instruction sets the appropriate bit in Status and disables PVROC checking Valid 0 0 to maximumimum positive float Default 0 0 PV second PVROCNegLimit Publication 1756 RMO06G EN P September 2010 REAL PV negative rate of change alarm limit The limit value for a negative decreasing change in
243. dicates this programming language relay ladder structured text function block Publication 1756 RMO06G EN P September 2010 Common Information for All Instructions Conventions and Related Terms Publication 1756 RMO06G EN P September 2010 Preface The Logix5000 instruction set has some common attributes For this information common attributes See this appendix appendix Common Attributes defines e arithmetic status flags e data types e keywords function block attributes Set and clear appendix Function Block Attributes defines e program and operator control e timing modes This manual uses set and clear to define the status of bits booleans and values non booleans This term Means set the bit is set to 1 ON a value is set to any non zero number clear the bit is cleared to 0 OFF all the bits in a value are cleared to 0 If an operand or parameter supports more than one data type the bold data types indicate optimal data types An instruction executes faster and requires less memory if all the operands of the instruction use the same optimal data type typically DINT or REAL Relay ladder rung condition The controller evaluates ladder instructions based on the rung condition preceding the instruction rung condition in Based on the rung condition in and the instruction the controller sets the rung condition following the instruction rung condition out which
244. ds float Default 0 0 CV2RespTC REAL The tuning parameter that determines the speed of the control Valid 0 0 to maximum positive variable action for CV2 in seconds float Default 0 0 CV3RespTC REAL The tuning parameter that determines the speed of the control Valid 0 0 to maximum positive variable action for CV3 in seconds float Default 0 0 ActistCV DINT The first CV to act to compensate for PV SP deviation Valid 1 3 Default 1 1 CV1 2 CV2 3 CV3 Act2ndCV DINT The second CV to act to compensate for PV SP deviation Valid 1 3 Default 2 1 CV1 2 CV2 3 CV3 Publication 1756 RMO06G EN P September 2010 179 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Input Parameter Data Type Description Values Act3rdCV DINT The third CV to act to compensate for PV SP deviation Valid 1 3 Default 3 1 CV1 2 CV2 3 CV3 Target1stCV DINT The CV with top priority to be driven to its target value Valid 1 3 Default 1 1 CV1 2 CV2 3 CV3 Target2ndCV DINT The CV with second highest priority to be driven to its target Valid 1 3 value Default 2 1 CV1 2 CV2 3 CV3 Target3rdCV DINT The CV with third highest priority to be driven to its target value Valid 1 3 1 CV1 2 CV2 3 CV3 Default 3 TargetRespTC Determines the speed in seconds with which the control Valid 0 0 to maximum positive variables approach the target values float Default
245. e 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 Publication 1756 RM006G EN P September 2010 333 Chapter 5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Input Parameter Data Type Description OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred IncRatelnv Status 1 BOOL IncRate lt 0 The instruction uses 0 DecRate Status 2 BOOL DecRate lt 0 The instruction uses 0 TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Att
246. e If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 218 Publication 1756 RMO06G EN P September 2010 MMC Input Parameter ProgCV3AutoReq Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description Program Auto mode request for CV3 Set TRUE by the user program to request Auto mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Values Default FALSE Chapter 2 ProgCV1ManualReq BOOL Program Manual mode request for CV1 Set TRUE by the user program to request Manual mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Default FALSE ProgCV2ManualReq BOOL Program Manual mode request for CV2 Set TRUE by the user program to request Manual mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Default FALSE ProgCV3ManualReq BOOL Program Manual mode request for CV3 Set TRUE by the user program to request Manual mode If value of HandFB lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Operating modes on page 86 Default FALSE ProgCV10OverrideReq BOOL Program Override mode request for CV1 Set T
247. e this block may provide the regulating characteristics required for stable control 285 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN 2 Determine the natural frequency of the system process This can may be arrived at empirically or it might be measured on site Adjust WLead so that it corresponds with or is slightly ahead of the natural frequency of the process itself 3 Tune damping factor Zlead so that it cancels out any of the overshoot in the system 4 Move WLag out far enough past the system crossover frequency gt 5 times and begin increasing overall Gain to achieve desired system response Structured Text SOC_01 In Process Error SOC_01 Initialize Regulator Enable Not SOC_01 Gain Gain SOC_01 WLag Lag Radians per sec SOC_01 WLead Lead radians per sec SOC_01 ZetaLead Damping Factor SOC_01 HighLimit Max Out SOC_01 LowLimit Min Out SOC SOC_01 SOC Out SOC_01 0ut Function Block Second Order Controller Regulator_Enable_Not SS eS ee a a Initialize Sain D C Gain Lag_Radians_persec gt 1 Wag Lead_Radians_per_see p 4 WLead Damping Factor_9 ZetaLea Max_ut OD c HighLimit Min_Out OD C LowLimit 286 Publication 1756 RM006G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Up Down Accumulator The UPDN instruction adds and subtr
248. e 2 If you want this Enter this structured text Move ASCII characters from a SINT array into a string tag In element number 0 a SINT array each element holds one character Stop when you reach the carriage return 1 Initialize Element_number to 0 While SINT array element number lt gt 13 do 2 Count the number of elements in S N7_array array j DATA el that contains the ASCII characters and store the result ee a E in SINT_array_size DINT tag SITTA y S EMEN e AMUMI SEJ 3 If the character at S NT_arrayfelement_number 13 element number element number 1 decimal value of the carriage return then stop SIZE SINT array 0 SINT array size 4 Set String_taglelement_number the character at String_tag LEN element_number SINT_arraylelement_number If element_number SINT array size then 5 Add 1 to element_number This lets the controller check the next character in S NT_array exit 6 Set the Length member of String_tag end if element_number This records the number of characters in String_tag so far end while 7 If element_number SINT_array_size then stop You are at the end of the array and it does not contain a carriage return 8 Go to 3 Publication 1756 RMO06G EN P September 2010 409 Appendix B Structured Text Programming REPEAT UNTIL Use the REPEAT UNTIL loop to keep doing something until conditions are true Operand
249. e 2nd CV for PV1 CV3 pressure setpoint Active 3rd CV for PV1 CV2 steam flow Active 1st CV for PV2 CV2 Active 2nd CV for PV2 CV3 Active 3rd CV for PV2 CV1 TargetCV CV3 pressure should be held constant if possible CV3Target 60 of pressure range The MMC calculates CV1 CV2 and CV3 so that the control goals are accomplished in the following order of importance 1 Control PV1 to SP1 PV1 is always considered more important than PV2 2 Control PV2 to SP2 3 Control CV3 to its target value CV 1 is selected as the most active control for PV1 and CV2 as the most active for PV2 If either CV1 or CV2 saturates or is put in Manual mode the control variable will use CV3 to maintain PV1 and PV2 at the setpoints Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Function Block Tuning The MMC function block is equipped with an internal tuner modeler The purpose of the tuner is to identify the process model parameters and to use these parameters as internal model parameters gain time constant and deadtime The tuner also calculates an optimal response time constant Set the tuner by configuring the following parameters for each CV PV process ProcessType Integrating level position control or nonintegrating flow pressure control ProcessGainSign Set to indicate a negative process gain increase in output causes a decrease in PV reset
250. e Array SoakValue BF Soak Time Array SoakTime a PY Units gallons Cancel Apply Configure this property Ramp Value Array To specify the array in the controller that contains the ramp values Soak Value Array array in the controller that contains the soak values Soak Time Array array in the controller that contains the soak times PV Units units that are displayed in the control 433 Appendix D Function Block Faceplate Controls D2SD Control 434 2 State Device D25D1 Open Opened NP Close Fault Alarm ey UrAletch Mode Alarm A Status Ok Feature on control Mode Mode Operator Hand Program Operator ala Bhs 4 asi Au Displays the mode of the block State Buttons open or closed state of the Commanded State Label as defined in the control s property page The top button sets Oper1 Req The bottom button sets OperOReq When clicked the button sets the OperReg field for that particular state Ordered State Indicator value of the Command Status by pointing to the request button for that state Actual State Indicators status of the actual state If DeviceStatus is set the actual state is as configured for the given state Non Permissive Indicator letters NP to the left of the button if the StatePerm is not set for that state Fault Alarm Indicator indicator if FaultAlarm is set Mode Alarm Indica
251. e True at start of CV2 PV1 Autotuning or during CV2 PV1 Autotuning When True CV2 PV1 Autotuning is not started or is aborted U Bit 5 of AtuneCV2PV1Status AtuneCV3PV1LimitsFault BOOL CV3LimitsInv and CVManLimiting are True at start of CV3 PV1 Autotuning or during CV3 PV1 Autotuning When True CV3 PV1 Autotuning is not started or is aborted Bit 5 of AtuneCV3PV1Status AtuneCV1PV1InitFault BOOL CV Initializing is True at start of CV1 PV1 Autotuning or during CV1 PV1 Autotuning When True CV1 PV1 Autotuning is not started or is aborted Bit 6 of AtuneCV1PV1Status AtuneCV2PV1InitFault BOOL CV2Initializing is True at start of CV2 PV1 Autotuning or during CV2 PV1 Autotuning When True CV2 PV1 Autotuning is not started or is aborted Publication 1756 RMO06G EN P September 2010 Bit 6 of AtuneCV2PV1Status 233 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Output Parameter Type Description Values AtuneCV3PV1InitFault BOOL CV3lnitializing is True at start of CV3 PV1 Autotuning or during Bit 6 of AtuneCV3PV1Status CV3 PV1 Autotuning When True CV3 PV1 Autotuning is not started or is aborted AtuneCV1PV1EUSpanChanged BOOL CVEUSpan or PVEUSpan changes during CV1 PV1 Autotuning Bit 7 of AtuneCV1PV1St
252. e 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 Refer to Selecting the Setpoint on page 87 SPPercent REAL The value of SP expressed in percent of span of PV SPPercent SP PVEUMin 100 PVSpan SPHAlarm 156 BOOL SP high alarm indicator TRUE when the SP SPHLimit Publication 756 RMO06G EN P September 2010 IMC Output Parameter SPLAlarm Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description SP low alarm indicator TRUE when the SP lt SPLLimit Valid and Default Values Chapter 2 PVPercent REAL PV expressed in percent of span PVPercent PV PVEUMin 100 PVSpan PV Span calculation PVSpan PVEUMax PVEUMin REAL Process error Difference between SP and PV scaled in PV units Refer to Converting the PV and SP Values to Percent on page 91 EPercent REAL The error expressed as a percent of span Refer to Converting the PV and SP Values to Percent on page 91 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 Refer to Primary Loop Control on page 98 WindupHOut BOOL Windup high indica
253. e forces and excessive impact on connected machinery and equipment Structured Text SSUM 01 In1 Master reference SSUM_01 Selectl master select SSUM_01 In2 Jog reference SSUM_01 Select2 jog select SSUM SSUM_01 select _out SSUM 01 0ut SCRV_01 In select out SCRV_01 AccelRate accel SCRV_01 DecelRate accel SCRV_01 JerkRate jerk rate SCRV SCRV_01 scurve out SCRV_01 0ut Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Function Block SSUM_04 SSUM Cj int Out D Fa p aid seet SCRV_01 Q In2 rana oq ad sereoo jog_select z we scurne_out C AccelRate C DecelRate Q JekRate accel f s w f w Step change from i Y 0 to 70 000 units r k f i a sii F a ve N Accel decel rate 50 000 units sec vA N Jerk rate 30 000 units sec Accel decel rate 50 000 units sec Jerk rate 3 000 units sec3 Publication 1756 RM006G EN P September 2010 277 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Second Order Controller SOC Operands SOC SOC_tag soc_o1 soc Second Order Controller In Out Input Parameter Enableln Data Type BOOL The SOC instruction is designed for use in closed loop control systems in a similar manner to the PI instruction The SOC instructio
254. e from current states by more than specified CV units at each scan Set the CVnROCPosLimit and CVnROCNegLimit to limit the CV rate of change Rate limiting is not imposed when control variable is in Manual mode unless CVManLimiting is set CC Function Block Tuning The function block is equipped with an internal tuner modeler The purpose of the tuner is to identify the process model parameters and to use these parameters as internal model parameters gain time constant and deadtime The tuner also calculates an optimal response time constant Set the tuner by configuring the following parameters for each CV PV process ProcessType Integral level position control or nonintegrating flow pressure control ProcessGainSign 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 ResponseSpeed slow medium or fast based on control objective 165 Chapter 2 166 Advanced Process Control Function Blocks IMC CC MMC ProcessType Integral level position control or nonintegrating flow pressure control NoiseLevel an estimate of noise level on PV low medium or high such that the tuner can distinguish which PV change is a random noise and which is caused by the CV step change StepSize a nonzero positive or negative number defining the magnitude of CV step change in either positive or negat
255. e invalid value and sets the arithmetic overflow status flag The internal parameters are not updated In each subsequent scan the output is computed using the internal parameters from the last scan when the output was valid Limiting The INTG instruction performs windup limiting to stop Out from changing based on the state of the HoldHigh and HoldLow inputs If HoldHigh is set and Out gt Out _ then Out Out _ If HoldLow is set and Out lt Out _ then Out Out 1 The INTG instruction also performs output limiting using HighLimit and LowLimit If Out 2 HighLimit then Out HighLimit and HighAlarm is set If Out lt LowLimit then Out LowLimit and LowAlarm is set Arithmetic Status Flags Arithmetic status flags are set for the Out output 244 Fault Conditions none Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan The internal parameters and Out are set to 0 The internal parameters and Out are set to 0 The control algorithm is not executed The control algorithm is not executed instruction first run The internal parameters and Out are set 0 The internal parameters and Out are set 0 The control algorithm is not executed The control algorithm is not executed Enableln is cleared EnableOut is cleared the instruct
256. e is fully opened or closed are wired into the OpenedFB and ClosedFB inputs The OpenOut and CloseOut outputs are wired to the open and close contacts on the motor operated valve Structured Text FlowController PV WaterFlowRate PIDE FlowController FlowValve SP FlowController CVEU FlowValve Position FlowValve OpenedFB FlowValve ClosedFB POSP FlowValve OpenFlowValveContact CloseFlowValveContact Publication 1756 RMO06G EN P September 2010 FlowValvePosition FlowValveOpened FlowValveClosed FlowValve OpenoOut FlowValve CloseOut 105 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Function Block Flow Controller Flow valve PIDE POSP Enhanced PID Position Proportional SPProg FlowValvePosition OD g Position Close Out EL Close Flow valveContact SPCascade Flow valve Opened E OpenedFB RatioProg E ClosedF B C vProg FF HandFB PYROCPosAarm 5 ProgProgReq PYROCNegAanm Prog OperReq DewHHAam a ProgCas RatReq DevHAarm hy ProgAuto Req ProghtanualReq DewLLAanm Prog Override Req ProgOper 3 ProgHandReq 106 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Ramp Soak RMPS Operands RMPS RMPS_tag RampValue SoakValue SoakTime RMPS_04 RMPS E Ra
257. e or a secondary loop Arithmetic flags will be set for this output if configured as PV1Act1stCV CV1EU CV1 CVEUSpan 100 CV1EUMin CVEU span calculation CVEUSpan CVEUMax CVEUMin CV2EU REAL Scaled control variable output for CV2 Scaled by using CV2EUMax and CV2EUMin where CV2EUMax corresponds to 100 and CV2EUMin corresponds to 0 This output is typically used to control an analog output module or a secondary loop Arithmetic flags will be set for this output if configured as PV1Act1stCV CV2EU CV2 CVEUSpan 100 CV2EUMin CVEU span calculation CVEUSpan CVEUMax CVEUMin CV3EU REAL Scaled control variable output for CV3 Scaled by using CV3EUMax and CV3EUMin where CV3EUMax corresponds to 100 and CV3EUMin corresponds to 0 This output is typically used to control an analog output module or a secondary loop Arithmetic flags will be set for this output if configured as PV1Act1stCV CV3EU CV CVEUSpan 100 CV3EUMin CVEU span calculation CVEUSpan CVEUMax CVEUMin CVI REAL Control variable output for CV1 This value will always be expressed as 0 100 CV1 is limited by CV1HLimit and CV1LLimit when in Auto mode or in Manual mode if CVManLimiting is TRUE otherwise limited by 0 and 100 Refer to Selecting the Control Variable on page 94 CV2 REAL Control variable output for CV2 This value will always be expressed as 0 100 CV2 is l
258. e output of the loop e f value of CVxOverrideValue lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 CV20verrideValue 208 REAL CV2 Override value e CV2 is set to this value when in Override mode This value should correspond to a safe state output of the loop e f value of CVxOverrideValue lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 Publication 1756 RMO06G EN P September 2010 MMC Input Parameter CV30verrideValue Type REAL Advanced Process Control Function Blocks IMC CC MMC Chapter 2 Description CV3 Override value e CV3 is set to this value when in Override mode This value should correspond to a safe state output of the loop e f value of CVxOverrideValue lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 Values Valid 0 0 100 0 Default 0 0 CVManLimiting BOOL Limit CV n where n can be 1 2 or 3 in Manual mode If Manual mode and CVManLimiting is TRUE CV n will be limited by the CV n HLimit and CV n LLimit values Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 Default FALSE CV1EUMax REAL Maximum value f
259. e response will be The response time constant should be set such that the PV reaches the setpoint in a reasonable time based on the process dynamics The larger that the response time constant is the slower the control variable response will be but the control variable also becomes more robust Refer to IMC Function Block Tuning on page 143 In the Manual mode the CV is set equal to the operator entered or program generated CVOper or CVProg parameter For the Manual to Auto mode bumpless transfer and for safe operation of the control variable the CV rate of change limiter is implemented such that the CV cannot change from its current state any faster than the rate of change limit parameter specified Set the CVROCPosLimit and CVROCNegLimit to limit the CV rate of change Rate limiting is not imposed when the control variable is in Manual mode unless CVManLimiting is set Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 IMC Function Block Tuning The function block is equipped with an internal tuner modeler The purpose of the tuner is to identify the process model parameters and to use these parameters as internal model parameters gain time constant and deadtime The tuner also calculates an optimal response time constant Set the tuner by configuring the following parameters ProcessType Integral level po
260. e the option of programming the ramp in units of time or rate All segments must be programmed in the same units The following table describes the ramping options Parameter Description time based ramping TimeRate is set for time based ramping in minutes The rate of change for the current segment is calculated and either added or subtracted to Out until Out reaches the current segments soak value In the following equation DeltaT is the elapsed time in minutes since the instruction last executed Eee R SoakValue c rrentSeg RampStart ae RampValue currentSeg Where RampStart is the value of Out at the start of the Current Segment rate based ramping TimeRate is cleared for rate based ramping in units minute The programmed rate of change is either added or subtracted to Out until Out reaches the current segment s soak value In the following equation Deltal is the elapsed time in minutes since the instruction last executed Out Out RampValue cyrrentseg x At Guaranteed ramping Set the input GuarRamp to enable guaranteed ramping When enabled the instruction monitors the difference between Out and PV If the difference is outside of the programmed RampDeadband the output is left unchanged until the difference between PV and Out are within the deadband The output GuarRampOn is set whenever Out is held due to guaranteed ramping being in effect Soaking Soaking is the amount of time the block output is to remain unch
261. e time accumulator Clear CoolOut if the internal cycle timer gt CoolTime e Clear HeatOut and CoolOut if CycleTime 0 Arithmetic Status Flags Arithmetic status flags are set for the HeatTimePercent and CoolTimePercent outputs Fault Conditions none 128 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Execution Condition Structured Text Action Function Block Action HeatOut and CoolOut are cleared HeatOut and CoolOut are cleared prescan instruction first scan The internal cycle timer is reset The internal cycle timer is reset instruction first run No action taken No action taken Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes EnableOut is set Enableln is always set he instruction executes postscan No action taken No action taken Example place the PIDE instruction in a slow lower priority task place the SRTP instruction in a faster higher priority task Publication 1756 RMO06G EN P September 2010 In this example the PIDE instruction executes in a slow lower priority task because it is a slow temperature loop The output of the PIDE instruction is a controller scoped tag because it becomes the input to an SRTP instruction T
262. eam valve when the steam flow drops before the liquid temperature in the tank drops To implement a cascaded loop use a PIDE instruction to control the steam valve opening based on a process variable signal from a steam flow transmitter This is the secondary loop of the cascaded pair A second PIDE instruction called the primary loop uses the liquid temperature as a process variable and sends its CV output into the setpoint of the secondary loop In this manner the primary temperature loop asks for a certain amount of steam flow from the secondary steam flow loop The steam flow loop is then responsible for providing the amount of steam requested by the temperature loop in order to maintain a constant liquid temperature Structured Text PrimaryLoop PV Local 1 1 CHOData PrimaryLoop CVInitReq SecondaryLoop InitPrimary PrimaryLoop CVInitValue SecondaryLoop SP PrimaryLoop WindupHIn SecondaryLoop WindupHoOut PrimaryLoop WindupLiIn SecondaryLoop WindupLOut PIDE PrimaryLoop SecondaryLoop PV Local 1 1 Ch1Data SecondaryLoop SPCascade PrimaryLoop CVEU PIDE SecondaryLoop Local 2 0 ChOData SecondaryLoop CVEU Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Function Block 0 0 Local 1 1 Ch1 Data m Primary Loop Secondary Loop PIDE P
263. eared when FaultAlarmLatch is set unless FaultAlmUnlatch is set and no fault is present Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Publication 1756 RMO06G EN P September 2010 Mode alarm conditions The mode alarm reminds an operator that a device has been left in operator control The mode alarm only turns on when in operator control mode the program tries to change the state of the device from the operator s commanded state The alarm does not turn on if an operator places a device in operator mode and changes the state The D2SD instruction checks for mode alarm conditions using these rules ModeAlarm When set ProgCommand ProgCommand and ProgCommand CommandStatus cleared ProgCommand CommandStatus or the device is in override hand or program control mode 37 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Discrete 3 State Device D3SD Operands D3SD D3SD_ tag D3SD_01 D3SD E Discrete 3 State Device ProgOCommand Out D E ProgiCommand Outi E Prog2Command E StateOPerm State1Perm E State2Perm FB0 g FB1 c FB2 E FBS E HandF BO E HandFB1 HandFB2 E ProgProgReq E ProgOperReq E ProgOverrideReq ProgHandReq Out fA DeviceO State D Device1State Device2State D
264. easing in value likewise a CV low or high limit does not prevent SP from increasing in value The instruction clears WindupLOut when SPLAlarm is cleared and not ControlAction is cleared and CVLAlarm is set and not ControlAction is set and CVHAlarm is set Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Fault condition Chapter 1 Processing Faults The following table describes how the instruction handles execution faults Action CVFaulted e Instruction is not initialized CVInitializing is cleared e Compute PV and SP percent calculate error update internal parameters for EPercent a and PVPIDPercent e PID control algorithm is not executed CVEUSpanInv e Disable the Auto and Cascade Ratio modes If Override or Hand is not the current mode set to Manual mode aoe e Set CV to value determined by Program or Operator control and mode Manual Override or Hand CVinitRequest e Refer to Execution on page 80 PV Health Bad e Disable the Auto and CasRat modes If Override or Hand is not the current mode then set to the Manual mode e Set PV high low PV rate of change and deviation high low alarm outputs FALSE e PID control algorithm is not executed e Set CV to value by determined by Program or Operator control and mode Manual Override or Hand PVFaulted is set e Disable the Auto and Cascade Ratio modes If Override or
265. ect to use of information circuits equipment or software described in this manual Reproduction of the contents of this manual in whole or in part without written permission of Rockwell Automation Inc is prohibited Throughout this manual when necessary we use notes to make you aware of safety considerations WARNING Identifies information about practices or circumstances that can cause an explosion in a hazardous environment which may lead to personal injury or death property damage or economic loss ATTENTION Identifies information about practices or circumstances that can lead to personal injury or death property damage or economic loss Attentions help you identify a hazard avoid a hazard and recognize the consequence SHOCK HAZARD Labels may be on or inside the equipment for example a drive or motor to alert people that dangerous voltage may be present BURN HAZARD Labels may be on or inside the equipment for example a drive or motor to alert people that surfaces may reach dangerous temperatures PP E gt IMPORTANT Identifies information that is critical for successful application and understanding of the product Allen Bradley Rockwell Software Rockwell Automation Logix5000 RSLogix 5000 PowerFlex 700 and TechConnect are trademarks of Rockwell Automation Inc Trademarks not belonging to Rockwell Automation are property of their respective companies Rockwell Automation Inc wishes
266. ed in CV3EU units When CV3lnitializing is TRUE set CV3EU equal to CV3lnitValue and CV3 to the corresponding percentage value CV3InitValue will normally come from the feedback of the analog output controlled by CV3EU or from the setpoint of a secondary loop Refer to CVEU Span Invalid on page 80 The instruction initialization is disabled when CVFaulted or CVEUSpanInv are TRUE Refer to Instruction First Scan on page 80 Valid any float Default 0 0 CV1Prog REAL CV1 Program Manual value CV1 is set to this value when in Program control and Manual mode Refer to Updating the CVOper and C VProg Values on page 97 Valid 0 0 100 0 Default 0 0 CV2Prog REAL CV2 Program Manual value CV2 is set to this value when in Program control and Manual mode Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 CV3Prog REAL CV3 Program Manual value CV3 is set to this value when in Program control and Manual mode Refer to Selecting the Control Variable on page 94 Publication 1756 RMO06G EN P September 2010 Valid 0 0 100 0 Default 0 0 207 Chapter 2 MMC Input Parameter CV10per Type REAL Advanced Process Control Function Blocks IMC CC MMC Description CV1 Operator Manual value e CV1 is set to this value when in Operator control and Manual mode If not Operator Manual mode set CV1 Oper to the value o
267. ed on an operator interface display Structured Text SCL_01 In InputOFrom17711FE SCL SCL_01 ALM 01 In SCL _01 0Out ALARM ALM_01 Function Block SCL_01 ALM 01 b HAlarm LAlarm LLAlarm ROCPosAlarm D ROCNegA icy 28 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Discrete 2 State Device D2SD Operands D2SD D2SD_ tag D2SD_01 D250 E Discrete 2 State Device ProgCommand State0Perm State1Perm j HandFB E ProgProgReq ProgOperReq DeviceOState D Device1State D CommandStatus D FaultAlarm f ModeAlarm Fj ProgOper D Override D E ProgOverrideReg j ProgHandReg Input Parameter Enableln Data Type BOOL Chapter 1 The D2SD instruction controls a discrete device which has only two possible states such as on off open closed Structured Text mo o o Operand D25D tag Description D2SD structure DISCRETE_2STATE Function Block D2SD tag DISCRETE_2STATE D2SD structure DISCRETE_2STATE Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes ProgCommand BOOL Used to determine CommandStatus when the device is in Program control When set
268. ed or is aborted Bit 6 of AtuneCV3PV2Status AtuneCV1PV2EUSpanChanged BOOL CVEUSpan or PVEUSpan changes during CV1 PV2 Autotuning When True CV1 PV2 Autotuning is aborted Bit 7 of AtuneCV1PV2Status AtuneCV2PV2EUSpanChanged BOOL CVEUSpan or PVEUSpan changes during CV2 PV2 Autotuning When True CV2 PV2 Autotuning is aborted Bit 7 of AtuneCV2PV2Status AtuneCV3PV2EUSpanChanged BOOL CVEUSpan or PVEUSpan changes during CV3 PV2 Autotuning When True CV3 PV2 Autotuning is aborted Bit 7 of AtuneCV3PV2Status AtuneCV1PV2Changed BOOL CV10per is changed when in Operation control or CV1Prog is changed when in Program control or CV1 becomes high low or ROC limited during CV1 PV2 Autotuning When True CV1 PV2 Autotuning is aborted Publication 1756 RMO06G EN P September 2010 Bit 8 of AtuneCV1PV2Status 235 Chapter 2 MMC Output Parameter AtuneCV2PV2Changed Type BOO L Advanced Process Control Function Blocks IMC CC MMC Description CV2Oper is changed when in Operation control or CV2Prog is changed when in Program control or CV2 becomes high low or ROC limited during CV2 PV2 Autotuning When True CV2 PV2 Autotuning is aborted Values Bit 8 of AtuneCV2PV2Status AtuneCV3PV2Changed BOO L CV30per is changed when in Operation control or CV3Prog is changed when in Program control or CV3 becomes high low or ROC limited during CV3 PV2 Autotuning When True
269. eft and Out outputs When the instruction is placed in Auto mode the ramp soak function resumes with the values last input from the operator CurrentSegOper and SoakTime are not transferred if they are invalid To facilitate a bumpless transition into Manual mode the CurrentSegOper SoakTimeOper and QutOper inputs are continuously updated to the current values of CurrentSeg SoakTimeLeft and Out whenever the instruction is not in Operator Manual mode Publication 1756 RMO06G EN P September 2010 117 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT 118 return from Manual or Hold mode Executing the ramp soak profile The following diagram illustrates how the RMPS instruction executes the ramp soak profile Out SoakValue of CurrentSegment eo Ramp return from Manual or Hold mode Out SoakValue of CurrentSegment SoakTimeLeft gt 0 m SoakTimeLeft 02 4 cyclic execution of profile complete Soak return from Manual or Hold mode Out SoakValue of CurrentSegment SoakTimeLeft 0 Out SoakValuel single execution of profile complete 1 The Ramp is complete when Out SoakValue If during ramp execution Out gt SoakValue Out is limited to SoakValue 2 Soaking is complete when Out is held for the amount of time specified in the current segment s SoakTime I
270. eing requested to enter the 1 state when cleared the field device is being requested to enter the 0 state Default is cleared FaultTime REAL Fault time value Configure the value in seconds of the time to allow the device to reach a newly commanded state Set FaultTime 0 to disable the fault timer If this value is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid any float gt 0 0 Default 0 0 FaultAlarmLatch BOOL Fault alarm latch input When set and FaultAlarm is set latch FaultAlarm To unlatch FaultAlarm set FaultAlmUnlatch or clear FaultAlarmLatch Default is cleared FaultAlmUnLatch BOOL Fault alarm unlatch input Set FaultAlmUnLatch when FaultAlarmLatch is set to unlatch FaultAlarm The instruction clears this input Default is cleared OverrideOnlInit BOOL Override on initialization request If this bit is set then during instruction first scan the 2 state device is placed in Operator control Override is set and Hand is cleared If ProgHandReg is set then Override is cleared and Hand is set Default is cleared OverrideOnFault BOOL Override on fault request Set OverrideOnFault if the device should go to Override mode and enter the OverrideState on a fault alarm After the fault alarm is removed the 2 state device is placed in Operator control Default is cleared OutReverse BOOL Reverse default out state The default state of Out is cleared when co
271. elGain is 1 40NAN or 1 4IND Not A Number or Bit 10 of Status3CV1 1 Infinity 00 CV1PV1ModelTClInv BOOL Entered value for CV1 PV1 Model Time Constant lt 0 Bit 11 of Status3CV1 CV1PV2ModelTCInv BOOL Entered value for CV1 PV2 Model Time Constant lt 0 Bit 12 of Status3CV1 CV1PV1ModelDTInv BOOL Entered value for CV1 PV1 Model Deadtime lt 0 Bit 13 of Status3CV1 CV2PV1ModelDTInv BOOL Entered value for CV2 PV1 Model Deadtime lt 0 Bit 13 of Status3CV2 CV1PV2ModelDTInv BOOL Entered value for CV1 PV2 Model Deadtime lt 0 Bit 14 of Status3CV1 CV2PV2ModelDTInv BOOL Entered value for CV2 PV2 Model Deadtime lt 0 Bit 14 of Status3CV2 238 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Output Parameter Type Description Values CV1PV1RespTClinv BOOL Entered value for CV1 PV1 Response Time Constant lt 0 Bit 15 of Status3CV1 CV2PV1RespTCinv BOOL Entered value for CV2 PV1 Response Time Constant lt 0 Bit 15 of Status3CV2 CV1PV2RespTCinv BOOL Entered value for CV1 PV2 Response Time Constant lt 0 Bit 16 of Status3CV1 CV2PV2RespTCinv BOOL Entered value for CV2 PV2 Response Time Constant lt 0 Bit 16 of Status3CV2 CV1TargetInv BOOL Entered value for CV1 Target lt 0 or gt 100 Bit 17 of Status3CV1 CV2TargetInv BOOL Entered value for CV2
272. electing the Setpoint on page 87 SP1Percent REAL The value of SP1 expressed in percent of span of PV1 SP1Percent SP1 PV1EUMin 100 PV1Span SP2Percent REAL The value of SP2 expressed in percent of span of PV2 SP2Percent SP2 PV2EUMin 100 PV2Span SP1HAlarm BOOL SP1 high alarm indicator TRUE when the SP1 gt SP1HLimit SP2HAlarm BOOL SP2 high alarm indicator TRUE when the SP2 gt SP2HLimit SP1LAlarm BOOL SP1 low alarm indicator TRUE when the SP1 lt SP1LLimit SP2LAlarm BOOL SP2 low alarm indicator TRUE when the SP2 lt SP2LLimit PV1Percent REAL PV1 expressed in percent of span PV1Percent PV1 PV1EUMin 100 PV1Span PV Span calculation PVSpan PVEUMax PVEUMin PV2Percent REAL PV2 expressed in percent of span PV2Percent PV2 PV2EUMin 100 PV2Span PV Span calculation PVSpan PVEUMax PVEUMin E1 REAL Process 1 error Difference between SP1 and PV1 scaled in PV1 units Refer to Converting the PV and SP Values to Percent on page 91 E2 REAL Process 2 error Difference between SP2 and PV2 scaled in PV2 units Refer to Converting the PV and SP Values to Percent on page 91 E1Percent REAL Error expressed as a percent of span for process 1 Refer to Converting the PV and SP Values to Percent on page 91 Publication 1756 RM006G EN P September 2010 227 Chap
273. ence in value between the process variable PV and setpoint SP Deviation alarming alerts the operator to a discrepancy between the process variable and the setpoint value The high high to low low alarming algorithm compares the deviation to deviation alarm limits and the deviation alarm limits plus or minus the deadband deviation gt DevHHLimit DevHHAlarm is cleared DevHHAlarm deviation lt DevHHLimit DevDeadband a is set deviation gt DevHLimit DevHAlarm is cleared DevHAlarm deviation lt DevHLimit DevDeadband i is set deviation lt DevLLimit DevLAlarm is cleared DevLAlarm is set deviation gt DevLLimit DevDeadband deviation lt DevLLLimit DevLLAlarm is cleared DevLLAlarm deviation gt DevLLLimit DevDeadband is set 1 During instruction first scan the instruction clears the deviation alarm outputs The instruction also clears the deviation alarm outputs and disables the alarming algorithm when PVFaulted or PVSpanInv is set Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Zero Crossing Deadband Control You can limit CV such that its value does not change when error remains within the range specified by ZCDeadband E lt ZCDea
274. eq set invalid inputs a Program Manual Mode P p Program Hold Mode ProgManualReg is set and ProgHoldReg is cleared q 1 In single non cyclic execution you must toggle ProgAutoReq from cleared to set if one execution of the ramp soak profile is complete and you want another execution of the ramp soak profile 2 When the instruction is configured for single execution and the Auto mode Ramp Soak profile completes the instruction transitions to Hold mode 3 The instruction is placed in Hold mode if PVFaulted is set or any of the following inputs are invalid NumberOfSegs CurrentSeg SoakTimeLeft CurrentSegProg or SoakTimeProg The following table describes the possible Program modes Mode Description Program Auto Mode While in Auto mode the instruction sequentially executes the ramp soak profile Program Manual Mode While in Manual mode the user program directly controls the instruction s Out The CurrentSegProg SoakTimeProg and OutProg inputs are transferred to the CurrentSeg SoakTimeLeft and Out outputs When the instruction is placed in auto mode the ramp soak function resumes with the values last input from the user program CurrentSegProg and SoakTimeProg are not transferred if they are invalid To facilitate a bumpless transition into Manual mode the CurrentSegProg SoakTimeProg and OutProg inputs are continuously updated to the current values of CurrentSeg SoakTimeLeft and Out when ProgValueReset is set and t
275. er 2010 17 Preface Purpose of This Manual This section Instruction name This manual provides a description of each instruction in this format Provides this type of information identifies the instruction defines whether the instruction is an input or an output instruction Operands lists all the operands of the instruction if available in relay ladder describes the operands if available in structured text describes the operands Fal if available in function block describes the operands The pins shown on a default function block are only the default pins The operands table lists all the possible pins for a function block Instruction structure lists control status bits and values if any of the instruction Description describes the instruction s use defines any differences when the instruction is enabled and disabled if appropriate Arithmetic status flags defines whether or not the instruction affects arithmetic status flags see appendix Common Attributes Fault conditions defines whether or not the instruction generates minor or major faults if so defines the fault type and code Execution defines the specifics of how the instruction operates Example 18 provides at least one programming example in each available programming language includes a description explaining each example The following icons help identify language specific information This icon In
276. er 2010 389 Appendix B Structured Text Programming In structured text you use two types of expressions BOOL expression An expression that produces either the BOOL value of 1 true or 0 false e A bool expression uses bool tags relational operators and logical operators to compare values or check if conditions are true or false For example tag1 gt 65 e A simple bool expression can be a single BOOL tag e Typically you use bool expressions to condition the execution of other logic Numeric expression An expression that calculates an integer or floating point value e A numeric expression uses arithmetic operators arithmetic functions and bitwise operators For example tag1 5 e Often you nest a numeric expression within a bool expression For example tag1 5 gt 65 Use the following table to choose operators for your expressions If you want to Then Calculate an arithmetic value Use arithmetic operators and functions on page 391 Compare two values or strings Use relational operators on page 392 Check if conditions are true or false Use logical operators on page 394 Compare the bits within values Use bitwise operators on page 395 390 Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Structured Text Programming Use arithmetic operators and functions Appendix B You can combine multiple operators and functions in arithme
277. er Data Type Description TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode Valid 0 2 Default 0 For more information about timing modes see appendix Function Block Attributes OversampleDT REAL Execution time for oversample mode Valid 0 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the deadtime algorithm Arithmetic status flags are set for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOO The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred InFaulted Status 1 BOO In health is bad Deadtimelnv Status 2 BOO Invalid Deadtime value TimingMode BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set whe
278. erator Control ProgProgReq is set when ProgOperReg is cleared OperProgReq is set when ProgOperReq and OperOperReq are cleared e ooo a t o 1 The instruction remains in operator control mode when ProgOperReg is set Por more information on program and operator control see page 381 The following diagram shows how the TOT instruction changes between Run and Stop modes ProgOper is cleared and OperStartReq is setl Y ProgOper and ProgStartReq are set Stop RunStop is cleared Y Run RunStop is set ProgOper and ProgStopReq are set A ProgOper is cleared and OperStopReq is set InFault is set ew Publication 1756 RMO06G EN P September 2010 a 1 The stop requests take precedence over start requests 2 The first scan in run after a stop the totalization is not evaluated but Inj is updated During the next scan totalization resumes All operator request inputs are cleared at the end of each scan If ProgValueReset is set all program request inputs are cleared at the end of each scan 137 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Resetting the TOT instruction When ProgResetReq transitions to set while ProgOper is set the following happens e OldTotal Total e Total ResetValue e ProgResetDone is set If ProgResetReq is cleared and ProgResetDone is set then ProgRes
279. erface to request Auto mode The function block resets the input to FALSE Refer to Operating modes on page 86 Values Default FALSE Chapter 2 OperCV3AutoReq BOOL Operator Auto mode request for CV3 Set TRUE by the operator interface to request Auto mode The function block sets input to FALSE Refer to Operating modes on page 86 Default FALSE OperCV1 ManualReq BOOL Operator Manual mode request for CV1 Set TRUE by the operator interface to request Manual mode The function block sets input to FALSE Refer to Operating modes on page 86 Default FALSE OperCV2ManualReq BOOL Operator Manual mode request for CV2 Set TRUE by the operator interface to request Manual mode The function block sets input to FALSE Refer to Operating modes on page 86 Default FALSE OperCV3ManualReq BOOL Operator Manual mode request for CV3 Set TRUE by the operator interface to request Manual mode The function block sets input to FALSE Refer to Operating modes on page 86 Default FALSE ProgValueReset BOOL Reset Program control values e When TRUE the Prog_xxx_Req inputs are reset to FALSE e When TRUE and Program control set SPProg equal to SP and CVxProg equal to CVx e When ProgValueReset is TRUE the instruction sets the input to FALSE Refer to Execution on page 80 for more information Default FALSE TimingMode DINT Sele
280. es You can select high low high or low limits Structured Text HLL tag HL_LIMIT HLL structure Function Block HLL tag HL_LIMIT HLL structure HL_LIMIT Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REAL The analog signal input to the instruction Valid any float Default 0 0 HighLimit REAL The high limit for the Input If HighLimit lt LowLimit the instruction sets the appropriate bit in Status and sets Out LowLimit Valid HighLimit gt LowLimit Default maximum positive float LowLimit REAL The low limit for the Input If HighLimit lt LowLimit the instruction sets the appropriate bit in Status and sets Out LowLimit Valid LowLimit lt HighLimit Default maximum negative float SelectLimit Publication 1756 RMO06G EN P September 2010 DINT Select limit input This input has three settings Value Description 0 use both limits 1 use high limit 2 use low limit If SelectLimit is invalid the instruction assumes SelectLimit 0 and sets the appropriate bit in Status Valid 0 to 2 Default 0 327 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Output Parameter Data Type Description EnableOut BOOL Enable output O
281. es a value of zero and sets the appropriate bit in Status Valid 0 0 to maximumOnTime Default 0 0 Deadtime Output Parameter EnableOut REAL Data Type BOOL Additional pulse time in seconds to overcome friction in the device Deadtime is added to the Opentime or CloseTime when the device changes direction or is stopped If this value is invalid the instruction sets the appropriate bit in Status and uses a value of Deadtime 0 0 Valid 0 0 to maximumOnTime Default 0 0 Description Enable output OpenOut BOOL This output is pulsed to open the device CloseOut BOOL This output is pulsed to close the device PositionPercent REAL Position feedback is expressed as percent of the Position span Arithmetic status flags are set for this output SPPercent REAL Setpoint is expressed as percent of the Position span OpenTime REAL Pulse time in seconds of OpenOutput for the current cycle CloseTime REAL Pulse time in seconds of CloseOutput for the current cycle Status DINT Status of the function block InstructFault Status 0 Publication 1756 RMO06G EN P September 2010 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred 101 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE PO
282. es not initialize and the CVEU and CV values are not updated if CVFault or CVEUSpanInv is set Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 When using cascaded PID loops the primary PID loop can be initialized when the secondary loop is initialized or when the secondary loop leaves the Cascade Ratio mode In this case move the state of the InitPrimary output and SP output from the secondary loop to the CVInitReq input and CVInitValue input on the primary loop Example 1 The easiest way to implement a PIDE instruction is to create an function block routine in a program in a periodic task The default timing mode for the PIDE instruction is periodic When the PIDE instruction is used in a periodic task and in periodic timing mode it automatically uses the periodic task s update rate as its DeltaT update time All you need to do is wire the process variable analog input into the PV parameter on the PIDE instruction and wire the CVEU out of the PIDE instruction into the controlled variable analog output Optionally you can wire the analog input s fault indicator if one is available into the PVFault parameter on the PIDE instruction This forces the PIDE into Manual mode when the analog input is faulted and stops the PIDE CVEU output from winding up or down when the PV signal is not available Structured Text PIDE 01 PV L
283. es the loop early Vad BOOL expression false true statement 1 statement 2 statement 3 statement 4 v rest of the routine While the bool_expression is true the controller executes only the statements within the WHILE DO loop Example 1 If you want this The WHILE DO loop evaluates its conditions first If the conditions are true the controller then executes the statements within the loop This differs from the REPEAT UNTIL loop because the REPEAT UNTIL loop executes the statements in the construct and then determines if the conditions are true before executing the statements again The statements in a REPEAT UNTIL loop are always executed at least once The statements in a WHILE DO loop might never be executed Arithmetic Status Flags not affected Fault Conditions A major fault will occur if false lad BOOL expression _____ true statement 1 statement 2 statement 3 statement 4 yes gt Exit Tr v rest of the routine To stop the loop before the conditions are true use an EXIT statement Enter this structured text pos 0 While pos lt 100 lt gt targetvalue do amp structarray pos value pos pos 2 String tag DATA pos SINT array pos end while Fault type Fault code the construct loops too long 6 1 408 Publication 1756 RM006G EN P September 2010 Structured Text Programming Appendix B Exampl
284. et o output not_output 365 Chapter 7 Move Logical Instructions DFF JKFF RESD SETD Set Dominant SETD Operands SETD SETD tag SETD_01 SETD Set Dominant Out f The SETD instruction uses Set and Reset inputs to control latched outputs The Set input has precedence over the Reset input Structured Text Operand Type Format Description SETD tag DOMINANT_SET structure SETD structure Function Block Operand Type Format Description SETD tag DOMINANT_SET structure SETD structure DOMINANT SET Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes Set BOOL Set input to the instruction Default is cleared Reset BOOL Reset input to the instruction Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output Out BOOL The output of the instruction OutNot BOOL The inverted output of the instruction Description The following diagram illustrates how the SETD instruction operates Out is cleared OutNot is set Set is set Out is set Reset is set and Set is cleared OutNot is cleared Arithmetic Status Flags not affected 366 Fault Conditions none Publication 1756 RMO06G EN P September 2010
285. et bad the instruction suspends execution holds the last output and sets the appropriate bit in Status When InFault transitions from set to cleared the instruction sets Out and all values in the deadtime buffer equal to In x Gain Bias Arithmetic Status Flags Arithmetic status flags are set for the Out output Condition prescan Fault Conditions none Execution Function Block Action Structured Text Action No action taken No action taken instruction first scan If InFault is cleared Out and all values in the deadtime buffer are set equal to In x Gain Bias instruction first run If InFault is cleared Out and all values in the deadtime buffer are set equal to In x Gain Bias Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan 54 No action taken No action taken Example In this example the DEDT instruction simulates a deadtime delay in a simulated process The output of the PIDE instruction is passed through a deadtime delay and a first order lag to simulate the process The array DEDT_Olarray is a REAL array with 100 elements to support a deadtime of up to 100 samples For example if this routine executes every 100 msec the array would support a deadtime of up to 10 seconds Publication 1756 RMO06G EN P
286. et in the block If no bits are set the status displays OK The TOT control has this additional property page Logix5000 TOT Faceplate Control Properties x 1 Fonts Locale In Units gallons sec Total Units gallons Meter Color Cancel Apply Configure this property To specify the In Units units for the In field on the control Total Units units for the Total and Old Total fields on the control Meter Color bar color of the meter 430 Publication 1756 RM006G EN P September 2010 Function Block Faceplate Controls Appendix D RMPS Control Ramp Soak RampSoak1 Output 10 gallons Mode PY 20 gallons Operator Current Segment 1 Manual Total Segments 8 Program Ramp Value 1 gallons min Soak Value 1 gallons Operator Soak Time 32 min rer Soak Time Left 30 min Cur Seg Oper Manual 1 Out Oper 12 gallons Initialize Soak Time Oper 0 min Detail Guaranteed Ramp In Effect Status PFaulted Feature on control Displays the Mode mode of the block Output value of Out PV value of PV Current Segment value of Current Segment Ramp Value value of RampValue for the current segment Soak Value value of SoakValue for the current segment Soak Time value of SoakTime for the current segment Soak Time Left value of SoakTimeLeft Program Button OperProgReq is set when you click this button Operator Button Ope
287. etDone is cleared When OperResetRegq transitions to set while ProgOper is cleared the following happens e OldTotal Total e Total ResetValue Calculating the totalization When RunStop is set and LowInCutoffFlag is cleared the following equation performs the totalization calculation DeltaT E E Total Total _ Gain x 2 x TimeBase x Un In _ 1 where TimeBase is Value Condition 1 TimeBase 0 seconds 60 TimeBase 1 minutes 3600 TimeBase 2 hours 86400 TimeBase 3 days Determining if target values have been reached Once the totalization has been calculated these rules determine whether the target or pre target values have been reached e TargetFlag is set when Total gt Target e TargetDev1 Flag is set when Total gt Target TargetDev1 e TargetDev2Flag is set when Total Target TargetDev2 138 Publication 1756 RMO06G EN P September 2010 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC Introduction These advanced process control function blocks are also available for use in the structured text programming language If you want to control Use this function block Page A single process variable by manipulating a single control variable Internal Model Control IMC 140 A single process variable by manipulating as many as three different co
288. eters to the model parameters The function block then resets the AtuneUseModel parameter Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 After a successful AutoTuneDone the Atune parameter is set to one 1 Tuning completed successfully To identify models and to calculate response time constants for all three CV PV processes run the tuner up to three times to obtain CV1 PV CV2 PV and CV3 PV models and tuning respectively CC Function Block Tuning Errors If an error occurs during the tuning procedure the tuning is aborted and an appropriate AtuneStatus value is set Also a user can abort the tuning by setting the AtuneAbort parameter After an abort the CV will assume its value before the step change and the GainTuned TCTuned DTTuned and RespTCTuned parameters are not updated The AtuneStatus parameter identifies the reason for the abort CC Function Block Model Initialization A model initialization occurs e During First Scan of the block e When the ModelInit request parameter is set e When DeltaT changes You may need to manually adjust the internal model parameters or the response time constants You can do so by changing the appropriate parameters and setting the appropriate Modellnit bit The internal states of the control variable will be initialized and the bit will automatically reset For example modified the Model Gain for CV2 PV mode
289. f the segment executed was not the last segment CurrentSeg increments by one 3 Soaking has completed for the last programmed segment and the instruction is configured for cyclic execution The instruction sets CurrentSeg 0 0 4 Soaking has completed for the last programmed segment and the instruction is configured for single execution 5 When returning to Auto mode the instruction determines if ramping or soaking resumes What to do next depends on the values of Out SoakTimeLeft and the SoakValue of the current segment If Out SoakValue for the current segment and SoakTimeLeft 0 then the current segment has completed and the next segment starts Ramping The ramp cycle ramps Out from the previous segment s SoakValue to the current segment s SoakValue The time in which the ramp is traversed is defined by the Ramp Value parameters Ramping is positive if Out lt target SoakValue of the current segment If the ramp equation calculates a new Out which exceeds the target SoakValue the Out is set to the target Soak Value Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Ramping is negative if Out gt the target Soak Value of the current segment If the ramp equation calculates a new Out which is less then the target SoakValue the Out is set to the target SoakValue Each segment has a ramp value You hav
290. f CV1 at the end of each function block execution e f value of CVProg or CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Updating the CVOper and CVProg Values on page 97 Values Valid 0 0 100 0 Default 0 0 CV20per REAL CV2 Operator Manual value e CV2 is set to this value when in Operator control and Manual mode If not Operator Manual mode set CV20per to the value of CV2 at the end of each function block execution e f value of CVProg or CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Updating the CVOper and CVProg Values on page 97 Valid 0 0 100 0 Default 0 0 CV30per REAL CV3 Operator Manual value e CV3 is set to this value when in Operator control and Manual mode If not Operator Manual mode set CV30per to the value of CV3 at the end of each function block execution e f value of CVProg or CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Updating the CVOper and C VProg Values on page 97 Valid 0 0 100 0 Default 0 0 CV1OverrideValue REAL CV1 Override value e CV1 is set to this value when in Override mode This value should correspond to a safe stat
291. f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Publication 1756 RMO06G EN P September 2010 Valid 0 0 lt CV3LLimit lt CV3HLimit Default 0 0 175 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Input Parameter Data Type Description Values CV1ROCPosLimit REAL CV1 rate of change limit in percent per second Rate of change Valid 0 0 to maximum positive limiting is only used when in Auto mode or in Manual mode if float CVManLimiting is TRUE A value of zero disables CV1 ROC limiting If value of CV1ROCLimit lt 0 set bit in Status and disable Default 0 0 CV1 ROC limiting Refer to CV Rate of Change Limiting on page 96 CV2ROCPosLimit REAL CV2 rate of change limit in percent per second Rate of change Valid 0 0 to maximum positive limiting is only used when in Auto mode or in Manual mode if float CVManLimiting is TRUE A value of zero disables CV2 ROC limiting If value of CV2ROCLimit lt 0 set bit in Status and disable Default 0 0 CV2 ROC limiting Refer to CV Rate of Change Limiting on page 96 CV3ROCPosLimit REAL CV3 rate of change limit in percent per second Rate of change Valid 0 0 to maximum positive limiting is only used when in Auto mode or in Manual mode if float CVManLimiting is TRUE A value of zero disables CV3 ROC limiting If value of CV3ROCLimit lt 0 set bit in Status and disable Default 0 0 CV3 ROC limiting
292. f necessary The solenoid valves in this example have limit switches which indicate when the valves are fully closed or opened These switches are wired into the FBO FB1 FB2 and FB3 feedback inputs This allows the D3SD instruction to generate a FaultAlarm if the solenoid valves do not reach their commanded states within the configured Fau tTime Structured Text OilFeedController ProgOCommand Close0ilFeed OilFeedController ProglCommand Slow0ilFeed OilFeedController Prog2Command Fast0OilFeed OilFeedController FBO SmallOilValveClosed OilFeedController FB1 Small0ilValveOpened OilFeedController FB2 LargeOilValveClosed OilFeedController FB3 LargeOilValveOpened D3SD O0ilFeedController Small0ilValve OilFeedController Out0 LargeOilValve OilFeedController Outl1 44 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 CND Program Control Function Block CloseODilFeed SlowODilFeed FastOilFeed SmallOilValveClosed SmallOilValveOpened LargeOilValveClosed LargeOilValveOpened OilFeedController D3SD Discrete 3 State Device ProgOCommand E ProgiCommand Prog2Command StateOPerm State1Perm E StatezPerm HandFBO HandFB1 HandFB2 ProgProgReq E ProgOperReq E ProgOverrideReg E ProgHandReq DeviceO State F Device1State
293. fault 0 0 AllowCasRat BOOL Allow cascade ratio mode permissive Set to allow Cascade Ratio mode to be selected using either ProgCascadeRatioReq or OperCascadeRatioReq Default is cleared ManualAfterInit BOOL Manual mode after initialization request When set the instruction is placed in Manual mode when CVinitializing is set unless the current mode is Override or Hand When ManualAfterlInit is cleared the instruction s mode is not changed unless requested to do so Default is cleared ProgProgReq BOOL Program program request Set by the user program to request Program control Ignored if ProgOperReg is set Holding this set and ProgOperReg cleared locks the instruction in Program control When ProgValueReset is set the instruction clears the input each execution Default is cleared 70 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type Description ProgOperReq BOOL Program operator request Set by the user program to request Operator control Holding this set locks the instruction in Operator control When ProgValueReset is set the instruction clears the input each execution Default is cleared ProgCasRatReq BOOL Program cascade ratio mode request Set by the user program to request Cascade Ratio mode When ProgValueReset is set
294. fault is cleared ProgOperReq BOOL Program operator request Set by the user program to request Operator control Holding this set locks the instruction into Operator control Default is cleared ProgOverrideReq BOOL Program override request Set by the user program to request the device to enter Override mode Ignored if ProgHandReg is set Default is cleared ProgHandReq BOOL Program hand request Set by the user program to request the device to enter Hand mode Default is cleared OperProgReq BOOL Operator program request Set by the operator interface to request Program control The instruction clears this input Default is cleared OperOperReq BOOL Operator operator request Set by the operator interface to request Operator control The instruction clears this input Default is cleared ProgValueReset BOOL Reset program control values When set all the program request inputs are cleared each execution of the instruction Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output Out BOOL The output of the 2 state instruction Device0State BOOL Device 0 state output Set when the device is commanded to the 0 state and the feedbacks indicate the device really is in the 0 state Device1 State BOOL Device 1 state output Set when the device is commanded to the 1 state and the feedbacks indicate the device really is in the 1 state CommandsStatus BOOL Command status output Set when the device is being comma
295. fer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV3Manual BOOL Manual mode indicator for CV3 TRUE when CV3 in the Manual mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV10verride BOOL Override mode indicator for CV1 TRUE when CV1 in the Override mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV20verride BOOL Override mode indicator for CV2 TRUE when CV2 in the Override mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV30verride BOOL Override mode indicator for CV3 TRUE when CV3 in the Override mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV1Hand BOOL Hand mode indicator for CV1 TRUE when CV1 in the Hand mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV2Hand BOOL Hand mode indicator for CV2 TRUE when CV2 in the Hand mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV3Hand BOOL Hand mode indicator for CV3 TRUE when CV3 in the Hand mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 DeltaT REAL Elapsed time between updates in seconds CV1StepSizeUsed REAL Actual CV1 step size used for tuning CV2StepSizeUsed REAL Actual CV2 step size used for tuning
296. ference Select Selectl Master Machine Select Reference Select In2 Section Jog Reference Select Select2 Jog Select SSUM Reference Select S Curve In Reference Select Out S_ Curve AccelRate accel rate S_Curve DecelRate accel rate SCRV S_ Curve PMUL 01 In Resolver Feedback PMUL 01 WordSize 12 PMUL 01 Multiplier 100000 PMUL PMUL 01 Speed Feedback PMUL_01 Out Velocity Error S_Curve Out Speed Feedback PI 01 In Velocity Error PI 01 Initialize Enable Regulator PI_01 Kp Velocity Proportional Gain PI 01 Wld Velocity Integral Gain PI PI 01 Torque Reference PI _01 0ut 258 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Function Block Reference_Select g In1 Out D Master_Machine_Ref D g Velocity_Error SSUM im Selected Summer S_Curve SUB_O2 PI_O4 Q In2 q In Out D SourceA Dest D g In Out D Cl Torque_Reterence Seetion_Jog D E Select Cj AccelRate q SourceB Initialize ies DecelRate l c d D a accel_rate D T Velocity_Proportional_Gain D PMUL_01 E PMUL LJ Pulse Multiplier Resolver_Feedback rer iti In Out D 100000 D g Multiplier g Speed_Feedback In non linear mode the gains of the PI instruction can be shaped as a function of the error being input to the block This functi
297. fication says Negate high_alarm and store the result in alarm high alarm function numeric expression If overtravel and overtravel_POS are DINT tags and your specification says Calculate the absolute value of overtrave and store the result in overtravel_POS overtravel POS ABS overtravel valuel operator function value2 value3 2 If adjustment and position are DINT tags and sensor and sensor2 are REAL tags and your specification says Find the absolute value of the average of sensor and sensor2 add the position adjustment ABS sensorl sensor2 2 adjustment and store the result in position Use relational operators Relational operators compare two values or strings to provide a true or false result The result of a relational operation is a BOOL value The result is If the comparison is true 1 false 0 Use the following relational operators For this comparison Use this operator Optimal Data Type equal DINT REAL string less than lt DINT REAL string less than or equal lt DINT REAL string greater than gt DINT REAL string greater than or equal gt DINT REAL string not equal lt gt DINT REAL string 392 Publication 1756 RM006G EN P September 2010 Use this format valuel operator value2 For example Example Structured Text Programming Appendix B For this situation If temp is
298. for an order of 2 or an order of 4 Higher orders take more execution time Gain 10 Q set smaller Publication 1756 RMO06G EN P September 2010 i Frequency 317 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Structured Text NTCH 01 In frequency input NTCH_01 WNotch center frequency NTCH_ 01 QFactor Notch width depth NTCH NTCH 01 Notch_output NTCH_01 Out Function Block NTCH_O4 NTCH fea Notch Filter requency_input Notch_output center_frequency 318 Publication 1756 RMO06G EN P September 2010 Chapter 5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Introduction These select limit instructions ate available If you want to Use this instruction Available in these languages Page select one of as many as six inputs Enhanced Select ESEL structured text 320 function bloc limit an analog input between two values High Low Limit HLL structured text 327 function bloc select one of eight inputs Multiplexer MUX function bloc 330 limit the amount of change of a signal Rate Limiter RLIM structured text 333 over time function bloc select one of two inputs Select SEL function bloc 337 select between the input value and the Selected Negate SNEG structured text 339 negative of the input value function bloc select real inputs to be summed Selected Summer SSUM structured text 341 function
299. frequency iDL2 01 WLag Lag frequency DL2 LDL2_01 Lead_ lag output LDL2 01 0Out Function Block LDL2_04 LDL2 E Second Order Lead Lag Lead_lag_output requency_input Lag_frequency Lead_frequency Publication 1756 RMO06G EN P September 2010 307 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Low Pass Filter LPF Operands LPF LPF tag LPF_04 LPF ia Low Pass Filter Out The LPF instruction provides a filter to attenuate input frequencies that are above the cutoff frequency Structured Text LPF tag FILTER_LOW_PASS LPF structure Function Block LPF tag FILTER_LOW_PASS LPF structure FILTER_LOW_PASS Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL Request to initialize filter control algorithm When set the instruction sets Out In Default is cleared WLag REAL The lag frequency in radians second If WLag lt minimum or WLag gt maximum the instruction sets the appropriate bit in Status and limits WLag Valid see Description section below for valid ranges Default maximum positive float Orde
300. g are not recommended due to jitter in DeltaT e TimingMode 0 Periodic while executing these function blocks in a Continuous or Event Task e TimingMode 2 RealTimeSample 145 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC IMC Function Block Input Parameter Descriptions The following table describes the input parameters in the IMC function block IMC Input Parameter Type Description Valid and Default Values Enableln BOOL Enable Input If False the function block will not execute and Default TRUE outputs are not updated PV REAL Scaled process variable input This value is typically read from Valid any float an analog input module Default 0 0 PVFault BOOL PV bad health indicator If PV is read from an analog input Default FALSE then PVFault will normally be controlled by the analog input fault status If PVFault is TRUE it indicates an error on the FALSE Good Health input module set bit in Status Refer to Processing Faults on page 99 PV Health BadPV PVEUMax REAL Maximum scaled value for PV The value of PV and SP that Valid PVEUMin lt PVEUMax lt corresponds to 100 span of the Process Variable If maximum positive float PVEUMax lt PVEUMin set bit in Status Default 100 0 Refer to Processing Faults on page 99 PVSpanlnv or SPLimitsInv for details PVEUMin REAL Minimum scaled value for PV The value of PV and SP that Valid maximum
301. ge 96 Valid 0 0 100 0 Default 0 0 Publication 1756 RMO06G EN P September 2010 CC Input Parameter CV1TrackValue Data Type REAL Advanced Process Control Function Blocks IMC CC MMC Chapter 2 Description CV1 track value When CVTrackReg is enabled and the CC function block is in Manual mode the CV1TrackValue will be ignored and the CC internal model will update its historical data with the CV1Oper or CV1Prog value When CVTrackReq is enabled and the CC function block is in Auto the internal model will update its historical data based on the value of CV1TrackValue The CV1 in this case will be allowed to move as if the CC function block was still controlling the process This is useful in multiloop selection schemes where you want the CC function block to follow the output of a different controlling algorithm where you would connect the output of the controlling algorithm into the CV1TrackValue Values Valid 0 0 100 0 Default 0 0 CV2TrackValue REAL CV2 track value When CVTrackReg is enabled and the CC function block is in Manual mode the CV2TrackValue will be ignored and the CC internal model will update its historical data with the CV2Oper or CV2Prog value When CVTrackReq is enabled and the CC function block is in Auto the internal model will update its historical data based on the value of CV2TrackValue The CV2 in this case will be allowed to move as if the CC function block was
302. ge Limiting on page 96 Valid 0 0 to maximum positive float Default 0 0 CV1HandFB REAL CV1 HandFeedback value CV1 set to this value when in Hand mode and CV1HandFBFault 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 lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 CV2HandFB 212 REAL CV2 HandFeedback value CV2 set to this value when in Hand mode and CV2HandFBFault 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 lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Input Parameter Type Description Values CV3HandFB REAL CV3 HandFeedback value CV3 set to this value when in Hand Valid 0 0 100 0 mode and CV3HandFBFault is FALSE good health This value would typically come from the output of a field mounted Def
303. hange alarm indicator TRUE when the calculated rate of change for CV2 exceeds CV2ROCPosLimit 187 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Output Parameter Data Type Description Values CV3ROCPosAlarm BOOL CV3 rate of change alarm indicator TRUE when the calculated rate of change for CV3 exceeds CV3ROCPosLimit CV1ROCNegAlarm BOOL CV1 rate of change alarm indicator TRUE when the calculated rate of change for CV1 exceeds CV1ROCNegLimit CV2ROCNegAlarm BOOL CV2 rate of change alarm indicator TRUE when the calculated rate of change for CV2 exceeds CV2ROCNegLimit CV3ROCNegAlarm BOOL CV3 rate of change alarm indicator TRUE when the calculated rate of change for CV3 exceeds CV3ROCNegLimit SP REAL Current setpoint value The value of SP is used to control CV when in the Auto or the PV Tracking mode scaled in PV units Refer to Selecting the Setpoint on page 87 SPPercent REAL The value of SP expressed in percent of span of PV SPPercent SP PVEUMin 100 PVSpan SPHAlarm BOOL SP high alarm indicator TRUE when the SP gt SPHLimit SPLAlarm BOOL SP low alarm indicator TRUE when the SP lt 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 Refer to Converting the PV an
304. have only two possible D2SD states such as on off open closed control discrete devices such as high low off Discrete 3 State Device 38 feeders that have three possible states suchas D3SD fast slow off forward stop reverse perform a delay of a single input You select the Deadtime DEDT 51 amount of deadtime delay convert an input based on a piece wise Function Generator FGEN 56 linear function provide a phase lead lag compensation for an Lead Lag LDLG 60 input signal regulate an analog output to maintain a process Enhanced PID PIDE 64 variable at a certain setpoint using a PID algorithm raise lower or open close a device such as a Position Proportional POSP 100 motor operated valve by pulsing open or close contacts provide for alternating ramp and soak periods to Ramp Soak RMPS 107 follow a temperature profile convert an unscaled input value to a floating point Scale SCL 121 value in engineering units take the 0 100 output of a PID loop and drive Split Range Time 125 heating and cooling digital output contacts with a Proportional SRTP periodic pulse provide a time scaled accumulation of an analog Totalizer TOT 131 input value such as a volumetric flow 23 Chapter 1 Alarm ALM Operands ALM ALM _tag ALM_O4 ALM l Alarm HHAlarm HAlarm E p m LAlarm D LLAlarm D ROCFPosAlarm H al ROCNegAlarm Input Parameter Enableln BOOL Data Type Process
305. he SPCascade parameter on the secondary loop The SPCascade value is used as the SP on the secondary loop when the secondary loop is placed into Cascade Ratio mode The engineering unit range of the CVEU on the primary loop should match the engineering unit range of the PV on the secondary loop This lets the primary loop scale its 0 100 value of CV into the matching engineering units used for the setpoint on the secondary loop Publication 1756 RM006G EN P September 2010 83 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Example 3 84 The PIDE instruction supports several other features to more effectively support cascade control Wire the InitPrimary output on the secondary loop into the CVInitReq input on the primary loop and wire the SP output of the secondary into the CVInitValue input on the primary This sets the CVEU value of the primary loop equal to the SP of the secondary loop when the secondary loop leaves Cascade Ratio mode This allows a bumpless transfer when you place the secondary loop back into Cascade Ratio mode Also wire the WindupHOut and WindupLOut outputs on the secondary loop into the WindupHIn and WindupLIn inputs on the primary loop This causes the primary loop to stop increasing or decreasing as appropriate its value of CVEU if the secondary loop hits a SP limit or CV limit and eliminates any windup on the primary loop if these conditions occur Ra
306. he SRTP instruction executes in a faster higher priority task so that the pulse outputs are more accurate Structured Text BarrelTempLoop PV BarrelTemp PIDE BarrelTempLoop LoopOutput BarrelTempLoop CVEU SRTP_02 In LoopOutput SRTP SRTP_02 ResistiveHeater SRTP_02 HeatOut CoolingSolenoid SRTP_02 CoolOut 129 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT place the PIDE instruction in a slow lower priority task place the SRTP instruction in a faster higher priority task 130 Function Block BarrelTempLoop PIDE ml Enhanced PID 0 0 0 0 Bareitemp D C Pv CVEUD g LoopOutput 0 0 Q SPProg SPD 0 Q SPCascade PVHHAIarm D o C RatioProg PVHAlarm D A O CVProg PYLAlarm A 0 g FF PWYLLAIarm 0 C HandFB PYROCPosAlarm f 0 E ProgProgReq PYROCNegAlarm D A ProgOperReq DewHHAlarm A E ProgCasRatReq DevHAlarm H 0 ProgAutoReq DevLAlarm D 0 Prog anualReq DevLLAlarm D 0 E ProgOverideReq ProgOper D ProgHandReq CasRat D a Auto J 0 Manual f 0 Override M 0 Hand AutotuneTag SRTP_O2 SRTP aE Split Range Time Proportional J ResistiveHeater o HeatOut o CoolOut fo o Q CoolingSolenoid 0 0 0 0 HeatTimePercent D CoolTimePercent D Publication 1756 RM006G EN P September 2010 Totalizer TOT Process Control Instructions ALM D2SD D3SD DEDT
307. he instruction is not in Program Manual mode Program Hold Mode While in Hold mode the instruction s outputs are maintained at their current values If in this mode when ProgOperReg is set to change to Operator control the instruction changes to Operator Manual mode 116 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Operator control The following diagram illustrates how the RMPS instruction operates in Operator control OperManualReq set p single execution of profile complete PE Operator Auto Mode invalid inputs pe Operator Manual Mode OperAutoReq is set and OperManualReq is 1 When the instruction is configured for Single Execution and the Auto mode ramp soak profile completes the instruction transitions to manual mode 2 The instruction is placed in Manual mode if PVFaulted is set or any of the following inputs are invalid NumberOfSegs CurrentSeg SoakTimeLeft CurrentSegOper or SoakTimeOper The following table describes the possible Operator modes Mode Description Operator Auto Mode While in Auto mode the instruction sequentially executes the ramp soak profile Operator Manual Mode While in Manual mode the operator directly controls the instruction s Out The CurrentSegOper SoakTimeOper and OutOper inputs are transferred to the CurrentSeg SoakTimeL
308. he length of the moving average span At every scan of the block when SampleEnable is set the instruction moves the value of In into the storage array and discards the oldest value Each In has a user configured Weight which is used if UseWeights is set 347 Chapter 6 Statistical Instructions MAVE MAXC MINC MSTD The MAVE instructions uses these equations Condition Equation weighted averaging method NumberOfSamples UseWeights is set Ours gt Weight n 1 uniform averaging method Numberofs mples UseWeights is cleared i gt gt In n 1 OWES NumberOfSamples The instruction will not place an invalid In value NAN or INF into the storage array When In is invalid the instruction sets Out In and sets the arithmetic overflow status flag When In becomes valid the instruction initializes the averaging algorithm and continues executing You can make runtime changes to the NumberOfSamples parameter If you increase the number the instruction incrementally averages new data from the current sample size to the new sample size If you decrease the number the instruction re calculates the average from the beginning of the sample array to the new NumberOfSamples value Initializing the averaging algorithm Certain conditions such as instruction first scan and instruction first run require the instruction to initialize the moving average algorithm When this occurs the instruction considers the sample array empty and
309. he output is invalid NAN or INF the instruction sets Out the invalid value and sets the arithmetic overflow status flag The internal parameters are not updated In each subsequent scan the output is computed using the internal parameters from the last scan when the output was valid Monitoring the RMPS instruction There is an operator faceplate available for the RMPS instruction For more information see appendix Function Block Attributes Publication 1756 RMO06G EN P September 2010 111 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Arithmetic Status Flags Arithmetic status flags are set for the Out output Condition prescan Fault Conditions none Execution Function Block Action Structured Text Action No action taken No action taken instruction first scan All the operator request inputs are cleared If ProgValueReset is set all the program request inputs are cleared The operator control mode is set to manual mode if the current mode is hold See the tables below instruction first run CurrentSegment 0 SoakTimeProg and SoakTimeOper SoakTime 0 if SoakTime 0 is valid Mode is set to operator manual Out 1 0 0 Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is
310. he position and set point values 0 0 102 How the POSP instruction uses the internal cycle timer 103 Producing output pulses pice Viel iho Pee eeu eed 103 Calculating Open and Close Pulse Times 00 4 104 Ramp S ak R MPS ne aa ak te ioe ee ane Sie 107 Monitoring the RMPS instruction ss isle 8 ee wtia ee Ba 111 Initial mode applied on instruction first scan 6 2 0008 112 Switching between Program control and Operator control 114 Programi contol Vichesaw lad bes pasa ds ee oae ogee ss 116 Operat r COMO aig Hae 2 eats E ae aE OS Hah Shae a 117 Executing the ramp soak protle acwnet caete en nae ee 118 Scale SCI y recs eres ar a ne gear ae ae E 121 PATRAS ti ra se alata Sate eA OE A OR Sie RE ET EEA E EEE AR 123 Dice Tinta queer asm eee chee ee arte Cr era See ee mn AEE cea RO Ce 123 Split Range Time Proportional SREP c 6 so 4 sshiwteson aes tages 125 Using the internal cycle Came tS spun VUpmarsngnae enna i mene ananp 127 Calculating heat and cool times 6 6 0 0 cee eee eee 127 Totalize TOD rreran na wales ater kay pew tener e Ole e Mee te 131 Monitoring the TOT instruction s s s aos ee eh ae 135 Check for low input cutoff 30 iis hate oes ei Pet Cees 136 PETALMO modes is Tene o iE E a ak Sanaa hard Arcee 137 Resetting the TOT instruction i422 sie k eas Sen ein ees 138 Calculating the totalization i eaongat tan eee ie BHO eR A 138 Determining if target values have been reac
311. he value of CVLLimit Valid 0 0 lt CVLLimit lt CVHLimit Default 0 0 CVROCLimit REAL CV rate of change limit in percent per second Rate of change limiting is only used when in Auto or Cascade Ratio modes or Manual mode if CVManLimiting is set Enter 0 to disable CV ROC limiting If CVROCLimit lt 0 the instruction sets the appropriate bit in Status and disables CV ROC limiting Valid 0 0 to maximumimum positive float Default 0 0 FF REAL Feed forward value The value of feed forward is summed with CV after the zero crossing deadband limiting has been applied to CV Therefore changes in FF are always reflected in the final output value of CV If FF lt 100 or gt 100 the instruction sets the appropriate bit in Status and limits the value used for FF Valid 100 0 100 0 Default 0 0 FFPrevious REAL FF value If FFSetPrevious is set the instruction sets FF FFPrevious FF is the value Publication 1756 RMO06G EN P September 2010 of FF from the previous execution If FFPrevious lt 100 or gt 100 the instruction sets the appropriate bit in Status and limits value used for FF 1 Valid 100 0 100 0 Default 0 0 67 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description FFSetPrevious BOOL Request to use FFPrevious If set FF FFPrevious Default is cleared HandFB REAL CV Hand feedback value
312. hed 138 6 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Drives Instructions INTG PI PMUL SCRV SOC UPDN Publication 1756 RMO06G EN P September 2010 Table of Contents Chapter 2 Tit AU CEO tgs ui shi ee ered a EEE Ro Cae ws a AES SA RR sen ER RS Internal Model Control IMC Function Block IMC Function Block Configuration 5 40 ca tee eines a IMC Function Block Tuning cnet RBA hut con ecient ys IMC Function Block Tuning Procedtites 056 ties dace ae nena IMC Function Block Tuning BrVOrs i cies meine ed eee nase is IMC Function Block Model Initialization IMC Function Block Structure 0 0 0 0 ee IMC Function Block Input Parameter Descriptions IMC Function Block Output Parameter Descriptions Coordinated Control CC Function Block 0 004 CC Function Block Contigutaton cc sbi owes os Using the Coordinated Control Function Block to Control MIT A ELI ai seca ge Nah tt taste aria tN Moa a esi epee Dh CC Function Block Tuning 24558845355 ed Pee aes BIOS CC Function Block Tuning Procedure sia i ig ane uae ea yes CC Function Block Tuning Errors poise peers eas CC Function Block Model Initialization 0 CC Function Block Structure 0 0 00 nes CC Function Block Input Parameter Descriptions CC Function Block Output Parameter Descriptions Modula
313. her The blocks within a specific group execute in the appropriate order in relation to the blocks in that group Publication 1756 RMO06G EN P September 2010 Function Block Attributes Appendix A Resolve a Loop To create a feedback loop around a block wire an output pin of the block to an input pin of the same block The following example is OK The loop contains only a single block so execution order does not matter This input pin uses an output that the block produced on the previous scan _ gt See If a group of blocks are in a loop the controller cannot determine which block to execute first In other words it cannot resolve the loop To identify which block to execute first mark the input wire that creates the loop the feedback wire with the Assume Data Available indicator In the following example block 1 uses the output from block 3 that was produced in the previous execution of the routine that block 3 produced on the previous scan The Assume Data Available indicator defines the data flow within the loop The arrow indicates that the data serves as input to the first block in the loop Publication 1756 RMO06G EN P September 2010 373 AppendixA Function Block Attributes Do not mark all the wires of a loop with the Assume Data Available indicator This is OK Assume Data Available indicator The Assume Data Available indicator defines the data f
314. iate bit in Status and uses Order 2 Valid 1 to 2 Default 2 TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred WLeadlnv Status 1 BOOL WLead lt minimum value or WLead gt maximum value WLaglnv Status 2 BOOL WLag lt minimum value or WLag gt maximum value ZetaLeadInv Status 3 BOOL Lead damping factor lt minimum value or lead damping factor gt maximum value ZetaLaglnv Status 4 BOOL Lag damping fact
315. ice0 State D Device1State D CommandStatus J FaultAlarm ModeAlarm ProgOper Override AddSyrup SyrupValveClosedLimitSwitch SyrupValveOpenedLimitSwitch SyrupController Out Out he SyrupValve Hand A 33 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Switching between Program control and Operator control The following diagram shows how the D2SD instruction changes between Program control and Operator control OperOperReq is set when ProgProgReg is cleared ProgOperReq is set 1 Override transitions from set to cleared and Hand is cleared Program Control Operator Control Hand transitions from set to cleared and Override is cleared YVYYVY ProgProgReq is set when ProgOperReg is cleared OperProgReq is set when ProgOperReg is cleared and OperOperReg is cleared y bo 1 The instruction remains in Operator control mode when ProgOperReg is set For more information on program and operator control see page 381 Commanded state in Program control The following diagram illustrates how the D2SD instruction operates when in Program control a a ProgCommand is cleared StateOPerm is set Set Command Status f Clear Command Status ProgCommand is set State1Perm is set q woo k y 34 Publication 1756 RM006G EN P September 2010
316. ies 1 Control PV to SP 2 Control Target1stCV to its target value 3 Control Target2ndCV to its target value If any CV is put in Manual mode the CC function block gives up the goal with priority 3 If two CV s are in Manual mode the CC function block is reduced to an IMC single input single output control variable controlling the PV to its setpoint In addition to this however the control variable reads the Manual CV values from the CV s that are in Manual mode as feedforward signals Then the CC function block predicts the influence of the Manual CV values on the PV by using the appropriate internal models and calculates the third CV that remains in Auto mode Por integrating process types such as level control and position control internal nonintegrating models are used to approximate the integrating process The Factor parameter is used to convert the identified integrating process models to nonintegrating internal models used for CV calculation This is necessary to provide for stable function block execution The CC function block is a flexible model based algorithm that can be used in various configurations for example e Three control variables are used to control one process variable e Heat cool split range control e Feedforward control e Zone temperature control e Constraint control Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Funct
317. if WindupLin and CV lt CV WindupLIn gt CV C CV Percent Limiting The following diagram illustrates how the instruction determines CV percent limiting CV gt 100 CVHAlarm is cleared CV lt 100 CVHAlarm is set CV gt 0 CVLAlarm is set CVLAlarm is cleared CV limited to 0 100 CV from windup algorithm if CVHAlarm is set CVHAlarm SS Reson oe es CV 100 if CVLAlarm is set CVLAlarm p gt CV 0 1 During instruction first scan the instruction clears the alarm outputs Publication 1756 RMO06G EN P September 2010 95 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT CV from 0 100 limit algorithm CVHAlarm is set and auto or cascade ratio or manual and CVManLimiting is set CVLAlarm is set and auto or cascade ratio or manual and CVManLimiting is set 96 CV High Low Limiting The instruction always performs alarming based on CVHLimit and CVLLimit Limit CV by CVHLimit and CVLLimit when in auto or cascade ratio mode When in manual mode limit CV by CVHLimit and CVLLimit when CVManLimiting is set Otherwise limit CV by 0 and 100 CV gt CVHLimit p CVHAlarm is cleared CV lt CVHLimit CVHAlarm is set CV lt CVLLimit CVLAlarm is cleared CV gt CVLLimit CVLAlarm is se
318. imer determines if the outputs need to be turned on You can change CycleTime at any time If CycleTime 0 the internal timer is cleared and HeatOut and CoolOut are cleared Calculating heat and cool times Heat and cool times are calculated every time the instruction is executed HeatTime is the amount of time within CycleTime that the heat output is to be turned on In MinHeatIn HeatTi x Cycle Ti ANR MaxHeatIn MinHeatIn ji cee e If HeatTime lt MinHeatTime set HeatTime 0 e If HeatTime gt maximumHeatTime limit HeatTime maximumHeatTime 127 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT HeatTimePercent is the percentage of CycleTime the HeatOut is set HeatTimePercent AICO EE x 100 CycleTime CoolTime is the amount of time within CycleTime that the cool output is to be tutned on In MinCoolln CoolT x CrycleT PECAS MaxCoolIn MinCoolIn A e If CoolTime lt MinCoolTime set CoolTime 0 e If CoolTime gt maximumCoolTime limit CoolTime maximumCoolTime CoolTimePercent is the percentage of CycleTime CoolOut is set CoolTime 1 CycleTime me CoolTimePercent The instruction controls heat and cool outputs using these rules e Set HeatOut if HeatTime 2 the internal cycle time accumulator Clear HeatOut when the internal cycle timer gt HeatTime Set CoolOut if CoolTime 2 the internal cycl
319. imit REAL The rate of change alarm limit in units per second for a positive increasing change in the input Set ROCPosLimit 0 to disable ROC positive alarming If invalid the instruction assumes a value of 0 0 and sets the appropriate bit in Status Valid any real value gt 0 0 Default 0 0 ROCNegLimit REAL The rate of change alarm limit in units per second for a negative decreasing change in the input Set ROCPNegLimit 0 to disable ROC negative alarming If invalid the instruction assumes a value of 0 0 and sets the appropriate bit in Status Valid any real value gt 0 0 Default 0 0 ROCPeriod REAL The time period used to evaluate the rate of change alarms in seconds Set ROCPeriod 0 to disable ROC alarming and set the output ROC to zero If invalid the instruction assumes a value of 0 0 and sets the appropriate bit in Status Valid any real value gt 0 0 Default 0 0 Output Parameter Data Type Description EnableOut BOOL Enable output HHAlarm BOOL The high high alarm indicator Default false HAlarm BOOL The high alarm indicator Default false LAlarm BOOL The low alarm indicator Default false LLAlarm BOOL The low low alarm indicator Default false ROCPosAlarm BOOL The rate of change positive alarm indicator Default false ROCNegAlarm BOOL The rate of change negative alarm indicator Default false ROC REAL The rate of change output Arithmetic status flags are set for this output Status DINT St
320. imited by CV2HLimit and CV2LLimit when in Auto mode or in Manual mode if CVManLimiting is TRUE otherwise limited by 0 and 100 Refer to Selecting the Control Variable on page 94 CV3 REAL Control variable output for CV3 This value will always be expressed as 0 100 CV3 is limited by CV3HLimit and CV3LLimit when in Auto mode or in Manual mode if CVManLimiting is TRUE otherwise limited by 0 and 100 Refer to Selecting the Control Variable on page 94 Publication 1756 RMO06G EN P September 2010 225 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Output Parameter Type Description Values CV 1 Initializing BOOL Initialization mode indicator for CV1 Set TRUE when CV1InitReg function blockFirstScan or OLCFirstRun are TRUE or on a TRUE to FALSE transition of CVHealth bad to good CV1 Initializing is set FALSE after the function block has been initialized and CV1InitReq is no longer TRUE Refer to Processing Faults on page 99 for more information on CV Initialize Request CV Health Good and CVEU Span Valid Refer to Autotuning the PIDE instruction on page 78 for more information on Initialization function blockFirstScan and Initialization OLCFirstRun CV2Initializing BOOL Initialization mode indicator for CV2 Set TRUE when CV2InitReg function blockFirstScan or OLCFirstRun are TRUE or ona TRUE to FALSE transition of CVHealth bad to good CV2Initializing is set
321. imum limit alarm indicator Set when the calculated value for Out lt LowLimit and output and integrator are clamped at LowLimit DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block 250 Publication 1756 RMO06G EN P September 2010 Output Parameter Data Type InstructFault Status 0 BOO Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Description The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred Kplnv Status 1 BOOL Kp lt minimum or Kp gt maximum WldInv Status 2 BOOL Wld lt minimum or Wld gt maximum HighLowLimsInv BOOL HighLimit lt LowLimit Status 3 ShapeKpPlusInv BOOL ShapeKpPlus lt minimum or ShapeKpPlus gt maximum Status 4 ShapeKpMinuslnv BOO Status 5 ShapeKpMinus lt minimum or ShapeKpMinus gt maximum KpInRangelnv BOO Status 6 KplnRange lt minimum or KpInRange gt maximum ShapeWldPlusInv BOO Status 7 ShapeWldPlus lt minimum or ShapeWldPlus gt maximum ShapeWldMinusInv BOO Status 8 ShapeWldMinus lt minimum or ShapeWldMinus gt maximum WldInRangelnv BOOL WldInRange lt minimum or WidInRange gt maximum Status 9 TimingModelnv BOOL Invalid timing mode
322. in Program control Default is cleared ProgOperReq BOOL Program operator request Set to request Operator control Holding this set locks the instruction in Operator control Default is cleared ProgstartReq BOOL The program start request input Set to request totalization to start Default is cleared ProgstopReq BOOL The program stop request input Set to request totalization to stop Default is cleared ProgResetReq BOOL The program reset request input Set to request the Total to reset to the ResetValue Default is cleared OperProgReq BOOL Operator program request Set by the operator interface to request Program control The instruction clears this input Default is cleared 132 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type Description OperOperReq BOOL Operator operator request Set by the operator interface to request Operator control The instruction clears this input Default is cleared OperStartReq BOOL The operator start request input Set by the operator interface to request totalization to start The instruction clears this input Default is cleared OperStopReq BOOL The operator stop request input Set by the operator interface to request totalization to stop The instruction clears this input Default
323. in Status and sets Out LowLimit Valid any float Default maximum negative float 242 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Input Parameter Data Type Description HoldHigh BOOL Hold output high request When set Out is not allowed to increase in value Default is cleared HoldLow BOOL Hold output low request When set Out is not allowed to decrease in value Default is cleared TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output HighAlarm BOOL High limit alarm indicator When Out gt HighLimit HighAlarm is set and the output is limited to the value of HighLimit LowAlarm BOOL Low limit alarm indicator When Out lt LowLimit LowAlarm is set and the output is limited to the val
324. indicator that the TOT instruction has completed a program reset request Set when the instruction resets as a result of ProgResetReq You can monitor this to determine that a reset successfully completed Cleared when ProgResetReq is cleared TargetFlag BOOL The flag for Total Set when Total gt Target Publication 1756 RMO06G EN P September 2010 133 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Output Parameter Data Type Description TargetDev1 Flag BOOL The flag for TargetDev1 Set when Total gt Target TargetDev1 TargetDev2Flag BOOL The flag for TargetDev2 Set when Total gt Target TargetDev2 LowInCutoffFlag BOOL The instruction low input cutoff flag output Set when In lt LowInCutoff DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred InFaulted Status 1 BOOL In value faulted TimeBaselnv Status 2 BOOL Invalid TimeBase value TimingModelnv BOOL Invalid TimingMode value Status 27 RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime
325. ing Dialog po DEES Kp 1 797549 E ho gt 0 Ki 1 min 18 4291 eet Kd min 0 02197 2 p up 1 47 45PM__ 1 49 45 1 55 45 4 57 45 PM Autotune 4 47 45 PM 1 49 45 1 55 45 1 57 45 PM SS rs a eT a Cee Autotune Button Autotuning Dialog pop up which you access from the Tune Dialog shown above x Process Type Flow X Acquire Tag Tag Status Acquired PV Change Limit 100 Release Tag CY Step Size 20 _ Start Tune Execution State Done Autotune Status OK Autotune Gains Proportional Integral 1 min Derivative min Slow Response C 0 599188 6 16307 0 0073234 Medium Response C 1 19838 12 3261 0 0146468 Fast Response Q 1 79756 18 4892 0 0219702 Current C 1 79755 18 4891 0 02197 Load Gains To PIDE Time Constant 5 1 Deadtime 2 2 Gain 1 05058 Status all the status bits that are set in the block If no bits are set the status displays OK Publication 1756 RMO06G EN P September 2010 439 Appendix D Function Block Faceplate Controls The PIDE control has this additional property page Logix5000 PIDE Faceplate Control Properties xj General Display PIDE Fonts Locale Autotune Tag Program MainProgram FlowLoopT uner a P Units GPM Time Span min 30 u Display Time min 10 0054 PY Color Full Read H L Alarm 5P Color TuningAccess V V Detail ccess D M HH LL Alarm C Color Cancel Apply Configure this property
326. instruction toggles Q If Clear is set Q is always cleared The JKFF instruction sets QNot to the opposite state of Q Structured Text JKFF 01 Clear clear input JKFF_ 01 Clock clock input JKFF JKFF 01 q output JKFF 01 0 qnot_ output JKFF 01 QNot Function Block Wa 0 clock_input doe Publication 1756 RMO06G EN P September 2010 JKFF_O4 JKFF JK Flip Flop q_output L qnot_outpu 363 Chapter 7 Move Logical Instructions DFF JKFF RESD SETD Reset Dominant RESD The RESD instruction uses Set and Reset inputs to control latched outputs The Reset input has precedence over the Set input Operands RESD RESD tag Structured Text Operand Type Format Description RESD tag DOMINANT_RESET structure RESD structure RESD_01 Function Block RESD al Reset Dominant Operand Type Format Description RESD tag DOMINANT_RESET structure RESD structure DOMINANT_RESET Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes Set BOOL Set input to the instruction Default is cleared Reset BOOL Reset input to the instruction Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output Out BOOL The output of the
327. ion Blocks IMC CC MMC Chapter 2 Coordinated Control Closed Loop Example Configuration CVI Track CV1 Disturbance Estimate In this example CV1 is in Manual mode CV2 is driven to its target value and CV3 is the active control The following table describes this example in detail Item Description CV1 Is in Manual mode CV2 is driven to its target value CV2 Target stCV CV3 is the active control CV3 Act1stCV This example could be a heat cooled system with a feed forward where e CV1 is feed forward e CV2 is cooling e CV3 heating Since CV1 is in Manual mode CV3 target value as the lowest priority goal cannot be accomplished PV will be maintained at the setpoint by using CV3 and at the same time CV2 will be driven to its target value 2nd priority goal If the operator changes the CV1 manual value the control variable will take the change into account when calculating new CV3 and CV2 M1 CV1 PV First order lag with deadtime model M2 CV2 PV First order lag with deadtime model M3 CV3 PV First order lag with deadtime model T Target Response C3 Model based algorithm to control PV by using CV3 Y1 Y2 Y3 Model outputs of M1 M2 M3 Y PV prediction 163 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC Using the Coordinated Control Function Block to Control Temperature This is an example of how you could use the Coordinated Control functi
328. ion does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan No action taken No action taken Example In many applications an integral gain component is included in the closed loop regulator design in order to eliminate or minimize error in the system being regulated A straight proportional only regulator will not tend to drive error in the system to zero A regulator that uses proportional and integral gain however tends to drive the error signal to zero over a period of time The INTG instruction uses the following equation to calculate its output In In _ I r Out Gain x 5 l DeltaT Out _ 1 In this chart the input to the block moves from 0 to 200 units During this period the output of the block integrates to 2800 units As In changes from 200 units to 0 units Out maintains at 2800 units When In transitions from 0 to 300 units Out slowly integrates down to 1400 units until In transitions back to 0 As In moves from 0 to 100 Out integrates back to 0 where In is set to 0 coincidentally with Out reaching 0 In Publication 1756 RMO06G EN P September 2010 245 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN 246 This characteristic of the integrator continually driving in a specific direction while any input to the function is present or holding at any level during the poi
329. ion executes Clear BOOL Clear input to the instruction If set the instruction clears Q and sets QNot Default is cleared Clock BOOL Clock input to the instruction Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output Q BOOL The output of the instruction ONot BOOL The complement of the Q output Description When Clear is set the instruction clears Q and sets QNot Otherwise if Clock Arithmetic Status Flags Fault Conditions 362 is set and Clock _ is cleared the instruction toggles Q and QNot The instruction sets Clock 4 Clock state every scan not affected none Publication 1756 RMO06G EN P September 2010 Move Logical Instructions DFF JKFF RESD SETD Chapter 7 Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Clock is set Clock is set Q is cleared Q is cleared ONot is set ONot is set instruction first run Clock is set Clock is set Q is cleared Q is cleared ONot is set ONot is set Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example When Clock goes from cleared to set the JKFF
330. ion taken No action taken Enableln is cleared EnableOut is cle and the outputs ared the instruction does nothing are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set i The instruction executes postscan No action taken No action taken Example The FGEN instruction characterizes a flow signal which is then totalized using a TOT instruction The F EN_01X1 and FGEN_01Y1 arrays are REAL arrays of 10 elements each to support up to a 9 segment curve You can use arrays of any size to support a curve of any desired number of segments Structured Text FGEN_01 IN Local 1 1 Ch0Data FGEN FGEN _01 FGEN_01X1 FGEN_01Y1 FlowTotal In FGEN _01 Out TOT FlowTotal Function Block FGEN_01 FlowT otal FGEN al TOT Function Generator Totalizer Local 1 ChOData In Out Cin Total D X1 F GEN_01X1 ProgProgReq OldTotal D Y1 FGEN_01Y1 E ProgOperReq ProgOper m Y2 E ProgStatReq RunStop amp x2 ProgStopReq ProgResetDone Publication 1756 RM006G EN P September 2010 ProgResetReq TargetFlag f TargetDew1Flag D TargetDev2Flag 59 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Lead Lag LDLG LDLG LDLG_ Operands tag LDLG_04 LDLG E Lead Lag Filter Out Input Parameter Enableln Data Type BOOL The LDLG inst
331. ion taken Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan No action taken No action taken Example The tag negate_enable determines whether to negate In or not The instruction sets Out In if NegateEnable is cleared The instruction sets Out In if NegateEnable is set Structured Text SNEG 01 In analog inputi SNEG_01 NegateEnable negate_enable SNEG SNEG 01 negate value SNEG 01 0ut Function Block SNEG_014 SNEG Selectable Negate 0 0 oo 6h analog_input1 a In Out O negate_value NegateEnable 0 negate_enable BD J 340 Publication 1756 RM006G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 The SSUM instruction uses boolean inputs to select real inputs to be elected Summer p p algebraically summed Operands SSUM SSUM_tag Structured Text SSUM tag SELECTABLE_SUMMER SSUM structure SSUM_O4 Function Block SSUM Ey Selected Summer Operand Tye Foma Description din Out SSUM tag SELECTABLE _SUMMER SSUM structure E Select1 g In2 g Select g Ins E Selects g In4 E Select4 SELECTABLE_SUMMER Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute
332. ious scan is added back into the total of the current value so that all counts or pulses are ultimately accounted for and no data is lost in the system The output of the block Out always yields a whole number in a floating point data type Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Structured Text PMUL 02 In Position feedback PMUL 02 Initalize Initialize Position PMUL 02 WordSize 12 PMUL 02 Multiplier 25000 PMUL PMUL_02 UPDN 02 Initialize Initialize Position UPDN 02 InPlus PMUL_02 Out UPDN UPDN 02 Total Position UPDN_ 02 O0ut Function Block UPDN_O2 UPDN LJ PMUL_02 Up Down Accumulator PMUL LJ Initialize Out Total_Position Pulse Multiplier d InitialVvalue Position_feedback Be In Out D4 hnitialize g InMinus g InitialValue jiz p wiordsize 2500 Multiplier Initialize_Position 1 Assuming Initial_Position 0 and Multiplier 25000 gt 25 000 100 000 Scan Position_Feedback PMUL_O2 0ut Total_Position Eg ae cn n 1 1 0 0 n 2 2 0 0 n 3 3 0 0 n 4 4 1 1 5 0 1 n 5 Publication 1756 RM006G EN P September 2010 265 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN
333. is lt to 31 repeat 2 and 3 Otherwise stop array subscript 0 Publication 1756 RMO06G EN P September 2010 405 Appendix B Structured Text Programming Example 2 If you want this A user defined data type structure stores the following information about an item in your inventory e Barcode ID of the item string data type e Quantity in stock of the item DINT data type An array of the above structure contains an element for each different item in your inventory You want to search the array for a specific product use its bar code and determine the quantity that is in stock 1 2 3 Get the size number of items of the nventory array and store the result in nventory_ tems DINT tag Initialize the position tag to 0 If Barcode matches the ID of an item in the array then a Set the Quantity tag Inventory position Oty This produces the quantity in stock of the item b Stop Barcode is a string tag that stores the bar code of the item for which you are searching For example when position 5 compare Barcode to Inventory 5 ID Add 1 to position If position is lt to Inventory_ tems 1 repeat 3 and 4 Since element numbers start at 0 the last element is 1 less than the number of elements in the array Enter this structured text SIZE Inventory 0 Inventory Items For position 0 to Inventory Items 1 do If Barcode Inventory position ID then Qua
334. it gt 100 if CV3HLimit lt CV3LLimit set bit in Status e f CV3HLimit lt CV3LLimit limit CV3 by using the value of CV3LLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 Valid CV3LLimit lt CV3HLimit lt 100 0 Default 100 0 CV1LLimit REAL CV1 low limit value This is used to set the CV1LAlarm output It is also used for limiting CV1 when in Auto mode or in Manual mode if CVManLimiting is TRUE Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 If CV1LLimit lt 0 set bit in Status If CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Valid 0 0 lt CV1LLimit lt CV1HLimit Default 0 0 CV2LLimit REAL CV2 low limit value This is used to set the CV2LAlarm output It is also used for limiting CV2 when in Auto mode or in Manual mode if CVManLimiting is TRUE Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 lf CV2LLimit lt 0 set bit in Status If CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Valid 0 0 lt CV2LLimit lt CV2HLimit Default 0 0 CV3LLimit REAL CV3 low limit value This is used to set the CV3LAlarm output It is also used for limiting CV3 when in Auto mode or in Manual mode if CVManLimiting is TRUE Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 If CV3LLimit lt 0 set bit in Status I
335. its gallons Colors Meter No Alarm H L Alarm HH LL Alarm Configure this property To specify the In Units units for the In field on the control Meter Color color of the meter bar when no alarms are current H L Color color of the meter bar when the instruction is in either the Low or High alarm state HH LL Color color of the meter bar when the instruction is in either the Low Low or High High alarm state 427 Appendix D Function Block Faceplate Controls ESEL Control 428 Enhanced Select Select Mode Program Override Program Operator Selected In ER Selector Type Average Output 12 2 Status InsFaulted Feature on control Mode Displays the mode of the block Input inputs to the block The number of displays 1 6 depends on the number of InsUsed Fault Indicator the letter F to the left of the input display if the particular input is faulted Selected Indicator triangle to the left of the input display indicates the selected input Program Button OperProgReq is set when you click this button Operator Button OperOperReq is set when you click this button Selected In value of Selectedin Selector Type select mode Output value of Out Status all the status bits that are set in the block If no bits are set the status displays OK Publication 1756 RMO06G EN P September 20
336. ive direction respectively PVTuneLimit only for integrating process type in PV engineering units defines how much of PV change that is caused by CV change to tolerate before aborting the tuning test due to exceeding this limit The tuner is started by setting the appropriate AtuneStart bit AtuneCV1Start for example You can stop the tuning by setting the appropriate AtuneAbort bit After the tuning is completed successfully the GainTuned TCTuned DTTuned and RespTCTuned parameters are updated with the tuning results and the AtuneStatus code is set to indicate complete You can copy these parameters to the ModelGain ModelTC and ResponseTC respectively by setting the AtuneUseModel bit The control vatiable will automatically initialize the internal variables and continue normal operation It will automatically reset the AtuneUseModel bit CC Function Block Tuning Procedure Follow these steps to configure the tuner 1 Put all three CV parameters into Manual mode 2 Set the AtuneStart parameter The tuner starts collecting PV and CV data for noise calculation 3 After collecting 60 samples 60 DeltaT period the tuner adds StepSize to the CV After successfully collecting the PV data as a result of the CV step change the CV assumes its value before the step change and the AtuneStatus GainTuned TCTuned DT Tuned and RespTCTuned parameters are updated 4 Set the AtuneUseModel parameter to copy the tuned param
337. ix5000 Controllers PhaseManager User Manual publication LOGIX UMO001 Instruction Location Languages Instruction Location Languages structured text function block CC structured text Coordinated Control function block Publication 1756 RM006G EN P September 2010 Instruction Locator Instruction Location Languages D2SD 29 structured text Discrete 2 State Device function block D3SD 38 structured text Discrete 3 State Device DEDT Deadtime function block 51 structured text function block Instruction ESEL Enhanced Select FGEN Function Generator Location Languages structured text function block structured text function block DERV 292 structured text HLL 327 structured text Derivative function block High Low Limit function block DFF 360 structured text HPF 296 structured text D Flip Flop function block High Pass Filter function block ICON 369 function block Input Wire Connector IMC 140 structured text Publication 1756 RMO06G EN P September 2010 Internal Model Control function block INTG Integrator structured text function block IREF Input Reference 369 function block Instruction Locator Instruction Languages Instruction Languages JKFF structured text JK Flip Flop function block LDL2 structured text Second Order Lead Lag function block LDLG structured text Lead Lag function block MAVE structured text Mo
338. l CV CVProg if in Operator control CV CVOper Select Manual mode using either OperManualReg or ProgManualReq Set OperManualReq to request Manual mode Ignored when ProgOper ProgOverrideRegq or ProgHandReg is set Set ProgManualReg to request Manual mode Ignored when ProgOper is cleared or when ProgOverrideReq or ProgHandReg is set Override While in Override mode the instruction does not compute the change in CV CV CVOverride regardless of the control mode Override mode is typically used to set a safe state for the PID loop Select Override mode using ProgOverrideReq Set ProgOverrideReg to request Override mode Ignored when ProgHandReq is Cleared Hand While in Hand mode the PID algorithm does not compute the change in CV CV HandFB regardless of the control mode Hand mode is typically used to indicate that control of the final control element was taken over by a field hand auto station Select Hand mode using ProgHandRea Set ProgHandReg to request hand mode This value is usually read as a digital input from a hand auto station 86 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 The Cascade Ratio Auto and Manual modes can be controlled by a user program when in Program control or by an operator interface when in Operator control The Override and Hand modes have a mode request input that ca
339. l Ignored if ProgOperReg is set Holding this set and ProgOperReg cleared locks the instruction into Program control Default is cleared ProgOperReq BOOL Program operator request Set by the user program to request Operator control Holding this set locks the instruction into Operator control Default is cleared ProgOverrideReq BOOL Program override request Set by the user program to request the device to enter Override mode Ignored if ProgOper is cleared In Override mode the instruction will act as a manual select Default is cleared OperProgReq BOOL Operator program request Set by the operator interface to request Program control The instruction clears this input Default is cleared OperOperReq BOOL Operator operator request Set by the operator interface to request Operator control The instruction clears this input Default is cleared ProgValueReset BOOL Reset program control values When set all the program request inputs are cleared each 322 execution of the instruction Default is cleared Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output SelectedIn DINT Number of input selected The instruction uses this value to display the
340. l Set the Modell nit2 parameter to TRUE to initialize the CV2 PV internal model parameters and for the new model gain to take effect Publication 1756 RMO06G EN P September 2010 167 Chapter 2 168 Advanced Process Control Function Blocks IMC CC MMC CC Function Block Structure cc_o4 cc Coordinated Control Operand CC tag g CV1Prog g CV2Prog g CV3Prog E ProgProgReq E ProgOperReq E Pro gEV 1AutoReq E ProgC 2AutoReg E Prog V3AutoReq Operand E ProgCV1ManualReq cc E ProgCV2ManualReq CV 10verride tag E Pro gCV3 la nual Req E Prog V 10veride Req E ProgCV 20veride Req C 20veride CV30veride D E ProgC V30veride Req Structured Text Coordinated Control Function Block moo i Coordinated Control IMPORTANT CC CC_tag eat Description CC structure Description CC structure Whenever an APC block detects a change in Delta Time DeltaT a Modellnit will be performed For this reason the blocks should only be run in one of the TimingModes in which DeltaT will be constant e TimingMode 0 Periodic while executing these function blocks in a Periodic Task e 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 Modellnit The following TimingMode setting are not recommended due to jitter in DeltaT e TimingMode 0 Periodic while executing the
341. l term DeltaPTerm using the change in process variable PVPercent When cleared use the change in error EPercent Default is cleared 68 Publication 1756 RMO06G EN P September 2010 Input Parameter PVEDerivative Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Data Type BOOL Chapter 1 Description Derivative PV control request When set calculate the derivative term DeltaDTerm using the change in process variable PVPercent When cleared use the change in error EPercent Default is set DSmoothing BOOL Derivative Smoothing request When set changes in the derivative term are smoothed Derivative smoothing causes less output jitters as a result of a noisy PV signal but also limits the effectiveness of high derivative gains Default is cleared PVTracking BOOL SP track PV request Set to cause SP to track PV when in manual mode Ignored when in Cascade Ratio or Auto mode Default is cleared ZCDeadband REAL Zero crossing deadband range scaled in PV units Defines the zero crossing deadband range Enter 0 to disable the zero crossing deadband checking If ZCDeadband lt 0 the instruction sets the appropriate bit in Status and disables zero crossing deadband checking Valid 0 0 to maximumimum positive float Default 0 0 ZCOff BOOL Zero crossing disable request Set to disable zero crossing for the dea
342. ldReq Hold SoakValue SoakTime RampValue AutoclaveRSSoakValue AutoclaveRSSoakTime AutoclaveRSRampValue ToEPoeoeoUT g PV Q SPProg SPCascade RatioProg Q CVProg CFF Cj HandFB E ProgProgReq E ProgOperReq E ProgCasRatReq ProgAutoReg E ProgManualReq E ProgOverrideReg E ProgHandReg PIDE Enhanced PID PYHHAlarm PY HAlarm f5 PY LAlarm D PYLLAIarm PYROCPosAlarm PVROCNegAlarm amp DevHHAlarm DevHAlarm DevLAlarm DevLLAlarm SteamValve Switching between Program control and Operator control The RMPS instruction can be controlled by either a user program or through an operator interface Control can be changed any time user program sets ProgOperReq request takes precedence and is always granted operator sets OperOperReq 2 granted if ProgProgReq is cleared Program Control ko y 114 user program sets ProgProgReq granted if ProgOperReq is cleared operator sets OperProgReq granted if ProgOperReq and OperOperReg are cleared 1 You can lock the instruction in Operator control by leaving ProgOperReq set Operator Control Nea y 2 You can lock the instruction in Program control by leaving ProgProgReq set while ProgOperReq is cleared For more information on program and operator control see page 381 Publication 1756 RMO06G EN P September 2010 Process Control Ins
343. le input 2 This value is typically read Valid any float from an analog input module Default 0 0 PV1Fault BOOL PV1 bad health indicator If PV1 is read from an analog input Default FALSE then PVFault will normally be controlled by the analog input fault status If PVFault is TRUE it indicates an error on the FALSE Good Health input module set bit in Status Refer to Processing Faults on page 99 PVSpanlnv or SPLimitsInv for details PV2Fault BOOL PV2 bad health indicator If PV2 is read from an analog input Default FALSE then PVFault will normally be controlled by the analog input fault status If PVFault is TRUE it indicates an error on the FALSE Good Health input module set bit in Status Refer to Processing Faults on page 99 PVSpaninv or SPLimitsInv for details PV1EUMax REAL Maximum scaled value for PV1 The value of PV1 and SP1 Valid PVIEUMin lt PV1EUMax that corresponds to 100 span of the Process Variable If maximum positive float PVEUMax lt PVEUMin set bit in Status Refer to Processing Faults on page 99 PVSpaninv or Beale SPLimitsInv for details PV2EUMax REAL Maximum scaled value for PV2 The value of PV2 and SP2 Valid PV2EUMin lt PV2EUMax that corresponds to 100 span of the Process Variable If maximum positive float PVEUMax lt PVEUMin set bit in Status Refer to Processing Faults on page 99 PVSpaninv or Dial 1006 SPLimitsInv for details PV1UEMin REAL Minimum scaled value for
344. le on page 94 Valid 0 0 100 0 Default 0 0 CV10per REAL CV1 Operator Manual value CV1 is set to this value when in Operator control and Manual mode If not Operator Manual mode set CV10per to the value of CV1 at the end of each function block execution If value of CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 and CV High Low Limiting on page 96 Publication 1756 RMO06G EN P September 2010 Valid 0 0 100 0 Default 0 0 171 Chapter 2 CC Input Parameter CV20per Data Type REAL Advanced Process Control Function Blocks IMC CC MMC Description CV2 Operator Manual value CV2 is set to this value when in Operator control and Manual mode If not Operator Manual mode set CV2Oper to the value of CV2 at the end of each function block execution If value of CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 and CV High Low Limiting on page 96 Values Valid 0 0 100 0 Default 0 0 CV30per REAL CV3 Operator Manual value CV3 is set to this value when in Operator control and Manual mode If not Operator Manual mode set CV30per to the value of CV3 at the end of each functi
345. leared when the device is being commanded to some other state FaultAlarm BOOL Fault alarm output Set if the device has been commanded to a new state and the FaultTime has expired without the feedback indicating that the new state has actually been reached Also set if after reaching a commanded state the feedbacks suddenly indicate that the device is no longer in the commanded state ModeAlarm BOOL Mode alarm output Set if the device is in operator control and a program command changes to a state which is different from the state currently commanded by the operator This alarm is intended as a reminder that a device was left in Operator control ProgOper BOOL Program operator control indicator Set when in Program control Cleared when in Operator control Override BOOL Override mode Set when the device is in the Override mode Hand BOOL Hand mode Set when the device is in the Hand mode Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred FaultTimelnv Status 1 BOOL Invalid FaultTime value The instruction sets FaultTime 0 42 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Output Parameter Data Type Description OverrideSta
346. lies only if you embed the assignment in the action of the step ot use the action to call a structured text routine via a JSR instruction Publication 1756 RMO06G EN P September 2010 403 Appendix B Structured Text Programming FOR DO Use the FOR DO loop to do something a specific number of times before doing anything else Operands Structured Text FOR count initial_value TO final value BY increment DO Operand Type Format Description lt statement gt count SINT tag tag to store count position as the END FOR INT FOR DO executes DINT initial_ SINT tag must evaluate to a number value INT expression specifies initial value for count DINT immediate final_ SINT tag specifies final value for count which value INT expression determines when to exit the loop DINT immediate increment SINT tag optional amount to increment count INT expression each time through the loop DINT immediate If you don t specify an increment the count increments by 1 IMPORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e If the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as IF THEN Description The syntax is FOR count initial value TO final
347. limit in percent per second e Rate of change limiting is only used when in Auto or CascadeRatio modes or Manual mode if CVManLimiting is TRUE e A value of zero disables CV ROC limiting e f value of CVROCNegLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Change Limiting on page 96 for details Valid 0 0 to maximum positive float Default 0 0 HandFB 150 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 lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 Valid 0 0 100 0 Default 0 0 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 IMC Input Parameter Type Description Valid and Default Values HandFBFault BOOL HandFB value bad health indicator If the HandFB value is read Default FALSE from an analog input then HandFBFault will normally be controlled by the status of the analog input channel FALSE Good Health If HandFBFault is TRUE it indicates an error on the input module set bit in Status WindupHIn BOOL Windup high request When TRUE
348. lock InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred GainInv Status 1 BOOL Gain gt maximum or Gain lt minimum WLaglInv Status 2 BOOL WLag gt maximum or WLag lt minimum WLeadlInv Status 3 BOOL WLead gt maximum or WLead lt minimum ZetaLeadinv Status 4 BOOL ZetaLead gt maximum or ZetaLead lt minimum HighLowLimsInv BOOL HighLimit lt LowLimit Status 5 TimingModelnv BOOL Invalid timing mode Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Status 30 Invalid RTSTimeStamp value DeltaT Status 31 BOOL Invalid DeltaT value Description The SOC instruction provides a gain term a first order lag and a second order 280 lead The frequency of the lag is adjustable and the frequency and damping of the lead is adjustable The zero pair for the second order lead can be complex damping lt unity or real damping S to unity The SOC instruction is designed to execute in a task where the scan rate remains constant The SOC instruction uses the following Laplace T
349. locks IMC CC MMC Chapter 2 MMC Input Parameter Type Description Values CV1PV2ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta Default FALSE PV2 Delta CV1 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV CV2PV2ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta Default FALSE PV2 Delta CV2 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV CV3PV2ProcessGainSign BOOL Used only for Autotuning Sign of the process gain Delta Default FALSE PV2 Delta CV3 e Set to indicate a negative process gain increase in output causes a decrease in PV e Reset to indicate a positive process gain increase in output causes an increase in PV Process lype DINT Process type selection for both PV1 and PV2 1 Integrating Default FALSE O non integrating CV1PV1ModelGain REAL The internal model gain parameter for CV1 PV1 Enter a Valid maximum negative float positive or negative gain depending on process direction gt maximum positive float If CV1ModelGain INF or NAN set bit in Status or INF or Default 0 0 NAN CV2PV1ModelGain REAL The internal model gain parameter for CV2 PV1 En
350. low within the loop This is NOT OK The controller cannot resolve the loop because all the wires use the Assume Data Available indicator Resolve Data Flow Between Two Blocks If you use two or more wires to connect two blocks use the same data flow indicators for all of the wires between the two blocks This is OK This is NOT OK Assume Data Available indicator Both wires use the Assume Data Available indicator 374 One wire uses the Assume Data Available indicator while the other wire does not Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Function Block Attributes Appendix A Create a One Scan Delay To produce a one scan delay between blocks use the Assume Data Available indicator In the following example block 1 executes first It uses the output from block 2 that was produced in the previous scan of the routine Summary In summary a function block routine executes in this order 1 The controller latches all data values in IREFs 2 The controller executes the other function blocks in the order determined by how they are wired 3 The controller writes outputs in OREFs 375 AppendixA Function Block Attributes Function Block Responses to Overflow Conditions Response 1 Blocks execute their algorithm and check the result for NAN or INF If NAN or INF the block outputs NAN or INF In general the function block instructi
351. lt FALSE analog output then CV3Fault will normally come from the analog output s fault status FALSE Good Health If CVFault is TRUE it indicates an error on the output module set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpaninv for details on fault handling CV1InitReq BOOL CV1 initialization request While TRUE set CVEU to the value Default FALSE of CVInitValue This signal will normally be controlled by the In Hold status on the analog output module controlled by CV1EU or from the InitPrimary output of a secondary loop Refer to Processing Faults on page 99 The instruction initialization is disabled when CVFaulted or CVEUSpaninv are TRUE Refer to Instruction First Scan on page 80 CV2InitReq BOOL CV2 initialization request While TRUE set CVEU to the value Default FALSE of CVInitValue This signal will normally be controlled by the In Hold status on the analog output module controlled by CV2EU or from the InitPrimary output of a secondary loop Refer to Processing Faults on page 99 The instruction initialization is disabled when CVFaulted or CVEUSpaninv are TRUE Refer to Instruction First Scan on page 80 206 Publication 1756 RMO06G EN P September 2010 MMC Input Parameter CV3lnitReq Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description CV3 initialization request While TRUE set CVEU to the value of CVInitValue This signal will normally be controlled b
352. lue Speed of response depends on the value of the response time constants The smaller the response time constants the faster the control variable response will be The response time constants should be set such that the PV s reach the setpoints in reasonable time based on the process dynamics The larger that the response time constants the slower the control variable response will be but the control variable also becomes more robust In the Manual mode the control variables CV are set equal to the operator entered Manual CV parameters For the Manual to Auto mode bumpless transfer and for safe operation of the control variable the CV rate of change limiters are implemented such that CV s cannot move from current states by more than specified CV units at each scan Set the CVROCPosLimit and CVROCNegLimit to limit the CV rate of change Rate limiting is not imposed when control variable is in Manual mode unless CVManLimiting is set Publication 1756 RMO06G EN P September 2010 199 Chapter 2 200 Advanced Process Control Function Blocks IMC CC MMC Using an MMC Function Block for Splitter Control The following example describes using an MMC function block to control a splitter Refer to MMC Function Block Splitter Example Configuration on page 197 Item Description PV1 Top composition more important PV2 Bottom composition less important Active 1st CV for PV1 CV1 reflux ratio Activ
353. m forms using these equations Kp Ke Kp Kelp Each algorithm provides identical control with the appropriate gains Some people prefer the independent gains style because they can manipulate individual gains without affecting the other terms Others prefer the dependent gains style because they can at least to a certain extent change just the controller gain and cause an overall change in the aggressiveness of the PID loop without changing each gain separately Monitoring the PIDE instruction There is an operator faceplate available for the PIDE instruction For more information see appendix Function Block Attributes Autotuning the PIDE instruction The RSLogix 5000 PIDE autotuner provides an open loop autotuner built into the PIDE instruction You can autotune from PanelView terminals or any other operator interface devices as well as RSLogix 5000 software The PIDE block has an Autotune Tag type PIDE_AUTOTUNE that you specify for those PIDE blocks that you want to autotune The PIDE autotuner is installed with RSLogix 5000 software but you need an activation key to enable the autotuner The autotuner is only supported in function block programming it is not available in relay ladder or structured text programming 78 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Use the Autotune tab to specify and configure the a
354. mes reflected through the feedback device itself 284 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Using the SOC instruction PID tuning is simplified because the regulating terms can be arranged so that you have WLead and ZLead as inputs to the SOC instruction rather than Kp Ki and Kd values In this manner the corner frequencies of the controller regulator are easier to adjust and setup against the real world process During startup the natural frequency of the system and the damping factor can be measured empirically or on site Afterward the parameters of the regulator can be adjusted to match the characteristics of the process allowing more gain and more stable control of the final process second order controller process second order lead Wi eag system natural moves gain from 1 to 1 frequency Publication 1756 RM006G EN P September 2010 In the system above if Wlead is set equal to the system natural frequency and if Wlag is set substantially above the desired crossover frequency gt 5 times crossover the resulting system response would look like the following In an actual application the steps in using and setting up this instruction include 1 Recognize the type of process that is being controlled If the system s response to a step function results in a high degree of ringing or can be characterized by the process curve shown abov
355. mmanded to state 0 and set when commanded to state 1 When OutReverse is set Out is set when commanded to state 0 and cleared when commanded to state 1 Default is cleared OverrideState BOOL Override state input Configure this value to specify the state of the device when the device is in Override mode Set indicates that the device should go to the 1 state cleared indicates that the device should go to the 0 state Default is cleared FBOState0 BOOL Feedback 0 state 0 input Configure the state of the FBO when the device is in the 0 state Default is cleared FBOState1 BOOL Feedback 0 state 1 input Configure the state of the FBO when the device is in the 1 state Default is cleared FB1State0 BOOL Feedback 1 state 0 input Configure the state of the FB1 when the device is in the 0 state Default is cleared FB1State1 BOOL Feedback 1 state 1 input Configure the state of the FB1 when the device is in the 1 state Default is cleared 30 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type Description ProgProgReq BOOL Program program request Set by the user program to request Program control Ignored if ProgOperReg is set Holding this set and ProgOperReg cleared locks the instruction into Program control De
356. mode request for CV2 Default FALSE 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 Refer to Operating modes on page 86 ProgCV3HandReq BOOL Program Hand mode request for CV3 Default FALSE 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 Refer to Operating modes on page 86 OperProgReq BOOL Operator Program Request Default FALSE Set TRUE by the operator interface to request Program control The function block will reset this parameter to FALSE Refer to Switching between Program control and Operator control on page 114 OperOperReq BOOL Operator Operator Request Default FALSE Set TRUE by the operator interface to request Operator control The function block will reset this parameter to FALSE Refer to Switching between Program control and Operator control on page 114 OperCV1AutoReq BOOL Operator Auto mode request for CV1 Default FALSE Set TRUE by the operator interface to request Auto mode The function block resets the input to FALSE Refer to Operating modes on page 86 182 Publication 1756 RMO06G EN P September 2010 CC Input Parameter OperCV2AutoReq Data Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description Operator Auto mode request for CV2 Set TRUE by the operator int
357. mp Soak dq PY Out D O CurrentSegProg CurrentSeg D o OutProg SoakTimeLeft D Q SoakTimeProg GuarRampOn A ProgProgReq GuarSoakOn D ProgOperReq ProgOper D E ProgAutoReg Auto D ProgManualReg Manual E ProgHoldReq Hold RampValue SoakValue SoakTime Publication 1756 RMO06G EN P September 2010 The RMPS instruction provides for a number of segments of alternating ramp and soak periods Structured Text Operand Type RMPS tag RAMP_ SOAK Format structure Description RMPS structure RampValue REAL array Ramp Value array Enter a ramp value for each segment 0 to NumberOfSegs 1 Ramp values are entered as time in minutes or as a rate in units minute The TimeRate parameter reflects which method is used to specify the ramp If a ramp value is invalid the instruction sets the appropriate bit in Status and changes to Operator Manual or Program Hold mode The array must be at least as large as NumberOfSegs valid 0 0 to maximumimum positive float SoakValue REAL array Soak Value array Enter a soak value for each segment 0 to NumberOfSegs 1 The array must be at least as large as NumberOfSegs valid any float SoakTime REAL Function Block array Soak Time array Enter a soak time for each segment 0 to NumberOfSegs 1 Soak times are entered in minutes If a soak value is invalid the instruction sets the appropriate bit in Status and changes to Operator Manual or
358. n The time stamp value is read from the tag name entered for the RTSTimeStamp parameter of the instruction Normally this tag name is a parameter on the input module associated with the process input The instruction compares the configured RTSTime value expected update period against the calculated DeltaT to determine if every update of the process input is being read by the instruction If DeltaT is not within 1 ms of the configuration time the instruction sets the RTSMissed status bit to indicate that a problem exists reading updates for the input on the module Publication 1756 RMO06G EN P September 2010 377 AppendixA Function Block Attributes Time based instructions require a constant value for DeltaT in order for the control algorithm to properly calculate the process output If DeltaT varies a discontinuity occurs in the process output The severity of the discontinuity depends on the instruction and range over which DeltaT varies A discontinuity occurs if the e instruction is not executed during a scan e instruction is executed multiple times during a task e task is running and the task scan rate or the sample time of the process input changes e user changes the time base mode while the task is running e Order parameter is changed on a filter block while the task is running Changing the Order parameter selects a different control algorithm within the instruction Common instruction parameters for timing modes
359. n Tes Model time constant D Model deadtime ee Response time constant Shore Laplace variable The function block then calculates the CV value CVHLimit CVLLimit and rate of change limits are imposed and the PV prediction Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 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 IMC Function Block Configuration Follow these steps to create a basic IMC configuration 1 Starting with the default configuration configure the following parameters Parameter Description PVEUMax Maximum scaled value for PV PVEUMin Minimum scaled value for PV SPHLimit SP high limit value scaled in PV units SPLLimit SP low limit value scaled in PV units CVInitValue An initial value of the control variable output 2 Ifyou have the process model available you can intuitively tune the IMC control
360. n executes in a Then DeltaT equals periodic task period of the task event or continuous elapsed time since the previous execution task The controller truncates the elapsed time to whole milliseconds ms For example if the elapsed time 10 5 ms the controller sets DeltaT 10 ms The update of the process input needs to be synchronized with the execution of the task or sampled 5 10 times faster than the task executes in order to minimize the sampling error between the input and the instruction oversample In oversample mode the delta time DeltaT used by the instruction is the value written into the OversampleDT parameter of the instruction If the process input has a time stamp value use the real time sampling mode instead Add logic to your program to control when the instruction executes For example you can use a timer set to the OversampleDeltaT value to control the execution by using the Enableln input of the instruction The process input needs to be sampled 5 10 times faster than the instruction is executed in order to minimize the sampling error between the input and the instruction real time sampling In the real time sampling mode the delta time DeltaT used by the instruction is the difference between two time stamp values that correspond to the updates of the process input Use this mode when the process input has a time stamp associated with its updates and you need precise coordinatio
361. n 1756 RM006G EN P September 2010 MINC_04 MINC ER Minimum Capture Out 0 0 p minimum C ResetValue teset_value 353 Chapter 6 Statistical Instructions MAVE MAXC MINC MSTD I lati The MSTD instruction calculates a moving standard deviation and average for oving otandar eviation g g MSTD MSTD MSTD tag storage Operands MSTD_01 MSTD E Moving Standard Deviation In SampleEnable StorageArray the In signal Structured Text Operand Type Format Description MSTD tag MOVING_STD_DEV structure MSTD structure storage REAL array holds the In samples This array must be at least as large as NumberOfSamples Function Block Operand Type Format Description MSTD tag MOVING_STD_DEV structure MSTD structure storage REAL array holds the In samples This array must be at least as large as NumberOfSamples MOVING _STD_DEV Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 InFault BOOL Bad health indicator for the input If In is read from an analog input then InFault is normally controlled by fault status on the analog input When set InFaul
362. n ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOO Status 30 Invalid RTSTimeStamp value DeltaTInv Status 31 BOO 52 Invalid DeltaT value Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Description The DEDT instruction uses a data buffer to store delayed data thereby allowing any length deadtime desited The DEDT instruction is designed to execute in a task where the scan rate remains constant To use the DEDT instruction create a storage array to store the deadtime buffer to hold the samples of In x Gain Bias The storage array should be large enough to hold the largest desired deadtime using this formula StorageArray Size Needed maximumimum Deadtime secs DeltaT secs Servicing the deadtime buffer During runtime the instruction checks for a valid Deadtime Deadtime must be between 0 0 and StorageArray Size x DeltaT If the Deadtime is invalid the instruction sets an appropriate Status bit and sets Out In x Gain Bias The deadtime buffer functions as a first in first out buffer Every time the deadtime algorithm executes the oldest value in the deadtime buffer is moved into Out The remaining values in the buffer shift downward and the value In x Gain Bias is moved to the beginning of the deadtime buffe
363. n BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In DINT The analog signal input to the instruction Valid any DINT Default 0 Initialize BOOL The initialize input When set Out is held at 0 0 and all the internal registers are set to 0 On a set to cleared transition In _ InitialValue not valid for Absolute mode When cleared the instruction executes normally The instruction ignores Initialize if WordSize is invalid Default is cleared InitialValue DINT The initial value input On a set to cleared transition of Initialize In _ InitialValue Valid any DINT Default 0 260 Publication 1756 RMO06G EN P September 2010 Input Parameter Data Type Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Description Mode BOOL The mode input Set to enable Relative mode Clear to enable Absolute mode Default is set WordSize DINT The word size in bits Specify the number of bits to use when computing In In in Relative mode WordSize is not used in Absolute mode When the change in In is greater than 1 2 x 2 Wordsize 1 Out changes sign When WordSize is invalid Out is held and the instruction sets the appropriate bit in Status Valid 2 to 32 Default 14 Multiplier DINT The multiplier Divide this value by 100 000 to control the ratio of In to Out If
364. n Block NTCHtag FILTER_NOTCH structure NTCH structure FILTER_NOTCH Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL Request to initialize filter control algorithm When set the instruction sets Out In Default is cleared WNotch REAL The filter center frequency in radians second If WNotch lt minimum or WNotch gt maximum the instruction sets the appropriate bit in status and limits WNotch Valid see Description section below for valid ranges Default maximum positive float OFactor REAL Controls the width and depth ratio Set OFactor 1 2 desired damping factor If QFactor lt minimum or OFactor gt maximum value the instruction sets the appropriate bit in Status and limits OFactor Valid 0 5 to 100 0 Default 0 5 Order 314 REAL Order of the filter Order controls the sharpness of the cutoff If Order is invalid the instruction sets the appropriate bit in Status and uses Order 2 Valid 2 or 4 Default 2 Publication 1756 RMO06G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Inpu
365. n PV units Refer to SP High Low Limiting on page 88 If SPHLimit lt SPHLimit or SPHLimit gt PVEUMax set bit in Status Refer to Processing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling Chapter 2 Valid and Default Values Valid SPLLimit to PVEUMax Default 100 0 SPLLimit REAL SP low limit value scaled in PV units Refer to SP High Low Limiting on page 88 If SPLLimit lt PVEUMin or SPHLimit lt SPLLimit set bit in Status and limit SP by using the value of SPLLimit Refer to Processing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling Valid PVEUMin to SPHLimit Default 0 0 UseRatio BOOL Allow Ratio control permissive Set TRUE to enable ratio control when in CascadeRatio mode Refer to Selecting the Setpoint on page 87 Default FALSE RatioProg REAL Ratio Program multiplier no units for example scalar Ratio and RatioOper are set to this value when in Program control Refer to Cascade ratio SP on page 87 If RatioProg or RatioOper lt RatioLLimit or gt RatioHLimit set bit in Status and limit value used for Ratio Refer to Selecting the Setpoint on page 87 CascadeRatio SP for details 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
366. n only be controlled by a user program these inputs operate in both Program and Operator control Selecting the Setpoint Once the instruction determines program or operator control and the PID mode the instruction can obtain the proper SP value You can select the cascade ratio SP or the current SP Cascade ratio SP The cascade ratio SP is based on the UseRatio and ProgOper values pe If Ratio gt RatioHLimit RatioHAlarm gt RatioHAlarm is set 8 8 gt UseRati i A a TEE PE T eee p If Ratio lt RatiolLimit RatioLAlarm op PatioLAlarm isset gt if Ratio gt RatioHLimit Hay Le p Ratio RatioHAlarm RatioProg If Ratio lt RatioLLimit Lt p gt Select set Output Ratio RatioLAlarm RatioOper p gt Select cleared ProgOper lect Input Output terete ee Selec e inp p RatioOper ed pw Enable 1 Output gt Select set Output gt 11x12 CascadeRatio SP Select cleared 2 SPCascade Select PP UseRatio Spas a Ns edi a Ser te iv a mie ed a ee ES ee cert eh ce s Publication 1756 RMO06G EN P September 2010 87 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Current SP The current SP is based on the Cascade Ratio mode the PVTracking value auto mode and the ProgOper value
367. n provides a gain term a first order lag and a second order lead Structured Text Operand Type Format Description SOC tag SEC_ORDER_CONTROLLER structure SOC structure Function Block Operand Type Format Description SOC tag SEC_ORDER_CONTROLLER structure SOC structure SEC_ORDER_CONTROLLER Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL The instruction initialization command When set Out and internal integrator are set equal to the value of InitialValue Default is cleared InitialValue REAL The initial value input When Initialize is set Out and integrator are set to the value of InitialValue The value of InitialValue is limited using HighLimit and LowLimit Valid any float Default 0 0 Gain REAL The proportional gain for the instruction If the value is out of range the instruction limits the value and sets the appropriate bit in Status Valid any float gt 0 0 Default minimum positive float WLag REAL First order lag corner frequency in radians second If the value is out of range the instruction limits the value and sets the appropriate bit in Status Valid see the Description section below for
368. n these components Term Definition Examples assignment Use an assignment statement to assign values to tags tag expression see page 387 The operator is the assignment operator Terminate the assignment with a semi colon expression An expression is part of a complete assignment or construct statement see page 389 An expression evaluates to a number numerical expression or to a true or false state BOOL expression An expression contains tags A named area of the memory where data is stored valuel BOOL SINT INT DINT REAL string immediates A constant value 4 operators A symbol or mnemonic that specifies an operation tagl tag2 within an expression tagl gt valuel functions When executed a function yields one value Use function tagl parentheses to contain the operand of a function Even though their syntax is similar functions differ from instructions in that functions can only be used in expressions Instructions cannot be used in expressions instruction An instruction is a standalone statement instruction see page 396 An instruction uses parenthesis to contain its operands Depending on the instruction there can be zero one or multiple instruction operand operands When executed an instruction yields one or more values that are part of instruction operand1 a data structure operand2 operand3 Terminate the instruction with a semi colon Even though their syntax is similar in
369. nableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes D BOOL The input to the instruction Default is cleared Clear BOOL Clear input to the instruction If set the instruction clears Q and sets QNot Default is cleared Clock BOOL Clock input to the instruction Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output 0 BOOL The output of the instruction ONot BOOL The complement of the Q output Description When Clear is set the instruction clears Q and sets QNot Otherwise if Clock is set and Clock _ is cleared the instruction sets Q D and sets QNot NOT D The instruction sets Clock 4 Clock state every scan Arithmetic Status Flags not affected 360 Publication 1756 RMO06G EN P September 2010 Move Logical Instructions DFF JKFF RESD SETD Chapter 7 Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Clock is set Clock is set Q is cleared Q is cleared ONot is set ONot is set instruction first run Clock is set Clock is set Q is cleared Q is cleared ONot is set ONot is set Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are n
370. nal for the fifth input Default is cleared In6 REAL The sixth input to be summed Valid any float Default 0 0 Gain6 REAL Gain for the sixth input Valid any float Default 1 0 Select6 BOOL Selector signal for the sixth input Default is cleared In7 REAL The seventh input to be summed Valid any float Default 0 0 Gain7 REAL Gain for the seventh input Valid any float Default 1 0 Select7 BOOL Selector signal for the seventh input Default is cleared In8 342 REAL The eighth input to be summed Valid any float Default 0 0 Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Input Parameter Data Type Description Gain8 REAL Gain for the eighth input Valid any float Default 1 0 Select8 BOOL Selector signal for the eighth input Default is cleared Bias REAL Bias signal input The instruction adds the Bias to the sum of the inputs Valid any float Default 0 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output Arithmetic Status Flags Publication 1756 RMO06G EN P September 2010 Description The SSUM instruction operates as follows Fault Conditions Execution Condition Action No In is selected Out Bi
371. nd actual positions Structured Text Operand Type Format Description POSP tag POSITION PROP structure POSP structure Function Block POSP Ea Position Proportional Operand Type Format Description SP OpenOut D block tag POSITION_PROP structure POSP structure Position CloseOut OpenedFB ClosedFB POSITION_PROP Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes SP REAL Setpoint This is the desired value for the position This value must use the same engineering units as Position Valid any float Default 0 0 Position REAL Position feedback This analog input comes from the position feedback from the device Valid any float Default 0 0 OpenedFB BOOL Opened feedback This input signals when the device is fully opened When set the open output is not allowed to turn on Default is cleared ClosedFB BOOL Closed feedback This input signals when the device is fully closed When set the close output is not allowed to turn on Default is cleared PositionEUmaximum REAL maximumimum scaled value of Position and SP 100 Valid any float Default 100 0 Publication 1756 RMO06G EN P September 2010 Input Parameter PositionEUMin Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP
372. ndard deviation algorithm and continues executing Valid 1 to size of the storage array Default 1 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm The instruction holds Out at its current value when SampleEnable is cleared Arithmetic status flags are set for this output Average REAL The calculated average of the algorithm Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred InFaulted Status 1 BOOL In health is bad InFault is set NumberOfSamplnv BOOL NumberOfSamples invalid or not compatible with array size Status 2 Description The MSTD instruction supports any input queue length Each scan if Publication 1756 RMO06G EN P September 2010 SampleEnable is set the instruction enters the value of In into a storage array When the storage array is full each new value of In causes the oldest entry to be deleted The MSTD instructions uses these equations for the outputs Condition Equals Average P gt RETE Ta eas ei NumberOfSamples Out NumberOfS les Gi E Kee Si Un Average NumberOfSamples 355 Chapter 6 356 Statistical Instructions MAVE MAXC MINC MSTD NumberOfSamples 3 Scan 1 Average In 1 The instruction will no
373. nded to the 1 state and cleared when the device is being commanded to the 0 state FaultAlarm BOOL Fault alarm output Set if the device was commanded to a new state and the FaultTime has expired without the feedbacks indicating that the new state has actually been reached Also set if after reaching a commanded state the feedbacks suddenly indicate that the device is no longer in the commanded state ModeAlarm BOOL Mode alarm output Set if the device is in Operator control and a program command changes to a state which is different from the state currently commanded by the operator This alarm is intended as a reminder that a device was left in Operator control ProgOper BOOL Program Operator control indicator Set when in Program control Cleared when in Operator control Override BOOL Override mode Set when the device is in the Override mode Hand BOOL Hand mode Set when the device is in the Hand mode Status DINT Status of the function block Publication 1756 RMO06G EN P September 2010 31 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Output Parameter Data Type Description InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred FaultTimelnv Status 1 BOOL Invalid FaultTime value The instruction sets Fault
374. ndix B Assign an ASCII character to a string Use the assignment operator to assign an ASCII character to an element of the DATA member of a string tag To assign a character specify the value of the character or specify the tag name DATA member and element of the character For example This is OK This is not OK stringl1 DATA 0 65 stringl DATA 0O A string1 DATA 0 string2 DATA 0 stringl string2 To add or insert a string of characters to a string tag use either of these ASCII string instructions To Use this instruction add characters to the end of a string CONCAT insert characters into a string INSERT Expressions An expression is a tag name equation or comparison To write an expression use any of the following tag name that stores the value variable e number that you enter directly into the expression immediate value e functions such as ABS TRUNC e operators such as lt gt And Or As you write expressions follow these general rules e Use any combination of upper case and lower case letter For example these three variations of AND are acceptable AND And and e For more complex requirements use parentheses to group expressions within expressions This makes the whole expression easier to read and ensures that the expression executes in the desired sequence See Determine the order of execution on page 395 Publication 1756 RMO06G EN P Septemb
375. ng is set the instruction limits the change of CV Updating the CVOper and CVProg Values If not in the Operator Manual mode the PIDE instruction sets CVOper CV This obtains bumpless mode switching from any control to the Operator Manual mode CV from CV rate of change limiting ProgOper or not Manual mode CV from CV rate of change limiting ProgOper is cleared or not Manual mode and ProgValueReset is set Publication 1756 RMO06G EN P September 2010 CVOper Input Output _ __ gt Enable CVProg Input Output _ ___ gt Enable 97 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Primary Loop Control Primary loop control is typically used by a primary PID loop to obtain bumpless switching and anti reset windup when using Cascade Ratio mode The primary loop control includes the initialize primary loop output and the anti reset windup outputs The InitPrimary output is typically used by the CVInitReq input of a primary PID loop The windup outputs are typically used by the windup inputs of a primary loop to limit the windup of its CV output InitPrimary is cleared WindupHOut is cleared WindupLOut is cleared 6 7 8 98 CVInitializing is set or not Cascade Ratio model InitPrimary CVInitializing is cleared and Cascade Ratio mode is set SPHAlarm is set o
376. ning is completed CV2PV2TCTuned REAL The calculated value of the internal model time constant for CV2 PV2 after tuning is completed CV3PV2TCTuned REAL The calculated value of the internal model time constant for CV3 PV2 after tuning is completed CV1PV1DTTuned REAL The calculated value of the internal model deadtime for CV1 PV1 after tuning is completed CV2PV1DTTuned REAL The calculated value of the internal model deadtime for CV2 PV1 after tuning is completed CV3PV1DTTuned REAL The calculated value of the internal model deadtime for CV3 PV1 after tuning is completed CV1PV2DTTuned REAL The calculated value of the internal model deadtime for CV1 PV2 after tuning is completed CV2PV2DTTuned REAL The calculated value of the internal model deadtime for CV2 PV2 after tuning is completed CV3PV2DTTuned REAL The calculated value of the internal model deadtime for CV3 PV2 after tuning is completed CV1PV1RespTCTunedS REAL The calculated value of the control variable time constant in slow response speed for CV1 PV1 after tuning is completed CV2PV1RespTCTunedS REAL The calculated value of the control variable time constant in slow response speed for CV2 PV1 after tuning is completed CV3PV1RespTCTunedS REAL The calculated value of the control variable time constant in slow response speed for CV3 PV1 after tuning is completed CV1PV2RespTCTunedS REAL The calculated value of the control variable time constan
377. nitPrimary output of a secondary loop Refer to Instruction First Scan on page 80 CV2InitReq BOOL CV2 initialization request While TRUE set CV2EU to the value of Default FALSE CVInitValue This signal will normally be controlled by the In Hold status on the analog output module controlled by CV2EU or from the InitPrimary output of a secondary loop Refer to Instruction First Scan on page 80 CV3lnitReq BOOL CV3 initialization request While TRUE set CV3EU to the value of Default FALSE CVInitValue This signal will normally be controlled by the In Hold status on the analog output module controlled by CV3EU or from the InitPrimary output of a secondary loop Refer to Instruction First Scan on page 80 170 Publication 1756 RMO06G EN P September 2010 CC Input Parameter CV1InitValue Data Type REAL Advanced Process Control Function Blocks IMC CC MMC Chapter 2 Description CV1EU initialization value scaled in CV1EU units When CV1 Initializing is TRUE set CV1EU equal to CV1InitValue and CV1 to the corresponding percentage value CV1InitValue will normally come from the feedback of the analog output controlled by CV1EU or from the setpoint of a secondary loop The instruction initialization is disabled when CVFaulted or CVEUSpaninv are TRUE Refer to Instruction First Scan on page 80 Values Valid any float Default 0 0 CV2InitValue REAL CVZ2EU initialization value scaled in CV2EU units When C
378. nitiated 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 Bit 1 of AtuneStatus PVTuneLimit during Autotuning When True Autotuning is aborted AtuneModelnv BOOL The IMC mode was not Manual at start of Autotuning or the Bit 2 of AtuneStatus IMC mode was changed from Manual during Autotuning When True Autotuning is not started or is aborted AtuneCVWindupFault BOOL WindupHln or WindupLin is True at start of Autotuning or Bit 3 of AtuneStatus during Autotuning When True Autotuning is not started or is aborted 158 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 IMC Output Parameter Type Description Valid and Default Values AtuneStepSize0 BOOL StepSizeUsed 0 at start of Autotuning When True Bit 4 of AtuneStatus Autotuning is not started AtuneCVLimitsFault BOOL CVLimitsInv and CVManLimiting are True at start of Autotuning Bit 5 of AtuneStatus or during Autotuning When True Autotuning is not started or is aborted
379. ns DERV HPF LDL2 LPF NTCH Chapter 4 Cutoft_frequency Publication 1756 RMO06G EN P September 2010 Velocity_Feedback Structured Text HPF OT Tmi Velocity Feedback PF 01 WLead Cutoff frequency 2 PF 01 0rder PF HPF 01 filtered velocity output HPF 01 0ut Function Block filtered_velocity_output 301 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Second Order Lead Lag The LDL2 instruction provides a filter with a pole pair and a zero pair The LDL2 frequency and damping of the pole and zero pairs are adjustable The pole or zero pairs can be either complex damping less than unity or real damping greater than or equal to unity Operands LDL2 LDL2 tag Structured Text LDL2 tag LEAD_LAG_SEC_ORDER structure LDL2 structure LDL2_01 Function Block LDL2 E In LDL2tag LEAD_LAG_SEC_ORDER structure LDL2 structure LEAD_LAG_SEC_ORDER Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL Request to initialize filter control algorithm When set the instruction sets Out In Default is cleared WLead REAL The lead corner frequency
380. nt where the input is at zero is what causes a regulator using integral gain to drive toward zero error over a period of time The following example shows how the INTG instruction can be used in an application In many instances the HighLimit and LowLimit inputs limit the total percentage of control that the integral gain element might have as a function of the regulator s total output The HoldHigh and HoldLow inputs on the other hand can be used to prevent the output from moving further in either the positive or negative direction In this example if the regulator output is already saturated at 100 the HoldHigh and HoldLow inputs prevent the INTG instruction from winding up in a direction which is already beyond the limits of the controlled variable Structured Text INTG 01 IN Dancer Loop Error INTG 01 Initialize Initialize Integrator INTG 01 InitialValue Int Init Val INTG 01 IGain I Gain INTG 01 HighLimit Int _saturate_high INTG 01 LowLimit Int saturate low INTG 01 HoldHigh ALM 01 HAlarm INTG 01 HoldLow ALM 01 LAlarm INTG INTG 01 regulator out Dancer Loop Error Proportional Gain INTG 01 0Out ALM 01 In regulator out ALM 01 HLimit 100 ALM 01 LLimit 100 ALM ALM 01 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Function Block MUL_01 MUL Multiply ADD_01
381. ntegral operation This instruction is designed to execute in a task where the scan rate remains constant Structured Text INTG tag INTEGRATOR structure INTG structure Function Block INTG tag INTEGRATOR INTG structure INTEGRATOR Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL Request to initialize control algorithm Output InitialValue as long as Initialize is set Valid any float Default 0 0 InitialValue REAL The initial value for instruction Output InitialValue as long as Initialize is set Valid any float Default 0 0 IGain REAL The integral gain multiplier If IGain lt 0 the instruction sets IGain 0 0 sets the appropriate bit in Status and leaves the Output unchanged Valid 0 0 to maximum positive float Default 0 0 HighLimit REAL The high limit value for Out If HighLimit lt LowLimit the instruction sets HighAlarm and LowAlarm sets the appropriate bit in Status and sets Out LowLimit Valid any float Default maximum positive float LowLimit REAL The low limit value for Out If HighLimit lt LowLimit the instruction sets HighAlarm and LowAlarm sets the appropriate bit
382. ntity Inventory position Oty Exit End if End for Otherwise stop 406 Publication 1756 RM006G EN P September 2010 Structured Text Programming Appendix B WHILE DO Use the WHILE DO loop to keep doing something as long as certain conditions are true Operands Structured Text WHILE bool_expression DO Operand Type Enter lt statement gt END WHILE bool_expression BOOL BOOL tag or expression that expression evaluates to a BOOL value IMPORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e If the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as IF THEN Description The syntax is WHILE bool _expressionl DO lt statement gt lt q statements to execute while bool_expression is true IF bool_expression2 THEN EXIT lt q If there are conditions when you want to exit the loop early use other statements eee such as an IF THEN construct to condition an EXIT statement optional Publication 1756 RMO06G EN P September 2010 407 Appendix B Structured Text Programming The following diagrams show how a WHILE DO loop executes and how an EXIT statement leav
383. ntrol variables Coordinated Control CC 161 Two process variables to their setpoints by using up to three control variables Modular Multivariable Control IMC 197 Topic Page Internal Model Control IMC Function Block 140 IMC Function Block Configuration 141 IMC Function Block Tuning 143 IMC Function Block Tuning Procedure 143 IMC Function Block Tuning Errors 144 IMC Function Block Model Initialization 144 IMC Function Block Input Parameter Descriptions 146 IMC Function Block Output Parameter Descriptions 156 Coordinated Control CC Function Block 161 CC Function Block Configuration 161 Using the Coordinated Control Function Block to Control Temperature 164 CC Function Block Tuning 165 CC Function Block Tuning Procedure 166 CC Function Block Tuning Errors 167 CC Function Block Model Initialization 167 CC Function Block Input Parameter Descriptions 169 CC Function Block Output Parameter Descriptions 185 Modular Multivariable Control MMC Function Block 197 MMC Function Block Configuration 198 Using an MMC Function Block for Splitter Control 200 MMC Function Block Tuning 201 MMC Function Block Tuning Procedure 201 MMC Function Block Tuning Errors 202 MMC Function Block Model Initialization 202 MMC Function Block Input Parameter Descriptions 204 MMC Function Block Output Parameter Descriptions 224 Publication 1756 RMO06G EN P September 2010 139 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC Internal Model Control
384. number of the input currently being placed into the output If the selector mode is average select the instruction sets SelectedIn 0 ProgOper BOOL Program Operator control indicator Set when in Program control Cleared when in Operator control Override BOOL Override mode Set when the instruction is in Override mode Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred InsFaulted Status 1 BOOL In Fault inputs for all the used In inputs are set InsUsedInv Status 2 BOOL Invalid InsUsed value SelectorModelnv BOOL Invalid SelectorMode value Status 3 ProgselectorInv BOOL Invalid ProgSelector value Status 4 OperSelectorlInv BOOL Invalid OperSelector value Status 5 Description The ESEL instruction operates as follows Condition Action SelectorMode 0 manual select or Override is set ProgOper is cleared and OperSelector 0 Out In OperSelector Selectedin OperSelector SelectorMode 0 manual select or Override is set ProgOper is set and ProgSelector 0 Out In ProgSelector Selectedin ProgSelector SelectorMode 1 high select and Out maximum of In InsUsed Override is cleared Selectedin index to the maximum input value SelectorMode 2 low select and Out minimum of
385. o between InEUMin and InEUmaximum Default is cleared 121 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The output that represents scaled value of the analog input Arithmetic status flags are set for this output valid any real value default InEUMin maximumAlarm BOOL The above maximumimum input alarm indicator This value is set when In gt InRawmaximum MinAlarm BOOL The below minimum input alarm indicator This value is set when In lt InRawMin Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred InRawRangelnv BOOL InRawMin gt InRawmaximum Status 1 Description Use the SCL instruction with analog input modules that do not support scaling to a full resolution floating point value Por example the 1771 IFE module is a 12 bit analog input module that supports scaling only in integer values If you use a 1771 IFE module to read a flow of 0 100 gallons per minute gpm you typically do not scale the module from 0 100 because that limits the resolution of the module Instead use the SCL instruction and configure the module to return an unscaled 0 4095 value whi
386. oat Default maximum positive float LowLimit REAL The low limit value This is the minimum value for Out If HighLimit lt LowLimit the instruction sets HighAlarm and LowAlarm sets the appropriate bit in Status and sets Out LowLimit Valid maximum negative float lt LowLimit lt HighLimit Default maximum negative float HoldHigh BOOL The hold high command When set the value of the internal integrator is not allowed to increase in value Default is cleared HoldLow BOOL The hold low command When set the value of the internal integrator is not allowed to decrease in value Default is cleared ShapeKpPlus REAL The positive Kp shaping gain multiplier Used when In is 0 If invalid the instruction clamps ShapeKpPlus at the limits and sets the appropriate bit in Status Not used when NonLinearMode is cleared Valid 0 1 to 10 0 Default 1 0 ShapeKpMinus REAL The negative Kp shaping gain multiplier Used when In is lt 0 If invalid the instruction clamps ShapeKpMinus at the limits and sets the appropriate bit in Status Not used when NonLinearMode is cleared Valid 0 1 to 10 0 Default 1 0 KplnRange REAL The proportional gain shaping range Defines the range of In error over which the proportional gain increases or decreases as a function of the ratio of In KplnRange When In gt KpInRange the instruction calculates the change in proportional error using entered the Kp shaping gain x In KpInRange If invali
387. ocal 1 1 Ch0Data PIDE 01 PVFault Local 1 1 ChOFault PIDE PIDE 01 Local 2 0 ChOData PIDE 01 CVEU Function Block PIDE Ext Enhanced PID 0 0 0 0 Local 1 1 ChOData D g PY CVEUD q Local 2 0 ChOData 0 0 PVFault SP pD 0 O SPProg PVHHAlarm 0 0 Local 1 1 ChOF ault E g SPCascade PVHAlarm Po RatioProg PYLAIarmm 0 CVProg PYLLAlarm o 0 CFF PYROCPosAlarm o o Q HandFB PVROCNegAlarm 9 5 E ProgProgReq DevHHAlarm Po ProgOperReq DevHAlarm 0 ProgCasRatReq DevLAlarm 0 ProgAutoReq DevLLAlarm H 0 ProgManualReq ProgOper D 0 ProgOverrideReg CasRat D 5 E ProgHandReq Auto D 0 Manual amp 0 Override FE 0 Hand D AutotuneTag Publication 1756 RMO06G EN P September 2010 81 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Example 2 82 Cascade control is useful when externally caused upsets to the controlled variable occur often which then cause upsets to the process variable you are trying to control For example try to control the temperature of liquid in a tank by varying the amount of steam fed into a heating jacket around the tank If the steam flow suddenly drops because of an upstream process the temperature of the liquid in the tank eventually drops and the PIDE instruction then opens the steam valve to compensate for the drop in temperature In this example a cascaded loop provides better control by opening the st
388. ock Structure Structured Text MC MMC_tag MMC tag Modular Multivariable Control MMC structure Function Block MMC tag Modular Multivariable Control MMC structure Whenever an APC block detects a change in Delta Time DeltaT a Modellnit will be performed For this reason the blocks should only be run in one of the TimingModes in which DeltaT will be constant e TimingMode 0 Periodic while executing these function blocks in a Periodic Task e 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 Modellnit The following TimingMode setting are not recommended due to jitter in DeltaT e TimingMode 0 Periodic while executing these function blocks in a Continuous or Event Task e TimingMode 2 RealTimeSample 203 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Function Block Input Parameter Descriptions The following table describes the input parameters in the MMC function block MMC Input Parameter Type Description Values Enableln BOOL Enable Input If False the function block will not execute and Default TRUE outputs are not updated PV1 REAL Scaled process variable input 1 This value is typically read Valid any float from an analog input module Default 0 0 PV2 REAL Scaled process variab
389. ock controls two process variables to their setpoints manipulating up to three control variables The MMC function block calculates the control variables CV1 CV2 and CV3 in the Auto mode based on the PV1 SP1 PV2 SP2 deviation internal model and tuning The MMC function block is a flexible model based algorithm that can be used in two basic configuration modes e Three control variables used to control two interacting process variables e Two control variables used to control two interacting process variables MMC Function Block Splitter Example Configuration CV3 Target Item Description M11 internal model CV1 PV1 M21 internal model CV2 PV1 M31 internal model CV3 PV1 M12 internal model CV1 PV2 M22 internal model CV2 PV2 M32 internal model CV3 PV2 J Target response C11 C22 model predictive function blocks IMC currently controlling PV1 and PV2 to SP1 and SP2 respectively Y11 Y21 Y31 12 model outputs of M11 M21 M31 M12 M22 M32 Y22 Y32 197 Chapter 2 198 Advanced Process Control Function Blocks IMC CC MMC Item Y1 Description PV1 prediction Y2 PV2 prediction CV1 Reflux ratio controls PV1 Top composition in Coordinated Control CC1 CV2 Steam flow controls PV2 Bottom composition in Coordinated Control CC2 CV3 drives the Target value through a target response MMC Function Block Configuration Star
390. of change of Out is based on AccelRate or DecelRate system reaches AccelRate Out In region 1 region 2 region 3 Publication 1756 RMO06G EN P September 2010 total time The Out is calculated for each region as follows FinalOutput InitialOutput 2 AccelRate T Ti OLENE AccelRate JerkRate 273 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN with these equations for each region Region Equations region 1 Time AccelRate 1 JerkRate Y Time InitialOutput JerkRate x Time region 2 Times JerkRate x FinalOutput InitialOutput AccelRate 2 JerkRate x AccelRate AccelRate Y Ti InitialOutput AccelRate x Ti Time nitialOutput AccelRate x Time 2x JerkRate region 3 Time AccelRate 3 JerkRate FinalOutput Initia Output eee 1 Time Y Time FinalOutput 3 VerkRate x Time AdeeiRiie 7 Accethare 2 JerkRate 274 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 When AccelRate InitialOutput FinalOutput lt InitialOutpu inalOutput FerkRate the SCRV block does not reach the AccelRate or DecelRate The Out does the following A Counts Gute system never reaches AccelRate l Out mete se Rate Initial output region 1 region 3 lt a p total time where MnitialOutput FinalOutput TotalTime 2 x JerkRate Arithme
391. ogAutoReq for the PIDE instruction TIC101 TIC101 has been configured with the ProgValueReset input set so when the PIDE instruction executes it automatically clears ProgAutoReq TICTOAutoRegPB TIC 101 AutoRegPBOneShot TIC101 Prog4utoReq JE ONS J 1 384 Publication 1756 RM006G EN P September 2010 Appendix B Structured Text Programming Introduction This appendix describes issues that are unique with structured text programming Review the information in this appendix to make sure you understand how your structured text programming will execute Topic Page Structured Text Syntax 385 Assignments 387 Expressions 389 Instructions 396 Constructs 397 Comments 413 When to Use This Chapter Use this chapter to write and enter structured text for a e structured text routine e action of a sequential function chart SFC e transition of sequential function chart SFC Structured Text Syntax Structured text is a textual programming language that uses statements to define what to execute e Structured text is not case sensitive e Use tabs and carriage returns separate lines to make your structured text easier to read They have no effect on the execution of the structured text Publication 1756 RMO06G EN P September 2010 385 Appendix B Structured Text Programming Structured text is not case sensitive Structured text can contai
392. ogix5000 PIDE Faceplate Control Properties General Display PIDE Fonts Locale Property Name ControlFont bz Font Font Style Size Arial Regular af 9 75 v F SimSun Effects T erminal T Strikeout Underline Fy Aharoni T Andalus Sample Tp Arabic Transparent AaBbY yZz Cancel Apply Item Description Property Name Use this pulldown to select the font to configure Select ControlFont or MinorFont Default ControlFont Font Select the font for the control The list contains all available fonts on the system Default Arial Size Configure the point size of the font Default ControlFont 10 5 points Default MinorFont 8 25 points Effects Select whether to underline and or strikeout the font Default both unchecked Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Appendix D Configuring Location Properties The locale property page determines language requirements Logix5000 PIDE Faceplate Control Properties x General Display PIDE Fonts Locale Locale Cancel Apply Item Description Locale Select the language e English e Portuguese e French e Italian e German e Spanish Publication 1756 RMO06G EN P September 2010 425 Appendix D Function Block Faceplate Controls ALM Control Alarm Alarm 50 gallons 15 gallons sec ROC Alarm Positive 100 o Status Ok
393. ommand When set the value of the internal integrator is not allowed to decrease in value Default is cleared TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp Publication 1756 RMO06G EN P September 2010 DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 279 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output HighAlarm BOOL The maximum limit alarm indicator Set when the calculated value for Out gt HighLimit and the output is clamped at HighLimit LowAlarm BOOL The minimum limit alarm indicator Set when the calculated value for Out lt LowLimit and the output is clamped at LowLimit DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function b
394. on prescan Fault Conditions none Execution Function Block Action Structured Text Action No action taken No action taken instruction first scan All operator request inputs are cleared If ProgValueReset is set then all program request inputs are cleared instruction first run The instruction initializes the internal parameters Total ResetValue OldTotal 0 0 ProgOper is cleared Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes EnableOut is set Enableln is always set he instruction executes postscan No action taken No action taken Example In this example the TOT instruction meters a target quantity of water into a tank and shuts off the flow once the proper amount of water has been added When the AddWater pushbutton is pressed the TOT instruction resets and starts totalizing the amount of water flowing into the tank Once the Target value is reached the TOT instruction sets the TargetFlag output which causes the solenoid valve to close For this example the TOT instruction was locked into Program Run by setting the ProgProgReq and ProgStartReq inputs This is done for this example because the operator never needs to directly control the TOT instruction Structured Text TotalWaterFlow In WaterFlowRate TotalWaterFlow ProgProgReq 1 TotalWaterFlow
395. on BOOL BOOL expression SINT numeric expression INT DINT REAL ends the assignment The ag retains the assigned value until another assignment changes the value The expression can be simple such as an immediate value or another tag name or the expression can be complex and include several operators and or functions See the next section Expressions on page 389 for details 387 Appendix B Structured Text Programming 388 Specify a non retentive assignment The non retentive assignment is different from the regular assignment described above in that the tag in a non retentive assignment is reset to zero each time the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction A non tetentive assignment has this syntax tag expression where Component Description tag represents the tag that is getting the new value the tag must be a BOOL SINT INT DINT or REAL is the non retentive assignment symbol expression represents the new value to assign to the tag If tag is this data type Use this type of expression BOOL BOOL expression SINT numeric expression INT DINT REAL ends the assignment Publication 1756 RMO06G EN P September 2010 Structured Text Programming Appe
396. on block to control the temperature in a process Item Description PV temperature Act1stCV CV3 high pressure steam Act2ndCV CV2 cooling Act3rdCV CV1 low pressure steam Target1stCV CV2 Target2ndCV CV3 Target3rdCV V1 CV1 Target 0 This value is irrelevant since in the target list setup CV1 has the lowest priority and will assume the steady state load to maintain PV at the setpoint CV2Target 0 CV3Target 10 Temperature Example Explanation Manipulating the PV at the setpoint is the top priority The high pressure steam and cooling are selected as the most active actuators At steady state the same two controls should assume their target values CV3 at 10 and CV2 at 0 CV1 will assume any value needed to maintain PV at the setpoint therefore its target value is irrelevant since manipulating the PV at the setpoint is a higher priority control objective Target CV priorities and target CV values can be changed on line The CC function block calculates CV1 CV2 and CV3 such that the control goals are accomplished in the following order of importance 1 Control PV to SP 2 Control CV2 to its target value 3 Control CV3 to its target value At this point you have completed the basic configuration You did not configure the built in tuner The control variable is ready to be put on line in either auto or Manual mode For tuning the default settings will be used Refer to CC Function Blo
397. on allows for adaptive gain control and can be used to model a regulator mechanism that more closely matches the process being regulated One example where this might be used is in a catenary control application where the feedback coming back from a sensor in a looping pit may not reflect a linear signal with respect to the amount of material actually stored Here the proportional gains of the PI regulator might be shaped to more closely model the process without using integral components that might constantly wind up and wind_down PI Instruction Non Linear Mode depth sensor Publication 1756 RMO06G EN P September 2010 259 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Pulse Multiplier PMUL PMUL PMUL tag PMUL_O4 PMUL Pulse Multiplier Cj Multiplier The PMUL instruction provides an interface from a position input module such as a resolver or encoder feedback module to the digital system by computing the change in input from one scan to the next By selecting a specific word size you configure the PMUL instruction to differentiate through the rollover boundary in a continuous and linear fashion Structured Text Operand Type Format Description PMUL tag PULSE_MULTIPLIER structure PMUL structure Function Block Operand Type Format Description PMUL tag PULSE_MULTIPLIER structure PMUL structure PULSE MULTIPLIER Structure Input Parameter Data Type Description Enablel
398. on block execution If value of CVOper lt 0 or gt 100 or lt CVLLimit or gt CVHLimit when CVManLimiting is TRUE set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 and CV High Low Limiting on page 96 Valid 0 0 100 0 Default 0 0 CV1OverrideValue REAL CV1 Override value CV1 set to this value when in Override mode This value should correspond to a safe state output of the loop If value of CV1OverrideValue lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 and CV High Low Limiting on page 96 Valid 0 0 100 0 Default 0 0 CV20verrideValue REAL CV2 Override value CV2 set to this value when in Override mode This value should correspond to a safe state output of the loop If value of CV2OverrideValue lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to Selecting the Control Variable on page 94 and CV High Low Limiting on page 96 Valid 0 0 100 0 Default 0 0 CV30verrideValue 172 REAL CV3 Override value CV3 set to this value when in Override mode This value should correspond to a safe state output of the loop Refer to Selecting the Control Variable on page 94 If value of CV3OverrideValue lt 0 or gt 100 set unique Status bit and limit value used for CV Refer to CV High Low Limiting on pa
399. ondary loop Arithmetic flags will be set for this output if configured as Act1stCV CV1EU CV1 CV1EUSpan 100 CV1EUMin CV1EU span calculation CV1EUSpan CV1EUMax CV1EUMin CV2EU REAL Scaled control variable output for CV2 Scaled by using CV2EUMax and CV2EUMin where CV2EUMax corresponds to 100 and CV2EUMin corresponds to 0 This output is typically used to control an analog output module or a secondary loop Arithmetic flags will be set for this output if configured as Act1stCV CV2EU CV2 CV2EUSpan 100 CV2EUMin CV2EU span calculation CV2EUSpan CV2EUMax CV2EUMin CV3EU REAL Scaled control variable output for CV3 Scaled by using CV3EUMax and CV3EUMin where CV3EUMax corresponds to 100 and CV3EUMin corresponds to 0 This output is typically used to control an analog output module or a secondary loop Arithmetic flags will be set for this output if configured as Act1stCV CV3EU CV3 CV3EUSpan 100 CV3EUMin CV3EU span calculation CV3EUSpan CV3EUMax CV3EUMin CV1 REAL Control variable 1 output This value will always be expressed as 0 100 CV1 is limited by CV1HLimit and CV1LLimit when in Auto mode or in Manual mode if CVManLimiting is TRUE otherwise limited by 0 and 100 Refer to Selecting the Control Variable on page 94 CV2 REAL Control variable 2 output This value will always be expressed as 0 100 CV2 is limited by CV2HLimit and CV2LLimit
400. onditions Possible Condition Description Prescan for function block routines is the same as for relay ladder routines The only prescan difference is that the Enableln parameter for each function block instruction is cleared during prescan instruction first scan Instruction first scan refers to the first time an instruction is executed after prescan The controller uses instruction first scan to read current inputs and determine the appropriate state to be in instruction first run Instruction first run refers to the first time the instruction executes with a new instance of a data structure The controller uses instruction first run to generate coefficients and other data stores that do not change for a function block after initial download 20 Publication 1756 RMO06G EN P September 2010 Preface Publication 1756 RMO06G EN P September 2010 Every function block instruction also includes EnableIn and EnableOut parameters e function block instructions execute normally when EnablelIn is set e when Enableln is cleared the function block instruction either executes prescan logic postscan logic or just skips normal algorithm execution e EnableOut mirrors EnableIn however if function block execution detects an overflow condition EnableOut is also cleared e function block execution resumes where it left off when EnableIn toggles from cleared to set However there are some function block instru
401. ons that maintain history do not update history with NAN or INF values when an overflow occurs Each instruction has one of these responses to an overflow condition Response 2 Blocks with output limiting execute their algorithm and check the result for NAN or INF The output limits are defined by the HighLimit and LowLimit input parameters If INF the block outputs a limited result If NAN the output limits are not used and the block outputs NAN Response 3 The overflow condition does not apply These instructions typically have a boolean output ALM NTCH DEDT PMUL DERV POSP ESEL RLIM FGEN RMPS HPF SCRV LDL2 SEL LDLG SNEG LPF SRTP MAVE SSUM MAXC TOT MINC UPDN MSTD MUX 376 HLL INTG PI PIDE SCL SOC BAND OSRI BNOT RESD BOR RTOR BXOR SETD CUTD TOFR D2SD TONR D3SD DFF JKFF OSFI Publication 1756 RMO06G EN P September 2010 Function Block Attributes Appendix A Timing Modes These process control and drives instructions support different timing modes DEDT LDLG RLIM DERV LPF SCRV HPF NTCH SOC INTG PI TOT LDL2 PIDE There are three different timing modes Timing Mode Description periodic Periodic mode is the default mode and is suitable for most control applications We recommend that you place the instructions that use this mode ina routine that executes in a periodic task The delta time DeltaT for the instruction is determined as follows If the instructio
402. op executes the statements in the pos construct and then determines if the conditions are true before SEDENT executing the statements again Y This differs from the WHILE DO loop because the WHILE DO PoS The WHILE DO loop evaluates its conditions first If the UNTIL conditions are true the controller then executes the statements within the loop The statements in a REPEAT UNTIL loop are always executed at least once The statements in a WHILE DO loop might never be executed Arithmetic Status Flags not affected Fault Conditions A major fault will occur if the construct loops too long Publication 1756 RM006G EN P September 2010 structarray pos valu leaves the loop early rad ement 1 ement 2 ement 3 ement 4 sta sta sta sta yes Exit no v ee false BOOL expression true rest of the routine To stop the loop before the conditions are false use an EXIT statement Enter this structured text 1 pos 2 101 pos OR end repeat Fault type 6 targetvalue Fault code 1 411 Appendix B Structured Text Programming Example 2 If you want this Move ASCII characters from a SINT array into a string tag In a SINT array each element holds one character Stop when you reach the carriage return 1 Initialize Element_number to 0 2 Count the number of elements in S N7_array array that contains the ASCII characters and st
403. or 100 0 in Manual mode if CVManLimiting is TRUE Default 100 0 e f CVLLimit lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status e f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 CV1LLimit REAL CV1 low limit value This is used to set the CV1LAlarm Valid 0 0 CV1LLimit lt output It is also used for limiting CV1 when in Auto mode or CV1HLimit in Manual mode if CVManLimiting is TRUE Default 0 0 e f CVLLimit lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status e f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 210 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Input Parameter Type Description Values CV2LLimit REAL CV2 low limit value This is used to set the CV2LAlarm Valid 0 0 CV2LLimit lt output It is also used for limiting CV2 when in Auto mode or CV2HLimit in Manual mode if CVManLimiting is TRUE Default 0 0 e f CVLLimit lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status e f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 CV3LLimit REAL CV3 low limit value This is use
404. or lt minimum value or lag damping factor gt maximum value Orderlnv Status 5 BOOL Invalid Order value WLagRatiolnv BOOL WLag WLead ratio greater than maximum value Status 6 TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second Publication 1756 RMO06G EN P September 2010 303 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Output Parameter Data Type Description RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value Description The LDI2 instruction filter is used in reference forcing and feedback forcing control methodologies The LDL2 instruction is designed to execute in a task where the scan rate remains constant The LDL2 instruction uses these equations When The instruction uses this Laplace transfer function Order 1 S 1 H s _Lead S 1 OLag Order 2 s poe read SS og o Lead H s Lad s T Rea Lae Lag Normalize the filter such that aq 1 2 gs 2x xs 1 H s Jead 2 2x6 xs 5 paa yj Orag Lag with these parameters limits where DeltaT is in seconds Parameter Limitations WLead first order LowLimit 0
405. or C1VEU The value of CV1EU that corresponds to 100 CV1 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling Valid any float Default 100 0 CV2EUMax REAL Maximum value for C2VEU The value of CV2EU that corresponds to 100 CV2 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling Valid any float Default 100 0 CV3EUMax REAL Maximum value for C3VEU The value of CV3EU that corresponds to 100 CV3 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling Valid any float Default 100 0 CV1EUMin REAL Minimum value of CV1EU The value of CV1EU that corresponds to 0 CV1 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling Valid any float Default 0 0 CV2EUMin REAL Minimum value of CV2EU The value of CV2EU which corresponds to 0 CV2 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling Publication 1756 RMO06G EN P September 2010 Valid any float Default 0 0 209 Chapter 2 Advanced Process Control Func
406. or CV1WindupLin is True at start of CV1 PV1 Autotuning or during CV1 PV1 Autotuning When True CV1 PV1 Autotuning is not started or is aborted Bit 3 of AtuneCV1PV1Status AtuneCV2PV1WindupFault BOOL CV2WindupHlIn or CV2WindupLIn is True at start of CV2 PV1 Autotuning or during CV2 PV1 Autotuning When True CV2 PV1 Autotuning is not started or is aborted Bit 3 of AtuneCV2PV1Status AtuneCV3PV1WindupFault BOOL CV3WindupHIn or CV3WindupLIn is True at start of CV3 PV1 Autotuning or during CV3 PV1 Autotuning When True CV3 PV1 Autotuning is not started or is aborted Bit 3 of AtuneCV3PV1Status AtuneCV1PV1StepSize0 BOOL CV1StepSizeUsed 0 at start of CV1 PV1 Autotuning When True CV1 PV1 Autotuning is not started Bit 4 of AtuneCV1PV1Status AtuneCV2PV1StepSize0 BOOL CV2StepSizeUsed 0 at start of CV2 PV1 Autotuning When True CV2 PV1 Autotuning is not started Bit 4 of AtuneCV2PV1Status AtuneCV3PV1StepSize0 BOOL CV3StepSizeUsed 0 at start of CV3 PV1 Autotuning When True CV3 PV1 Autotuning is not started Bit 4 of AtuneCV3PV1Status AtuneCV1PV1LimitsFault BOOL CV1LimitsInv and CVManLimiting are True at start of CV1 PV1 Autotuning or during CV1 PV1 Autotuning When True CV1 PV1 Autotuning is not started or is aborted Bit 5 of AtuneCV1PV1Status AtuneCV2PV1LimitsFault BOOL lt CV2LimitsInv and CVManLimiting ar
407. or Real Time Sampling mode Valid 1 32 767 1 count 1 ms RTSTimeStamp DINT Module time stamp value for Real Time Sampling mode Valid 0 32 767 wraps from 32 767 0 1 count 1 ms PV1TuneLimit REAL PV1 tuning limit scaled in PV1 units When Autotune is Valid any float running and predicted PV1 exceeds this limit the tuning will Default 0 be aborted PV2TuneLimit REAL PV2 tuning limit scaled in PV2 units When Autotune is Valid any float running and predicted PV2 exceeds this limit the tuning will Default 0 be aborted PV1AtuneTimeLimit REAL Maximum time for PV1 autotune to complete following the Valid range any float gt 0 CV step change When PV1 autotune exceeds this time PV1 tuning will be aborted Default 60 minutes PV2AtuneTimeLimit REAL Maximum time for PV2 autotune to complete following the Valid range any float gt 0 CV step change When PV2 autotune exceeds this time PV2 tuning will be aborted Default 60 minutes PV1NoiseLevel DINT An estimate of the noise level expected on PV1 to Range 0 2 compensate for it during tuning The selections are O low 1 medium 2 high Default 1 PV2NoiseLevel DINT An estimate of the noise level expected on PV2 to Range 0 2 compensate for it during tuning The selections are 0 low 1 medium 2 high Default 1 Publication 1756 RMO06G EN P September 2010 221 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC
408. ore the result in SINT_array_size DINT tag 3 Set String_taglelement_number the character at SINT_arrayfelement_number 4 Add 1 to element_number This lets the controller check the next character in S NT_array 5 Set the Length member of String_tag element_number This records the number of characters in String_tag so far 6 If element_number SINT_array_size then stop You are at the end of the array and it does not contain a carriage return 7 If the character at S NT_arrayfelement_number 13 decimal value of the carriage return then stop Otherwise go to 3 412 Enter this structured text element number SIZE SINT array Repeat 0 0 SINT array size String tag DATA element number SINT array element_ number element number element number 1 String tag LEN element number If element number SINT array size then exit end_if Until SINT array element_number 13 end repeat Publication 1756 RMO06G EN P September 2010 Structured Text Programming Appendix B Comments Format comment To make your structured text easier to interpret add comments to it e Comments let you use plain language to describe how your structured text works e Comments do not affect the execution of the structured text To add comments to your structured text To add a comment Use one of these formats ona single line comment at the end of a line of str
409. orresponds to 0 percent span of the Process Variable Valid maximumimum negative float lt PVEUMin lt PVEUmaximum Default 0 0 SPProg REAL SP program value scaled in PV units SP is set to this value when in Program control and not Cascade Ratio mode If the value of SPProg lt SPLLimit or gt SPHLimit the instruction sets the appropriate bit in Status and limits the value used for SP Valid SPLLimit to SPHLimit Default 0 0 SPOper REAL SP operator value scaled in PV units SP is set to this value when in Operator control and not Cascade Ratio mode If the value of SPOper lt SPLLimit or gt SPHLimit the instruction sets the appropriate bit in Status and limits the value used for SP Valid SPLLimit to SPHLimit Default 0 0 SPCascade REAL SP Cascade value scaled in PV units If CascadeRatio is set and UseRatio is cleared then SP Cascade value SPCascade This is typically the CVEU of a primary loop If CascadeRatio and UseRatio are set SP Cascade value SPCascade x Ratio If SP Cascade value lt SPLLimit or gt SPHLimit set the appropriate bit in Status and limit the value used for SP Valid SPLLimit to SPHLimit Default 0 0 SPHLimit REAL SP high limit value scaled in PV units If SPHLimit gt PVEUmaximum the instruction sets the appropriate bit in Status Valid SPLLimit to PVEUmaximum Default 100 0 SPLLimit REAL SP low limit value scaled in PV unit
410. ostscan No action taken No action taken 32 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Example The D2SD instruction is typically used to control on off or open close devices such as pumps or solenoid valves In this example the D2SD instruction controls a solenoid valve adding corn syrup to a batch tank As long as the D2SD instruction is in Program control the valve opens when the AddSyrup input is set The operator can also take Operator control of the valve to open or close it if necessary The solenoid valve in this example has limit switches that indicate when the valve is fully closed or opened These switches are wired into the FBO and FB1 feedback inputs This allows the D2SD instruction to generate a Fau tAlarm if the solenoid valve does not reach the commanded state within the configured Fau fTime Structured Text SyrupController ProgCommand SyrupController FBO SyrupController FB1l D2SD SyrupController SyrupValve Function Block SyrupContraller D2SD Discrete 2 State Device AddSyrup a ProgGommand SyrupValveClosedLimitSwitch E SyrupValveOpenedLimitSwitch E Publication 1756 RM006G EN P September 2010 E StateOPerm E State1Perm e FB0 Ff FB1 HandFB E ProgProgReq ProgOperReq E ProgOverrideReg E ProgHandReq E Dev
411. ot started or is aborted Bit 2 of AtuneCV1PV2Status AtuneCV2PV2Modelnv BOO L The MMC mode was not Manual at start of Autotuning or the MMC mode was changed from Manual during CV2 PV2 Autotuning When True CV2 PV2 Autotuning is not started or is aborted Bit 2 of AtuneCV2PV2Status AtuneCV3PV2Modelnv BOO L The MMC mode was not Manual at start of Autotuning or the MMC mode was changed from Manual during CV3 PV2 Autotuning When True CV3 PV2 Autotuning is not started or is aborted Bit 2 of AtuneCV3PV2Status Status1 DINT Bit mapped status of the function block A value of 0 indicates that no faults have occurred Any parameter that could be configured with an invalid value must have a status parameter to indicate its invalid status Status2 DINT Additional bit mapped status for the function block A value of 0 indicates that no faults have occurred Any parameter that could be configured with an invalid value must have a status parameter to indicate its invalid status Status3CV1 DINT Additional bit mapped CV1 status for the function block A value of 0 indicates that no faults have occurred Status3CV2 236 DINT Additional bit mapped CV2 status for the function block A value of 0 indicates that no faults have occurred Publication 1756 RMO06G EN P September 2010
412. ot updated Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example When Clock goes from cleared to set the DFF instruction sets Q D When Clear is set Q is cleared The DFF instruction sets QNot to the opposite state of Q Structured Text DFF_01 D d_input DFF_01 Clear clear input DFF_01 Clock clock input DFF DFF_01 q output DEF 01 0 qnot_output DFF_01 QNot Function Block o clock_input I Publication 1756 RMO06G EN P September 2010 DFF_O4 DFF D Flip Flop _ ae g_output L ai gnot_outpuf 361 Chapter 7 Move Logical Instructions DFF JKFF RESD SETD JK Flip Flop JKFF Operands JKFF JKFF_tag JKFF_O4 JKFF JK Flip Flop Clear Clock Input Parameter Data Type The JKFF instruction complements the Q and QNot outputs when the Clock input transitions from cleared to set Structured Text Operand Type Format Description JKFF tag FLIP_FLOP_JK structure JKFF structure Function Block Operand Type Format Description JKFF tag FLIP_FLOP_JK structure JKFF structure FLIP_FLOP_JK Structure Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruct
413. page 94 CV2Manual BOOL Manual mode indicator for CV2 TRUE when CV2 in the Manual mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV3Manual Publication 1756 RMO06G EN P BOOL September 2010 Manual mode indicator for CV3 TRUE when CV3 in the Manual mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 189 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Output Parameter Data Type Description Values CV10verride BOOL Override mode indicator for CV1 TRUE when CV1 in the Override mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV20verride BOOL Override mode indicator for CV2 TRUE when CV2 in the Override mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV30verride BOOL Override mode indicator for CV3 TRUE when CV3 in the Override mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV1Hand BOOL Hand mode indicator for CV1 TRUE when CV1 in the Hand mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV2Hand BOOL Hand mode indicator for CV2 TRUE when CV2 in the Hand mode Refer to Selecting the Setpoint on page 87 and Selecting the Control V
414. pendix D The D3SD control has this additional property page Logix5000 D3SD Faceplate Control Properties Ei General Display 3 State Fonts Locale Commanded State 0 Label Off Commanded State 1 Label Dribble Commanded State 2 Label Fast Actual State 0 Label Actual State 1 Label Actual State 2 Label Off Dribble Fast Configure this property Commanded State 0 Label To specify the label for the Commanded State 0 Commanded State 1 Label label for the Commanded State 1 Commanded State 2 Label label for the Commanded State 2 Actual State 0 Label label for the Actual State 0 Actual State 1 Label label for the Actual State 1 Actual State 2 Label label for the Actual State 2 437 Appendix D Function Block Faceplate Controls PIDE Control Feature on control Mode Enhanced PID Pid1 Program Operator Cas Rat Auto ROC Pos Alarm Manual 68 3607 gallons 65 gallons Detail Tune CY ROC Limited Status InstructFault CYFaulted HandFBFaulted Displays the mode of the block PV Barmeter value of PV The limits of the barmeter are PVEUmaximum and PVEUMin Alarm Bars limits for the Deviation and PV Limit Alarms The Deviation Alarm Bars are on the left and move with the SP The PV Limit Alarms are on the right and remain fairly static SP Slider value of the SP The limits of the slider are PVEUmaximum and
415. perReq inputs to lock an instruction in a desired control For example let s assume that a Totalizer instruction will always be used in Operator control and your user program will never control the running or stopping of the Totalizer In this case you could wire a literal value of 1 into the ProgOperReq This would prevent the operator from ever putting the Totalizer into Program control by setting the OperProgReq from an operator interface device ToT_o1 Because the ProgOperReg input is Loeakt ChOData oa q Fe a5 g 382 g Wiring a 1 into ProgOperReq means d the user program always wants the TOT to be in Operator control In ProgProgReq ProgOperReq ProgStartReq ProgStopReq ProgResetReq aT Totalizer program MainProgram TOT_01 always set pressing the Program button on the faceplate which sets Totalizer Total 403 292 gallons Mode the OperProgReg input has no effect Total D arora 0 gallons Operator Normally setting OperProgReq puts Input 59 07 gal min Run the TOT in Program control OldTotal D T t ProgOper a ease Program RunStop D ES Operator Start Stop 5 Reset Resat Detail Status Ok ProgResetDone D TargetFlag D TargetDev1Flag D TargetDev2Flag A Publication 1756 RM006G EN P September 2010 Function Block Attributes Appendix A Publication 1756 RMO06G EN P September 2010 Likewise constantly
416. place the Default FALSE current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE AtuneCV3UseModel BOOL Use Autotune model request for CV3 Set True to replace the Default FALSE current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE AtuneCV1Abort BOOL Abort Autotune request for CV1 Set True to abort the auto tuning Default FALSE of the CV1 output The function block resets the input to FALSE AtuneCV2Abort BOOL Abort Autotune request for CV2 Set True to abort the auto tuning Default FALSE of the CV2 output The function block resets the input to FALSE AtuneCV3Abort BOOL Abort Autotune request for CV3 Set True to abort the auto tuning Default FALSE of the CV3 output The function block resets the input to FALSE CC Function Block Output Parameter Descriptions The following table describes the output parameters in the CC function block Publication 1756 RMO06G EN P September 2010 185 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Output Parameter Data Type Description Values EnableOut BOOL Enable Output CV1EU REAL Scaled control variable output for CV1 Scaled by using CV1EUMax and CV1EUMin where CV1EUMax corresponds to 100 and CV1EUMin corresponds to 0 This output is typically used to control an analog output module or a sec
417. put then CV1HandFBFault will normally be controlled by the status of the analog input channel If FALSE Good Health CV1HandFBFault is TRUE it indicates an error on the input module set bit in Status CV2HandFBFault BOOL CV2HandFB value bad health indicator If the CV2HandFB value is Default FALSE read from an analog input then CV2HandFBFault will normally be controlled by the status of the analog input channel If FALSE Good Health CV2HandFBFault is TRUE it indicates an error on the input module set bit in Status CV3HandFBFault BOOL CV3HandFB value bad health indicator If the CV3HandFB value is Default FALSE read from an analog input then CV3HandFBFault will normally be controlled by the status of the analog input channel If FALSE Good Health CV3HandFBFault is TRUE it indicates an error on the input module set bit in Status CV1Target REAL Target value for CV1 Valid 0 0 100 0 Default 0 0 CV2Target REAL Target value for CV2 Valid 0 0 100 0 Default 0 0 CV3Target REAL Target value for CV3 Valid 0 0 100 0 Default 0 0 CV1WindupHIn BOOL CV1 Windup high request When TRUE CV1 will not be allowed to Default FALSE increase in value This signal will typically be the CV1WindupHOut output from a secondary loop Refer to CV Windup Limiting on page 95 CV2WindupHIn BOOL CV2 Windup high request When TRUE CV2 will not be allowed to Default FALSE increase in value This signal will typically be the CV2WindupHO
418. r A new value that is placed in the deadtime buffer appears in the Out after Deadtime seconds The number of array elements required to perform the programmed delay is calculated by dividing Deadtime by DeltaT If Deadtime is not evenly divisible by DeltaT then the number of array elements and the programmed delay are rounded to the nearest increment of DeltaT For example to find the number of array elements required to perform the programmed delay given Deadtime 4 25s and DeltaT 0 50s 4 25s 0 50s 8 5 rounds up to 9 array elements required The actual delay applied to the input in this example is number of array elements x DeltaT programmed delay or 9 x 0 5s 4 5s Publication 1756 RMO06G EN P September 2010 53 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Runtime changes to either Deadtime or DeltaT change the point in which values are moved out of the buffer The number of elements required to perform the programmed delay can either increase or decrease Prior to servicing the deadtime buffer the following updates occur e If the number of required elements needs to increase the new buffer elements are populated with the oldest value in the current deadtime buffer e If the number of required elements needs to decrease the oldest elements of the current deadtime buffer are discarded Instruction behavior on InFault transition When InFault is s
419. r 1 Operands SCL SCL_tag Input Parameter Enableln Data Type BOOL The SCL instruction converts an unscaled input value to a floating point value in engineering units Structured Text SCL tag SCALE SCL structure Function Block SCL tag SCALE SCL structure SCALE Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REAL The analog signal input Valid any real value Default 0 0 InRawmaximum REAL The maximumimum value attainable by the input to the instruction If INRawmaximum lt InRawMin the instruction sets the appropriate bit in Status and stops updating the output Valid InRawmaximum gt InRawMin Default 0 0 InRawMin REAL The minimum value attainable by the input to the instruction If INRawMin gt InRawmaximum the instruction sets the appropriate bit in Status and stops updating the output Valid InRawMin lt InRawmaximum Default 0 0 InEUmaximum REAL The scaled value of the input corresponding to InRawmaximum Valid any real value Default 0 0 InEUMin REAL The scaled value of the input corresponding to InRawMin Valid any real value Default 0 0 Limiting Publication 1756 RMO06G EN P September 2010 BOOL Limiting selector If set Out is limited t
420. r Multivariable Control MMC Function Block MMC Function Block Configuration 000 008 Using an MMC Function Block for Splitter Control MMC Function Block Tuning oinid ya inte eeu waite MMC Function Block Tuning Procedure 0 MMC Function Block Tuning Errots 0 04 eee cere ees MMC Function Block Model Initialization MMC Function Block Structure 0 0 0 0 ee MMC Function Block Input Parameter Descriptions MMC Function Block Output Parameter Descriptions Chapter 3 Introductions sirere iai eh CORRES CREE OES Tatestatot ANTOG eere dren ee Tease em nested wae ee on Hae REIS WATTS sch thd ated Bact cane eee wet OR ad ro a Proportional Integral PD cts tawwn vasa te ye eee wan Operating in linear mode 94 ih ea FA Ee ete aut outst Operating in non linear MOdE eis cides surnu rnnr LIMINE et ena se cachet Ai det ETE E Naa Ni Ri et a ig tet Pulse Multiplier PMUL 35 esiie tate oo aeons S35 eee Calculating the output and remainder 0005 S C rye SERV Seia adi eenrn ee sore se na ee eean Rhee S Calculating output and rate values ee iwkaG ee ee ho eve ned es Table of Contents Filter Instructions DERV HPF LDL2 LPF NTCH Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Statistical Instructions MAVE MAXC MINC MSTD Move Logical Instructions DFF JKFF RESD SETD Second Order Cont
421. r REAL Order of the filter Order controls the sharpness of the cutoff If Order is invalid the instruction sets the appropriate bit in Status and uses Order 1 Valid 1 to 3 Default 1 TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 308 Publication 1756 RM006G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Input Parameter Data Type Description OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine
422. r appropriate CV alarm WindupHOut SPHAlarm is cleared and no CV alarm is set SPLAlarm is set or appropriate CV alarm WindupLOut 8 d i Is set SPLAlarm is cleared and no CV alarm During instruction first scan the instruction sets InitPrimary When CVInitializing is set or when not in Cascade Ratio mode the instruction sets InitPrimary When CVInitializing is cleared and in Cascade Ratio mode the instruction clears InitPrimary During instruction first scan the instruction clears the windup outputs The instruction also clears the windup outputs and disables the CV windup algorithm when CVInitializing is set or if either CVFaulted or CVEUSpanInv is set The instruction sets WindupHOut when SPHAlarm is set or when ControlAction is cleared and CVHAlarm is set or when ControlAction is set and CVLAlarm is set The SP and CV limits operate independently A SP high limit does not prevent CV from increasing in value Likewise a CV high or low limit does not prevent SP from increasing in value The instruction clears WindupHOut when SPHAlarm is cleared and not ControlAction is cleared and CVHAlarm is set and not ControlAction is set and CVLAlarm is set The instruction sets WindupLOut when SPLAlarm is set or when ControlAction is cleared and CVLAlarm is set or when ControlAction is set and CVHAlarm is set The SP and CV limits operate independently A SP low limit does not prevent CV from incr
423. r auto mode request Set by the operator interface to request Auto mode The instruction clears the input each execution Default is cleared OperManualReq BOOL Operator manual mode request Set by the operator interface to request Manual mode The instruction clears the input each execution Default is cleared ProgValueReset BOOL Reset program control values When set all the program request inputs are cleared by the instruction each execution When set and in Operator control the instruction sets SPProgram SP and CVProgram CV Default is cleared TimingMode DINT Selects timing execution mode Publication 1756 RMO06G EN P September 2010 Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 2 Default 0 n Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description OversampleDT REAL Execution time for oversample mode Valid 0 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 32 767 ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 32 767 ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output CVE
424. r to Current SP on page 88 If value of SPProg or SPOper lt SPLLimit or gt SPHLimit set bit in Status and limit value used for SP Refer to Current SP on page 88 Valid SPZLLimit to SP2HLimit Default 0 0 SP1HLimit REAL SP1 high limit value scaled in PV units Refer to SP High Low Limiting on page 88 e f SPLLimit lt PVEUMin or SPHLimit gt PVEUMax set bit in Status e f SPHLimit lt SPLLimit set bit in Status and limit SP by using the value of SPLLimit Refer to Processing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling SP2HLimit REAL SP2 high limit value scaled in PV units Refer to SP High Low Limiting on page 88 e f SPLLimit lt PVEUMin or SPHLimit gt PVEUMax set bit in Status e f SPHLimit lt SPLLimit set bit in Status and limit SP by using the value of SPLLimit Refer to Processing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling SP1LLimit REAL SP1 low limit value scaled in PV units Refer to SP High Low Limiting on page 88 e f SPLLimit lt PVEUMin or SPHLimit gt PVEUMax set bit in Status e f SPHLimit lt SPLLimit set bit in Status and limit SP by using the value of SPLLimit Refer to Processing Faults on page 99 PV Span Invalid or SP Limits Invalid for details on fault handling Publication 1756 RMO06G EN P September 2010 Valid PV1
425. rOperReq is set when you click this button Auto Button OperAutoReq is set when you click this button Manual Button OperManualReq is set when you click this button Initialize Button Initialize is set when you click this button This button is only enabled when the block is in the Operator Manual mode Publication 1756 RMO06G EN P September 2010 431 Appendix D Function Block Faceplate Controls Feature on control Displays the Detail Button Detail Dialog pop up Ramp Soak RampSoak 1 Detail Ea Ramp Value Soak Value Soak Time Segment gallons min gallons min Number of Segs Guaranteed Ramp M Deadband 11 Ramp By Time Guaranteed Soak M Deadband 12 Cyclic Ramp Soak M Cur Seg Oper value of CurrentSegOper Out Oper value of OutOper Soak Time Oper value of SoakTimeOper Guaranteed Ramp or statement Guaranteed Ramp in Effect or Guaranteed Soak in Effect Soak in Effect when the corresponding GuarRamp or GuarSoak bits are set Status all the status bits that are set in the block If no bits are set the status displays OK 432 Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Appendix D The RMPS control has this additional property page Logix5000 RMPS Faceplate Control Properties x General Display Raves Fonts Locale Ramp Value Array RampValue Z Soak Valu
426. ransfer equation Pa reas read o 1 rag Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Publication 1756 RMO06G EN P September 2010 Parameter limitations The following SOC parameters have these limits on valid values Parameter Limit WLead mig 2200001 LowLimit DeltaT _ 0 077 HighLimit DeltaT where DeltaT is in seconds WLag _ 0 0000001 LowLimit Deltar _ 0 077 HighLimit DeltaT where DeltaT is in seconds ZetaLead LowLimit 0 0 HighLimit 10 0 Whenever the value computed for the output is invalid or NAN the instruction sets Out the invalid value and sets the arithmetic overflow status flag The internal parameters are not updated In each subsequent scan the output is computed using the internal parameters from the last scan when the output was valid Limiting The instruction stops wind up based on state of the Hold inputs If Then HoldHigh is set and Integrator Integrator Integrator gt Integrator HoldLow is set and Integrator Integrator Integrator lt Integrator 281 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN The instruction also stops integrator windup based on the HighLimit and LowLimit values If Then Integrator gt IntegratorHighLimit Integrator IntegratorHighLimit Integrator lt IntegratorLowLimit Integrator Integra
427. rator interface to request Manual mode The function block resets the input to FALSE Refer to Operating modes on page 86 Default FALSE OperCV2ManualReq 220 BOOL Operator Manual mode request for CV2 Set TRUE by the operator interface to request Manual mode The function block sets input to FALSE Refer to Operating modes on page 86 Publication 1756 RMO06G EN P September 2010 Default FALSE Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Input Parameter Type Description Values OperCV3ManualReq BOOL Operator Manual mode request for CV3 Set TRUE by the Default FALSE operator interface to request Manual mode The function block sets input to FALSE Refer to Operating modes on page 86 ProgValueReset BOOL Reset Program control values When TRUE the Default FALSE Prog_xxx_Req inputs are reset to FALSE When TRUE and Program control set SPProgram equal to SP and CVProgram equal to CV TimingMode DINT Selects time base execution mode Valid 0 2 Value Description Default 0 0 Periodic mode 1 Oversample mode 2 Real time sampling mode Valid 0 2 Default 0 For more information about timing modes see appendix Function Block Attributes 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 f
428. re Follow these steps to configure the tuner 1 Put the CV into Manual mode 2 Set the AtuneStart parameter The tuner starts collecting PV and CV data for noise calculation 3 After collecting 60 samples 60 DeltaT period the tuner adds StepSize to the CV 143 Chapter 2 144 Advanced Process Control Function Blocks IMC CC MMC After successfully collecting the PV data as a result of the CV step change the CV assumes its value before the step change and the AtuneStatus GainTuned TCTuned DT Tuned and RespTCTuned parameters are updated 4 Set the AtuneUseModel parameter to copy the tuned parameters to the model parameters The function block then resets the AtuneUseModel parameter After a successful AutoTuneDone the Atune parameter is set to one 1 Tuning completed successfully IMC Function Block Tuning Errors If an error occurs during the tuning procedure the tuning is aborted and the AtuneStatus bit is set You can abort the tuning by setting the AtuneAbort bit After an abort the CV will assume its value before the step change and the GainTuned TCTuned DT Tuned and RespTCTuned parameters are not updated The AtuneStatus parameter identifies the reason for the abort IMC Function Block Model Initialization A Model Initialization occurs e during First Scan of the block e when the ModelInit request parameter is set e when DeltaT changes You may need to manually adjust the internal model
429. re not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan No action taken Example 1 Publication 1756 RMO06G EN P September 2010 No action taken The most common use of the PMUL instruction is in the relative mode of operation In this mode the PMUL instruction serves several purposes First in the relative mode the PMUL instruction differentiates the information that it receives at its input from scan to scan As data is received the instruction outputs the difference of the input from one scan to the next This means that if In 500 at scan n and then In 600 at scan n 1 Out 100 at scan n 1 Secondly while in this mode of operation the PMUL instruction also compensates for rollover values of binary data originating from a feedback module For example a resolver feedback module may have 12 bits of resolution represented as a binary value with sign ranging from 2048 to 2047 In terms of raw data coming from the feedback module the rotation of the feedback device might be represented as shown below 263 Chapter 3 264 Drives Instructions INTG PI PMUL SCRV SOC UPDN In this example as the value of the feedback data moves from 2047 to 2048 the effective change in position is equivalent to a jump of 4095 counts in position In reality however this change in position is only 1 part in
430. request Set by the user program to request to stop the ramp soak without changing the Out CurrentSeg or SoakTimeLeft Also useful when a PID loop getting its setpoint from the ramp soak leaves cascade An operator can accomplish the same thing by placing the ramp soak into Operator Manual mode Default is cleared OperProgReq BOOL Operator program request Set by the operator interface to request Program control Ignored Publication 1756 RMO06G EN P September 2010 if ProgOperReg is set The instruction clears this input Default is cleared 109 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description OperOperReq BOOL Operator operator request Set by the operator interface to request Operator control Ignored if ProgProgReq is set and ProgOperReq is cleared The instruction clears this input Default is cleared OperAutoReq BOOL Operator auto mode request Set by the operator interface to request the ramp soak to enter Auto mode Ignored if the loop is in Program control or if OperManualReg is set The instruction clears this input Default is cleared OperManualReq BOOL Operator manual mode request Set by the operator interface to request the ramp soak to enter Manual mode Ignored if the loop is in Program control The instruction clears this input Default is cleared Initialize BOO
431. response speed for CV3 after tuning is completed AtuneCV10n BOOL Set True when auto tuning for CV1 has been initiated AtuneCV20n BOOL Set True when auto tuning for CV2 has been initiated AtuneCV30n BOOL Set True when auto tuning for CV3 has been initiated AtuneCV1Done BOOL Set True when auto tuning for CV1 has completed successfully AtuneCV2Done BOOL Set True when auto tuning for CV2 has completed successfully AtuneCV3Done BOOL Set True when auto tuning for CV3 has completed successfully AtuneCV1 Aborted BOOL Set True when auto tuning for CV1 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV2Aborted BOOL Set True when auto tuning for CV2 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV3Aborted DINT Set True when auto tuning for CV3 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV1Status DINT Indicates the tuning status for CV1 AtuneCV2Status DINT Indicates the tuning status for CV2 AtuneCV3Status DINT Indicates the tuning status for CV3 AtuneCV1Fault BOOL CV1 Autotune has generated any of the following faults Bit 0 of AtuneCV1 Status AtuneCV2Fault BOOL CV2 Autotune has generated any of the following faults Bit 0 of AtuneCV2Status AtuneCV3Fault BOOL CV3 Autotune has generated any of the following faults Bit 0 of AtuneCV3Status Publication 1756 RMO06G EN P September 2010 191 Chapter 2 CC O
432. rger than this value CoolTime is limited to maximumCoolTime If maximumCoolTime is invalid the instruction assumes a value of CycleTime and sets the appropriate bit in Status Valid 0 0 to CycleTime Default 0 0 MinCoolTime REAL Minimum cool time in seconds Specify the minimum time in seconds that a cooling pulse can be on If the instruction calculates CoolTime to be less than this value CoolTime is set to zero If MinCoolTime is invalid the instructions assumes a value of zero and sets the appropriate bit in Status Valid 0 0 to maximumCoolTime Default 0 0 Output Parameter Data Type Description EnableOut BOOL Enable output HeatOut BOOL Heating output pulse The instruction pulses this output for the heating contact CoolOut BOOL Cooling output pulse The instruction pulses this output for the cooling contact HeatTimePercent REAL Heating output pulse time in percent This value is the calculated percent of the current cycle that the HeatingOutput will be on This allows you to use the instruction with an analog output for heating if required Arithmetic status flags are set for this output CoolTimePercent REAL Cooling output pulse time in percent This value is the calculated percent of the current cycle that the CoolingOutput will be on This allows you to use the instruction with an analog output for cooling if required Arithmetic status flags are set for this output Status DINT Status of the function block InstructFault St
433. ributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value 334 Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Description The RLIM instruction provides separate increment and decrement rates in per second units The ByPass input lets you stop rate limiting and pass the signal directly to the output Condition Action ByPass is set Out In Out In ByPass is cleared and DeltaT gt 0 es In Out _ a DeltaT If Slope lt DecRate then YSlope DecRate lf DecRate lt Slope lt IncRate then YSlope Slope If IncRate lt Slope then YSlope IncRate Out Out DeltaT x YSlope Out Out where DeltaT is in seconds Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Out In Out In instruction first run Out 1 In Out In Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes EnableOut is se
434. rogram control Ignored if ProgOperReq is TRUE Holding this TRUE and ProgOperReq FALSE can be used to lock the function block into program control e When ProgValueReset is TRUE the function block resets the input to FALSE Refer to Switching between Program control and Operator control on page 85 for details 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 Refer to Switching between Program control and Operator control on page 85 for details 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 Refer to Operating modes on page 86 for details 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 Refer to Operating modes on page 86 for details Default FALSE ProgManualReq 152 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 Refer to Operating mode
435. roller SOC spew tae ated piawa en eeawd 278 Parameter Mmitan Ons antec deed eta eat wale yee 281 REA EAT ATA Gi hot tsar setts uc edad dit igo ANAL dat clit iy se caalehele 281 Up Down Accumulator PDN iil tan sed PAM nie Oe baie nn 287 Chapter 4 Titroducton c50 225 ded crete paratae anea aaa A aR a dea 291 Derivative DER V0 detena eoar a Meade ty Gece a Sih 292 High Pass Filtet HPF 34096 enii i pa eia 296 Second Order Lead Lag EDL acs ba rao wate eed ode righ meee 302 Low Pass Filter LPF ot wiomut Poeun wemien Rati ane aaia 308 Notch Filter NTC tetas Ei ihe Sa eet h waa lidst de 314 Chapter 5 Totrod cton s Saers essai Meet icra a EU anol Nad aR S RE 319 Enhanced Select ESEE cir ta a a r tis 320 Monitoring the ESEL instruction ci ee bien See wise ay Re 324 Switching between Program control and Operator control 326 High Low Limit HEL a jc cnadiamhbhdcawvetbsich wed aaa ai 327 Multiplexe MUR Scie tea nnes peo s att yo wate tia 330 Rate Limitet REIM viel Se e Oh ie eee EETA 333 Select SEL erer a E E aA ea o e E 337 Selected Negate SNEG airian o gens E A E S 339 Selected Summer SSUM oo eeenunnusunresenrnnnnnn ereere 341 Chapter 6 Tatrod c o nas Naina o a A a tar arta a era er cr 345 Moving Average MAVE vosliniicchn dee cans halal umasrelets 346 Initializing the averaging algorithm sy jirin ae yw ene Ge aD 348 Maximum Capture MAXO icin kes joke BIS RE SOIR 350 Minimum Capture MING pcg ay eas age wetale
436. rrors 144 INTG 242 J JK Flip Flop 362 JKFF 362 L latching data 370 LDL2 302 LDLG 60 LEAD _LAG structure 60 LEAD_LAG_ SEC_ORDER structure 302 Lead Lag 60 Low Pass Filter 308 LPF 308 MAVE 346 MAXC 350 Maximum Capture 350 MAXIMUM_CAPTURE structure 350 MC 202 MINC 352 Minimum Capture 352 MINIMUM_CAPTURE structure 352 mixing data types 416 Modular Multivariable Control MMC fuction block 197 function block configuration 198 function block diagram 197 input parameters 204 model initialization 202 output parameters 225 splitter control example 200 tuning 201 tuning errors 202 move logical instructions DFF 360 JKFF 362 RESD 364 SETD 366 Moving Average 346 Moving Standard Deviation 354 MOVING_AVERAGE structure 346 MOVING_STD_DEV structure 354 MSTD 354 Multiplexer 330 MULTIPLEXER structure 330 MUX 330 Notch Filter 314 NTCH 314 0 order of execution 372 overflow conditions 376 P PI 248 PIDE 64 PIDE autotuning 78 PIDE_AUTOTUNE structure 78 PMUL 260 Position Proportional 100 POSITION_PROP structure 100 POSP 100 process control instructions ALM 24 D2SD 29 D3SD 38 DEDT 51 FGEN 56 LDLG 60 PIDE 64 POSP 100 RMPS 107 SCL 121 SRTP 125 TOT 131 program operator control D2SD 34 D3SD 45 ESEL 326 overview 381 Publication 1756 RMO06G EN P September 2010 PIDE 85 RMPS 114 TOT 137 programming examples ESEL 325 POSP 106 RMPS 114 SCL 124 SRTP 130 PROP_INT
437. rrors 167 D D Flip Flop 360 D2SD 29 D3SD 38 Deadtime 51 DEDT 51 Derivative 292 DERV 292 DFF 360 Discrete 2 State Device 29 Discrete 3 State Device 38 DISCRETE_2STATE structure 29 DOMINANT_RESET structure 364 DOMINANT_SET structure 366 drives instructions INTG 242 PI 248 PMUL 260 Publication 1756 RM006G EN P September 2010 Index SCRV 268 SOC 278 UPDN 287 E Enhanced PID 64 Enhanced Select 320 ESEL 320 execution order 372 F faceplates ALM 27 426 D2SD 32 434 D3SD 43 436 display properties 423 ESEL 324 428 font properties 424 425 general properties 422 PIDE 78 438 RMPS 111 431 TOT 135 429 feedback loop function block diagram 373 FGEN 56 filter instructions DERV 292 HPF 296 LDL2 302 LPF 308 NTCH 314 FILTER_HIGH_PASS structure 296 FILTER_LOW_PASS structure 308 FILTER_NOTCH structure 314 FLIP_FLOP_D structure 360 FLIP_FLOP_JK structure 362 function block diagram create a scan delay 375 resolve a loop 373 resolve data flow between blocks 374 Function Generator 56 FUNCTION_GENERATOR structure 57 H High Pass Filter 296 High Low Limit 327 HL_LIMIT structure 327 HLL 327 HPF 296 443 Index 444 immediate values 415 Integrator 242 INTEGRATOR structure 242 Internal Model Control IMC function block 140 function block configuration 141 function block diagram 140 input parameters 146 model initialization 144 output parameters 156 tuning 143 tuning e
438. rs The function block resets the input to FALSE AtuneCV3PV2UseModel BOOL Use Autotune model request for CV3 PV2 Set True to Default FALSE replace the current model parameters with the calculated Autotune model parameters The function block resets the input to FALSE AtuneCV1 Abort BOOL Abort Autotune request for CV1 Set True to abort the auto Default FALSE tuning of the CV1 output for both PV1 and PV2 The function block resets the input to FALSE AtuneCV2Abort BOOL Abort Autotune request for CV2 Set True to abort the auto Default FALSE tuning of the CV2 output for both PV1 and PV2 The function block resets the input to FALSE AtuneCV3Abort BOOL Abort Autotune request for CV3 Set True to abort the auto Default FALSE tuning of the CV3 output for both PV1 and PV2 The function block resets the input to FALSE MMC Function Block Output Parameter Descriptions The following table describes the output parameters in the MMC function block 224 Publication 1756 RMO06G EN P September 2010 MMC Output Parameter EnableOut Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description Enable Output Values Chapter 2 CV1EU REAL Scaled control variable output for CV1 Scaled by using CV1EUMax and CV1EUMin where CV1EUMax corresponds to 100 and CVEUMin corresponds to 0 This output is typically used to control an analog output modul
439. ruction first scan All the operator request inputs are cleared If ProgValueReset is set all the program request inputs are cleared All the operator request inputs are cleared If ProgValueReset is set all the program request inputs are cleared instruction first run The instruction is set to Operator control The instruction is set to Operator control Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan 324 No action taken No action taken Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Example Publication 1756 RMO06G EN P September 2010 This ESEL instruction selects In1 In2 or In3 based on the SelectorMode In this example SelectorMode 1 which means high select The instruction determines which input value is the greatest and sets Out greatest In Structured Text ESEL 01 In1 analog inputl ESEL 01 In2 analog input2 ESEL 01 In3 analog input3 ESEL 01 SelectorMode 1 ESE ESEL 01 gt selected value ESEL 01 0ut Function Block ESEL_01 ESEL E anaoa Sp Enhanced Select 00 Int Out selected_value 0 0 o an
440. ruction provides a phase lead lag compensation for an input signal This instruction is typically used for feedforward PID control or for process simulations Structured Text Operand Type Format Description LDLG tag LEAD_LAG structure LDLG structure Function Block Operand Type Format Description LDLG tag LEAD_LAG structure LDLG structure LEAD_LAG Structure Description Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes REAL The analog signal input to the instruction Valid any float Default 0 0 Initialize BOOL Request to initialize filter control algorithm When Initialize is set Out In x Gain Bias Default cleared Lead REAL The lead time in seconds Set Lead 0 0 to disable the lead control algorithm If Lead lt 0 0 the instruction sets the appropriate bit in Status and limits Lead to 0 0 If Lead gt maximumimum positive float the instruction sets the appropriate bit in Status Valid any float gt 0 0 Default 0 0 Lag REAL The lag time in seconds The minimum lag time is DeltaT 2 If Lag lt DeltaT 2 the instruction sets the appropriate bit in Status and limits Lag to DeltaT 2 If Lag gt maximumimum positive float the instruction sets the appropriate bit in Status Valid any float gt DeltaT 2 Default 0 0
441. s Structured Text REPEAT UNTIL bool expression bool_ l BOOL tag l BOOL tag or expression that evaluates to ine Bane expression expression a BOOL value BOOL expression IMPORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e If the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occuts e Consider using a different construct such as IE THEN Description The syntax is REPEAT lt statement gt lt q Statements to execute while bool_expression is false IF bool _expression2 THEN TIPE If there are conditions when you want to exit the loop early use other statements END IF such as an IF THEN construct to condition an EXIT statement optional UNTIL bool _expressionl END REPEAT 410 Publication 1756 RMO06G EN P September 2010 Structured Text Programming Appendix B The following diagrams show how a REPEAT UNTIL loop executes and how an EXIT statement statement 1 statement 2 statement 3 statement 4 true aia rest of the routine BOOL expression false While the bool_expression is false the controller executes only the statements within the REPEAT UNTIL loop Example 1 If you want this The REPEAT UNTIL lo
442. s If SPLLimit lt PVEUMin the instruction sets the appropriate bit in Status If SPHLimit lt SPLLimit the instruction sets the appropriate bit in Status and limits SP using the value of SPLLimit Valid PVEUMin to SPHLimit Default 0 0 UseRatio Publication 1756 RMO06G EN P September 2010 BOOL Allow ratio control permissive Set to enable ratio control when in Cascade Ratio mode Default is cleared 65 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description RatioProg REAL Ratio program multiplier Ratio and RatioOper are set equal to this value when in Program control If RatioProg lt RatioLLimit or gt RatioHLimit the instruction sets the appropriate bit in Status and limits the value used for Ratio Valid RatioLLimit to RatioHLimit Default 1 0 RatioOper REAL Ratio operator multiplier Ratio is set equal to this value when in Operator control If RatioOper lt RatioLLimit or gt RatioHLimit the instruction sets the appropriate bit in Status and limits the value used for Ratio Valid RatioLLimit to RatioHLimit Default 1 0 RatioHLimit REAL Ratio high limit value Limits the value of Ratio obtained from RatioProg or RatioOper If RatioHLimit lt RatioLLimit the instruction sets the appropriate bit in Status and limits Ratio using the value of RatioLLimit Valid Ratio
443. s in the 0 state Default is cleared FB3State1 BOO Feedback 3 state 1 input This value determines the expected value of FB3 when the device is in the 1 state Default is cleared FB3State2 BOO Feedback 3 state 2 input This value determines the expected value of FB3 when the device is in the 2 state Default is cleared ProgProgReq BOO Program program request Set by the user program to request Program control Ignored if ProgOperReg is set Holding this set and ProgOperReg cleared locks the instruction in Program control Default is cleared ProgOperReq BOO Program operator request Set by the user program to request operator control Holding this set locks the instruction in Operator control Default is cleared ProgOverrideReq BOO Program override request Set by the user program to request the device to enter Override mode Ignored if ProgHandReg is set Default is cleared ProgHandReq Publication 1756 RMO06G EN P September 2010 BOO Program hand request Set by the user program to request the device to enter Hand mode Default is cleared 41 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description OperProgReq BOOL Operator program request Set by the operator interface to request Program control The instr
444. s NORAD it Selb A 8 8 385 When to Use This Chapter siiicauskks os Se SKS eke 385 Siitichifed Text Syne scar rua cen E heen em Ee awe 385 PASSIONES tid fot oodee nr latolide ea Ged SAREE beg 2 pS Ry 387 Specify a non retentive assloniment s s s aie we es 388 Assign an ASCII character to a string 4 iho eee 389 Expressions eein aE Mae he Ste OE E i 389 Use arithmetic operators and functions 0005 391 Use relational operators jes Fis 23 de RAR a aes 392 Use Topical OP TAtOYS e erana Sek a8 paiana a aaa ee iai 394 Use bitwise Opetatotsnc sock eects sates ere ey ts 395 Determine the order of execution n ee eat 4S 395 TastucHo nsee is ren E e aa we a T AO EE Ra E S 396 CofsUCES e n E EEE E O ORE EAA as ENA 397 Some key words are reserved for future use 397 TE EHEN ie a R a R S A Da aa 398 PS DNO i sat ess both E stants Ah T ed ase Satis dk 401 FOR JO visasdte toa awaa stots ca bites peabhadasy 404 WAILBE DO gareg a ER naa e RE ad aad oe 407 REPEAT UNTIE enaa ere ware ar een nee eet one ear ree 410 COMMEN aA mR ane ere ete a ate Oo ae ee eee eran gm oe ree 413 Table of Contents Common Attributes Function Block Faceplate Controls Index Appendix C Tatrod cton nite Ga a wed atu eit an wee he Rae ea 415 Immediate VANES 95 as G ite 2s Shh eee ws EEE TA eed ae ee 415 Data CONV er hlON a ay ine tana ee ete Rees aoa 416 SINT f TNE to DINT oii ate ESAS in strike dies 417 Tnteger to READ Snia
445. s changed too much to Autotune for CV2 When True CV2 Autotuning is aborted Wait until PV is more stable before autotuning CV2 Bit 10 of AtuneCV2Status AtuneCV3PVNotSettled BOO The PV is changed too much to Autotune for CV3 When True CV3 Autotuning is aborted Wait until PV is more stable before autotuning CV3 Bit 10 of AtuneCV3Status Status1 DINT Bit mapped status of the function block Status2 DINT Additional bit mapped status for the function block Status3CV1 DINT Additional bit mapped CV1 status for the function block A value of 0 indicates that no faults have occurred Status3CV2 DINT Additional bit mapped CV2 status for the function block A value of 0 indicates that no faults have occurred Status3CV3 Publication 1756 RMO06G EN P DINT Additional bit mapped CV3 status for the function block A value of 0 indicates that no faults have occurred September 2010 193 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Output Parameter Data Type Description Values InstructFault BOOL The function block has generated a fault Indicates state of bits in Bit 0 of Status1 Status1 Status2 and Status3CV n where n can be 1 2 or 3 A value of 0 indicates that no faults have occurred Any parameters that could be configured with an in
446. s on page 86 for details Default FALSE Publication 1756 RMO06G EN P September 2010 IMC Input Parameter ProgOverrideReq Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description 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 Refer to Operating modes on page 86 for details Valid and Default Values Default FALSE Chapter 2 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 Refer to Operating modes on page 86 for details 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 Refer to Switching between Program control and Operator control on page 85 Default FALSE OperOperReq BOOL Operator Operator Request Set TRUE by the operator interface to request Operator control The function block will reset this parameter to FALSE Refer to Switching between Program control and Operator control on page 85 Default FALSE OperCasRatReq BOOL Operator CascadeRatio mode request Set TRUE by the operator interface to
447. s variable and the setpoint value If DevHLimit lt 0 0 the instruction sets the appropriate bit in Status and sets DevHLimit 0 0 Valid 0 0 to maximumimum positive float Default maximumimum positive float DevLLimit REAL Deviation low alarm limit value scaled in PV units Deviation is the difference in value between the process variable PV and the setpoint SP Deviation alarming alerts the operator to a discrepancy between the process variable and the setpoint value If DevLLimit lt 0 0 the instruction sets the appropriate bit in Status and sets DevLLimit 0 0 Valid 0 0 to maximumimum positive float Default maximumimum positive float DevLLLimit REAL Deviation low low alarm limit value scaled in PV units Deviation is the difference in value between the process variable PV and the setpoint SP Deviation alarming alerts the operator to a discrepancy between the process variable and the setpoint value If DevLLLimit lt 0 0 the instruction sets the appropriate bit in Status and sets DevLLLimit 0 0 Valid 0 0 to maximumimum positive float Default maximumimum positive float DevDeadband REAL The deadband value for the Deviation alarm limits scaled in PV units Deadband is the delta value between the turn on and turn off value for each of the Deviation alarm limits If DevDeadband lt 0 0 the instruction sets the appropriate bit in Status and sets DevDeadband 0 0 Valid 0 0 to maximumimum positive float De
448. scription 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 lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status If CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV High Low Limiting on page 96 for details Valid and Default Values Valid CVLLimit lt CVHLimit lt 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 e f CVLLimit lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status e f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV High Low Limiting on page 96 for details Valid 0 0 lt CVLLimit lt CVHLimit Default 0 0 CVROCPosLimit REAL CV increasing rate of change limit in percent per second e Rate of change limiting is only used when in Auto or CascadeRatio modes or Manual mode if CVManLimiting is TRUE e A value of zero disables CV ROC limiting e f value of CVROCPOSLimit lt 0 set bit in Status and disable CV ROC limiting Refer to CV Rate of Change Limiting on page 96 for details Valid 0 0 to maximum positive float Default 0 0 CVROCNegLimit CV decreasing rate of change
449. se S_Mode is cleared Out REAL The output of the S Curve instruction Arithmetic status flags are set for this output Rate REAL Internal change in the Out in units per second DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status Publication 1756 RMO06G EN P September 2010 DINT Status of the function block 269 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Output Parameter Data Type Description InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred AccelRatelnv BOOL AccelRate is negative Status 1 DecelRatelnv BOOL DecelRate is negative Status 2 JerkRatelnv Status 3 BOOL JerkRate is negative TimingModelnv BOOL Invalid timing mode Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaT Status 31 BOOL Invalid DeltaT value Description The primary requirement of the SCRV instruction is to ensure that the rate never changes by more than the
450. se function blocks in a Continuous or Event Task e TimingMode 2 RealTimeSample Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 CC Function Block Input Parameter Descriptions The following table describes the input parameters in the CC function block CC Input Parameter Data Type Description Values Enableln BOOL Enable Input If False the function block will not execute and Default TRUE outputs are not updated PV REAL Scaled process variable input This value is typically read from an Valid any float analog input module Default 0 0 PVFault BOOL PV bad health indicator If PV is read from an analog input then Default FALSE PVFault will normally be controlled by the analog input fault status FALSE Good Health If PVFault is TRUE it indicates an error on the input module set bit in Status Refer to Processing Faults on page 99 PVSpaninv or SPLimitsInv for details PVEUMax REAL Maximum scaled value for PV The value of PV and SP that Valid PVEUMin lt PVEUMax lt corresponds to 100 span of the Process Variable maximum positive float If PVEUMax lt PVEUMin set bit in Status Default 100 0 Refer to Processing Faults on page 99 PVSpaninv or SPLimitsInv for details PVEUMin REAL Minimum scaled value for PV The value of PV and SP that Valid maximum negative float corresponds to 0 span of the Process Variable
451. se linear curve valid any float REAL array Y axis array table one Combine with the X axis array table one to define the points of the first piece wise linear curve valid any float X2 REAL array optional X axis array table two Combine with the Y axis array table two to define the points of the second piece wise linear curve valid any float Y2 REAL Function Block array optional Y axis array table two Combine with the X axis array table two to define the points of the second piece wise linear curve valid any float The operands are the same as for the structured text FGEN instruction Publication 1756 RM006G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type FUNCTION_GENERATOR Structure Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 XY1Size DINT Number of points in the piece wise linear curve to use from table one If the value is less than one and Select is cleared the instruction sets the appropriate bit in Status and the output is not changed Valid 1 to smallest of X1 and Y1 array si
452. set The instruction executes postscan No action taken No action taken Initial mode applied on instruction first scan The following table shows the ending control based on the program request inputs Prog Prog Prog First Oper Prog Value Run Control at Start of First Scan Req Req Reset Control at End of First Scan Operator control cleared set cleared na Program control na cleared na na Operator control Program control set na cleared cleared Operator control na na set set cleared cleared cleared set cleared set cleared na na na set cleared cleared cleared cleared cleared 112 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 The following table shows the ending control based on the Manual Auto and Hold mode requests Oper Oper Prog Prog Prog Manual Prog First Auto Man Auto Man Hold Hold Value Run Control at Start of Req Req Req Req Req After Reset Control at End of First Scan First Scan Init Operator control na na na na na cleared na cleared Operator current mode na na na na na na na set Operator Manual mode na na na na na set na na Program control na na cleared cleared cleared cleared na cleared Program current mode na na na na na cleared set cleared na na set cleared cleared cleared cleared na Program Auto mode na na na set cleared cleared cleared n
453. set bit in Status or 1 Infinity o0 CV2ModelGain REAL The internal model gain parameter for CV2 Enter a positive or valid maximum negative float negative gain depending on process direction gt maximum positive float CV2ModelGain for Model Gain is 1 QNAN or 1 4IND Not A Default 0 0 Number or 1 Infinity 00 CV3ModelGain REAL The internal model gain parameter for CV3 Enter a positive or valid maximum negative float negative gain depending on process direction gt maximum positive float CV3ModelGain for Model Gain is 1 4QNAN or 1 4IND Not A Default 0 0 Number or 1 Infinity 00 CV1ModelTC REAL The internal model time constant for CV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV2ModelTC REAL The internal model time constant for CV2 in seconds Valid 0 0 to maximum positive float Default 0 0 CV3ModelTC REAL The internal model time constant for CV3 in seconds Valid 0 0 to maximum positive float Default 0 0 CV1ModelDT REAL The internal model deadtime for CV1 in seconds Valid 0 0 to maximum positive float Default 0 0 CV2ModelDT REAL The internal model deadtime for CV2 in seconds Valid 0 0 to maximum positive float Default 0 0 CV3ModelDT REAL The internal model deadtime for CV3 in seconds Valid 0 0 to maximum positive float Default 0 0 CV1RespTC REAL The tuning parameter that determines the speed of the control Valid 0 0 to maximum positive variable action for CV1 in secon
454. set for the ROC output Fault Conditions none Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan All alarm outputs are cleared The elapsed time accumulator is cleared All alarm outputs are cleared The elapsed time accumulator is cleared instruction first run All alarm outputs are cleared The elapsed time accumulator is cleared All alarm outputs are cleared The elapsed time accumulator is cleared Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken Publication 1756 RM006G EN P September 2010 No action taken 27 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Example The ALM instruction is typically used either with analog input modules such as 1771 I O modules that do not support on board alarming or to generate alarms on a calculated variable In this example an analog input from a 1771 IFE module is first scaled to engineering units using the SCL instruction The Ow of the SCL instruction is an input to the ALM instruction to determine whether to set an alarm The resulting alarm output parameters could then be used in your program and or view
455. setting the ProgProgReq can lock the instruction into Program control This is useful for automatic startup sequences when you want the program to control the action of the instruction without worrying about an operator inadvertently taking control of the instruction In this example you have the program set the ProgProgReq input during the startup and then clear the ProgProgRegq input once the startup was complete Once the ProgProgReq input is cleared the instruction remains in Program control until it receives a request to change For example the operator could set the OperOperReq input from a faceplate to take over control of that instruction The following example shows how to lock an instruction into Program control FuelFlowController PIDE Enhanced PID g SPProg sP p g SPCascade PVHHAIarm StartupCV gt J RatioProg PYVHAlarm f5 CVProg PVLAlarm D GFF PYVLLAIarm D d HandFB PVROCPosAlarm D StartupSequenceActive p F ProgProgReq PVROCNegAlarm D E ProgOperReq DevHHAlarm H ProgCasRatReq DevHAlarm ProgAutoReq DevLAlarm D L ProgManualReq DevLLAlarm D When StartupSequenceActive odrana Sebi is set the PIDE instruction is E PregHandReg CasRat i placed in Program control and Auto D Manual mode The StartupCV Manual fp value is used as the loop output Oramia la Hand 9 Operator request inputs to an instruction are always cleared by the instruction when it executes This
456. sition control or nonintegrating flow pressure control ProcessGainSign 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 Responsespeed Slow medium or fast based on control objective NoiseLevel An estimate of noise level on PV low medium or high such that the tuner can distinguish which PV change is a random noise and which is caused by the CV step change StepSize A nonzero positive or negative number defining the magnitude of CV step change in either positive or negative direction respectively PVTuneLimit Only for integrating process type in PV engineering units defines how much of PV change that is caused by CV change to tolerate before aborting the tuning test due to exceeding this limit The tuner is started by setting the AtuneStart bit You can stop the tuning by setting the AtuneAbort bit After the tuning is completed successfully the GainTuned TCTuned DTTuned and RespTCTuned parameters are updated with the tuning results and the AtuneStatus code is set to indicate complete You can copy these parameters to the ModelGain ModelTC and ResponseTC respectively by setting the AtuneUseModel bit The function block will automatically initialize the internal variables and continue normal operation It will automatically reset the AtuneUseModel bit IMC Function Block Tuning Procedu
457. sitive float Default 0 0 RespTC REAL The tuning parameter that determines the speed of the control Valid 0 0 to maximum positive float variable action in seconds Default 0 0 PVTracking BOOL SP track PV request Set TRUE to enable SP to track PV Default FALSE Ignored when in CascadeRatio or Auto modes Refer to Current SP on page 88 CVTrackReq BOOL CV Track request Set true to enable CV Tracking when Default FALSE autotune is OFF Ignored in Hand and Override mode Refer to CVTrackValue on page 149 Publication 1756 RMO06G EN P September 2010 151 Chapter 2 IMC Input Parameter AllowCasRat Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description Allow CascadeRatio mode permissive Set TRUE to allow CascadeRatio mode to be selected by using either ProgCasRatReq or OperCasRatReq Refer to Switching between Program control and Operator control on page 85 Valid and Default Values Default FALSE ManualAfterlnit BOOL Manual mode after initialization request e 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 e When ManualAfterlnit is FALSE the function block s mode will not be changed Refer to Processing Faults on page 99 CVinitRequest Default FALSE ProgProgReq BOOL Program Program Request e Set TRUE by the user program to request P
458. sponse Time Constant lt 0 Bit 16 of Status3CV3 Publication 1756 RMO06G EN P September 2010 239 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC Notes 240 Publication 1756 RMO06G EN P September 2010 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Introduction These drives instructions are available If you want to Use this instruction Available in these languages Page execute a integral operation Integrator INTG structured text 242 function block execute a PI algorithm Proportional Integral PI structured text 248 function block provide an interface from a position input Pulse Multiplier PMUL structured text 260 module such as a resolver or encoder feedback function block module to the digital system by computing the change in input from one scan to the next perform a ramp function with an added S Curve SCRV structured text 268 jerk rate function block use a gain term a first order lag and a second Second Order Controller structured text 278 order lead SOC function block add and subtract two inputs into an Up Down Accumulator structured text 287 accumulated value UPDN function block Publication 1756 RMO06G EN P September 2010 241 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Integrator INTG Operands INTG INTG tag INTG_01 NTG Integrator The INTG instruction implements an i
459. ssion OF TETO rI EREE Operand Type Format Enter Sr statements numeric_ SINT tag tag or expression that evaluates to a g expression NT expression number numeric expression ELSE DINT statement REAL END CASE selector SINT immediate same type as numeric expression INT DINT REAL IMPORTANT If you use REAL values use a range of values for a selector because a REAL value is more likely to be within a range of values than an exact match of one specific value Description The syntax is CASE numeric expression OF selectorl1 lt statement gt q statements to execute when numeric_expression selector specify as many selector2 lt statement gt lt _q _ statements to execute when si feat ueSClactor numeric_ expression selector2 values paths as you 4 need selector3 lt statement gt statements to execute when numeric_expression selector3 ELSE lt statement gt lt qg statements to execute when optional numeric_expression any selector END_CASE See the table on the next page for valid selector values Publication 1756 RMO06G EN P September 2010 401 Appendix B Structured Text Programming The syntax for entering the selector values is When selector is one value Enter value statement multiple distinct values value1 value2 valueN lt statement gt Use a comma to separate each value a range of values value1
460. struction Default is cleared FB3 BOOL The fourth feedback input available to the instruction Default is cleared HandFBO BOOL Hand feedback state 0 This input from a field hand off auto station shows the requested state of the field device Set indicates that the field device is being requested to enter the 0 state cleared indicates that the field device is being requested to enter some other state Default is cleared HandFB1 BOOL Hand feedback state 1 This input from a field hand off auto station shows the requested state of the field device Set indicates that the field device is being requested to enter the 1 state cleared indicates that the field device is being requested to enter some other state Default is cleared HandFB2 BOOL Hand feedback state 2 This input from a field hand off auto station shows the requested state of the field device Set indicates that the field device is being requested to enter the 2 state cleared indicates that the field device is being requested to enter some other state Default is cleared FaultTime REAL Fault time value Configure the value in seconds of the time to allow the device to reach a newly commanded state Set FaultTime 0 to disable the fault timer If this value is invalid the instruction assumes a value of zero and sets the appropriate bit in Status Valid any float gt 0 0 Default 0 0 FaultAlarmLatch BOOL Fault alarm latch input When set and FaultAlarm is set latch FaultAlarm To
461. structions differ from functions in that instructions cannot be used in expressions Functions can only be used in expressions construct A conditional statement used to trigger structured text code for IF THEN see page 397 example other statements CASE Terminate the construct with a semi colon FOR DO WHILE DO REPEAT UNTIL EXIT comment Text that explains or clarifies what a section of structured text does comment see page 413 e Use comments to make it easier to interpret the structured text e Comments do not affect the execution of the structured text start of comment e Comments can appear anywhere in structured text end of comment start of comment end of comment Entering spaces in structured text syntax is optional Spaces have no effect on the execution of the structured text For example both of these statements execute the same Tag_B Tag_A Tag_B Tag_A 386 Publication 1756 RMO06G EN P September 2010 Assignments Publication 1756 RMO06G EN P September 2010 Structured Text Programming Appendix B Use an assignment to change the value stored within a tag An assignment has this syntax tag expression where Component Description tag represents the tag that is getting the new value the tag must be a BOOL SINT INT DINT or REAL is the assignment symbol expression represents the new value to assign to the tag lf tag is this data type Use this type of expressi
462. structure 248 Proportional Integral 248 Pulse Multipler 260 PULSE_MULTIPLIER structure 260 RAMP_SOAK structure 108 Ramp Soak 107 Rate Limiter 333 RATE_LIMITER structure 333 RESD 364 Reset Dominant 364 RLIM 333 RMPS 107 S S_CURVE structure 268 Scale 121 SCALE structure 121 scan delay function block diagram 375 SCL 121 SCRV 268 S Curve 268 SEC_ORDER_CONTROLLER structure 278 Second Order Controller SOC 278 Second Order Lead Lag 302 SEL 337 Select 337 SELECT structure 337 SELECT_ENHANCED structure 320 select limit instructions ESEL 320 HLL 327 MUX 330 RLIM 333 SEL 337 SNEG 339 SSUM 341 SELECTABLE_NEGATE structure 339 Publication 1756 RMO06G EN P September 2010 Index SELECTABLE_SUMMER structure 341 Selected Negate 339 Selected Summer 341 Set Dominant 366 SETD 366 SNEG 339 SOC 278 Split Range Time Proportional 125 SRTP 125 SSUM 341 statistical instructions MAVE 346 MAXC 350 MINC 352 MSTD 354 STOD instruction 398 string conversion instructions STOD 398 String To DINT 398 structured text CASE 401 structures ALARM 24 DISCRETE_2STATE 29 DOMINANT_RESET 364 DOMINANT_SET 366 FILTER_HIGH_PASS 296 FILTER_LOW_PASS 308 FILTER_NOTCH 314 FLIP_FLOP_D 360 FLIP_FLOP_JK 362 FUNCTION_GENERATOR 57 HL_LIMIT 327 INTEGRATOR 242 LEAD_LAG 60 LEAD_LAG_SEC_ORDER 302 MAXIMUM_CAPTURE 350 MINIMUM_CAPTURE 352 MOVING_AVERAGE 346 MOVING_STD_DEV 354 MULTIPLEXER 330 PIDE_AUTOTUNE 78 POSITION
463. t BOOL Internal model initialization switch for CV3 PV1 Refer to MMC Function Block Tuning on page 201 Default FALSE CV1PV2Modellnit BOOL Internal model initialization switch for CV1 PV2 Refer to MMC Function Block Tuning on page 201 Default FALSE CV2PV2Modellnit BOOL Internal model initialization switch for CV2 PV2 Refer to MMC Function Block Tuning on page 201 Default FALSE CV3PV2Modellnit BOOL Internal model initialization switch for CV3 PV2 Refer to MMC Function Block Tuning on page 201 Default FALSE PV1Factor REAL Non integrating model approximation factor for PV1 Only used for integrating process types Default 100 PV2Factor REAL Non integrating model approximation factor for PV2 Only used for integrating process types Default 100 AtuneCV1 Start BOOL Start Autotune request for CV1 Set True to initiate auto tuning of the CV1 output for both PV1 and PV2 Ignored when CV1 output is not in Manual mode The function block resets the input to FALSE Default FALSE AtuneCV2Start BOOL Start Autotune request for CV2 Set True to initiate auto tuning of the CV2 output for both PV1 and PV2 Ignored when CV2 output is not in Manual mode The function block resets the input to FALSE Default FALSE AtuneCV3Start BOOL Start Autotune request for
464. t Enableln is always set The instruction executes postscan No action taken Publication 1756 RMO06G EN P September 2010 No action taken 335 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Example The RLIM instruction limits In by IncRate If analog_input1 changes at a rate greater than the IncRate value the instruction limits In The instruction sets Out rate limited value of In Structured Text RLIM 01 In analog _inputl RLIM 01 Bypass bypass RLIM RLIM 01 rate limited RLIM 01 O0Out Function Block RLIM_04 RLIM E Rate Limiter d rate_limited 336 Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Select SEL The SEL instruction uses a digital input to select one of two inputs Operands SEL_01 Function Block Clint Out SEL tag SELECT SEL structure g In2 E Selectorin SELECT Structure Input Parameter Data Type Description Enableln BOOL Enable input If cleared the instruction does not execute and outputs are not updated Default is set In1 REAL The first analog signal input to the instruction Valid any float Default 0 0 In2 REAL The second analog signal input to the instruction Valid any float Default 0 0 Selectorln BOOL The input that selects between In1 and In2 Default is cleared Output Parameter Data Type Description
465. t 0 0 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling CV1HLimit REAL CV1 high limit value This is used to set the CV1HAlarm output It Valid CV1LLimit lt CV1HLimit is also used for limiting CV1 when in Auto mode or in Manual lt 100 0 mode if CVManLimiting is TRUE _ l P n Default 100 0 e f CV1HLimit gt 100 if CV1HLimit lt CV1LLimit set bit in Status e f CV1HLimit lt CV1LLimit limit CV1 by using the value of CV1LLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 174 Publication 1756 RMO06G EN P September 2010 CC Input Parameter CV2HLimit Data Type REAL Advanced Process Control Function Blocks IMC CC MMC Description CV2 high limit value This is used to set the CV2HAlarm output It is also used for limiting CV2 when in Auto mode or in Manual mode if CVManLimiting is TRUE e f CV2HLimit gt 100 if CV2HLimit lt CV2LLimit set bit in Status e f CV2HLimit lt CV2LLimit limit CV2 by using the value of CV2LLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 Chapter 2 Values Valid CV2LLimit lt CV2HLimit lt 100 0 Default 100 0 CV3HLimit REAL CV3 high limit value This is used to set the CV3HAlarm output It is also used for limiting CV3 when in Auto mode or in Manual mode if CVManLimiting is TRUE e f CV3HLim
466. t Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output Description The MINC instruction executes this algorithm Condition Action Reset is set Out ResetValue Out ResetValue Reset is cleared Out In when In lt Out Out Out when In gt Out Out Out 352 Publication 1756 RMO06G EN P September 2010 Statistical Instructions MAVE MAXC MINC MSTD Chapter 6 Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Out In Out In instruction first run Out 1 In Out 1 In Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken Example If Reset is No action taken set the instruction sets Out ResetValue If Reset is cleared the instruction sets Out In when In lt Out _ Otherwise the instruction sets Out Out 1 Structured Text MINC 01 MINC 01 MINC 01 minimum ein Reset ResetValu input _value reset_input reset value MINC MINC 01 MINC 01 0ut Function Block O reset_input Publicatio
467. t lt CV limited to CV high low limits Boe cies Sala eee pw CV CVLLimit gt CV CVHLimit if CVLAlarm is set p gt if CVHALARM is set 1 During instruction first scan the instruction clears the alarm outputs CV Rate of Change Limiting The PIDE instruction limits the rate of change of CV when in Auto or Cascade Ratio mode or when in Manual mode and CVManLimiting is set A value of zero disables CV rate of change limiting The CV rate of change is calculated as CVROV CV CVh 1 CVROCDelta CVROCLimit x DeltaT where DeltaT is in seconds Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Once CV rate of change has been calculated the CV rate of change alarms ate determined as follows CVROCAlarm is set CV output CVROC gt CVROCDelta eae CVROC lt CVROCDelta is cleared q CV from CV high low limit algorithm pe if CV gt CVa CVROC alarm gt gt gt gt B CV CV CVROCDelta if CV lt CV noe pe CV CV CVROCDelta 1 During instruction first scan the instruction clears the alarm output The instruction also clears the alarm output and disables the CV rate of change algorithm when CVInitializing is set 2 When in Auto or Cascade Ratio mode or when in Manual mode and CVManLimiti
468. t lt SP2LLimit If SP2HLimit lt SP2LLimit then limit value by using SP2LLimit SampleTimeToosmall BOOL Model DeadTime DeltaT must be less than or equal to 200 Bit 11 of Status PV1Factorinv BOOL Entered value for PV1Factor lt 0 Bit 12 of Status PV2Factorinv BOOL Entered value for PV21Factor lt 0 Bit 13 of Status TimingModelnv BOOL Entered TimingMode invalid If the current mode is not Override Bit 27 of Status2 or Hand then set to Manual mode RTSMissed BOOL Only used when in Real Time Sampling mode TRUE whenABS Bit 28 of Status2 DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Entered RTSTime invalid Bit 29 of Status2 RTSTimeStamplnv BOOL RTSTimeStamp invalid If the current mode is not Override or Bit 30 of Status2 Hand then set to Manual mode DeltaTInv BOOL DeltaT invalid If the current mode is not Override or Hand then Bit 31 of Status2 set to Manual mode CV1Faulted BOOL Control variable CV1 health bad Bit 0 of Status3CV1 CV2Faulted BOOL Control variable CV2 health bad Bit 0 of Status3CV2 CV3Faulted BOOL Control variable CV3 health bad Bit 0 of Status3CV3 CV1Proginv BOOL CV1Prog 1 lt 0 or gt 100 or lt CV1LLimit or gt CV1HLimit when Bit 2 of Status3CV1 CVManLimiting is TRUE Limit value used for CV1 CV2Proginv BOOL CV2Prog 2 lt 0 or gt 100 or lt CV2LLimit or gt CV2HLimit when Bit 2 of Status3CV2 CVManLimiting is TRUE Limit value used for CV2 CV3Proginv BOOL C
469. t Parameter Data Type Description TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mode 2 real time sampling mode For more information about timing modes see appendix Function Block Attributes Valid 0 to 2 Default 0 OversampleDT REAL Execution time for oversample mode Valid 0 to 4194 303 seconds Default 0 RTSTime DINT Module update period for real time sampling mode Valid 1 to 32 767ms Default 1 RTSTimeStamp DINT Module time stamp value for real time sampling mode Valid 0 to 32 767ms Default 0 Output Parameter Data Type Description EnableOut BOOL Enable output Out REAL The calculated output of the algorithm Arithmetic status flags are set for this output DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred WNotchInv Status 1 BOOL WNotch lt minimum or WNotch gt maximum OFactorInv Status 2 BOOL QFactor lt minimum or OFactor gt maximum Orderlnv Status 3 BOOL Invalid Order value TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28
470. t during CV3 PV2 Autotuning When True CV3 PV2 Autotuning is aborted 234 Publication 1756 RMO006G EN P September 2010 MMC Output Parameter AtuneCV2PV2Limit Type BOOL Advanced Process Control Function Blocks IMC CC MMC Description Either PV2 or the deadtime step ahead prediction of PV2 exceeds PV2TuneLimit during CV2 PV2 Autotuning When True CV2 PV2 Autotuning is aborted Chapter 2 Values Bit 1 of AtuneCV2PV2Status AtuneCV1PV2WindupFault BOOL CV1WindupHIn or CV1WindupLin is True at start of CV1 PV2 Autotuning or during CV1 PV2 Autotuning When True CV1 PV2 Autotuning is not started or is aborted Bit 3 of AtuneCV1PV2Status AtuneCV2PV2WindupFault BOOL CV2WindupHIn or CV2WindupLin is True at start of CV2 PV2 Autotuning or during CV2 PV2 Autotuning When True CV2 PV2 Autotuning is not started or is aborted Bit 3 of AtuneCV2PV2Status AtuneCV3PV2WindupFault BOOL CV3WindupHin or CV3WindupLin is True at start of CV3 PV2 Autotuning or during CV3 PV2 Autotuning When True CV3 PV2 Autotuning is not started or is aborted Bit 3 of AtuneCV3PV2Status AtuneCV1PV2StepSized BOOL CV1StepSizeUsed 0 at start of CV1 PV2 Autotuning When True CV1 PV2 Autotuning is not started Bit 4 of AtuneCV1PV2Status AtuneCV2PV2StepSized BOOL CV2StepSizeUsed 0 at start of CV2 PV2 Autotuning When True CV2 PV2 Autotuning is not started Bit 4 of AtuneCV2PV2Status
471. t in slow response speed for CV1 PV2 after tuning is completed 230 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Output Parameter Type Description Values CV2PV2RespTCTunedS REAL The calculated value of the control variable time constant in slow response speed for CV2 PV2 after tuning is completed CV3PV2RespTCTuneds REAL The calculated value of the control variable time constant in slow response speed for CV3 PV2 after tuning is completed CV1PV1RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV1 PV1 after tuning is completed CV2PV1RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV2 PV1 after tuning is completed CV3PV1RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV3 PV1 after tuning is completed CV1PV2RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV1 PV2 after tuning is completed CV2PV2RespTCTunedM REAL The calculated value of the control variable time constant in medium response speed for CV2 PV2 after tuning is completed CV3PV2RespTCTunedM REAL The
472. t indicates that the input signal has an error the instruction sets the appropriate bit in Status and the instruction holds Out and Average at their current values When InFault transitions from set to cleared the instruction initializes the averaging algorithm and continues executing Default is cleared 354 Publication 1756 RMO06G EN P September 2010 Statistical Instructions MAVE MAXC MINC MSTD Chapter 6 Input Parameter Data Type Description Initialize BOOL Initialize input to the instruction When set the instruction sets Out 0 0 and Average In except when InFault is set in which case the instruction holds both Out and Average at their current values When Initialize transitions from set to cleared the instruction initializes the standard deviation algorithm and continues executing Default is cleared SampleEnable BOOL Enable for taking a sample of In When set the instruction enters the value of In into the storage array and calculates a new Out and Average value When SampleEnable is cleared and Initialize is cleared the instruction holds Out and Average at their current values Default is cleared NumberOfSamples DINT The number of samples to be used in the calculation If this value is invalid the instruction sets the appropriate bit in Status and the instruction holds Out and Average at their current values When NumberOfSamples becomes valid again the instruction initializes the sta
473. t place an invalid In value NAN or INF into the storage array When In is invalid the instruction sets Out In sets Average In and sets the arithmetic overflow status flag When In becomes valid the instruction initializes the standard deviation algorithm and continues executing You can make runtime changes to the NumberOfSamples parameter If you increase the number the instruction incrementally processes new data from the current sample size to the new sample size If you decrease the number the instruction re calculates the standard deviation from the beginning of the sample array to the new NumberOfSamples value Initializing the standard deviation algorithm Certain conditions such as instruction first scan and instruction first run require the instruction to initialize the standard deviation algorithm When this occurs the instruction considers the sample array empty and incrementally processes samples from 1 to the NumberOfSamples value For example Out Square root In Average 7 1 Scan 2 Average In In 1 2 Out Square root In Average 7 In Average 2 Scan 3 Average In In _ In _ NumberOfSamples Out Square root In Average In Average In o Average By NumberOfSamples Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Publication 1756 RMO06G EN P September 2010 Statistical Instructions MAVE MAX
474. t speed is used CV1PV2ResponseSpeed DINT Desired speed of closed loop response for CV1 PV2 Range 0 2 Slow response ResponseSpeed 0 Default 1 Medium response Responsespeed Fast response ResponseSpeed 2 If ResponseSpeed is less than 0 Slow speed is used If ResponseSpeed is greater than 2 Fast speed is used CV2PV2ResponseSpeed DINT Desired speed of closed loop response for CV2 PV2 Range 0 2 Slow response ResponseSpeed 0 Default 1 Medium response ResponseSpeed Fast response ResponseSpeed 2 If ResponseSpeed is less than 0 Slow speed is used If ResponseSpeed is greater than 2 Fast speed is used 222 Publication 1756 RMO06G EN P September 2010 MMC Input Parameter CV3PV2ResponseSpeed Type DINT Advanced Process Control Function Blocks IMC CC MMC Description Desired speed of closed loop response for CV3 PV2 Slow response ResponseSpeed 0 Medium response ResponseSpeed Fast response ResponseSpeed 2 If ResponseSpeed is less than 0 Slow speed is used If ResponseSpeed is greater than 2 Fast speed is used Values Range 0 2 Default 1 Chapter 2 CV1PV1Modellnit BOOL Internal model initialization switch for CV1 PV1 Refer to MMC Function Block Tuning on page 201 Default FALSE CV2PV1Modellnit BOOL Internal model initialization switch for CV2 PV1 Refer to MMC Function Block Tuning on page 201 Default FALSE CV3PV1Modellni
475. t2 analog_input3 mux_result select_value C Selector 332 Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM Chapter 5 Rate Limiter RLIM The RLIM instruction limits the amount of change of a signal over time Operands RLIM RLIM_tag Structured Text RLIM tag RATE_LIMITER structure RLIM structure RLIM_01 Function Block RLIM E RLIM tag RATE_LIMITER structure RLIM structure RATE_LIMITER Structure E ByP ass Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 IncRate REAL Maximum output increment rate in per second units If invalid the instruction sets IncRate 0 0 and sets the appropriate bit in Status Valid any float gt 0 0 Default 0 0 DecRate REAL Maximum output decrement rate in per second units If invalid the instruction sets DecRate 0 0 and sets the appropriate bit in Status Valid any float gt 0 0 Default 0 0 ByPass BOOL Request to bypass the algorithm When set Out In Default is cleared TimingMode DINT Selects timing execution mode Value Description 0 periodic mode 1 oversample mod
476. tCV DINT The first CV to act to compensate for PV1 SP1 deviation Valid 1 3 1 CV1 2 CV2 3 CV3 Default 1 PV1Act2ndCV DINT The second CV to act to compensate for PV1 SP1 deviation Valid 1 3 1 CV1 2 CV2 3 CV3 Default 2 PV1Act3rdCV DINT The third CV to act to compensate for PV1 SP1 deviation Valid 1 3 1 CV1 2 CV2 3 CV3 Default 3 PV2Act1stCV DINT The first CV to act to compensate for PV2 SP2 deviation Valid 1 3 1 CV1 2 CV2 3 CV3 Default 1 PV2Act2ndCV DINT The first CV to act to compensate for PV2 SP2 deviation Valid 1 3 1 CV1 2 CV2 3 CV3 Default 2 PV2Act3rdCV DINT The first CV to act to compensate for PV2 SP2 deviation Valid 1 3 1 CV1 2 CV2 3 CV3 Default 1 TargetCV DINT The CV to be driven to its target value 1 CV1 2 CV2 3 CV3 Valid 1 3 Default 3 TargetRespTC REAL Determines the speed with which the control variables Valid 0 0 to maximum positive approach the target values Publication 1756 RMO06G EN P September 2010 float Default 0 0 217 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Input Parameter Type Description Values PVTracking BOOL SP track PV request Default FALSE Set TRUE to enable SP to track PV Ignored when in Auto modes SP will only track PV when all three outputs are in manual As soon as any output returns to Auto PVTracking stops Refer to Selecting the Setpoint on page 87
477. taken No action taken Example The derivative instruction calculates the amount of change of a signal over time in per second units This instruction is often used in closed loop control to create a feedforward path in the regulator to compensate for processes that have a high degree of inertia Structured Text DERV_01 In Speed Reference DERV_01 Gain Feedforward Gain DERV DERV_01 PI 01 In Speed Reference Speed feedback PI 01 Kp Proportional Gain PI _01 Wld Integral Gain PI PI 01 regulator out DERV_01 Out PI 01 0ut Publication 1756 RMO06G EN P September 2010 Filter Instructions DERV HPF LDL2 LPF NTCH Chapter 4 Function Block DERV_04 DERV Derivative Feedfonward_Gain SUB Speed_Reference Subtract o SoureeA C SourceA O SourceB Speed_feedback regulator_out Cj SourceB Integral_Gain Publication 1756 RMO06G EN P September 2010 295 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH High Pass Filter HPF Operands HPF HPF tag HPF_04 E High P ass Filter The HPF instruction provides a filter to attenuate input frequencies that are below the cutoff frequency Structured Text Operand Type Format Description HPF tag FILTER_HIGH_PASS HPF structure Function Block HPF tag FILTER_HIGH_PASS HPF structure FILER_HIGH_PASS Structure Input Parameter D
478. telnv BOOL The Override value is out of range Status 2 ProgCommandinv BOOL Multiple program state command bits are set at the same time Status 3 OperReqlnv Status 4 BOOL Multiple operator state request bits are set at the same time HandCommandlnv BOOL Multiple hand state request bits are set at the same time Status 5 Description The D3SD instruction controls a discrete device having three possible states such as fast slow off forward stop reverse Typical discrete devices of this nature include feeder systems reversible motors Monitoring the D3SD instruction There is an operator faceplate available for the D3SD instruction For more information see appendix Function Block Attributes Arithmetic Status Flags Arithmetic status flags are not affected Condition prescan Fault Conditions none Execution Function Block Action Structured Text Action No action taken No action taken instruction first scan The fault timer is cleared ModeAlarm is cleared All the operator request inputs are cleared If ProgValueReset is set all the program request inputs are cleared When OverrideOnInit is set ProgOper is cleared Operator control If ProgHandReq is cleared and OverrideOnInit is set clear Hand and set Override Override mode If ProgHandReq is set set Hand and clear Override Hand mode instruction first run ProgOper and CommandsStatus are cleared ProgOper and CommandsStatus are cleared
479. ter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Output Parameter E2Percent Type REAL Description Error expressed as a percent of span for process 2 Refer to Converting the PV and SP Values to Percent on page 91 Values CV1WindupHOut BOOL CV1 Windup high indicator TRUE when either a SP high or CV1 high low limit has been reached This signal will typically be used by the WindupHin input to limit the windup of the CV1 output on a primary loop CV2WindupHOut BOOL CV2 Windup high indicator TRUE when either a SP high or CV2 high low limit has been reached This signal will typically be used by the WindupHIn input to limit the windup of the CV2 output on a primary loop CV3WindupHOut BOOL CV3 Windup high indicator TRUE when either a SP high or CV3 high low limit has been reached This signal will typically be used by the WindupHIn input to limit the windup of the CV3 output on a primary loop CV1WindupLOut BOOL CV1 Windup low indicator TRUE when either a SP or CV1 low limit has been reached This signal will typically be used by the WindupLIn input to limit the windup of the CV1 output on a primary loop CV2WindupLOut BOOL CV2 Windup low indicator TRUE when either a SP or CV2 low limit has been reached This signal will typically be used by the WindupLIn input to limit the windup of the CV2 output on a primary loop CV3WindupL Out BOOL CV3 Windup lo
480. ter a Valid maximum negative float positive or negative gain depending on process direction gt maximum positive float If CV1ModelGain INF or NAN set bit in Status or INF or Default 0 0 NAN CV3PV1ModelGain REAL The internal model gain parameter for CV3 PV1 Enter a Valid maximum negative float positive or negative gain depending on process direction gt maximum positive float If CV1ModelGain INF or NAN set bit in Status or INF or Default 0 0 NAN CV1PV2ModelGain REAL The internal model gain parameter for CV1 PV2 Enter a Valid maximum negative float positive or negative gain depending on process direction gt maximum positive float If CV1ModelGain INF or NAN set bit in Status or INF or Default 0 0 NAN CV2PV2ModelGain REAL The internal model gain parameter for CV2 PV2 Enter a Valid maximum negative float positive or negative gain depending on process direction If CV1ModelGain INF or NAN set bit in Status or INF or NAN Publication 1756 RMO06G EN P September 2010 gt maximum positive float Default 0 0 215 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Input Parameter Type Description Values CV3PV2ModelGain REAL The internal model gain parameter for CV3 PV2 Enter a Valid maximum negative float positive or negative gain depending on process direction gt maximum positive float If
481. ter initialization completes Otherwise the ramp soak remains is in its previous mode after initialization completes Default is cleared CyclicSingle BOOL Cyclic single execution Set for cyclic action or clear for single action Cyclic action continuously repeats the ramp soak profile Single action performs the ramp soak profile once and then stops Default is cleared TimeRate BOOL Time rate ramp value configuration Set if the RampValue parameters are entered as a time in minutes to reach the soak temperature Clear if the RampValue parameters are entered as a rate in units minute Default is cleared GuarRamp BOOL Guaranteed ramp If set and the instruction is in auto ramping is temporarily suspended if the PV differs from the Output by more than RampDeadband Default is cleared RampDeadband REAL Guaranteed ramp deadband Specify the amount in engineering units that PV is allowed to differ from the output when GuarRamp is on If this value is invalid the instruction sets RampDeadband 0 0 and the instruction sets the appropriate bit in Status Valid any float gt 0 0 Default 0 0 GuarSoak BOOL Guaranteed soak If set and the instruction is in auto the soak timer is cleared if the PV differs from the Output by more than SoakDeadband Default is cleared SoakDeadband REAL Guaranteed soak deadband Specify the amount in engineering units that the PV is allowed to differ from the output when GuarSoak is on If this value is invalid
482. ter the divide operation in a scan and adds it back in during the next scan In this manner position information is not lost over the course of the operation oN ee Initialize is cleared difference In INp difference 0 B sign extend difference remainder 0 using WordSize Inj 9 INp 1 Np Initialize is set re XY In the Absolute mode the instruction can scale an input such as position without losing any information from one scan to the next Initialize is cleared difference 0 difference In remainder 0 Initialize is set be w Calculating the output and remainder The PMUL instruction uses these equations to calculate Out in either relative or absolute mode Ans DiffInput x Multiplier INT_Remainder INT_Out Ans 100 000 INT_Remainder Ans INT_Out 100 000 Out INT_Out Arithmetic Status Flags Arithmetic status flags are set for the Out output 262 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Inp 1 In Inp 1 In Remainder 0 Remainder 0 instruction first run Ing In Ing In Remainder 0 Remainder 0 Enableln is cleared EnableOut is cle and the outputs ared the instruction does nothing na a
483. the device is commanded to the 1 state when cleared the device is commanded to the 0 state Default is cleared OperOReq BOOL Operator state 0 request Set by the operator interface to place the device in the 0 state when the device is in Operator control Default is cleared Oper1Req BOOL Operator state 1 request Set by the operator interface to place the device in the 1 state when the device is in Operator control Default is cleared StateOPerm Publication 1756 RMO06G EN P September 2010 BOOL State 0 permissive Unless in Hand or Override mode this input must be set for the device to enter the 0 state This input has no effect for a device already in the 0 state Default is set 29 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Input Parameter Data Type Description State1 Perm BOOL State 1 permissive Unless in the Hand or Override mode this input must be set for the device to enter the 1 state This input has no effect for a device already in the 1 state Default is set FBO BOOL The first feedback input available to the D2SD instruction Default is cleared FB1 BOOL The second feedback input available to the D2SD instruction Default is cleared HandFB BOOL Hand feedback input This input is from a field hand off auto station and it shows the requested state of the field device When set the field device is b
484. 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 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 Refer to CV High Low Limiting on page 96 and Selecting the Control Variable on page 94 Default FALSE CVEUMax REAL Maximum value for CVEU The value of CVEU that corresponds to 100 CV If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling 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 Refer to Processing Faults on page 99 CVFaulted or CVEUSpanInv for details on fault handling Publication 1756 RMO06G EN P September 2010 Valid any float Default 0 0 149 Chapter 2 IMC Input Parameter CVHLimit Type REAL Advanced Process Control Function Blocks IMC CC MMC De
485. thm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOO The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred LeadInv Status 1 BOOL Lead lt minimum value or Lead gt maximumimum value Laglnv Status 2 BOOL Lag lt minimum value or Lag gt maximumimum value TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOO Status 30 Invalid RTSTimeStamp value DeltaTInv Status 31 BOO Publication 1756 RMO06G EN P September 2010 Invalid DeltaT value 61 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Description The LDLG instruction supports one lead and lag in series The instruction also allows configurable gain and bias factors The LDLG instruction is designed to execute in a task where the scan rate remains constant The LDLG instruction uses this equation 1 Lead x AG 1 Lagxs with these parameters limits Parameter Limitations Lead LowLimit 0 0 HighLimit maximumim
486. tic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Publication 1756 RM006G EN P September 2010 275 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan Initialize internal variables Initialize internal variables instruction first run No action taken No action taken Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan No action taken No action taken 276 Example In most coordinated drive applications a master reference commands line speed for an entire group of drives As various references are selected the drives cannot be presented with step changes in speed reference because differences in load inertia motor torque and tuning would not allow the individual drive sections to react in a coordinated manner The SCRV instruction is designed to ramp and shape the reference signal to the drive sections so that acceleration deceleration and jerk derivative of acceleration are controlled This instruction provides a mechanism to allow the reference to the drives to reach the designated reference setpoint in a manner that eliminates excessiv
487. tic expressions Arithmetic operators calculate new values To Use this operator Optimal data type add DINT REAL subtract negate DINT REAL multiply j DINT REAL exponent x to the power of y as DINT REAL divide DINT REAL modulo divide MOD DINT REAL Arithmetic functions perform math operations Specify a constant a non boolean tag or an expression for the function For Use this function Optimal data type absolute value ABS numeric _ expression DINT REAL arc cosine ACOS numeric expression REAL arc sine ASIN numeric expression REAL arc tangent ATAN numeric expression REAL cosine COS numeric _ expression REAL radians to degrees DEG numeric expression DINT REAL natural log LN numeric expression REAL log base 10 LOG numeric expression REAL degrees to radians RAD numeric expression DINT REAL sine SIN numeric _ expression REAL square root SORT numeric expression DINT REAL tangent TAN numeric expression REAL truncate TRUNC numeric expression DINT REAL 391 Appendix B Structured Text Programming For example Use this format Example For this situation You d write valuel operator value2 If gain_4 and gain_4_adj are DINT tags and your gain 4 adj specification says Add 15 to gain_4and store the gain 4 15 result in gain_4_adj operator valuel If alarm and high_alarm are DINT tags and your alarm speci
488. ting from Fault alarm conditions The D3SD instruction checks for these fault alarm conditions Rules device state was commanded to change but the feedback Start the fault timer when Command0Status CommandOStatus or did not indicate that the desired state was actually Command1 Status Command Status or reached within the FaultTime Command2Status Command2Status Set FaultAlarm when the fault timer done and FaultTime gt 0 0 the device unexpectedly leaving a state according to the Set FaultAlarm when fault timer is not timing and one of the following feedback without being commanded to Publication 1756 RMO06G EN P September 2010 conditions is satisfied CommandOStatus is set and DeviceOState is cleared Command Status is set and Device1State is cleared Command2Status is set and Device2State is cleared If there is no fault present FaultAlarm is cleared if one of the following conditions is met e CommandOStatus is set and DeviceOState is set e Command Status is set and Device State is set e Command2Status is set and Device2State is set e FaultTime lt 0 FaultAlarm cannot be cleared when FaultAlarmLatch is set unless FaultAlmUnlatch is set and no fault is present 49 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Mode alarm conditions The mode alarm reminds an operator that a device has been left in Operator control The mode
489. ting with the default configuration configure the following parameters Parameter PV1EUMax Description Maximum scaled value for PV1 PV1EUMin Minimum scaled value for PV1 PV2EUMax Maximum scaled value for PV2 PV2EUMIin Minimum scaled value for PV2 SP1HLimit SP1 high limit value scaled in PV units SP1LLimit SP1 low limit value scaled in PV units SP2HLimit SP2 high limit value scaled in PV units SP2LLimit SP2 low limit value scaled in PV units CV1InitValue an initial value of the control variable CV1 output CV2InitValue an initial value of the control variable CV2 output CV3lnitValue an initial value of the control variable CV3 output If you have the process models available you can intuitively tune the MMC function block by entering the following parameters At this point you have completed the basic configuration You did not configure the built in tuner The function block variables are ready to be put on line in either auto or Manual mode For tuning the default settings will be used If you do not know the process models you need to identify the models and tune the function block by using the built in tuner modeler for the function block to operate correctly in the Auto mode Parameter ModelGains Description nonzero numbers negative for direct acting control variable positive for reverse acting control variable
490. tio control is typically used to add a fluid in a set proportion to another fluid For example if you want to add two reactants say A and B to a tank in a constant ratio and the flow rate of reactant A may change over time because of some upstream process upsets you can use a ratio controller to automatically adjust the rate of reactant B addition In this example reactant A is often called the uncontrolled flow since it is not controlled by the PIDE instruction Reactant B is then called the controlled flow To perform ratio control with a PIDE instruction set the AlowCasRat and UseRatio input parameters Wire the uncontrolled flow into the SPCascade input parameter When in Cascade Ratio mode the uncontrolled flow is multiplied by either the RatioOper when in Operator control or the RatioProg when in Program control and the resulting value is used by the PIDE instruction as the setpoint Structured Text PIDE 01 PV ControlledFlow PIDE 01 SPCascade UncontrolledFlow PIDE PIDE 01 Local 2 0 Ch0Data PIDE 01 CVEU Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT ControlledFlow D UncontrolledFlow D A Function Block 0 0 0 0 PIDE_01 PIDE E Enhanced PID gq Pv CVEU Q SPProg SP q SPCascade PVHHAlarm g RatioProg PVHAIarm g CVProg PVLAlarm OFF PYLLAlarm Q HandFB PYROCPosAlarm ProgProgReq
491. tion Block Attributes 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 32 767 1 count 1 ms RTSTimeStamp DINT Module time stamp value for Real Time Sampling mode Valid 0 32 767 wraps from 32 767 0 1 count 1 ms PVTuneLimit REAL PV tuning limit scaled in the PV units When Autotune is Range any float running and predicted PV exceeds this limit the tuning will be aborted Default 0 AtuneTimeLimit REAL Maximum time for autotune to complete following the CV step Valid range any float gt 0 change When autotune exceeds this time tuning will be aborted Default 60 minutes NoiseLevel DINT An estimate of the noise level expected on the PV to Range 0 2 compensate for it during tuning Default 1 The selections are 0 low 1 medium 2 high CVStepSize REAL CV step size in percent for the tuning step test Step size is Range 100 100 directly added to CV subject to high low limiting Default 10 ResponseSpeed DINT Desired speed of closed loop response Range 0 2 e Slow response ResponseSpeed 0 Default 1 e Medium response ResponseSpeed 1 e Fast response Responsespeed 2 If ResponseSpeed is less than 0 Slow response is used If ResponseSpeed is greater than 2 Fast response is used Modellnit BOOL Internal model initialization switch Default FALSE Refer to
492. tion Blocks IMC CC MMC MMC Input Parameter Type Description Values CV3EUMin REAL Minimum value of CV3EU The value of CV3EU which Valid any float corresponds to 0 CV3 Default 0 0 If CVEUMax CVEUMin set bit in Status Refer to Processing Faults on page 99 CVFaulted or CVEUSpaninv for details on fault handling CV1HLimit REAL CV1 high limit value This is used to set the CV1HAlarm Valid CV1LLimit lt CV1HLimit output It is also used for limiting CV1 when in Auto mode or 100 0 in Manual mode if CVManLimiting is TRUE Default 100 0 e f CVLLimit lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status e f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 CV2HLimit REAL CV2 high limit value This is used to set the CV2HAlarm Valid CV2LLimit lt CV2HLimit output It is also used for limiting CV2 when in Auto mode or 100 0 in Manual mode if CVManLimiting is TRUE Default 100 0 e f CVLLimit lt 0 if CVHLimit gt 100 if CVHLimit lt CVLLimit set bit in Status e f CVHLimit lt CVLLimit limit CV by using the value of CVLLimit Refer to CV Percent Limiting on page 95 and CV High Low Limiting on page 96 CV3HLimit REAL CV3 high limit value This is used to set the CV3HAlarm Valid CV3LLimit lt CV3HLimit output It is also used for limiting CV3 when in Auto mode
493. tion does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan No action taken No action taken 256 Publication 1756 RMO06G EN P September 2010 Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Example The PI instruction is a regulating instruction with proportional and integral gain components The integral gain component is set by the user in tadians sec this sets the basic frequency response of the PI regulator The proportional gain sets the overall gain of the block including the proportional AND integral gain of the block Excluding initialization and holding clamping functionality the following diagram shows the PI block s basic regulating loop while in the linear mode PI Instruction Linear Mode Publication 1756 RMO06G EN P September 2010 The following example shows the PI instruction used as a velocity regulator In this example velocity error is created by subtracting the velocity feedback signal see the PMUL instruction example from the system s velocity reference through the SCRV instruction Velocity error is driven directly into the PI instruction which acts on this signal according to the function shown in the diagram above 257 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Structured Text Reference Select Inl Master Machine Ref Re
494. tions DERV HPF LDL2 LPF NTCH Chapter 4 Condition prescan Execution Function Block Action No action taken Structured Text Action No action taken instruction first scan No action taken No action taken instruction first run The instruction sets Out In The control algorithm is not executed The instruction sets Out In The control algorithm is not executed Enableln is cleared EnableOut is cleared the instruction does nothing and the outputs are not updated na Enableln is set The instruction executes EnableOut is set Enableln is always set The instruction executes postscan No action taken No action taken Example The NTCH instruction attenuates a specific resonance frequency Typically these resonance frequencies are directly in the range of response being regulated by the closed loop control system Often they are generated by loose mechanical linkages that cause backlash and vibration in the system Although the best solution is to correct the mechanical compliance in the machinery the notch filter can be used to soften the effects of these signals in the closed loop regulating scheme The following diagram shows the ideal gain curve over a frequency range for a specific center frequency and Q factor As Q increases the notch becomes wider and shallower A Q decreases the notch becomes deeper and narrower The instruction may be set
495. to acknowledge the use of copyrighted material provided under license from ControlSoft Inc Introduction Updated Information Publication 1756 RMO06G EN P September 2010 Summary of Changes This release of this document contains new and updated information To find new and updated information look for change bars as shown next to this paragraph This document contains the following changes Change Page The Dependent Gains Form graphic was corrected 77 SoakTime operand description valid valued changed to 107 valid 0 0 to 71582 0 minutes CC Function Block Output Parameter Descriptions 186 The statement Arithmetic flags will be set for this output if configured as ActistCV has been corrected for the following e CVIEU e CV2EU e CV3EU Summary of Changes Notes Publication 1756 RMO06G EN P September 2010 Summary of Changes Instruction Locator Preface Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Publication 1756 RMO06G EN P September 2010 Table of Contents THtTO AUCH Of ase vests etn SSE Sea ooh Te SE bay ste ta eng ee ad 3 Updated Thfofmaton secca ara bese don trarehania an eee sume HAE i 3 Where to Find an Instruction 2 0 0 0 ee eens 11 THitrO AU CLONE ise nciseraointa eaei dr age do dun E soda aA e os bodes 17 Who Should Use This Manual 0 0 0 0 00 0 cc cece eens 17 Purpose of This Matals cee oink a See Saas
496. to indicate a positive process gain increase in output causes an increase in PV ResponseSpeed slow medium or fast based on control objective NoiseLevel an estimate of noise level on PV low medium or high such that the tuner can distinguish which PV change is a random noise and which is caused by the CV step change StepSize a nonzero positive or negative number defining the magnitude of CV step change in either positive or negative direction respectively PVTuneLimit only for integrating process type in PV engineering units defines how much of PV change that is caused by CV change to tolerate before aborting the tuning test due to exceeding this limit The tuner is started by setting the AtuneStart bit AtuneCV1Start for example You can stop the tuning by setting the appropriate AtuneAbort bit After the tuning is completed successfully the appropriate GainTuned TCTuned DTTuned and RespTCTuned parameters are updated with the tuning results and the AtuneStatus code is set to indicate complete You can copy these parameters to the ModelGain ModelTC ModelDT and RespTC respectively by setting the AtuneUseModel bit The MMC function block automatically initializes the internal variables and continue normal operation It automatically resets the AtuneUseModel bit MMC Function Block Tuning Procedure Follow these steps to configure the tuner 1 Put all three CV parameters into Manual mode 2 Set the appropriate AtuneSt
497. tor indicator if ModeAlarm is set Unlatch Button status of FaultAlmUnlatch When this button is clicked FaultAlmUnlatch is set This button is only enabled when FaultAlarm and FaultAlmLatch are set Program Button OperProgReq is set when you click this button Operator Button OperOperReq is set when you click this button FB1 value of FB1 FBO value of FBO Status all the status bits that are set in the block If no bits are set the status displays OK Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Appendix D The D2SD control has this additional property page Logix5000 D2SD Faceplate Control Properties Ei General Display 2 State Fonts Locale Commanded State 0 Label Close Commanded State 1 Label Open Actual State 0 Label Closed Actual State 1 Label Opened Configure this property To specify the Commanded State 0 Label label for the Commanded State 0 Commanded State 1 Label label for the Commanded State 1 Actual State 0 Label label for the Actual State 0 Actual State 1 Label label for the Actual State 1 Publication 1756 RMO06G EN P September 2010 435 Appendix D Function Block Faceplate Controls D3SD Control Feature on control Mode 3 State Device D3SD1 Mode Operator Dribble Hand Program Operator Fault Alarm E Uniatch FBO 1 Aeae Kn Mode Alarm FR 1 0 FB3 Sta
498. tor 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 Refer to Primary Loop Control on page 98 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 Refer to Primary Loop Control on page 98 Ratio REAL Current ratio multiplier no units Refer to Cascade ratio SP on page 87 RatioHAlarm BOOL Ratio high alarm indicator TRUE when Ratio gt RatioHLimit RatioLAlarm BOOL Ratio low alarm indicator TRUE when Ratio lt RatioLLimit ProgOper BOOL Program Operator control indicator TRUE when in Program control FALSE when in Operator control Refer to Switching between Program control and Operator control on page 85 CasRat BOOL CascadeRatio mode indicator TRUE when in the CascadeRatio mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 for details Publication 1756 RMO06G EN P September 2010 157 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC IMC Output Parameter Type Description Valid and Default Values Auto BOOL
499. torLowLimit where PE gt Gain x WLa IntegratorHighLimit HighLimit x sans 2 WLead Gain x WLag IntegratorLowLimit LowLimit x 7 WLead The instruction also limits the value of Out based on the HighLimit and LowLimit values If Then HighLimit lt LowLimit Out LowLimit Integrator IntegratorLowLimit HighLowLimslnv is set HighAlarm is set LowAlarm is set Out gt HighLimit Out HighLimit Integrator Integrator HighAlarm is set Out lt LowLimit Out LowLimit Integrator Integrator LowAlarm is set Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none 282 Publication 1756 RMO06G EN P September 2010 Condition Drives Instructions INTG PI PMUL SCRV SOC UPDN Chapter 3 Execution Function Block Action Structured Text Action No action taken No action taken prescan instruction first scan The instruction sets the internal parameters and Out 0 The control algorithm is not executed instruction first run The instruction sets the internal parameters and Out 0 The control algorithm is not executed Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes and EnableOut is set Enableln is always set he instruction executes postscan No action taken No action taken Example The SOC instruction is a speci
500. tp t state si adept maiden RAA EEE O EA i 48 Fault alarm cOndiuOns s eenaa oye dan ie hail heen ape te 49 Mode alarm conditions 0 ccc cence nes 50 Deadtme DED Pirrs daria ct ack hae hates tok hain faa ed a 51 Servicing the deadtime BUTTERS nc ieee ccs tele nd tela as AS in 53 Instruction behavior on InFault transition 00 54 Function Generator FGEN wisest deh ards ca lonesa lhon tar S aera wea nnn 56 Reade ao LDEG ache Spacek tie eis eaters eke il eas 60 Enhanced PID PIDE cise eae e Wea a os 64 Compute EY hs sian on neea Bone E E 76 PIDE Algorithmis eiriaa ay tees E AA a Oe 76 Table of Contents Monitoring the PIDE instruction c06 4 ose eee ee eek oes 78 Autotuning the PIDE instrcton i s04 os ee ees 78 AB OCU CANE A ae EE kitted hated yes cise AR LOR dt laren hs fi 80 Switching between Program control and Operator control 85 Op rating MOd Se pe neriie atai web Se sitaat eaaa a id 86 Selecting the Setpoint sei iieaeoe a BNA IOS r 87 PY High Low Alatmine e ee i E RE E S 89 Converting the PV and SP Values to Percent 91 Deviation High Low Alarming siccvanueitoe satade ns 92 Zero Crossing Deadband Control vccuie cetera twee 93 Selecting the Control Variable u G hake iti whee oan 94 Primary Loop Control vie st and Fare eR ied darn eee 98 PROCS Ve AHS is cial ol A ea vt eile aha og dU tg et 99 Position Proportional POSP 4 43 0 4s dibee Sieh Se 100 Scaling t
501. tructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 When you transition from Operator control to Program control while the ProgAutoReq ProgManualReq and ProgHoldReq inputs are cleared the mode is determined as follows e If the instruction was in Operator Auto mode then the transition is to Program Auto mode e If the instruction was in Operator Manual mode then the transition is to Program Manual mode When you transition from Program control to Operator control while the OperAutoReq and OperManualReq inputs are cleared the mode is determined as follows e If the instruction was in Program Auto mode then the transition is to Operator Auto mode e If the instruction was in Program Manual or Program Hold mode then the transition is to Operator Manual mode Publication 1756 RMO06G EN P September 2010 115 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Program control The following diagram illustrates how the RMPS instruction operates in Program control ProgManualReg set and ProgHoldReq cleared single execution of profile complete2 invalid input Program Auto Mode gt ProgHoldReq set ProgAutoReq set ProgHoldReg cleared and ProgManualReg cleared ProgAutoReq set ProgHoldReq cleared and y ProgManualReg cleared y y y ProgHoldR
502. tuning for CV3 PV1 has completed successfully Publication 1756 RMO06G EN P September 2010 231 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC MMC Output Parameter Type Description Values AtuneCV1PV1Aborted BOOL Set True when auto tuning for CV1 PV1 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV2PV1Aborted BOOL Set True when auto tuning for CV2 PV1 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV3PV1Aborted BOOL Set True when auto tuning for CV3 PV1 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV1PV20n BOOL Set True when auto tuning for CV1 PV2 has been initiated AtuneCV2PV20n BOOL Set True when auto tuning for CV2 PV2 has been initiated AtuneCV3PV20n BOOL Set True when auto tuning for CV3 PV2 has been initiated AtuneCV1PV2Done BOOL Set True when auto tuning for CV1 PV2 has completed successfully AtuneCV2PV2Done BOOL Set True when auto tuning for CV2 PV2 has completed successfully AtuneCV3PV2Done BOOL Set True when auto tuning for CV3 PV2 has completed successfully AtuneCV1PV2Aborted BOOL Set True when auto tuning for CV1 PV2 has been aborted by user or due to errors that occurred during the auto tuning operation AtuneCV2PV2Aborted BOOL Set True when
503. tus Ok Displays the mode of the block State Buttons open or closed state of the Commanded State Label as defined in the control s property page The top button sets Oper2Req The middle button sets Oper1Req The bottom button sets OperOReq When clicked the button sets the OperReg field for that particular state Ordered State Indicator value of the Command Status by pointing to the request button for that state Actual State Indicators status of the actual state If DeviceStatus is set the actual state is as configured for the given state Non Permissive Indicator letters NP to the left of the button if the StatePerm is not set for that state Fault Alarm Indicator indicator if FaultAlarm is set Mode Alarm Indicator indicator if ModeAlarm is set Program Button OperProgReq is set when you click this button Operator Button OperOperReq is set when you click this button FB3 value of FB3 FB2 value of FB2 FB1 value of FB1 FBO value of FBO Unlatch Button status of FaultAlmUnlatch When this button is clicked FaultAlmUnlatch is set This button is only enabled when FaultAlarm and FaultAlmLatch are set Status 436 all the status bits that are set in the block If no bits are set the status displays OK Publication 1756 RMO06G EN P September 2010 Publication 1756 RMO06G EN P September 2010 Function Block Faceplate Controls Ap
504. tus2 Hand then set to Manual mode DeltaTInv BOOL DeltaT invalid If the current mode is not Override or Hand then Bit 31 of Status2 set to Manual mode 160 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 Coordinated Control CC Function Block cco cc q pv g SPProg g CV1Prog g CV2Prog d CV3Prog E ProgProgReq Ej ProgOperReq E ProgCV 1AutoReq E Pro gC V2AutoReq E ProgCV 3AutoReg E Pro gEV 1ManualReq Ej ProgCV2ManualReq Pro gV 3Ma nual Req amp Pro gV 10veride Req E ProgCV20veride Req q ProgCV3O0verideReq Coordinated Control CV1EU CV2EU CV3EU SP ProgOper CV 1Auto CV2Auto CV3Auto CV41 Manual CV2Manual CV3Manual Cv10verride CV20verride CV30veride Publication 1756 RMO06G EN P September 2010 The Coordinated Control CC function block controls a single process vatiable by manipulating as many as three different control variables As an option any of the three outputs can be used as an input to create feed forward action in the control variable The CC function block calculates the control variables CV1 CV2 and CV3 in the Auto mode based on the PV SP deviation internal models and tuning CC Function Block Configuration Starting with the default configuration configure the following parameters Parameter Description PVEUMax Maximum scaled value for PV PV
505. uction clears this input Default is cleared OperOperReq BOOL Operator operator request Set by the operator interface to request Operator control The instruction clears this input Default is cleared ProgValueReset BOOL Reset program control values When set all the program request inputs are cleared each execution of the instruction Default is cleared Output Parameter Data Type Description EnableOut BOOL Enable output OutO BOOL The first output of the instruction Out BOOL The second output of the instruction Out2 BOOL The third output of the instruction Device0State BOOL Device 0 state output Set when the device is commanded to the 0 state and the feedback indicates the device really is in the 0 state Device1 State BOOL Device 1 state output Set when the device is commanded to the 1 state and the feedback indicates the device really is in the 1 state Device2State BOOL Device 2 state output Set when the device is commanded to the 2 state and the feedback indicates the device really is in the 2 state Command0Status BOOL Device 0 command status Set when the device is being commanded to the 0 state cleared when the device is being commanded to some other state Command 1Status BOOL Device 1 command status Set when the device is being commanded to the 1 state cleared when the device is being commanded to some other state Command2Status BOOL Device 2 command status Set when the device is being commanded to the 2 state c
506. uctured comment text comment within a line of structured text comment comment that spans more than one line start of comment end of comment start of comment end of comment For example Example At the beginning of a line Check conveyor belt direction IF conveyor direction THEN At the end of a line ELSE If conveyor isn t moving set alarm light light 1 END _IF comment Sugar Inlet 1 open the inlet IF Sugar Low low level LS amp Sugar High high level LS THEN Controls the speed of the recirculation pump The speed depends on the temperature in the tank IF tank temp gt 200 THEN comment Publication 1756 RMO06G EN P September 2010 Sugar Inlet 0 close the inlet IF bar _code 65 A THEN Gets the number of elements in the Inventory array and stores the value in the Inventory Items tag SIZE Inventory 0 Inventory Items 413 Appendix B Structured Text Programming Notes 414 Publication 1756 RMO06G EN P September 2010 Appendix C Introduction Immediate Values Publication 1756 RMO06G EN P September 2010 Common Attributes This appendix describes attributes that are common to the Logix instructions Topic Page Immediate Values 415 Data Conversions 416 Whenever you enter an immediate value constant in decimal format
507. ue of LowLimit DeltaT REAL Elapsed time between updates This is the elapsed time in seconds used by the control algorithm to calculate the process output Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred IGainInv Status 1 BOOL IGain gt maximum or Gain lt minimum HighLowLimsInv BOOL HighLimit lt LowLimit Status 2 TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second Publication 1756 RMO06G EN P September 2010 243 Chapter 3 Drives Instructions INTG PI PMUL SCRV SOC UPDN Output Parameter Data Type Description RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value Description The INTG instruction is designed to execute in a task where the scan rate remains constant The INTG instruction executes this control algorithm when Initialize is cleared and DeltaT gt 0 In In _ Out Gain x ca x DeltaT Out _ Whenever the value computed for the output is invalid NAN or INF the instruction sets Out th
508. um positive float Lag LowLimit DeltaT 2 DeltaT is in seconds HighLimit maximumimum positive float Whenever the value computed for the output is invalid NAN or INF the instruction sets Out the invalid value and sets the arithmetic overflow status flag When the value computed for the output becomes valid the instruction initializes the internal parameters and sets Out In x Gain Bias Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none Execution Condition Function Block Action Structured Text Action prescan No action taken No action taken instruction first scan No action taken No action taken instruction first run The instruction sets Out In x Gain Bias The control algorithm is not executed Enableln is cleared EnableOut is cleared the instruction does nothing na and the outputs are not updated Enableln is set The instruction executes Enableln is always set EnableOut is set The instruction executes postscan No action taken No action taken Example 62 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 The LDLG instruction in this example adds a first order lag to a simulated process Optionally you could enter a Gain on the LDLG instruction to simulate a process gain and you could enter a Bias to simulate an ambient condition
509. us Valid 0 to NumberOfSegs 1 Default 0 OutOper REAL Output operator The operator interface writes a requested value for the Out into this input This value is used as the Out when the ramp soak is in Operator Manual mode Valid any float Default 0 0 SoakTimeOper REAL Soak time operator The operator interface writes a requested value for the SoakTimeLeft into this input This value is used if the ramp soak is in Operator Manual mode If this value is invalid the instruction sets the appropriate bit in Status Valid 0 0 to maximumimum positive float Default 0 0 ProgProgReq BOOL Program program request Set by the user program to request Program control Ignored if ProgOperReg is set Holding this set and ProgOperReg cleared locks the instruction in Program control Default is cleared ProgOperReq BOOL Program operator request Set by the user program to request Operator control Holding this set locks the instruction in Operator control Default is cleared ProgAutoReq BOOL Program auto mode request Set by the user program to request the ramp soak to enter Auto mode Ignored if the loop is in Operator control if ProgManualReg is set or if ProgHoldReq is set Default is cleared ProgManualReq BOOL Program manual mode request Set by the user program to request the ramp soak to enter Manual mode Ignored if the ramp soak is in Operator control or if ProgHoldReg is set Default is cleared ProgHoldReq BOOL Program hold mode
510. us on the analog input If all the In Fault inputs are set the instruction sets the appropriate bit in Status the control algorithm is not executed and Out is not updated Default cleared IndFault BOOL Bad health indicator for Ind If Ind is read from an analog input then In5Fault is normally controlled by the fault status on the analog input If all the In Fault inputs are set the instruction sets the appropriate bit in Status the control algorithm is not executed and Out is not updated Default cleared In6Fault BOOL Bad health indicator for In6 If In6 is read from an analog input then In6Fault is normally controlled by the fault status on the analog input If all the In Fault inputs are set the instruction sets the appropriate bit in Status the control algorithm is not executed and Out is not updated Default cleared InsUsed DINT Number of inputs used This defines the number of inputs the instruction uses The Publication 1756 RMO06G EN P September 2010 instruction considers only In1 through Ininstseq in high select low select median select and average select modes If this value is invalid the instruction sets the appropriate bit in Status The instruction does not update Out if InsUsed is invalid and if the instruction is not in manual select mode and if Override is cleared Valid 1 to 6 Default 1 321 Chapter5 Select Limit Instructions ESEL HLL MUX RLIM SEL SNEG SSUM
511. ut This value determines the expected value of FBO when the device is in the 0 state Default is cleared FBOState1 BOO Feedback 0 state 1 input This value determines the expected value of FBO when the device is in the 1 state Default is cleared FBOState2 BOO Feedback 0 state 2 input This value determines the expected value of FBO when the device is in the 2 state Default is cleared FB1State0 BOO Feedback 1 state 0 input This value determines the expected value of FB1 when the device is in the 0 state Default is cleared FB1State1 BOO Feedback 1 state 1 input This value determines the expected value of FB1 when the device is in the 1 state Default is cleared FB1State2 BOO Feedback 1 state 2 input This value determines the expected value of FB1 when the device is in the 2 state Default is cleared FB2State0 BOO Feedback 2 state 0 input This value determines the expected value of FB2 when the device is in the 0 state Default is cleared FB2State1 BOO Feedback 2 state 1 input This value determines the expected value of FB2 when the device is in the 1 state Default is cleared FB2State2 BOO Feedback 2 state 2 input This value determines the expected value of FB2 when the device is in the 2 state Default is cleared FB3State0 BOO Feedback 3 state 0 input This value determines the expected value of FB3 when the device i
512. ut output from a secondary loop Refer to CV Windup Limiting on page 95 Publication 1756 RMO06G EN P September 2010 177 Chapter 2 Advanced Process Control Function Blocks IMC CC MMC CC Input Parameter Data Type Description Values CV3WindupHin BOOL CV3 Windup high request When TRUE CV3 will not be allowed to Default FALSE increase in value This signal will typically be the CV3WindupHOut output from a secondary loop Refer to CV Windup Limiting on page 95 CV1WindupLIn BOOL CV1 Windup low request When TRUE CV1 will not be allowed to Default FALSE decrease in value This signal will typically be the CV1WindupLOut output from a secondary loop Refer to CV Windup Limiting on page 95 CV2WindupLIn BOOL CV2 Windup low request When TRUE CV2 will not be allowed to Default FALSE decrease in value This signal will typically be the CV2WindupLOut output from a secondary loop Refer to Selecting the Control Variable on page 94 CV3WindupLIn BOOL CV3 Windup low request When TRUE CV3 will not be allowed to Default FALSE decrease in value This signal will typically be the CV3WindupLOut output from a secondary loop Refer to Selecting the Control Variable on page 94 GainEUSpan BOOL ModelGain units in EU or of span Default 0 CVx ModelGain units in EU or of span Set to interpret ModelGain as EU reset to interpret ModelGain as of Span CV1ProcessGainSign BOOL Used only
513. ut REAL The calculated output of the algorithm Arithmetic status flags are set for this output HighAlarm BOOL The high alarm indicator Set when In gt HighLimit LowAlarm BOOL The low alarm indicator Set when In lt LowLimit Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred LimitsInv Status 1 BOOL HighLimit lt LowLimit SelectLimitinv BOOL The value of SelectLimit is not a 0 1 or 2 Status 2 Description The HLL instruction determines the value of the Out using these rules Selection Condition Action SelectLimit 0 In lt HighLimit and Out In use high and low limits In gt LowLimit In gt HighLimit Out HighLimit HighAlarm is set In lt LowLimit Out LowLimit LowAlarm is set HighLimit lt LowLimit Out LowLimit HighAlarm is set LowAlarm is set LimitsInv is set SelectLimit 1 use high limit only SelectLimit 2 use low limit only In lt HighLimit Out In In gt HighLimit Out HighLimit HighAlarm is set In gt LowLimit Out In In lt LowLimit Out LowLimit LowAlarm is set Arithmetic Status Flags Arithmetic status flags are set for the Out output Fault Conditions none 328 Publication 1756 RMO06G EN P September 2010 Select Limit Instructions ESEL HLL MUX
514. ut pulse p OpenOut cleared Publication 1756 RMO06G EN P September 2010 CloseQut set 103 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Calculating Open and Close Pulse Times OpenOut is pulsed whenever SP gt Position feedback When this occurs the instruction sets CloseTime 0 and the duration for which OpenOut is to be turned on is calculated as SPPercent PositionPercent OpenRate OpenTime e If OpenTime _ lt CycleTime then add Deadtime to OpenTime e If OpenTime gt maximumOnTime then limit to maximumOnTime e If OpenTime lt MinOnTime then set OpenTime 0 If any of the following conditions exist OpenOut is not pulsed and OpenTime 0 e OpenFB is set or PositionPercent 100 e CycleTime 0 e OpenRate 0 e SPPercent is invalid The CloseOut is pulsed whenever SP lt Position feedback When this occurs the instruction sets OpenTime 0 and the duration for which CloseOut is to be turned on is calculated as PositionPercent SPPercent Ti Ces te CloseRate e If CloseTime 1 lt CycleTime then add Deadtime to CloseTime e If CloseTime gt maximumOnTime then limit to maximumOnTime e If CloseTime lt MinOnTime then set CloseTime to 0 If any of the following conditions exist CloseOut will not be pulsed and CloseTime will be cleared e ClosedFB is set or PositionPercent lt 0 e CycleTime 0 e CloseR
515. ut_value reset input Function Block input_value gt 0 reset_input teset_value Publication 1756 RMO06G EN P September 2010 MAXC MAXC_01 MAXC_01 ResetValue reset value maximum MAXC 01 Out MAXC_04 MAXC E Maximum Capture C ResetValue maximum 351 Chapter 6 Minimum Capture MINC Operands MINC MINC tag MINC_O4 E Minimum Capture g ResetValue Out Statistical Instructions MAVE MAXC MINC MSTD The MINC instruction finds the minimum of the Input signal over time Structured Text Operand Type Format Description MINC tag MINIMUM_CAPTURE structure MINC structure Function Block MINC tag MINIMUM_CAPTURE structure MINC structure MINIMUM_CAPTURE Structure Input Parameter Data Type Description Enableln BOOL Function Block If cleared the instruction does not execute and outputs are not updated If set the instruction executes Default is set Structured Text No effect The instruction executes In REAL The analog signal input to the instruction Valid any float Default 0 0 Reset BOOL Request to reset control algorithm The instruction sets Out ResetValue as long as Reset is set Default is cleared ResetValue REAL The reset value for instruction The instruction sets Out ResetValue as long as Reset is set Valid any float Default 0 0 Output Parameter Data Type Description EnableOut BOOL Enable outpu
516. utotune tag for a PIDE block PIDE Properties PIDE_01 For more information about using the autotuner see RSLogix 5000 online help or the Getting Results with the PIDE Autotuner publication PIDE GRO01 Publication 1756 RMO06G EN P September 2010 79 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Execution Condition Prescan Function Block Action Arithmetic status flags are set for the CV output Structured Text Action InstructionFirstScan is set InstructionFirstScan is set Instruction First Scan If CVFault and CVEUSpanInv are set see Processing Faults on page 99 If CVFault and CVEUSpaninv are cleared 1 o nN o CVInitializing is set 2 If PVFault is set PVSpanlnv and SPLimitsInv are cleared See Processing Faults on page 99 3 4 The instruction sets CVEU CVInitValue and CV corresponding percentage The PID control algorithm is not executed CVInitValue is not limited by CVEUmaximum or CVEUMin When the instruction calculates CV as the corresponding percentage it is limited to 0 100 CVEU CVInitValue CVEU CVEUMin CV 1 OV eprumax CVvEUMin CVOper CV When CVinitializing and ManualAfterInit are set the instruction disables auto and cascade ratio modes If the current mode is not Override or Hand mode the instruction changes to Manual mode If ManualAfterlnit is cleared the mode is not
517. utput Parameter AtuneCV1PVOutOfLimit Data Type BOO Advanced Process Control Function Blocks IMC CC MMC Description Either PV or the deadtime step ahead prediction of PV exceeds PVTuneLimit during CV1 Autotuning When True CV1 Autotuning is aborted Values Bit 1 of AtuneCV1Status AtuneCV2PVOutOfLimit BOO Either PV or the deadtime step ahead prediction of PV exceeds PVTuneLimit during CV2 Autotuning When True CV2 Autotuning is aborted Bit 1 of AtuneCV2Status AtuneCV3PVOutOfLimit BOO Either PV or the deadtime step ahead prediction of PV exceeds PVTuneLimit during CV3 Autotuning When True CV3 Autotuning is aborted Bit 1 of AtuneCV3Status AtuneCV1Modelnv BOO The CC mode was not Manual at start of Autotuning or the CC mode was changed from Manual during CV1 Autotuning When True CV1 Autotuning is not started or is aborted Bit 2 of AtuneCV1Status AtuneCV2Modelnv BOO The CC mode was not Manual at start of Autotuning or the CC mode was changed from Manual during CV2 Autotuning When True CV2 Autotuning is not started or is aborted Bit 2 of AtuneCV2Status AtuneCV3Modelnv BOO The CC mode was not Manual at start of Autotuning or the CC mode was changed from Manual during CV3 Autotuning When True CV3 Autotuning is not started or is aborted Bit 2 of AtuneCV3Status AtuneCV1WindupFault BOO CV1WindupHin or CV1WindupLin is True
518. valid value must have a status parameter to indicate their invalid status PVFaulted BOOL Process variable PV health bad Bit 1 of Status1 PVSpaninv BOOL The span of PV inValid PVEUMax lt PVEUMin Bit 2 of Status1 SPProg nv BOOL SPProg lt SPLLimit or gt SPHLimit Limit value used for SP Bit 3 of Status SPOperInv BOOL SPOper lt SPLLimit or gt SPHLimit Limit value used for SP Bit 4 of Status SPLimitsInv BOOL Limits inValid SPLLimit lt PVEUMin SPHLimit gt PVEUMax or Bit 5 of Status1 SPHLimit lt SPLLimit If SPHLimit lt SPLLimit then limit value by using SPLLimit SampleTimeTooSmall BOOL Model DeadTime DeltaT must be less than or equal to 200 Bit 6 of Status FactorlInv BOOL Entered value for Factor lt 0 Bit 7 of Status TimingModelnv BOOL Entered TimingMode inValid If the current mode is not Override or Bit 27 of Status2 Hand then set to Manual mode RTSMissed BOOL Only used when in Real Time Sampling mode Bit 28 of Status2 TRUE whenABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Entered RTSTime inValid Bit 29 of Status2 RTSTimeStamplnv BOOL RTSTimeStamp inValid If the current mode is not Override or Bit 30 of Status2 Hand then set to Manual mode DeltaTInv BOOL DeltaT inValid If the current mode is not Override or Hand then Bit 31 of Status2 set to Manual mode CV1Faulted BOOL Control variable CV1 health bad Bit 0 of Status3CV1 CV2Faulted BOOL Control variable CV2 health bad Bit 0 of Status3CV2 CV3F
519. variable PV health bad CVFaulted Status1 2 BOOL Control variable CV health bad HandFBFaulted BOOL HandFB value health bad Status1 3 PVSpanInv Status1 4 BOOL Invalid span of PV PVEUmaximum lt PVEUMin SPProgInv Status1 5 BOOL SPProg lt SPLLimit or SPProg gt SPHLimit The instruction uses the limited value for SP SPOperlnv Status1 6 BOOL SPOper lt SPLLimit or SPOper gt SPHLimit The instruction uses the limited value for SP SPCascadelnv BOOL SPCascade lt SPLLimit or SPCascade gt SPHLimit The instruction uses the limited value Status1 7 for SP Only validated if AllowCasRat is set or in Cascade Ratio mode If UseRatio is set the value of SPCascade Ratio will be validated SPLimitsInv BOOL Limits invalid SPLLimit lt PVEUMin SPHLimit gt PVEUmaximum or SPHLimit lt SPLLimit If Status1 8 SPHLimit lt SPLLimit the instruction limits the value using SPLLimit RatioProginv BOOL RatioProg lt RatioLLimit or RatioProg gt RatioHLimit The instruction limits the value for Ratio Status1 9 RatioOperlnv BOOL RatioOper lt RatioLLimit or RatioOper gt RatioHLimit The instruction limits the value for Ratio Status1 10 RatioLimitsInv BOOL Low limit lt 0 or High limit lt low limit Status1 11 CVProgInv Status1 12 BOOL CVProg lt 0 or CVProg gt 100 or CVProg lt CVLLimit or CVProg gt CVHLimit when CVManLimiting is set The instruction limits the value for CV CVOperInv BOO
520. ving Average function block maximumC structured text maximumimum Capture function block LPF structured text Low Pass Filter function block Publication 1756 RMO06G EN P September 2010 Instruction Locator Instruction Location Languages Instruction Location Languages NTCH 314 structured text Notch Filter function block OCON 369 function block Output Wire Connector MINC 352 structured text Minimum Capture function block MMC 197 structured text Modular Multivariable Control function block OREF function block Output Reference MSTD structured text Moving Standard Deviation function block MUX function block Multiplexer PI 248 structured text Proportional Integral function block PIDE 64 structured text Enhanced PID function block PMUL 260 structured text Pulse Multiplier function block POSP 100 structured text Position Proportional function block Publication 1756 RM006G EN P September 2010 14 Instruction Locator Instruction RESD Reset Dominant Location Languages structured text function block RLIM 333 structured text Rate Limiter function block RMPS 107 structured text Ramp Soak function block SCL 121 structured text Scale function block SCRV 268 structured text S Curve function block SEL 337 function block Select SETD 366 structured text Set Dominant 15 function block Instruction Location Languages
521. w indicator TRUE when either a SP or CV3 low limit has been reached This signal will typically be used by the WindupLIn input to limit the windup of the CV3 output on a primary loop ProgOper BOOL Program Operator control indicator TRUE when in Program control FALSE when in Operator control Refer to Switching between Program control and Operator control on page 114 CV1Auto BOOL Auto mode indicator for CV1 TRUE when CV1 in the Auto mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV2Auto BOOL Auto mode indicator for CV2 TRUE when CV2 in the Auto mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV3Auto 228 BOOL Auto mode indicator for CV3 TRUE when CV3 in the Auto mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 Publication 1756 RMO06G EN P September 2010 Advanced Process Control Function Blocks IMC CC MMC Chapter 2 MMC Output Parameter Type Description Values CV1Manual BOOL Manual mode indicator for CV1 TRUE when CV1 in the Manual mode Refer to Selecting the Setpoint on page 87 and Selecting the Control Variable on page 94 CV2Manual BOOL Manual mode indicator for CV2 TRUE when CV2 in the Manual mode Re
522. what occurred WLaglnv Status 1 BOOL WLag lt minimum value or WLag gt maximum value Orderlnv Status 2 BOOL Invalid Order value TimingModelnv BOOL Invalid TimingMode value Status 27 For more information about timing modes see appendix Function Block Attributes RTSMissed Status 28 BOOL Only used in real time sampling mode Set when ABS DeltaT RTSTime gt 1 001 second RTSTimelnv BOOL Invalid RTSTime value Status 29 RTSTimeStamplnv BOOL Invalid RTSTimeStamp value Status 30 DeltaTInv Status 31 BOOL Invalid DeltaT value Publication 1756 RMO06G EN P September 2010 309 Chapter 4 Filter Instructions DERV HPF LDL2 LPF NTCH Description The LPF instruction uses the Order parameter to control the sharpness of the cutoff The LPF instruction is designed to execute in a task where the scan rate remains constant The LPF instruction uses these equations When The instruction uses this transfer function Order 1 oO sto Order 2 2 oO 2 2 S J2xsx t o Order 3 3 Q st 2xs x t 2xsx xo with these parameters limits where DeltaT is in seconds Parameter Limitations WLag first order LowLimit 0 0000001 DeltaT WLag second order DeltaT WLag third order LowLimit 0 001 DeltaT HighLimit 0 77 DeltaT Whenever the value computed for the output is invalid NAN or INF the instruction sets Out the invalid value and sets the
523. when the ramp soak is in Program Manual or Operator Manual mode Hold BOOL Hold mode Set when the ramp soak is in program Hold mode Status DINT Status of the function block InstructFault Status 0 BOOL The instruction detected one of the following execution errors This is not a minor or major controller error Check the remaining status bits to determine what occurred PVFaulted Status 1 BOOL PVHealth is bad NumberOfSegsInv BOOL The NumberOfSegs value is invalid value or is not compatible with an array size Status 2 RampDeadbandInv BOOL Invalid RampDeadband value Status 3 110 Publication 1756 RMO06G EN P September 2010 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Chapter 1 Input Parameter Data Type Description SoakDeadbandInv BOOL Invalid SoakDeadband value Status 4 CurrSegProginv BOOL Invalid CurrSegProg value Status 5 SoakTimeProgInv BOOL Invalid SoakTimeProg value Status 6 CurrSegOperinv BOOL Invalid CurrSegOper value Status 7 SoakTimeOperlnv BOOL Invalid SoakTimeOper value Status 8 RampValuelnv BOOL Invalid RampValue value Status 9 SoakTimelnv BOOL Invalid SoakTime value Status 10 Description The RMPS instruction is typically used to provide a temperature profile in a batch heating process The output of this instruction is typically the input to the setpoint of a PID loop Whenever the value computed for t
524. witching between Program and Operator control or when switching from Cascade Ratio mode SP from SP high low limiting ProgOper or Cascade Ratio mode or PVTracking and not auto mode not ProgOper or Cascade Ratio mode or PVTracking and not Auto mode and ProgValueReset PV High Low Alarming SPOper Input Output __ gt Enable SPProg Input Output _ amp _ gt Enable The high high to low low alarming algorithm compares PV to the PV alarm limits and the PV alarm limits plus or minus the PV alarm deadband PV gt PVHHLimit PVHHAlarm is cleared lt p PV lt PVHHLimit PVDeadband PVHHAlarm is set PV gt PVHLimit PVHAlarm is cleared q PV lt PVHLimit PVDeadband PVHAlarm is set PV lt PVLLimit gt N PVLAlarm is cleared PV gt PVLLimit PVDeadband PVLAlarm is set PV lt PVLLLimit PVLLAlarm is cleared q gt PV gt PVLLLimit PVDeadband PVLLAlarm is set 1 During instruction first scan the instruction clears all the PV alarm outputs The instruction also clears the PV alarm outputs and disables the alarming algorithm when PVFaulted is set Publication 1756 RMO06G EN P September 2010 89 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT PV Rate of Change Alarming PV rate of change ROC alarming
525. x to make sure you understand how your function block routines will operate IMPORTANT When programming in function block restrict the range of engineering units to 1 0715 because internal floating point calculations are done using single precision floating point Engineering units outside of this range may result in a loss of accuracy if results approach the limitations of single precision floating point 1073 ae Choose the Function Block To control a device use the following elements Elements input reference IREF function block output reference OREF 4 output wire connector OCON input wire connector a ICON Use the following table to choose your function block elements If you want to Then use a supply a value from an input device or tag input reference IREF send a value to an output device or tag output reference OREF Publication 1756 RMO06G EN P September 2010 369 AppendixA Function Block Attributes If you want to Then use a perform an operation on an input value or values and function block produce an output value or values transfer data between function blocks when they output wire connector OCON and are an input wire connector ICON e far apart on the same sheet e ondifferent sheets within the same routine disperse data to several points in the routine single output wire connector OCON and multiple input wire connectors ICON Latching Data If you use an
526. y the In Hold status on the analog output module controlled by CV3EU or from the InitPrimary output of a secondary loop Refer to Processing Faults on page 99 The instruction initialization is disabled when CVFaulted or CVEUSpanInv are TRUE Refer to Instruction First Scan on page 80 Chapter 2 Values Default FALSE CV1InitValue REAL CV1EU initialization value scaled in CV1EU units When CV Initializing is TRUE set CV1EU equal to CV1InitValue and CV1 to the corresponding percentage value CV1InitValue will normally come from the feedback of the analog output controlled by CV1EU or from the setpoint of a secondary loop Refer to CVEU Span Invalid on page 80 The instruction initialization is disabled when CVFaulted or CVEUSpanInv are TRUE Refer to Instruction First Scan on page 80 Valid any float Default 0 0 CV2InitValue REAL CVZ2EU initialization value scaled in CV2EU units When CV2Initializing is TRUE set CV2EU equal to CV2InitValue and CV2 to the corresponding percentage value CV2InitValue will normally come from the feedback of the analog output controlled by CV2EU or from the setpoint of a secondary loop Refer to CVEU Span Invalid on page 80 The instruction initialization is disabled when CVFaulted or CVEUSpanInv are TRUE Refer to Instruction First Scan on page 80 Valid any float Default 0 0 CV3lnitValue REAL CV3EU initialization value scal
527. zes Default 1 XY2Size DINT Number of points in the piece wise linear curve to use from table two If the value is less than one and Select is set the instruction sets the appropriate bit in Status and the output is not changed Valid 0 to smallest of X2 and Y2 array sizes Default 0 Select BOOL This input determines which table to use When cleared the instruction uses table one Output Parameter Data Type When set the instruction uses table two Default is cleared Description EnableOut BOOL Enable output Out REAL Output of the instruction Arithmetic status flags are set for this output Status DINT Status of the function block InstructFault Status 0 BOOL Instruction generated a fault XY1Sizelnv Status 1 BOOL Size of table 1 is invalid or not compatible with the array size XY2Sizelnv Status 2 BOOL Size of table 2 is invalid or not compatible with the array size XisOutofOrder BOOL Status 3 Publication 1756 RMO06G EN P September 2010 The X parameters are not sorted 57 Chapter 1 Process Control Instructions ALM D2SD D3SD DEDT FGEN LDLG PIDE POSP RMPS SCL SRTP TOT Description The following illustration shows how the FGEN instruction converts a twelve segment curve Out lt lt lt lt lt lt lt lt lt X X X X X X X X X Xo X X X The X axis parameters must follow the relationship X 1 lt X 2 lt X 3 lt lt

Download Pdf Manuals

image

Related Search

Related Contents

Whirlpool EH120CXL User's Manual  Инструкция - BlueCosmo Satellite Communications  ブラシレスの走りを激変させるキーワード イニシャルスピード  Niles ZR-4 4 Channels Receiver  plawa-feinwerktechnik GmbH & Co.KG Spypen aias 1.3 User's Manual  TigerCENSE: Wireless Image Sensor Network to Monitor Tiger  取扱説明書 [PDF形式]  CM/CP Converter Manual  

Copyright © All rights reserved.
Failed to retrieve file