Siemens SIMATIC Manual

Siemens SIMATIC Manual

Pid temperature control
Hide thumbs Also See for SIMATIC:
Table of Contents

Advertisement

Quick Links

s
SIMATIC
PID Temperature Control
Manual
Edition 12/2003
A5E00125039-02
Preface, Contents
Introduction
Continuous Temperature
Controller FB 58 "TCONT_CP"
Controller Tuning in FB 58
"TCONT_CP"
Temperature Step Controller
FB59 "TCONT_S"
Getting Started
Examples for the Temperature
Controllers
Appendix
Abbreviations and Acronyms
Index
1
2
3
4
5
6
A
B

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC

  • Page 1 Preface, Contents Introduction Continuous Temperature SIMATIC Controller FB 58 "TCONT_CP" Controller Tuning in FB 58 "TCONT_CP" PID Temperature Control Temperature Step Controller FB59 "TCONT_S" Getting Started Manual Examples for the Temperature Controllers Appendix Abbreviations and Acronyms Index Edition 12/2003 A5E00125039-02...
  • Page 2: Edition

    Trademarks SIMATIC®, SIMATIC HMI® and SIMATIC NET® are registered trademarks of SIEMENS AG. Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners.
  • Page 3 Preface Purpose of the Manual This manual supports you when you work with the temperature controller block from the Standard Library > PID Control. It will familiarize you with the functions of the controller blocks and, in particular, with tuning the controller and working with the user interface in which you set the parameters for the blocks.
  • Page 4 • PID Temperature Control Further Closed-Loop Control Products in SIMATIC S7 • SIMATIC S7 User Manuals: Standard PID Control, Modular PID Control, PID Self-Tuner, FM355/455 PID Control • Jürgen Müller, "Regeln mit SIMATIC - Praxisbuch für Regelungen mit SIMATIC S7 und PCS7" published by MCI Publicis Verlag...
  • Page 5 You will find your contact person at: http://www.ad.siemens.de/partner Training Centers Siemens offers a number of training courses to familiarize you with the SIMATIC S7 automation system. Please contact your regional training center or our central training center in D 90327 Nuremberg, Germany for details: Telephone: +49 (911) 895-3200.
  • Page 6 +86 10 64 74 74 74 Fax: +49 (180) 5050-223 E-Mail: simatic.hotline@ E-Mail: adsupport.asia@ E-Mail: adsupport@ siemens.com sea.siemens.com siemens.com GMT: +1:00 GMT: -5:00 GMT: +8:00 The languages of the SIMATIC Hotlines and the authorization hotline are generally German and English. PID Temperature Control A5E00125039-02...
  • Page 7 Preface Service & Support on the Internet In addition to our documentation, we offer our Know-how online on the internet at: http://www.siemens.com/automation/service&support where you will find the following: • The newsletter, which constantly provides you with up-to-date information on your products.
  • Page 8 Preface PID Temperature Control viii A5E00125039-02...
  • Page 9: Table Of Contents

    Contents Introduction FB 58 "TCONT_CP"..................1-3 FB59 "TCONT_S" .....................1-4 Continuous Temperature Controller FB 58 "TCONT_CP" Controller Section....................2-1 2.1.1 Forming the Error ....................2-1 2.1.2 PID Algorithm ....................2-4 2.1.3 Calculating the Manipulated Variable ...............2-6 2.1.4 Saving and Reloading Controller Parameters...........2-9 Pulse Generator PULSEGEN (PULSE_ON)...........2-11 Block Diagram ....................2-13 Including the Function Block in the User Program..........2-14 2.4.1...
  • Page 10 Contents Examples for the Temperature Controllers Introduction......................6-1 Example with FB 58 "TCONT_CP" (pulse control) ...........6-2 Samples for FB 58 "TCONT_CP" with Short Pulse Generator Sampling Time............6-6 Sample for FB 58 "TCONT_CP" (Continuous) ..........6-7 Sample for FB 59 "TCONT_S" (Step Controller) ..........6-11 Appendix Technical Specifications...................
  • Page 11: Introduction

    After you have installed STEP 7, the various parts of STEP 7 PID Temperature Control are located in the following folders: • SIEMENS\STEP7\S7LIBS\: FBs • SIEMENS\STEP7\S7WRT\: parameter assignment user interface, readme, online help • SIEMENS\STEP7\EXAMPLES\: sample programs • SIEMENS\STEP7\MANUAL\: manual...
  • Page 12 Introduction Function Blocks The "Standard Library PID Control" contains two temperature controllers: 1. FB 58 "TCONT_CP": Temperature controller for actuators with a continuous or pulsed input signal. This controller block also includes a self-tuning function for the PI/PID parameters. 2. FB 59 "TCONT_S": Temperature step controller for actuators with an integral component such as a positioning motor.
  • Page 13: Fb 58 "Tcont_Cp

    PID controller and adapt it to the process. These settings can be made simply with the parameter assignment tool. You start this within a project by double- clicking on the instance DB in the SIMATIC Manager. You can open the electronic manual as follows: Start >...
  • Page 14: Fb59 "Tcont_S

    You start this within a project by double-clicking on the instance DB in the SIMATIC Manager. You can open the electronic manual as follows: Start > Simatic > Documentation > English > PID Temperature Control. Application The functionality is based on the PI control algorithm of the sampling controller.
  • Page 15 Continuous Temperature Controller FB 58 "TCONT_CP" Controller Section 2.1.1 Forming the Error The schematic below is a block diagram illustrating how the error is formed: SP_INT PVPER_ON PV_IN DEADBAND CRP_IN PV_NORM *0,1 *0,01 DEADB_W PV_PER PV_FAC, PER_MODE PV_OFFS Parameter assignment user interface FB call interface Parameter assignment u ser interface, FB call interface Setpoint Branch...
  • Page 16: Continuous Temperature Controller Fb 58 "Tcont_Cp

    Continuous Temperature Controller FB 58 "TCONT_CP" Process Value Format Conversion CRP_IN (PER_MODE) The CRP_IN function converts the peripheral value PV_PER to a floating-point format depending on the switch PER_MODE according to the following rules: PER_MODE Output of Analog Input Type Unit CRP_IN PV_PER * 0.1...
  • Page 17: Forming The Error

    Continuous Temperature Controller FB 58 "TCONT_CP" Example of Process Value Normalization If you want to enter the setpoint as a percentage, and you have a temperature range of -20 to 85 °C applied to CRP_IN, you must normalize the temperature range as a percentage.
  • Page 18: Pid Algorithm

    Continuous Temperature Controller FB 58 "TCONT_CP" 2.1.2 PID Algorithm The schematic below is the block diagram of the PID algorithm: LMN_P SP_INT GAIN PFAC_SP DISV LMN_Sum INT_HPOS INT_HNEG LMN_I TI, I_ITL_ON, I_ITLVAL TD, D_F LMN_D Parameter assignment user interface FB call interface Parameter assignment user interface, FB call interface PID Algorithm (GAIN, TI, TD, D_F) The PID algorithm operates as a position algorithm.
  • Page 19 Continuous Temperature Controller FB 58 "TCONT_CP" LMN_Sum LMN_Sum(t) GAIN * D_F ER GAIN * ER (0) GAIN * ER (0) TD / D_F Integrator (TI, I_ITL_ON, I_ITLVAL) In the manual mode, it is corrected as follows: LMN_I = LMN - LMN_P - DISV. If the manipulated variable is limited, the I-action is stopped.
  • Page 20: Calculating The Manipulated Variable

    Continuous Temperature Controller FB 58 "TCONT_CP" Parameter Settings of a P or PD Controller with Operating Point In the user interface, deactivate the I-action (TI = 0.0) and possible also the D- action (TD = 0.0). Then make the following parameter settings: •...
  • Page 21 Continuous Temperature Controller FB 58 "TCONT_CP" Temperature Do not heat with LMN = LMN_LLM SP_INT + CON_ZONE Upper control zone SP_INT Lower control zone SP_INT - CON_ZONE Heat with LMN = LMN_HLM Time Note Before activating the control zone manually, make sure that the control zone band is not too narrow.
  • Page 22 Continuous Temperature Controller FB 58 "TCONT_CP" Manipulated Variable Limitation LMNLIMIT (LMN_HLM, LMN_LLM) The value of the manipulated variable is limited to the LMN_HLM and LMN_LLM limits by the LMNLIMIT function. If these limits are reached, this is indicated by the message bits QLMN_HLM and QLMN_LLM.
  • Page 23: Saving And Reloading Controller Parameters

    Continuous Temperature Controller FB 58 "TCONT_CP" 2.1.4 Saving and Reloading Controller Parameters The schematic below shows the block diagram: MAN_ON MAN_ON & & SAVE_PAR UNDO_PAR LOAD_PID PID_ON PFAC_SP, PFAC_SP, PID_CON GAIN, GAIN, GAIN, PAR_SAVE PAR_SAVE PI_CON D_F, D_F, CONZ_ON, CONZONE CONZ_ON, CONZONE CONZONE...
  • Page 24 Continuous Temperature Controller FB 58 "TCONT_CP" Note • The controller parameters are only written back to the controller with UNDO_PAR or LOAD_PID when the controller gain is not 0: LOAD_PID copies the parameters only if the relevant GAIN is <> 0 (either of the PI or PID parameters).
  • Page 25: Pulse Generator Pulsegen (Pulse_On)

    Continuous Temperature Controller FB 58 "TCONT_CP" Pulse Generator PULSEGEN (PULSE_ON) The PULSEGEN function converts the analog manipulated variable value LmnN to a train of pulses with the period PER_TM using pulse duration modulation. PULSEGEN is activated with PULSE_ON=TRUE and is processed in the CYCLE_P cycle.
  • Page 26 Continuous Temperature Controller FB 58 "TCONT_CP" Minimum Pulse or Minimum Break Time (P_B_TM) Short on and off times reduce the working life of switching elements and actuators. These can be avoided by setting a minimum pulse or minimum break time P_B_TM.
  • Page 27: Block Diagram

    Continuous Temperature Controller FB 58 "TCONT_CP" Block Diagram Parameter assignment user interface FB call interface Parameter assignment user interface, SP_INT FB call interface PVPER_ON GAIN PV_IN DEADBAND CRP_IN PV_NORM PV_PER DEADB_W PER_MODE PV_FAC, PV_OFFS LMN_P SP_INT DISV PFAC_SP LMN_Sum PFAC_SP, PID_TUNER GAIN, TI, INT_HPOS...
  • Page 28: Including The Function Block In The User Program

    Continuous Temperature Controller FB 58 "TCONT_CP" Including the Function Block in the User Program 2.4.1 Calling the Controller Block The following diagram shows the control call in FBD: "TCONT_CP" PV_IN PV_PER DISV INT_HPOS INT_HNEG SELECT LMN_PER CYCLE CYCLE_P QPULSE QLMN_HLM SP_INT QLMN_LLM QC_ACT...
  • Page 29: Call Without Pulse Generator (Continuous Controller)

    Continuous Temperature Controller FB 58 "TCONT_CP" 2.4.2 Call without Pulse Generator (continuous controller) Controller Sampling Time CYCLE You specify the sampling time at the CYCLE parameter. You can also enter the sampling time using the parameter assignment tool. The sampling time CYCLE must match the time difference between two calls (cycle time of the cyclic OB including scan rates).
  • Page 30 Continuous Temperature Controller FB 58 "TCONT_CP" Rule of Thumb for the CYCLE and CYCLE_P Sampling Times The controller sampling time should not exceed 10 % of the calculated integral time constant of the controller (TI): CYCLE ≤ TI/10 For an adequately accurate manipulated variable resolution, make sure that the following relationship applies: CYCLE_P ≤...
  • Page 31 Continuous Temperature Controller FB 58 "TCONT_CP" Various Call Options for Pulse Control (SELECT) In a fast process, extremely short pulse generator sampling times (for example 10 ms) are necessary. Due to the program run time (CPU utilization) it is not practical to process the control sections in the same cyclic interrupt OB as the calculation of the pulse output.
  • Page 32: Initialization

    Continuous Temperature Controller FB 58 "TCONT_CP" Numeric Examples Required CYCLE = PER_TM = CYCLE_P = Comment Accuracy G TI/10 TI/5 PER_TM*G 100 s 10 s 20 s 0.2 s Call with SELECT = 0 at a cycle time of 200 0.5 s 0.01 s Separate call of the...
  • Page 33: Controller Tuning In Fb 58 "Tcont_Cp

    Controller Tuning in FB 58 "TCONT_CP" Introduction The controller optimization is to be used exclusively for heating or cooling processes. With controller tuning in FB 58 "TCONT_CP", the PI/PID controller parameters are set automatically. There are two ways of tuning: •...
  • Page 34: Process Types

    Controller Tuning in FB 58 "TCONT_CP" Process Types Process Types Apart from the process gain GAIN_P, the parameters shown in the schematic below, lag time TU and process time constant TA are characteristic parameters of a process. The schematic below illustrates the step response: Process responce to a manipulated variable step change...
  • Page 35: Area Of Application

    Controller Tuning in FB 58 "TCONT_CP" Area of Application Transient Response The process must have a stable, asymptotic transient response with time lag. After a step change in the manipulated variable, the process variable must change to a steady state. This therefore excludes processes that have an oscillating response without control and processes that are not self-regulating (integrator in the process).
  • Page 36: The Phases Of Controller Tuning

    Controller Tuning in FB 58 "TCONT_CP" The Phases of Controller Tuning During tuning, several phases are run through in the block algorithm. The PHASE parameter indicates which phase the block is currently in. You start the tuning as follows (see Section 3.6, Page 3-8): •...
  • Page 37 Controller Tuning in FB 58 "TCONT_CP" The schematic below illustrates the phases of tuning at the operating point started with TUN_ST = TRUE: PHASE = 3, 4, 5 Temperature (one cycle) PHASE = 7 PHASE = 0 PHASE = 1 PHASE PHASE = 0 Operating point process value Point of inflection...
  • Page 38: Preparations

    Controller Tuning in FB 58 "TCONT_CP" Preparations SIMATIC and Controller Tuning is started by the in/out parameters TUN_ON, TUN_ST or SP_INT. You can set the parameters in the following ways: • With the parameter assignment user interface • With an operator control and monitoring device •...
  • Page 39 Controller Tuning in FB 58 "TCONT_CP" Preparing for Tuning (Phase 0 -> 1) You can start the tuning both in manual or in automatic mode. Set the parameter TUN_ON = TRUE. This makes FB 58 "TCONT_CP" ready for tuning (Phase 1). The TUN_ON bit must only be set in the steady state or during aperiodic settling to the steady state.
  • Page 40: Starting Tuning (Phase 1 -> 2)

    Controller Tuning in FB 58 "TCONT_CP" In Phase 1, both the controller sampling time CYCLE and the pulse generator sampling time CYCLE_P are measured and written to the relevant in/out parameters at the beginning of Phase 2. In the control mode without the pulse generator, CYCLE_P = CYCLE.
  • Page 41 Controller Tuning in FB 58 "TCONT_CP" Tuning at the Operating Point without Setpoint Step Change The tuning manipulated variable (LMN0 + TUN_DLMN) is applied by setting the start bit TUN_ST (transition Phase 1 -> 2). When you change the setpoint, the new setpoint takes effect only when the point of inflection is reached (this is when the controller switches to automatic).
  • Page 42: Searching For The Point Of Inflection (Phase 2) And Calculating The Control Parameters (Phase 3, 4, 5)

    Controller Tuning in FB 58 "TCONT_CP" Searching for the Point of Inflection (Phase 2) and Calculating the Control Parameters (Phase 3, 4, 5) In Phase 2, the tuning function attempts to detect the point of inflection with the manipulated variable remaining constant. This method prevents the point of inflection being found too early as a result of process variable noise.
  • Page 43: Result Of The Tuning

    Controller Tuning in FB 58 "TCONT_CP" Result of the Tuning The left digit of STATUS_H indicates the tuning status (for a detailed table, see Appendix A.4, Page A-22): STATUS_H Result: Default or no new controller parameters have been found (yet). 10000 Suitable control parameters found 2xxxx...
  • Page 44: Error Situations And Remedies

    Controller Tuning in FB 58 "TCONT_CP" 3.11 Error Situations and Remedies Point of inflection not reached (only with excitation by setpoint step change) Tuning is terminated at the latest when the process value has exceeded 75% of the setpoint step change (SP-INT-PV0). This is signaled by "inflection point not reached"...
  • Page 45 Controller Tuning in FB 58 "TCONT_CP" The schematic below illustrates the overshoot of the process variable when the excitation is too strong (process type III): PHASE PHASE = 2 PHASE = 1 PHASE = 7 PHASE = 0 Tuning stopped at 75 % Temp.
  • Page 46 Controller Tuning in FB 58 "TCONT_CP" Quality of the measuring signals (measurement noise, low-frequency interference) The results of the tuning can be distorted by measurement noise or by low- frequency interference. Note the following: • If you encounter measurement noise, set the sampling frequency higher rather than lower.
  • Page 47 Controller Tuning in FB 58 "TCONT_CP" Overshoot Overshoot can occur in the following situations: Situation Cause Remedy • • End of tuning Excitation by a manipulated Increase the setpoint step variable change too high change or reduce the compared with the setpoint step manipulated variable step change (see above).
  • Page 48: Manual Fine Tuning In Control Mode

    Controller Tuning in FB 58 "TCONT_CP" 3.12 Manual Fine Tuning in Control Mode To achieve a setpoint response free of overshoot, you can take the measures described below: Adapting the Control Zone During the tuning, a control zone CON_ZONE is calculated by FB58 "TCONT_CP" that is activated (CONZ_ON = TRUE) if the process type is suitable (process type I and II) and a PID controller is being used.
  • Page 49 Controller Tuning in FB 58 "TCONT_CP" Example of Weakening the Control Response with PFAC_SP Process parameters: • GAIN = 6 • = 50 s • = 5 s; Controller parameters: • GAIN = 1.45 • = 19.6 s Process value Setpoint Process value Manip.
  • Page 50 Controller Tuning in FB 58 "TCONT_CP" Damping Control Parameters If oscillations occur in the closed control loop or if there is overshoot following setpoint step changes, you can reduce the controller GAIN (for example to 80 % of the original value) and increase the reset time TI (for example to 150 % of the original value).
  • Page 51: Parallel Tuning Of Control Channels

    Controller Tuning in FB 58 "TCONT_CP" 3.13 Parallel Tuning of Control Channels Neighboring Zones (Strong Heat Coupling) If two or more controllers control the temperature, for example, on a plate (in other words, there are two heaters and two measured process values with strong heat coupling ), follow the steps outlined below: 1.
  • Page 52 Controller Tuning in FB 58 "TCONT_CP" PID Temperature Control 3-20 A5E00125039-02...
  • Page 53 Temperature Step Controller FB59 "TCONT_S" Controller Section 4.1.1 Forming the Error Block Diagram SP_INT PVPER_ON PV_IN DEADBAND CRP_IN PV_NORM *0,1 *0,01 DEADB_W PV_PER PV_FAC, PER_MODE PV_OFFS Parameter assignment user interface FB call interface Parameter assignment user interface, FB call interface Setpoint Branch The setpoint is entered at input SP_INT in floating-point format as a physical value or percentage.
  • Page 54: Temperature Step Controller Fb59 "Tcont_S

    Temperature Step Controller FB59 "TCONT_S" Process Value Format Conversion CRP_IN (PER_MODE) The CRP_IN function converts the peripheral value PV_PER to a floating-point format depending on the switch PER_MODE according to the following rules: PER_MODE Output of Analog Input Type Unit CRP_IN PV_PER * 0.1 Thermoelements;...
  • Page 55: Forming The Error

    Temperature Step Controller FB59 "TCONT_S" Example of Process Variable Normalization If you want to enter the setpoint as a percentage, and you have a temperature range of -20 to 85 °C applied to CRP_IN, you must normalize the temperature range as a percentage. The schematic below shows the adaptation of the temperature range from -20 to 85°C to an internal scale of 0 to 100 %: PV_NORM [%]...
  • Page 56: Pi Step Controller Algorithm

    Temperature Step Controller FB59 "TCONT_S" 4.1.2 PI Step Controller Algorithm FB 59 "TCONT_S" operates without a position feedback signal (see block diagram in Section 4.2, Page 4-5). The I-action of the PI algorithm and the assumed position feedback signal are calculated in an integrator (INT) and compared as a feedback value with the remaining P-action.
  • Page 57: Block Diagram

    Temperature Step Controller FB59 "TCONT_S" Block Diagram Parameter assignment user interface FB call interface Parameter assignment user interface, SP_INT FB call interface PVPER_ON PV_IN DEADBAND CRP_IN PV_NORM PV_PER DEADB_W PER_MODE PV_FAC, PV_OFFS SP_INT PFAC_SP LMNR_HS LMNR_LS LMNUP LMNDN LMNS_ON QLMNUP PULSEOUT DISV THREE_ST...
  • Page 58: Including The Function Block In The User Program

    Temperature Step Controller FB59 "TCONT_S" Including the Function Block in the User Program 4.3.1 Calling the Controller Block The following diagram shows the controller call in FBD: “TCONT_S” CYCLE SP_INT PV_IN PV_PER DISV LMNR_HS LMNR_LS QLMNUP LMNS_ON QLMNDN LMNUP LMNDN COM_RST FB TCONT_S must be called at constant intervals.
  • Page 59: Sampling Time

    Temperature Step Controller FB59 "TCONT_S" 4.3.2 Sampling Time You specify the sampling time at the CYCLE parameter. You can also enter the sampling time using the parameter assignment tool. The sampling time CYCLE must match the time difference between two calls (cycle time of the cyclic OB including scan rates).
  • Page 60 Temperature Step Controller FB59 "TCONT_S" PID Temperature Control A5E00125039-02...
  • Page 61: Getting Started

    Create a project in the SIMATIC Manager The project window appears in the SIMATIC with File->New... Manager. Insert a SIMATIC 300 or 400 station to match your hardware configuration. Configure your station in HW Config and set the cycle time of the cyclic interrupt priority class of OB35 to 20 ms.
  • Page 62 Result: Open the parameter assignment tool by The parameter assignment tool opens. double-clicking on the instance DB DB_TCONT_CP in the SIMATIC Manager. Under Options, select the menu command The curve recorder and the first dialog of the Controller Tuning. wizard open.
  • Page 63 The value of the manipulated variable and click the Send button. remains constant in the curve recorder. Open the VAT_StructPar variable table in the SIMATIC Manager and click on Variable Monitor. Under "PID/PI Parameter Setting" in the In the VAT_StructPar variable table, you can...
  • Page 64 Send button. remains constant in the curve recorder. Open the VAT_StructPar variable table in the SIMATIC Manager and click on Variable Monitor. Click the Download button for the "Saved PID In the VAT_StructPar variable table, you can and control zone parameters"...
  • Page 65: Examples For The Temperature Controllers

    Preparing the Samples 1. Open the sample project zEn01_13_STEP7__PID-Temp in the ...\STEP7\EXAMPLES folder with the SIMATIC Manager and copy it to your project folder with a suitable name ( File > Save As ). Use the View > Details option to display all the information.
  • Page 66: Example With Fb 58 "Tcont_Cp" (Pulse Control)

    Examples for the Temperature Controllers Code of the Samples The samples are written in STL. You can view them directly in the LAD/STL/FBD editor. In this editor, select View > Display with "Symbolic Representation", "Symbol Selection" and "Comment". If you have enough space on the screen, you can also display the "Symbol Information".
  • Page 67 Examples for the Temperature Controllers Process Block for Simulation of a Temperature Heating Zone The block simulates a typical temperature process for heating that can occur as a control zone in an extruder, an injection molding machine, an annealing machine or as a separate furnace.
  • Page 68 Examples for the Temperature Controllers Operator Control and Monitoring You can make your operator input in the VAT_LoopControl variable table. The screenshot below shows the VAT_LoopControl variable table: The controller can be changed to manual at the MAN_ON switch. The manual value can be set at MAN.
  • Page 69 Examples for the Temperature Controllers After a warm restart on the CPU, the controller is in manual with the heating off. If you want to tune the controller, set the TUN_ON bit and enter a setpoint at SP. You can monitor the tuning at the PHASE parameter. The result of the tuning can be seen at the status words STATUS_H and STATUS_D.
  • Page 70: Samples For Fb 58 "Tcont_Cp" With Short Pulse Generator Sampling Time

    Examples for the Temperature Controllers Samples for FB 58 "TCONT_CP" with Short Pulse Generator Sampling Time The two samples described here are identical to the "pulse controller" sample described in Section 6.2. The only differences are in the call mechanism as described below.
  • Page 71: Sample For Fb 58 "Tcont_Cp" (Continuous)

    Examples for the Temperature Controllers Sample for FB 58 "TCONT_CP" (Continuous) The "continuous controller" sample contains a simple control loop with the FB 58 "TCONT_CP" temperature controller and temperature process simulated with PROC_C. The controller is set as a continuous controller. PROC_C represents a 3rd order lag with an analog input.
  • Page 72 Examples for the Temperature Controllers Parameter Parameter Comment Description Input variable Value of the manipulated variable of the controller DISV Disturbance variable GAIN Process gain TM_LAG1 Time lag 1 TM_LAG2 Time lag 2 TM_LAG3 Time lag 3 AMB_TEM Ambient temperature OUTV Output variable Temperature of the control zone...
  • Page 73 Examples for the Temperature Controllers Operator Control and Monitoring You can make your operator input in the VAT_LoopControlC variable table. PID Temperature Control A5E00125039-02...
  • Page 74 Examples for the Temperature Controllers The controller can be changed to manual at the MAN_ON switch. The manual value can be set at MAN. After a warm restart on the CPU, the controller is in manual with the heating off. If you want to tune the controller, set the TUN_ON bit and enter a setpoint at SP.
  • Page 75: Sample For Fb 59 "Tcont_S" (Step Controller)

    Examples for the Temperature Controllers Sample for FB 59 "TCONT_S" (Step Controller) The "step controller" sample contains a simple control loop consisting of a PI step controller and a third-order lag with an integrating actuator as the model for a temperature process.
  • Page 76 Examples for the Temperature Controllers Parameter Parameter Comment Description INV_UP input variable up INV_DOWN input variable down DISV disturbance variable GAIN process gain MTR_TM motor actuating time LMNR_HLM actuator value high limit LMNR_LLM actuator value low limit TM_LAG1 time lag 1 TM_LAG2 time lag 2 with temperature processes:...
  • Page 77 Examples for the Temperature Controllers Operator Control and Monitoring You can make your operator input in the VAT_LoopControlS variable table. The controller can be changed to manual at the LMNS_ON switch. After a warm restart on the CPU, the controller is in manual. If LMNS_ON is set, the outputs QLMNUP or QLMNDN can be controlled at the inputs LMNUP or LMNDN in manual mode.
  • Page 78 Examples for the Temperature Controllers Putting the Sample into Operation To put the sample into operation, follow the steps outlined below: 1. Copy the sample to a CPU. 2. In HW Config, set the cycle time of OB35 to 20 ms. If a time error occurs in the cyclic interrupt level, you must extend the cycle time.
  • Page 79: A Appendix

    Appendix Technical Specifications The following tables indicate the memory requirements of the temperature blocks: Block Name FB No. Load Memory Req. Work Memory Req. Local Data TCONT_CP FB 58 10866 Bytes 9910 Bytes TCONT_S FB 59 2282 Bytes 1966 Bytes Instance DB Load Memory Req.
  • Page 80: Db Assignment

    Appendix DB Assignment A.3.1 Instance DB for FB 58 "TCONT_CP" Parameters: Addr Parameter Decl. Data Range of Initial Description Type values Value PV_IN INPUT REAL Depen- PROCESS VARIABLE IN dent on An initialization value can be set at the "Process Variable In" input or an sensors external process variable in floating- used...
  • Page 81 Appendix Addr Parameter Decl. Data Range of Initial Description Type values Value 12.0 SELECT INPUT 0 to 3 SELECTION OF CALL PID AND PULSE GENERATOR If the pulse generator is activated, there are several ways of calling the PID algorithm and pulse generator: •...
  • Page 82 Appendix Addr Parameter Decl. Data Range of Initial Description Type values Value 24.2 QLMN_LLM OUTPUT BOOL FALSE LOW LIMIT OF MANIPULATED VARIABLE REACHED The value of the manipulated variable is always limited to an upper and lower limit. The QLMN_LLM output indicates when the lower limit is exceeded.
  • Page 83 Appendix Internal Parameters Addr Parameter Decl. Data Range of Initial Description Type Values Value DEAD BAND WIDTH 44.0 DEADB_W INPUT REAL Dependent on the The error passes through a dead sensors band. The "dead band width" input used decides the size of the dead band. INITIALIZATION VALUE OF THE 48.0 I_ITLVAL...
  • Page 84 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value 72.0 LMN_OFFS INPUT REAL MANIPULATED VARIABLE OFFSET The "manipulated variable offset" input is added to the value of the manipulated variable. The input is used to adapt the manipulated variable range.
  • Page 85 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value 90.1 I_ITL_ON INPUT BOOL FALSE INITIALIZATION OF THE INTEGRAL ACTION ON 90.2 PULSE_ON INPUT BOOL FALSE PULSE GENERATOR ON If PULSE_ON = TRUE is set, the pulse generator is activated KEEP TUNING ON 90.3 TUN_KEEP INPUT...
  • Page 86 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value 116.0 PI_CON OUTPUT STRUCT PI CONTROLLER PARAMETERS PI PROPORTIONAL GAIN GAIN OUTPUT REAL %/phys.unit +0.0 ≥ 0.0 s PI RESET TIME [s] OUTPUT REAL 0.0 s +4.0 124.0 PID_CON OUTPUT STRUCT PID CONTROLLER...
  • Page 87 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value ≥ 0.0 s 170.0 INPUT/ REAL 40.0 s RESET TIME [s] OUTPUT ≥ 0.0 s 174.0 INPUT/ REAL 10.0 s DERIVATIVE TIME [s] OUTPUT The "derivative time" input decides the derivative action response.
  • Page 88 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value 186.3 UNDO_ INPUT/ BOOL FALSE UNDO CHANGE OF OUTPUT CONTROLLER PARAMETERS 186.4 SAVE_PAR INPUT/ BOOL FALSE SAVE CURRENT CONTROLLER PARAMETERS OUTPUT Saves the controller parameters PFAC_SP, GAIN, TI, TD, D_F CONZ_ON and CON_ZONE in the data structure PAR_SAVE.
  • Page 89 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value 208.0 TM_LAG_P OUTPUT REAL TIME LAG OF PTN MODEL [s] Time lag of a PTN model (practical values only for N_PTN >= 2). 212.0 T_P_INF OUTPUT REAL TIME TO POINT OF INFLECTION [s] Time from process excitation until the point of inflection.
  • Page 90 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value 250.0 POI_CMAX OUTPUT INT MAX NO. OF CYCLES AFTER POINT OF INFLECTION This time is used to find a further (in other words better) point of inflection when measurement noise is present.
  • Page 91: Instance Db For Fb 59 "Tcont_S

    Appendix A.3.2 Instance DB for FB 59 "TCONT_S" Parameter: Addr Parameter Decl. Data Range of Initial Description Type Values Value ≥ 0.001 SAMPLE TIME OF STEP CYCLE INPUT REAL 0.1 s CONTROLLER [s] At this input, you enter the sampling time for the controller.
  • Page 92 Appendix Addr Parameter Decl. Data Range of Initial Description Type Values Value 18.1 LMNR_LS INPUT BOOL FALSE LOW LIMIT SIGNAL OF REPEATED MANIPULATED VALUE 18.2 LMNS_ON INPUT BOOL TRUE MANIPULATED SIGNALS ON The processing of the controller output signal is set to manual at the "manipulated signals on"...
  • Page 93 Appendix Internal Parameters Addr Parameter Decl Data Range of Initial Description Type values Value 32.0 PV_FAC INPUT REAL PROCESS VARIABLE FACTOR The "process variable factor" input is multiplied by the "process value". The input is used to adapt the process variable range. 36.0 PV_OFFS INPUT...
  • Page 94 Appendix Addr Parameter Decl Data Range of Initial Description Type values Value 68.0 PER_ INPUT 0, 1, 2 PERIPHERY MODE MODE You can enter the type of the I/O module at this switch. The process variable at input PV_PER is then normalized to °C at the PV output.
  • Page 95: List Of Possible Messages During Tuning

    Appendix List of Possible Messages during Tuning STATUS_H Description Remedy Default or no new controller parameters (yet). 10000 Tuning completed and suitable controller parameters found 2xxxx Tuning completed and controller parameters uncertain 2xx2x Point of inflection not reached If the controller is oscillating, weaken (only with excitation by setpoint the controller parameters and repeat step change)
  • Page 96 Appendix PID Temperature Control A-18 A5E00125039-02...
  • Page 97: B Abbreviations And Acronyms

    Abbreviations and Acronyms Abbr./Acronym Explanation BREAK_TM Minimum break time [s] COM_RST Restart Control zone width CON_ZONE CONZ_ON Activate control zone Sampling time [s] CYCLE CYCLE_P Sampling time of the pulse generator [s] Derivative factor DEADB_W Deadband width DISV Disturbance variable Error FIL_CYC Number of cycles of the mean value filter...
  • Page 98 Abbreviations and Acronyms Abbr./Acronym Explanation LMNR_LS Lower limit stop signal of the position feedback signal LMNS_ON Activate manual mode for actuating signals LMNUP Actuating signal up Load tuned PID parameters LOAD_PID Manual value Activate manual mode MAN_ON MTR_TM Motor actuating time [s] Process order N_PTN NOI_PVDT...
  • Page 99 Abbreviations and Acronyms Abbr./Acronym Explanation QLMNDN Actuating signal down QLMNUP Actuating signal up QPULSE Pulse output Tuning active (phase 2) QTUN_RUN SAVE_PAR Save current controller parameters Selection of the call for PID and pulse generator SELECT SP_INT Internal setpoint Status controller design of the controller tuning STATUS_D STATUS_H Status heating of the controller tuning...
  • Page 100 Abbreviations and Acronyms PID Temperature Control A5E00125039-02...
  • Page 101 Index PID algorithm..........2-4 preparations ..........3-6 process value format conversion....2-2 process value normalization .......2-2 Control ............6-1 process value normalization, example..2-3 Controller sampling time ....2-15, 2-16, 4-7 process value options.........2-1 Controller tuning..........3-1 pulse generator ........2-11 improving ..........3-16 reloading controller parameters....2-9 messages ..........A-17 sampling time of the pulse generator..2-15 phases ............
  • Page 102 Index PI step controller algorithm ......4-4 Sample for FB 58 "TCONT_CP"....6-6, 6-7 feedforward control ........4-4 Sample for FB 59 "TCONT_S" .....6-11 Process type Sampling time of the pulse generator...2-15 checking........... 3-10 Software Process types ..........3-2 installing .............1-1 Product structure..........

Table of Contents