+ All Categories
Home > Documents > SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become...

SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become...

Date post: 08-Mar-2018
Category:
Upload: haxuyen
View: 216 times
Download: 0 times
Share this document with a friend
276
Preface, Contents Function Blocks for Standard Controllers Standard Controller Product Overview 1 Designing Digital Controllers 2 Configuring and Starting the Standard Controller 3 Signal Processing in SP/PV Channels and PIG Controller Functions 4 The Continuous Controller (PID_C) 5 The Step Controller (PID_S) 6 The Loop Scheduler and Examples of Controller Configurations 7 Technical Data and Block Diagrams 8 Parameter Lists of the Standard Controller 9 Configuration Standard Controller Configuration Tool Product Overview 10 Working with the Configuration Tool 11 Appendix Appendix A A Glossary, Index C79000-G7076-C195-02 Standard Controller User Manual SIMATIC
Transcript
Page 1: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Preface, Contents

Function Blocks for Standard Controllers

Standard Controller Product Overview 1

Designing Digital Controllers 2

Configuring and Starting the Standard Controller 3

Signal Processing in SP/PV Channelsand PIG Controller Functions 4

The Continuous Controller (PID_C) 5

The Step Controller (PID_S) 6

The Loop Scheduler and Examples ofController Configurations 7

Technical Data and Block Diagrams 8

Parameter Lists of the Standard Controller 9

Configuration Standard Controller

Configuration Tool Product Overview 10

Working with the Configuration Tool 11

Appendix

Appendix A A

Glossary, Index

C79000-G7076-C195-02

Standard Controller

User Manual

SIMATIC

Page 2: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

iiStandard Controller

C79000 G7076 C195 02

This manual contains notices which you should observe to ensure your own personal safety, as well as toprotect the product and connected equipment. These notices are highlighted in the manual by a warningtriangle and are marked as follows according to the level of danger:

!Danger

indicates that death, severe personal injury or substantial property damage will result if proper precautions arenot taken.

!Warning

indicates that death, severe personal injury or substantial property damage can result if proper precautions arenot taken.

!Caution

indicates that minor personal injury or property damage can result if proper precautions are not taken.

Note

draws your attention to particularly important information on the product, handling the product, or to a particularpart of the documentation.

The device/system may only be set up and operated in conjunction with this manual.

Only qualified personnel should be allowed to install and work on this equipment. Qualified persons aredefined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and sys-tems in accordance with established safety practices and standards.

Note the following:

!Warning

This device and its components may only be used for the applications described in the catalog or the technicaldescription, and only in connection with devices or components from other manufacturers which have beenapproved or recommended by Siemens.

This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, andoperated and maintained as recommended.

SIMATIC� and SINEC� are registered trademarks of SIEMENS AG.

Third parties using for their own purposes any other names in this document which refer totrademarks might infringe upon the rights of the trademark owners.

We have checked the contents of this manual for agreement with thehardware and software described. Since deviations cannot be precludedentirely, we cannot guarantee full agreement. However, the data in thismanual are reviewed regularly and any necessary corrections included insubsequent editions. Suggestions for improvement are welcomed.

� Siemens AG 1995Technical data subject to change.

Disclaimer of LiabilityCopyright � Siemens AG 1995 All rights reserved

The reproduction, transmission or use of this document or its contents isnot permitted without express written authority. Offenders will be liable fordamages. All rights, including rights created by patent grant or registrationof a utility model or design, are reserved.

Siemens AGAutomation GroupIndustrial Automation SystemsPostfach 4848, D-90327 Nürnberg

Siemens Aktiengesellschaft Order No. 6ES7 830-2AA20-8BG0

Safety Guidelines

Qualified Personnel

Correct Usage

Trademarks

Page 3: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

iiiStandard ControllerC79000-G7076-C195-02

Preface

This manual will help you when selecting, configuring, and assigningparameters to a controller block for your control task.

The manual introduces you to the functions of the configuration tool andexplains how you use it.

StandardControllerS7-300/400

FunctionBlocks forStandardController

ConfigurationStandardController

ManualStandardController

The “Standard Controller S7-300/400” software product includes threeseparate products:

– The product ”Standard Controller” consists essentially of the twocontroller blocks PID_C and PID_S .

– The product “Configuration Standard Controller” consists essentiallyof the tools for configuring the controller blocks.This product is referred to simply as “configuration tool” in thismanual.

– The manual is a separate product and describes both the product”Standard Controller” and the product “Configuration StandardController”.

Purpose of theManual

How the ManualFits into the Intothe Package”StandardControllerS7-300/400”

Page 4: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

ivStandard Controller

C79000-G7076-C195-02

The “Standard Controller” software package provides a comprehensiveconcept for implementing control functions in SIMATIC S7 programmablelogic controllers.

The controller is completely programmed with its full range of functions andfeatures for signal processing. To adapt a controller to your process, yousimply select the subfunctions you require from the complete range offunctions. The time and effort required for configuration is therefore reducedto omitting functions you do not require. In all these tasks, you are supportedby the configuration tool.

Since configuration is restricted to selecting or, in some cases, extendingbasic functions, the concept of the standard controller is easy to learn. Evenusers with only limited knowledge of control systems will be in a position tocreate high-quality controls.

provides you with an overview of the standard controllerChap. 1

explains the structure and the functions of the standard controllerChap. 2

helps you to design and start up a standard controllerChap. 3

explains the signal processing in the setpoint/process variable channelChap. 4

explains the signal processing in the continuous controllerChap. 5

explains the signal processing in the step controllerChap. 6

shows you how to work with the loop scheduler andintroduces examples of controller structures

Chap. 7

contains technical data and block diagramsChap. 8

contains parameter lists for the standard controllerChap. 9

Chap. 10

provides you with an overview of the configuration tool

The “StandardControllerPackage”

Contents of theManual

Preface

Page 5: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

vStandard ControllerC79000-G7076-C195-02

shows you how to work with the configuration toolChap. 11

This manual is intended for the following readers:

– S7 programmers

– programmers of control systems

– operators

– service personnel

To make it easier for you to find information in the manual, certainconventions have been used:

� First glance through the titles in the left margin to get an idea of thecontent of a section.

� Sections dealing with a specific topic either answer a question about thefunctions of the tool or provide information about necessary orrecommended courses of action.

� References to further information dealing with a topic are indicated by(see Chapter or Section x.y). References to other manuals anddocumentation are indicated by numbers in slashes /.../. These numbersrefer to the titles of manuals listed in the Appendix.

� Instructions for you to follow are marked by a black dot.

� Sequences of activities are numbered or explained as explicit steps.

� Alternative courses of action or decisions you need to take are indicatedby a dash.

This manual is intended as a reference work that provides you with theinformation you will require to work with the standard controller. You do,however, require a broader scope of information that is available in thefollowing manuals: /70/, /71/, /100/, /101/, /231/, /232/, /234/, and /352/.

If you have questions about using the controller block or the configurationtool, please contact your Siemens SIMATIC distributor or representative. You will find the addresses in the appendix “SIEMENS Companies andRepresentatives” in the S7-300 Programmable Controller, Hardware andInstallation Manual.

Audience

Conventions in theText

FurtherInformation

Further Support

Preface

Page 6: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

viStandard Controller

C79000-G7076-C195-02

If you have questions or comments relating to the manual itself, pleasecomplete the Remarks Form at the end of the manual and return it to theappropriate address. We would also appreciate your appraisal of the manualon the Remarks Form.

To help you to become familiar with SIMATIC S7 programmable logiccontrollers, we provide training courses. Please contact your regionaltraining center or the main training center in D-90327 Nürnberg, GermanyTel. 0911 985 3154.

Preface

Page 7: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

viiStandard ControllerC79000-G7076-C195-02

Contents

Function Blocks for Standard Controllers

1 Standard Controller Product Overview 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1 The Product “Standard Controller” 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.2 The “Standard Controller” Software Product 1-4. . . . . . . . . . . . . . . . . . . . . . . . .

1.3 Environment and Applications 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 Designing Digital Controllers 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.1 Process Characteristics and Control 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.2 Identifying Process Characteristics 2-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.3 Feedforward Control 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.4 Multi-Loop Controls 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.5 Structure and Mode of Operation of the Standard Controller 2-12. . . . . . . . . . .

2.6 Signal Flow Diagrams 2-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3 Configuring and Starting the Standard Controller 3-1. . . . . . . . . . . . . . . . . . . . . . . . . .

3.1 Defining the Control Task 3-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.2 Configuring a Project (Checklist) 3-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.3 Assigning Parameters for the Standard Controller 3-10. . . . . . . . . . . . . . . . . . . .

3.4 The Sampling Time CYCLE 3-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.5 How the Standard Controller is Called 3-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.6 Range of Values and Signal Adaptation (Normalization) 3-19. . . . . . . . . . . . . . .

4 Signal Processing in the Setpoint/Process Variable Channels and PID Controller Functions 4-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.1 Signal Processing in the Setpoint Branch 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Setpoint Generator (SP_GEN) 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Ramp Soak (RMP_SOAK) 4-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.3 Normalization of the External Setpoint (SP_NORM) 4-12. . . . . . . . . . . . . . . . . . 4.1.4 FC Call in the Setpoint Branch (SPFC) 4-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.5 Limiting the Rate of Change of the Setpoint (SP_ROC) 4-16. . . . . . . . . . . . . . . 4.1.6 Limiting the Absolute Value of the Setpoint (SP_LIMIT) 4-18. . . . . . . . . . . . . . . 4.1.7 Setpoint Adjustment Using the Configuration Tool 4-20. . . . . . . . . . . . . . . . . . . .

Page 8: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

viiiStandard Controller

C79000-G7076-C195-02

4.2 Signal Processing in the Process Variable Branch 4-21. . . . . . . . . . . . . . . . . . . . 4.2.1 Entering the Process Variable in the Peripheral Format (CRP_IN) 4-21. . . . . . 4.2.2 Normalizing the Process Variable Input in the Floating Point Format

(PV_NORM) 4-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 Damping the Process Variable (LAG1ST) 4-24. . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.4 Extracting the Square Root (SQRT) 4-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.5 FC Call in the Process Variable Branch (PVFC) 4-29. . . . . . . . . . . . . . . . . . . . . . 4.2.6 Monitoring the Process Variable Limits (PV_ALARM) 4-31. . . . . . . . . . . . . . . . . 4.2.7 Monitoring the Rate of Change of the Process Variable

(ROCALARM) 4-33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.8 Changing the Manipulated Variable Using the Configuration Tool 4-35. . . . . . .

4.3 Processing the Error Signal 4-36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Filtering the Signal with DEADBAND Function 4-36. . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Monitoring the Error Signal Limit Values (ER_ALARM) 4-38. . . . . . . . . . . . . . . .

4.4 The PID Controller Functions 4-40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.5 Signal Processing in the PID Controller Algorithm 4-47. . . . . . . . . . . . . . . . . . . . 4.5.1 Integrator (INT) 4-47. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.2 Derivative Unit (DIF) 4-50. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5 The Continuous Controller (PID_C) 5-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5.1 Control Functions of the Continuous PID Controller 5-2. . . . . . . . . . . . . . . . . . .

5.2 Processing the Manipulated Variable Signal 5-3. . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Modes affecting the Manipulated Variable Signal 5-3. . . . . . . . . . . . . . . . . . . . . 5.2.2 Manual Value Generator (MAN_GEN) 5-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.3 FC Call in the Manipulated Variable Branch (LMNFC) 5-7. . . . . . . . . . . . . . . . . 5.2.4 Limiting the Rate of Change of the Manipulated Value (LMN_ROC) 5-9. . . . . 5.2.5 Limiting the Absolute Value of the Manipulated Variable (LMNLIMIT) 5-11. . . . 5.2.6 Normalization of the Manipulated Variable to the Format of a

Physical Variable (LMN_NORM) 5-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.7 Manipulated Value Output in the Peripheral Format (CRP_OUT) 5-15. . . . . . . 5.2.8 Influencing the Manipulated Value With the Configuration Tool 5-16. . . . . . . . .

5.3 Continuous Controller in Cascade Control 5-17. . . . . . . . . . . . . . . . . . . . . . . . . . .

5.4 Pulse Generator (PULSEGEN) 5-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6 The Step Controller (PID_S) 6-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.1 Control Functions of the PID Step Controller 6-2. . . . . . . . . . . . . . . . . . . . . . . . .

6.2 Manipulated Variable Processing on the Step Controller With Position Feedback Signal 6-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.2.1 Modes of the Step Controller 6-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.2 Influencing the Manipulated Variable With the Configuration Tool 6-7. . . . . . . 6.2.3 Limiting the Absolute Value of the Manipulated Variable

(LMNLIMIT) 6-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.4 Processing the Position Feedback Signal (LMNR) 6-10. . . . . . . . . . . . . . . . . . . . 6.2.5 Generating the Actuating Signals (QLMNUP/QLMNDN) 6-13. . . . . . . . . . . . . . .

6.3 Manipulated Variable Processing on the Step Controller Without Position Feedback Signal 6-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.4 Step Controllers in Cascade Controls 6-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contents

Page 9: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

ixStandard ControllerC79000-G7076-C195-02

7 The Loop Scheduler and Examples of Controller Configurations 7-1. . . . . . . . . . . .

7.1 The Loop Scheduler (LP_SCHED) 7-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.2 APP_1: Step Controller (Fixed Setpoint Controller) With Process Simulation 7-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.3 APP_2: Continuous Controller With Process Simulation 7-13. . . . . . . . . . . . . . .

7.4 APP_3: Multi-Loop Ratio Control 7-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.5 APP_4: Blending Control 7-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.6 APP_5: Cascade Control 7-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8 Technical Data and Block Diagrams 8-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8.1 Technical Data: Function Blocks 8-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8.2 Block Diagrams of the Standard Controller 8-4. . . . . . . . . . . . . . . . . . . . . . . . . .

9 Parameter Lists of the Standard Controller 9-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9.1 Parameters of the PID_C Function Block 9-2. . . . . . . . . . . . . . . . . . . . . . . . . . . .

9.2 Parameters of the PID_S Function Block 9-9. . . . . . . . . . . . . . . . . . . . . . . . . . .

9.3 Parameters of the PULSEGEN Function Block 9-17. . . . . . . . . . . . . . . . . . . . . . .

9.4 Parameter of the LP_SCHED Function 9-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Configuration Standard Controller10 Configuration Tool - Product Overview 10-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10.1 Purpose of the Configuration Tool 10-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10.2 Functions 10-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10.3 Program and Data Structure 10-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11 Working with the Configuration Tool 11-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.1 Preparations 11-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.2 General Operating Instructions 11-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.3 Configuring and Assigning Parameters 11-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.4 Curve Recorder 11-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.5 Loop Monitor 11-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.6 Process Identification 11-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.7 Final Jobs 11-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

AppendixA References A-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Glossary Glossary-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Index Index-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contents

Page 10: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

xStandard Controller

C79000-G7076-C195-02

1-1 Overview of the Functions of the “Continuous Controller” Software Block 1-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1-2 Contents of the “Standard Controller” Software Package 1-4. . . . . . . . . . . . . . 1-3 Environment of the “Standard Controller S7-300”

Software Package 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Step Response of a Self-Regulating Process (first order) 2-3. . . . . . . . . . . . . . 2-2 Step Response of a Self-Regulating Process with Dead Time 2-4. . . . . . . . . . 2-3 Step Response of a Non Self-Regulating Process (I Process) 2-5. . . . . . . . . . 2-4 Compensating a Disturbance Affecting Process Input

(signal names of the standard controller) 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Ratio Control with Two Loops (APP_3) 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 Blending Control for Three Components (APP_4) 2-10. . . . . . . . . . . . . . . . . . . . 2-7 Two-Loop Cascade Control (APP_5) 2-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 Sampling Controller of the Standard controller in the

Closed Loop 2-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Sequence of Functions of the Standard Controller

(continuous controller) 2-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Manipulated Variable Branch of the Step Controller with

Position Feedback Signal 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Manipulated Value Branch of the Step Controller without

Position Feedback Signal 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Signal Flow Diagram of Setpoint Processing 2-18. . . . . . . . . . . . . . . . . . . . . . . . . 2-13 Signal Flow Diagram of the Process Variable and

Error Signal Processing 2-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 Signal Flow Diagram of the Control Function 2-21. . . . . . . . . . . . . . . . . . . . . . . . 2-15 Signal Flow Diagram of Actuating Signal Generation with the

Continuous Controller 2-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16 Signal Flow Diagram of Actuating Signal Generation on the

Step Controller with Position Feedback Signal (LMNR_ON = TRUE) 2-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-17 Block Diagram of Manipulated Variable Generation on the Step Controller without Position Feedback Signal (LMNR_ON = FALSE) 2-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-1 Types of Process that can be Controlled with the Standard Controller 3-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-2 Connecting the Process Signals to the Standard Controller 3-3. . . . . . . . . . . . 3-3 Actuating Signal Outputs of the the Standard Controller 3-5. . . . . . . . . . . . . . . 3-4 Configuration of the Setpoint Branch of the Standard Controller

(checklist points 4 and 5) 3-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 Configuration of the Process Variable and Error Signal Branch

of the Standard Controller (checklist points 6, 7 and 8) 3-11. . . . . . . . . . . . . . . . 3-6 Configuration of the Manipulated Value Branch

(checklist point 8) 3-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 Configuration of the Controller Functions PID_C and PID_S

(checklist point 9) 3-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 Determining the Equivalent System Time Constant TE 3-15. . . . . . . . . . . . . . . . 3-9 Connecting the Start-Up Blocks with the Sample APP_1 3-17. . . . . . . . . . . . . . 3-10 Calling a Controller with the Loop Scheduler LP_SCHED 3-18. . . . . . . . . . . . . . 3-11 Example of the Adaptation of the Temperature

Range –20 to +85_ C Converted to 0.0 to 100.0 % 3-20. . . . . . . . . . . . . . . . . . . 4-1 Changing the Setpoint by Setting “SPUP” 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . .

Figures

Contents

Page 11: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

xiStandard ControllerC79000-G7076-C195-02

4-2 Functions and Parameters of the Setpoint Generator 4-3. . . . . . . . . . . . . . . . . 4-3 Ramp Soak with Seven Coordinates (0 to 6) 4-4. . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Counting the Coordinates and Time Slices 4-5. . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 Influencing the Ramp Soak with the Default Signal DFRMP_ON 4-7. . . . . . . 4-6 The Effect of the Hold Signal RMP_HOLD on the Ramp Soak 4-8. . . . . . . . . . 4-7 How the RMP_HOLD Hold Signal and the CONT_ON

Continue Signal Affect the Ramp Soak 4-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Functions and Parameters of the Ramp Soak 4-10. . . . . . . . . . . . . . . . . . . . . . . . 4-9 Functions and Parameters for Normalizing the

External Setpoint 4-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10 Calling an FC in the Setpoint Branch 4-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 Limiting the Rate of Change of the Setpoint SP(t) 4-16. . . . . . . . . . . . . . . . . . . . 4-12 Functions and Parameters for Limiting the Rate of

Setpoint Change 4-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Limits for the Absolute Values of the Setpoint SP (t) 4-18. . . . . . . . . . . . . . . . . . 4-14 Functions and Parameters of the Absolute Value Limits

of the Setpoint 4-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Intervention in the Setpoint Branch Using the Configuration Tool 4-20. . . . . . . 4-16 Functions and Parameters for Normalizing Physical

Process Variables 4-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17 Functions and Parameters of the Absolute Value Limitation

of the Setpoint 4-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18 Functions and Parameters for Extracting the Square Root

of the Process Variable Signals 4-28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 Calling an FC Block in the Process Variable Branch 4-30. . . . . . . . . . . . . . . . . . 4-20 Process Variable PV – Monitoring the Limit Values 4-31. . . . . . . . . . . . . . . . . . . 4-21 Functions and Parameters of the Process Variable

Limit Value Monitoring 4-32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 Monitoring the Rate of Change (Slope) of the Process

Variable PV(t) 4-33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23 Functions and Parameters of the Rate of Change Monitoring

of the Process Variable PV(t) 4-34. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 Intervening in the Process Variable Branch Using an

Operator Panel 4-35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25 Filtering Noise Affecting the Error Signal ER using a

DEADBAND 4-36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26 Functions and Parameters of the DEADBAND Function in the

Error Signal Channel 4-37. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27 Monitoring the Limit Values of the Error Signal ER 4-38. . . . . . . . . . . . . . . . . . . . 4-28 Functions and Parameters of the Error Difference ER

Limit Value Monitoring 4-39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29 Control Algorithm of the Standard Controller (Parallel Structure) 4-40. . . . . . . . 4-30 Control Algorithm with the P and D Actions in the

Feedback Path 4-41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31 P Controller with Operating Point Setting 4-42. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32 Step Response of the P Controller 4-42. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33 Step Response of the PI Controller 4-43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34 PI Controller with Smooth Switchover: Manual → Automatic 4-43. . . . . . . . . . . 4-35 Step Response of the PD Controller 4-44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36 Step Response of the PID Controller 4-45. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-37 Modes of the Integrator in the PI/PID Controller 4-49. . . . . . . . . . . . . . . . . . . . . . 4-38 Functions and Parameters of the Integrator 4-49. . . . . . . . . . . . . . . . . . . . . . . . . .

Contents

Page 12: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

xiiStandard Controller

C79000-G7076-C195-02

4-39 Functions and Parameters of the Derivative Unit 4-51. . . . . . . . . . . . . . . . . . . . . 5-1 Block Diagram of the Controller with Continuous Actuating Signal

(“Standard Controller” Software Package) 5-2. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Manual Value Generation with the Standard Controller 5-3. . . . . . . . . . . . . . . . 5-3 Changing the Manipulated Variable by Setting “MANUP” 5-5. . . . . . . . . . . . . . 5-4 Functions and Parameters of the Manual Manipulated

Value Generator 5-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 Calling an FC in the Manipulated Variable Branch 5-8. . . . . . . . . . . . . . . . . . . . 5-6 Limitation of the Rate of Change of the Manipulated

Variable LMN(t) 5-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 Functions and Parameters of the Manipulated Value Rate

of Change Limits 5-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 Absolute Value Limits of the Manipulated Variable

LMN(t) = OUTV (t) 5-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Functions and Parameters of the Absolute Value Limits of the

Manipulated Variable 5-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Functions and Parameters for Manipulated Value Normalization

to a Physical Value 5-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 Functions and Parameters of Manipulated Variable Conversion

to the Peripheral Format 5-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Intervening in the Manipulated Variable Branch From an

Operator Panel 5-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13 Two-Loop Cascade Control System 5-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 Connecting a Cascade With Two Slave Control Loops 5-18. . . . . . . . . . . . . . . . 5-15 Pulse Duration Modulation 5-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Synchronization of the Start of the Period 5-21. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17 How the Pulse Output Switches On and Off 5-22. . . . . . . . . . . . . . . . . . . . . . . . . 5-18 Symmetrical Curve of the Three-Step Controller

(Ratio Factor = 1) 5-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19 Asymmetrical Curve of the Three-Step Controller

(Ratio Factor = 0.5) 5-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 Two-Step Controller With Bipolar Range (–100% to 100%) 5-25. . . . . . . . . . . . 5-21 Two-Step Controller With a Monopolar Range (0% to 100%) 5-25. . . . . . . . . . . 5-22 Functions and Parameters of the Pulse Generator 5-26. . . . . . . . . . . . . . . . . . . . 6-1 Functions of the Step Controller With a Position Algorithm 6-2. . . . . . . . . . . . . 6-2 Functions of the Step Controller Without Position Feedback

Signal 6-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 Step Controller With Position Feedback Signal 6-4. . . . . . . . . . . . . . . . . . . . . . . 6-4 Modes and Generating Manual Values on the Step Controller

With a Position Feedback Signal 6-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 Interventions in the Manipulated Variable Branch Using an

Operator Panel (OP) 6-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6 Absolute Value Limits of the Manipulated Variable

LMN(t) = OUTV (t) 6-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7 Functions and Parameters of the Absolute Value Limitation

of the Manipulated Value 6-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Processing the Position Feedback Signal With the

Step Controller 6-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Functions and Parameters of the Peripheral Value Conversion

for the Position Feedback Signal 6-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10 Generating the Binary Actuating Signal on the Step Controller

With Position Feedback Signal 6-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contents

Page 13: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

xiiiStandard ControllerC79000-G7076-C195-02

6-11 Functions of the Three-Step Element THREE_ST 6-14. . . . . . . . . . . . . . . . . . . . 6-12 Functions of the Pulse Generator PULSEOUT 6-15. . . . . . . . . . . . . . . . . . . . . . . 6-13 Functions and Parameters for Generating Actuating Signals

on the Step Controller 6-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14 Step Controller Without Position Feedback Signal 6-16. . . . . . . . . . . . . . . . . . . . 6-15 Manual Mode With the Step Controller Without

Position Feedback Signal 6-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16 Generating the Binary Actuating Signal on the Step Controller

Without Position Feedback Signal 6-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17 Functions of the Three-Step Element THREE_ST 6-19. . . . . . . . . . . . . . . . . . . . 6-18 Simulation of the Position Feedback Signal 6-20. . . . . . . . . . . . . . . . . . . . . . . . . . 6-19 Functions and Parameters for Generating Actuating Signals

on the Step Controller Without Position Feedback Signal 6-21. . . . . . . . . . . . . . 6-20 Two-Loop Cascade Control With a Step Controller 6-22. . . . . . . . . . . . . . . . . . . 6-21 Connecting a Cascade With Two Secondary Control Loops

and a Step Controller 6-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 Principle of the Controller Call Using the Loop Scheduler

LP_SCHED 7-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Call Sequence of Four Loops Called at Different Intervals 7-5. . . . . . . . . . . . . 7-3 Block Diagram and Parameters of the LP_SCHED Function 7-6. . . . . . . . . . . 7-4 Example APP_1, Control Loop 7-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Structure and Parameters of the Process Block PROC_S 7-8. . . . . . . . . . . . . 7-6 Blocks for Example 1: Connection and Call 7-9. . . . . . . . . . . . . . . . . . . . . . . . . . 7-7 FC100 (APP_1), Connections and Call 7-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8 Functions and Parameters of the PROC_S Process Model 7-11. . . . . . . . . . . . 7-9 Control Loop With Step Controller Following a Step Change

in the Setpoint 7-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10 Example APP_2, Control Loop 7-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11 Structure and Parameters of the Process Block PROC_C 7-14. . . . . . . . . . . . . 7-12 Blocks of Example 2: Connection and Call 7-15. . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13 Connecting and Calling FC100 (APP_2) 7-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14 Functions and Parameters of the Process Model PROC_C 7-17. . . . . . . . . . . . 7-15 Controlling With a Continuous Controller and Setpoint

Step Changes Over the Entire Measuring Range 7-18. . . . . . . . . . . . . . . . . . . . . 7-16 Ratio Control With Two Loops (APP_3) 7-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 Blocks for Example 3: Connection and Call 7-20. . . . . . . . . . . . . . . . . . . . . . . . . . 7-18 Circuit Diagram and Parameters for the FC Block APP_3 7-21. . . . . . . . . . . . . 7-19 Blending Control for Three Components (APP_4) 7-22. . . . . . . . . . . . . . . . . . . . 7-20 Blocks for Example 4: Connection and Call 7-23. . . . . . . . . . . . . . . . . . . . . . . . . . 7-21 Block Diagram and Parameters of the FC Block APP_4 7-24. . . . . . . . . . . . . . . 7-22 Two-Loop Cascade Control System (APP_5) 7-25. . . . . . . . . . . . . . . . . . . . . . . . 7-23 Blocks of Example 4: Connection and Call 7-26. . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24 Block Diagram and Parameters of the FC Block APP_5 7-27. . . . . . . . . . . . . . . 8-1 Block Diagram of the Continuous Controller: PID_C 8-6. . . . . . . . . . . . . . . . . . 8-2 Block Diagram of the Step Controller: PID_S

(with position feedback signal “LMNR = TRUE”) 8-8. . . . . . . . . . . . . . . . . . . . . . 8-3 Block Diagram of the Step Controller: PID_S

(without position feedback signal “LMNR = FALSE”) 8-10. . . . . . . . . . . . . . . . . . 9-1 LP_SCHED Function 9-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1 Program Structure 10-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Data Structure 10-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1 Open Control Loop 11-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contents

Page 14: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

xivStandard Controller

C79000-G7076-C195-02

11-2 Closed Control Loop 11-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 Transfer Function of a Self-Regulating Third Order Process Glossary-10. . . . .

3-1 Manipulated Variable, Type of Control and Required Controller Blocks 3-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4-1 Modes of the Ramp Soak (RMP_SOAK) 4-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Shared Data Block (DB_NBR) with the Start Point and

Four Time Slices Assigned 4-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Selecting the Controller Structure 4-41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 Modes of the Continuous Controller 5-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 Modes of the Step Controller 6-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Modes of the Step Controller Without Position Feedback Signal 6-18. . . . . . . . 7-1 Shared Data Block ”DB_LOOP” for the Controller Call 7-3. . . . . . . . . . . . . . . 7-2 Blocks for Example 1 7-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Parameters of the Process Block ”PROC_S” (DB100: FB100) 7-9. . . . . . . . . 7-4 Blocks for Example 2 7-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Parameters of the Process Block ”PROC_C” (DB100: FB100) 7-15. . . . . . . . . 7-6 Blocks for Example 3 7-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7 Blocks for Example 4 7-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8 Blocks of Example 5 7-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 Input Parameters of PID_C (continuous controller) 9-2. . . . . . . . . . . . . . . . . . . 9-2 Output Parameters of PID_C (continuous controller) 9-3. . . . . . . . . . . . . . . . . . 9-3 Static Local Data of PID_C (inputs) 9-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4 Static Local Data of PID_C (outputs) 9-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Static Local Data used by the Configuration Tool PID_C 9-8. . . . . . . . . . . . . . . 9-6 Input Parameters of PID_S (step controller) 9-9. . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Output Parameters of PID_S (step controller) 9-10. . . . . . . . . . . . . . . . . . . . . . . . 9-8 Static Local Data of PID_S (inputs) 9-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9 Static Local Data of PID_S (outputs) 9-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10 Static Local Data used by the Configuration Tool

(step controller PID_S) 9-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11 RMP_SOAK Function (PID_C and PID_S): Shared Data Block

(DB_NBR), with Default of Start Point and Four Time Slices 9-16. . . . . . . . . . . 9-12 Input Parameters of PULSEGEN 9-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13 Output Parameters of PULSEGEN 9-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14 Input Parameters of LP_SCHED 9-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15 Global Data Area “DB_NBR” 9-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1 Criteria for PI and PID Controllers 11-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Tables

Contents

Page 15: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1-1Standard ControllerC79000-G7076-C195-02

Standard Controller Product Overview

This chapter describes the following:

� The concept of the standard controller

� The software packages of the standard controller

� The environment in which you can use the controller and its applications

What Does thisChapter Describe?

1

Page 16: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1

1-2Standard Controller

C79000-G7076-C195-02

1.1 The Product “Standard Controller”

The Standard Controller software product essentially consists of twofunction blocks (FBs) containing the algorithms for creating the control andsignal processing functions for a continuous or step controller. This istherefore purely a software controller in which the standard function blocksimplement all the functions of the controller.

The response of the controller itself and the characteristics of the functions inthe measuring channel and control channel are implemented or simulated bythe numeric algorithms of the function block. The data required for thesecyclic calculations are located in data blocks for each specific control loop.An FB is only required once even if you want to create several controllers.

Each controller is represented by an instance DB which is created for theparticular application. When using the Configuration Standard Controllertool, the DB is created implicitly. This means that designing a specificcontroller is restricted to specifying the structure and the values of theparameters in the dialogs of the user interface software. The configurationtool creates the instance DB.

The algorithms for a particular controller are calculated in the processor ofthe S7 programmable logic controller (PLC) at the selected sampling times.The results of the calculations, in other words, the updated values of the inputand output variables (measured variable and manipulated variable) and statusmessages (limit values) are saved in the instance DB or transferred to theprocess peripherals.

When operating a large number of control loops, it is usually the case thatsome loops must be processed more often than others although each loopitself must be processed at equidistant intervals. For this situation, there is aloop scheduler (LP_SCHED) available with which extensive plant controlsystems can be configured clearly and simply. This also ensures that the loadon the CPU is spread out.

In many control tasks, the classic PID controller that influences the process isnot the sole important element but great demands are also made on signalprocessing.

A controller created with the Standard Controller software package thereforeconsists of a series of subfunctions for which you can select parameter valuesseparately. In addition to the actual controller with the PID algorithm,functions are also available for processing the setpoint and process variableand for adapting the calculated manipulated variable.

The package also includes display and monitoring functions (not illustratedin the schematic overview of the functions).

Concept of theStandardController

Overview of theBasic Functions

Standard Controller Product Overview

Page 17: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1

1-3Standard ControllerC79000-G7076-C195-02

Setpoint

Error signal PID algorithm

SP

PV

Manual value

Manipulatedvalue

MAN

LMN

Process variable

Figure 1-1 Overview of the Functions of the “Continuous Controller” Software Block

Using the Standard Controller S7-300/400 software package, you canconfigure a controller for a particular control task. You can configure thecontroller with a restricted range of functions. Using so-called structureswitches, you can activate or deactivate subfunctions or disable entirebranches. Once you have reduced the structure, you then only need to selectparameter values for the remaining functions.

All the phases in the creation of a controller, such as structuring thecontroller, assigning parameters, and calling the controller in the systemprogram can be achieved largely without programming. Knowledge ofSTEP 7 is necessary.

The structure of the instance DB is explained in Chapter 9 of this manual. Aline is reserved for each structure or parameter value. By editing the entries,you can specify both the structure and the required characteristics of thecontroller.

This method is, however, complicated and is not recommended. Theconfiguration tool designed specially for the standard controller simplifiesthis job considerably.

Note

The configuration tool cannot be used for assigning parameters to thePULSEGEN and LP_SCHED blocks. The functions of these blocks can onlybe defined by entries in the corresponding data blocks.

Creating theController

Standard Controller Product Overview

Page 18: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1

1-4Standard Controller

C79000-G7076-C195-02

1.2 The “Standard Controller” Software Product

The diskettes of the Standard Controller package contain five workingexamples, three standard function blocks (SFBs) as well as one standardfunction (SFC) and a database for important application configurations.

Standard FB

”PID_C”

Instance DB

Standard FB

”PID_S”

Instance DB

Standard FB

”PULSEGEN”

Instance DB

APP_1Example

(fixed setpointcontroller withdiscontinuous

APP_2Example

APP_3Example

APP_4Example

APP_5Example

(multi–loop (blending (cascadecontroller)ratio controller)

Standard FC

”LP_SCHED”

Shared DB

Setup On-line help

output)

(fixed setpointcontroller withcontinuousoutput)

controller)

Figure 1-2 Contents of the “Standard Controller” Software Package

� The PID_C standard function block contains all the control functions of acontinuous PID controller.

� The PID_S standard function block contains all the control functions of aPID controller with a three-step output.

� The PULSEGEN standard function block for pulse duration modulationof analog actuating signals is used in conjunction with the PID_Cstandard function block to create a controller with a pulse output forproportional actuators.

� The LP_SCHED schedules the controller calls in a cyclic interruptpriority class in applications requiring a lot of control loops. The block isalso responsible for initializing the controller structure when the CPU orPLC is started up.

The software package also contains a setup program for installing theStandard Controller on a programming device or personal computer and anon-line help system that provides information about subfunctions andparameters while working with the package.

Structure of theStandardController Product

Standard Controller Product Overview

Page 19: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1

1-5Standard ControllerC79000-G7076-C195-02

The Standard Controller package also contains five data structures (instanceDBs) for the most commonly used controller types and for the mostimportant multi-loop controllers.

These sample structures (APP_1 to APP_5) are complete and ready foroperation and you can use them if creating a new controller from the verystart would be too time consuming or if you want to avoid errors creatingconnected controller structures.

The following sample structures are available:

Name Functions Comment

APP_1 Fixed setpoint controller withdiscontinuous output – forintegrating actuators (for examplemotor drives)

PID step controller with three-stepaction

APP_2 Fixed setpoint controller withcontinuous output – forproportional actuators

Analog PID controller

APP_3 Multi-loop ratio controller The ratio between two processvariables is kept constant

APP_4 Blending controller Components to be mixed are keptto a constant percentage and thetotal amount is controlled

APP_5 Cascade controller Improvement of the controllerperformance by including processvariables in secondary controlloops

The functions of the Configuration Standard Controller software package aredescribed in Chapter 10 of this manual.

PreconfiguredApplicationStructures

“Configuration ofthe StandardController”

Standard Controller Product Overview

Page 20: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1

1-6Standard Controller

C79000-G7076-C195-02

1.3 Environment and Applications

The controllers created with the Standard Controller S7-300/400 softwarepackage can be run on the target systems (CPU with floating point and cyclicinterrupt) of the S7-300 and S7-400 family.

PG/PC OS/OP

CPU

LAN bus

CP

S7-300

MPI

OperationMonitoring

ConfigurationParameter assignmentTestingCommissioning

STEP 7(S7 TOP)

Figure 1-3 Environment of the “Standard Controller S7-300/400” Software Package

The Standard Controller S7-300/400 software package is intended for use inthe STEP 7 program group.

Apart from STEP 7, the following software is also required:

– Microsoft� Windows� 95

The configuration software for standard controllers can be installed locallyon a programming device or personal computer or on a central network drivein a network.

HardwareEnvironment

SoftwareEnvironment

Standard Controller Product Overview

Page 21: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1

1-7Standard ControllerC79000-G7076-C195-02

Since the digital implementation of controller functions always involvesoperations with complicated calculations (word-oriented processing), it isimportant to have an idea of the load on the CPU right from the beginning.The following guidelines will help:

� Size of a function block(PID_C or PID_S): � 6 Kbytes

� Data per controller � 0.5 Kbytes

� Basic data about the minimum run times (processing times) of a PIDcontroller are listed in Section 8.1 (Technical Data).

� The amount of user memory required and therefore the number of controlloops that can theoretically be installed with the available memory (at50% utilization of the working memory by controller tasks) is listed in thetechnical data (see Section 8.1) .

� There are no memory requirements for an L stack.

� Interrupts are not delayed by processing the controller FB.

If a lot of controllers or controllers with large sampling times have to becalled, the cyclic interrupt priority class is inadequate to deal with the manycalls required. The loop scheduler (LP_SCHED) can then be used in onecyclic interrupt priority class to call several controllers each at equidistantintervals.

The tasks of the loop scheduler are as follows:

� Controlling the calls of the individual controllers within a cyclic interruptpriority class.

� Calling the installed standard controllers when the CPU is first started up.

The control function implemented by processing an FB can basically be usedfor any application. The control performance and the speed in which actualcontrol loops are processed only depends on the performance of the CPUbeing used.

With any given CPU, a compromise must be made between the number ofcontrollers and the frequency at which the individual controllers have to beprocessed. The faster the control loops have to be processed, in other wordsthe more often the manipulated variables must be calculated per unit of time,the less the number of controllers that can be installed.

The standard function blocks PID_C and PID_S allow you to generate andoperate software controllers based on the conventional PID algorithm of thestandard controller. Special functions in terms of handling process signals onthe controller are not included.

There are no restrictions to the type of process that can be controlled. Bothslow processes (temperatures, tank levels) and very fast processes (flow rate,motor speed) can be controlled.

The SystemFramework

Loop Scheduler

PossibleApplications andLimitations of theStandardController

Standard Controller Product Overview

Page 22: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

1

1-8Standard Controller

C79000-G7076-C195-02

Types of control that can be implemented with the standard controller:

� Fixed setpoint control with P, PI, PD, PID controller

� Fixed setpoint control with continuous P, PI, PD, PID controller

� Fixed setpoint control with feedforward control

� Cascade control (step controller only in secondary loop)

� Ratio control (two loops)

� Blending control.

By configuring the functions contained in the “Standard Controller” product,you can create controllers with the following characteristics and modes:

� Adjustment of the setpoint by a ramp soak

� Limitation of the rate of change of the reference input and (withcontrollers with a continuous output) of the manipulated variable

� Limitation of the absolute values of the reference input and (withcontrollers with a continuous output) of the manipulated variable

� Suppression of noise in the process variable or setpoint branch by filteringthe error signal

� Suppression of high frequency oscillations in the process variable branchby delaying the process variable signal

� Linearization of quadratic functions of the process variable (flow controlwith differential pressure sensors)

� Possibility of calling your own functions in the setpoint, process variableand/or manipulated variable branch

� Manual mode (controlling the manipulated variable from a programmingdevice or OP/OS)

� Monitoring two upper and two lower limits for the process variable and/orerror signal

� Monitoring of the rate of change of the process variable

� The option of including a P and D action in the feedback path of thecontroller

Range ofFunctions of theStandardController

Standard Controller Product Overview

Page 23: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2-1Standard ControllerC79000-G7076-C195-02

Designing Digital Controllers

This chapter describes the following:

� The process characteristics and their general influence on controlfunctions

� The identification of the process characteristics

� Feedforward control

� Multi-loop controllers

� The structure of the standard controller and how it works

� Signal flow diagrams

What Does thisChapter Describe?

2

Page 24: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-2Standard Controller

C79000-G7076-C195-02

2.1 Process Characteristics and Control

The static behavior (gain) and the dynamic characteristics (time lag, deadtime, reset times etc.) of the process to be controlled have a significantinfluence on the type and time response of the signal processing in thecontroller responsible for keeping the process stable or changing the processaccording to a selected time schedule.

The process has a special significance among the components of the controlloop. Its characteristics are fixed either by physical laws or by the machinerybeing used and can hardly be influenced. A good control result is thereforeonly possible by selecting the controller type best suited to the particularprocess and by adapting the controller to the time response of the process.

Precise knowledge of the type and characteristic data of the process to becontrolled is indispensable for structuring and designing the controller andfor selecting the dimensions of its static (P mode) and dynamic (I and Dmodes) parameters.

To design the controller, you require exact data from the process that youobtain by means of a transfer function following a step change in thesetpoint. The (graphical) analysis of this (time) function allows you to drawconclusions about the selection of the most suitable controller function andthe dimensions of the controller parameters to be set.

The configuration tool supports you to a large extent during the phase ofprocess analysis.

Before describing the use of the Configuration Standard Controller tool thenext sections briefly look at the most common processes involved inautomation. You may possibly require this information to help you to decidethe best procedure for the analysis and simulation of the processcharacteristics.

ProcessCharacteristicsand the Controller

Process Analysis

Designing Digital Controllers

Page 25: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-3Standard ControllerC79000-G7076-C195-02

The following processes will be analyzed in greater detail:

� Self-regulating process

� Self-regulating process with dead time

� Process with integral action

Most processes are self-regulating, in other words, after a step change in themanipulated variable, the process (controlled) variable approaches a newsteady-state value. The time response of the system can therefore bedetermined by plotting the curve of the process variable with respect to timePV(t) after a step change in the manipulated variable LMN by a value greaterthan 1.5% of its total range.

PV

t

LMN

t

� LMN

� PV

Tg

Tu

KS =� PV� LMN

Legend:KS transfer coefficientTu time lagTg settling time

Figure 2-1 Step Response of a Self-Regulating Process (first order)

If the process response within the manipulated variable range is linear, thetransfer coefficient Ks indicates the gain of the control loop. From the ratio ofthe time lag to the settling time Tu/Tg, the controllability of the process canbe estimated. The smaller this value is, in other words the smaller the timelag relative to the settling time, the better the process can be controlled.

According to the values Tu and Tg, the time response of a process can beroughly classified as follows:

Tu < 0.2 min and Tg < 2 min � fast process

Tu > 0.5 min and Tg > 5 min � slow process

The absolute value of the settling time therefore has a direct influence on thesampling time of the controller: The higher Tg is, in other words the slowerthe process reaction, the higher the sampling time that can be selected.

Type andCharacteristics ofthe Process

Self-regulatingProcess

Designing Digital Controllers

Page 26: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-4Standard Controller

C79000-G7076-C195-02

Many processes involving transportation of materials or energy (pipes,conveyor belts etc.) have a time response similar to that shown in Figure 2-2.This includes a start-up time Ta made up of the actual dead time and the timelag of the self-regulating process. In terms of controllability of the process itis extremely important that Tt remains small relative to Tg or in other wordsthat the relationship Tt/Tg �� 1 is maintained.

LMN

t

� LMN

PV

t

� PV

Tg

Tu

Legend:Tt dead timeTu time lagTa start-up time (= Tt +Tu)Tg settling time

Tt

Ta

Figure 2-2 Step Response of a Self-Regulating Process with Dead Time

Since the controller does not receive any signal change from the transmitterduring the dead time, its interventions are obviously delayed and the controlquality is therefore reduced. When using a standard controller, such effectscan be partly eliminated by choosing a new location for the measuringsensor.

Self-RegulatingProcess with DeadTime

Designing Digital Controllers

Page 27: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-5Standard ControllerC79000-G7076-C195-02

Here, the slope of the ramp of the process variable (PV) after changing themanipulated variable by a fixed amount is inversely proportional to the valueof the integration time constant (reset time) TI.

t

LMN

t

� LMN

TI

Legend:TI reset time

� PV

� LMN

Steady-state condition

1

Figure 2-3 Step Response of a Non Self-Regulating Process (I Process)

Processes with an I component are, for example liquid level processes inwhich the level can be raised or lowered at different rates depending on theopening of the final control element. Important processes involving the Iaction are also the commonly used motor drives with which the rate ofchange of a traversing movement is directly proportional to the speed of thedrive.

If no disturbance variables occur before the I element of a process withintegral action (which is usually the case), a controller without I actionshould be used. The effects of a disturbance variable at the process input canusually be eliminated by feedforward control without using an I action in thecontroller.

Process withIntegral Action

Designing Digital Controllers

Page 28: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-6Standard Controller

C79000-G7076-C195-02

2.2 Identifying Process Characteristics

As already mentioned, the investigation and identification of a given processresponse requires two steps:

1. The recording of the transfer function of the process after a step change inthe manipulated variable.

2. The evaluation of the recorded or saved transfer function to determine asuitable controller structure and the optimum controller parameters.

During the first part, you are largely supported by the process identificationfunction of the configuration tool.

Comments in the dialog boxes provide you with background informationabout the current actions. Input boxes or output boxes are openedautomatically at certain steps in the procedure.

In the second part, the actual process identification, all you need to do isspecify the tuning mode (a periodic or with 10% overshoot) and then start theautomatic process identification by the system.

The following diagram illustrates the method ,used by the system for processidentification:

Real process

Identification

Process model

Entries about processtype and settling

Calculation and output of theoptimized controller parameters

The results of the process identification are displayed in a window. You caneither save the PI or PID parameters in the database or discard the results andrepeat the identification using different process data or different settings.

ProcessIdentification

1. Recording the Step Response

2. Acquiring the Controller Data

Designing Digital Controllers

Page 29: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-7Standard ControllerC79000-G7076-C195-02

A process identification can be done in the following modes as shown for thevarious types of processes:

DataAcquired Loop Process Process Stimulation

1. On-line Open(manual mode)

without Icomponent

Step change in manipulatedvariable:

2. On-line Closed(automatic mode)

without Icomponent

Step change in the setpoint:

3. On-line Open(manual mode)

with Icomponent

Pulse-shaped change in themanipulated variable:

4. On-line Closed(automatic mode)

with Icomponent

Pulse-shaped setpoint change:

5. Off-line Loop data fromarchive

How to use the Process Identification function of the configuration tool andthe system dialog boxes is described in more detail in Chapter 12 of thismanual.

ProcessIdentification andType of Loop

Designing Digital Controllers

Page 30: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-8Standard Controller

C79000-G7076-C195-02

2.3 Feedforward Control

Disturbance variables affecting the process must be compensated by thecontroller. Constant disturbance variables are compensated by controllerswith an I action. The control quality is not affected.

Dynamic disturbance variables, on the other hand, have a much greaterinfluence on the quality of the control. Depending on the point at which thedisturbance affects the control loop and the time constants of sections of theloop after the disturbance, error signals of differing size and duration occurthat can only be eliminated by the I action in the controller.

This effect can be avoided in situations where the disturbance variable can bemeasured. By feeding the measured disturbance variable forward to theoutput of the controller, the disturbance variable can be compensated and thecontroller reacts much faster to the disturbance variable.

The standard controller has a signal input DISV for the disturbance variable.This disturbance variable can be switched to the summation point at theoutput of the PID controller by means of a structure switch (Figure 2-4).

Controller

Programmable logic controller

Rest of loop

Process/plant

DISV

LMN–SP

PV

Disturbance

PT

(Measurement)

Figure 2-4 Compensating a Disturbance Affecting Process Input (signal names of thestandard controller)

FeedforwardControl

Designing Digital Controllers

Page 31: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-9Standard ControllerC79000-G7076-C195-02

2.4 Multi-Loop Controls

The Standard Controller product contains examples (APP_3 to APP_5, seeChapter 7) with which you can implement multi-loop controls quickly andeasily. Using such control structures always has advantages when dealingwith processes that have interdependent process variables.

The next sections describe the design of these controller structures and howthey can be used.

Whenever the relationship between two or more process variables in aprocess is more important than keeping its absolute values constant, ratiocontrol is necessary (Figure 2-5).

Programmable logic controller

Process 1(e.g. amount of air)

Process/plant

LMNSP1

PV1

Controller 1(PID_C)

Process 2(e.g. amount of fuel)

LMN

FACX SP2

PV2

-

-Controller 2(PID_C)

Figure 2-5 Ratio Control with Two Loops (APP_3)

Generally the process variables that must be maintained in a preset ratioinvolve flow rates or volumes as found in combustion processes. In Figure2-5, the amount of fuel in control loop 2 is controlled in a ratio selected withFAC to the amount of air set at SP1.

Processes withInter-dependent,Process Variables

Multi-loop RatioControls(APP_3)

Designing Digital Controllers

Page 32: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-10Standard Controller

C79000-G7076-C195-02

In a blending process, both the total amount of materials to be mixed and theratio of the components making up the total product must be kept constant.

Based on the principle of ratio control, these requirements result in a controlstructure in which the amount of each component of the mixture must becontrolled. The setpoints of the components are influenced by the fixedproportion or ratio factors (FAC) and by the manipulated variable of thecontroller responsible for the total amount (Figure 2-6).

Process 1(component 1)

QLMNUPSP1

PV1

Controller 1(PID_S)

Process 2(component 2)

Controller 2(PID_S)

FAC2

XSP2

PV2

-

-

Process 3(component 3)

SP3

PV3

Controller 3(PID_S)-

+

+

QLMNDN

FAC3

X

X

FAC1

LMNController ALL(PID_C)

SPGM

PVGM

QLMNUP

QLMNDN

QLMNUP

QLMNDN

Programmable logic controller Process/plant

Figure 2-6 Blending Control for Three Components (APP_4)

The controller structure for the blending control (APP_4) contains acontroller with a continuous output (PID_C) for controlling the total amountALL and three step controllers (PID_S) for the secondary control loops of theindividual components 1 to 3, that make up the total amount according to thefactors FAC1 to FAC3 (addition).

Blending Control(APP_4)

Designing Digital Controllers

Page 33: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-11Standard ControllerC79000-G7076-C195-02

If a process includes not only the actual process variable to be controlled butalso a secondary process variable that can be controlled separately, it isusually possible to obtain better control results than with a single loopcontrol.

The secondary process variable PV2 is controlled in a secondary control loop(Figure 2-7). This means that disturbances from this part of the system arecompensated before they can affect the quality of the primary processvariable PV1. Due to the structure, inner disturbance variables arecompensated more quickly since they do not occur in the entire control loop.The setting of the primary controller can then be made more sensitiveallowing faster and more precise control with the fixed setpoint SP.

QLMNUP

QLMNDNProcesspart 1–

LMNController 1(PID_C)

PV2

Processpart 2

SP

PV1

Programmable logic controller Process/plant

Secondary loop(follow-on control)

Primary controller

–Controller 2(PID_S)

Figure 2-7 Two-Loop Cascade Control (APP_5)

The controller structure for cascade control (APP_5) contains a controllerwith a continuous output (PID_C) for controlling the reference input(setpoint) of the secondary loop and a step controller (PID_S) to control thesecondary process variable PV2 (secondary controller).

Cascade Control(APP_5)

Designing Digital Controllers

Page 34: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-12Standard Controller

C79000-G7076-C195-02

2.5 Structure and Mode of Operation of the Standard Controller

The controllers that can be implemented with the Standard Controller arealways digital sampling controllers (DDC=direct digital control). Samplingcontrollers are time-controlled, in other words they are always processed atequidistant intervals (the sampling time or CYCLE). The sampling time orfrequency at which the controller is processed can be selected.

Figure 2-8 illustrates a simple control loop with the standard controller. Thisdiagram shows you the names of the most important variables and theabbreviations of the parameters as used in this manual.

Process

SP PV

Controlleralgorithm

Manip. valuealgorithm

Manual value(MAN)

Disturbance

Setpoint

Actuator

Error signal (ER)

Process variable

Function block: PID_C orPID_S, sampling time: CYCLE

DISV

Comparator

= Interfaces to process

LMNManipulatedvariable

Figure 2-8 Sampling Controller of the Standard controller in the Closed Loop

The control functions implemented in the function blocks PID_C and PID_Sare pure software controllers. The input and output values of the controllersare processed using digital algorithms on a CPU.

Since the processing of the controller blocks in the processor of the CPU isserial, input values can only be acquired at discrete times and the outputvalues can only be output at defined times. This is the main characteristic ofsampling control.

Sampling Control

Designing Digital Controllers

Page 35: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-13Standard ControllerC79000-G7076-C195-02

The control algorithm on the processor simulates the controller underreal-time conditions. Between the sampling instants, the controller does notreact to changes in the process variable PV and the manipulated variableLMN remains unchanged.

Assuming, however, that the sampling intervals are short enough so that theseries of sampling values realistically approximates the continuous changesin the measured variable, a digital controller can be considered as quasicontinuous. With the Standard Controller, the usual methods for determiningthe structure and setting characteristic values can be used just as withcontinuous controllers.

This requirement for creating and scaling controllers with the standardcontroller package is met when the sampling time (CYCLE) is less than 20%of the time constant of the entire loop.

If this condition is met, the functions of the Standard Controller can bedescribed in the same way as those of conventional controllers. The samerange of functions and the same possibilities for monitoring control loopvariables and for tuning the controller are available.

The following diagrams illustrate the preconfigured controller structures ofthe standard controller as block diagrams.. Figure 2-9 represents thecontinuous controller with the signal processing branches for the processvariable and setpoint, the controller and the manipulated variable branch.You can see which functions must be implemented after the signalconditioning at the input and which are not required.

The range of functions of the Standard Controller is rigid, but can beextended by a user-defined function (FC) in each of the signal processingbranches.

Figures 2-10 and 2-11 represent the manipulated value generation with thestep controller in the versions with and without position feedback. Thismakes clear that in the absence of position feedback, a quasiposition-proportional feedback signal is generated from the “on” times of thebinary outputs.

– You will find detailed descriptions of the functions in Chapters 4 to7of the manual. Background and context-specific information is alsoavailable in the on-line help system.

– The structure diagrams in the following section contain details withparameter names and structure or mode switches (see Section 2.6).

– You will find a detailed illustration of the entire signal flow in thecontinuous controller and in the step controller in the block diagramsin Section 8.2.

Control Algorithmand ConventionalControl

The Functions ofthe “StandardController”

Designing Digital Controllers

Page 36: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-14Standard Controller

C79000-G7076-C195-02

Manipulatedvalue limits

Process variablenormalization

Process variableinput

Peripheral input

Time lag

Square rootextraction

User function (FC)

Process variablemonitoring

Process variable rate ofchange monitoring

PV SP

Setpointgenerator

Setpoint input External setpoint

Setpointnormalization

Ramp soak

User function (FC)

Rate of changelimits

Setpoint limits

Dead band

PID controller

Error signal monitoring

Manual valuegenerator

Manual input

User function (FC)

Rate of changelimits

ER

LMN

Manipulated valuenormalization

Manipulated value output [%]

Formatconversion

Peripheral output

Figure 2-9 Sequence of Functions of the Standard Controller (continuous controller)

Designing Digital Controllers

Page 37: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-15Standard ControllerC79000-G7076-C195-02

Manipulatedvalue limits

PV SP

PID controllerManual valuegenerator

Manual input

Three-stepelement

LMN

down

Position feedbacksignal normalization

Position feedbackfrom I/Os

Pulse generator

up

LMNR

Position feedbacksignal

Manual input: binary–

Figure 2-10 Manipulated Variable Branch of the Step Controller with Position Feedback Signal

PV SP

PID controller

Three-stepelement

ER

down

Pulse generator

up

Inputcomponent

Manual input: binary

Integrator

Actuatingsignalfeedback

Figure 2-11 Manipulated Value Branch of the Step Controller without Position Feedback Signal

Designing Digital Controllers

Page 38: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-16Standard Controller

C79000-G7076-C195-02

2.6 Signal Flow Diagrams

The following diagrams are overviews of the functions of the standardcontroller. The number of software switches with which you can select thefunctions you require is particularly clear to see.

Analogous to the representation of the switches in the configuration tool, theblack dot in the switch symbols indicates that the switching symbol has theBoolean value (0=FALSE or 1=TRUE) next to the switch and that the signalpath is switched via this dot. The switching signals (binary signals) areindicated by broken lines.

In the diagrams, the subfunctions are represented with the default switch bitsfor the default signal paths. In the initial situation, practically all theswitching signals have the value FALSE (exceptions: P_SEL, I_SEL andMAN_ON=TRUE).

This means that the setpoint is set via SP_INT, the same applies to the inputof the process value via PV_IN. The controller function is set to a normal PIcontroller with the P function in the forward branch. The loop is open and themanipulated variable is influenced in the percentage range by the MANinput. All other functions are either passive or if they cannot be deactivated,they are assigned marginal parameter values so that they have no effect

The names of the connectable process variables are shown on a shadedbackground. This allows you to recognize where the controller structure canbe connected to the S7 I/Os or directly to the measurement components andactuators of the process.

Parameter names including “OP” (for example SP_OP/SP_OP_ON) indicatethat an intervention using the configuration tool of the standard controller ispossible at this point. The configuration tool has its own interface to thecontroller FB.

Interim values in the signal can be monitored at the measuring points MP1 toMP12. These interim values are required to match values before triggeringsmooth changeovers or to be able to check the current statuses of thecontroller. The measuring point values can be represented statically anddynamically in the curve recorder of the configuration tool.

To make the illustrations clearer, the parameters for setting and selecting thedimensions of the processing functions (algorithms) are indicated besideindividual function fields. Please refer to the descriptions in the referencesection and to the representation of the individual subfunctions in thefollowing sections.

Signal FlowDiagrams

Symbols andIdentifiers in theSignal FlowDiagrams

Designing Digital Controllers

Page 39: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-17Standard ControllerC79000-G7076-C195-02

• Fine tuning of the setpoint (SP_GEN)

With fixed setpoint controllers, the setpoint is selected using a switch atthe setpoint generator SP_GEN and is then fixed.

� Setting the setpoint with the ramp soak (RMP_SOAK)

When controlling processes with different setpoints set according to atime-controlled program, the ramp soak function generates the requiredcurve for the reference input and influences the process so that theprocess variable changes according to a defined profile.

� Rate of change limits for the setpoint (SP_ROC)

The conversion of setpoint step changes to a ramp-shaped increase ordecrease in the reference input prevents large input changes to theprocess. The SP_ROC function limits the setpoint rate of changeseparately for the up rate and down rate and for positive and negativevalues in the reference input.

� Absolute value limitation of the setpoint (SP_LIMIT)

To prevent illegal process states occurring, the setpoint is limited by highand low limits (SP_LIMIT).

Signal Processingin the SetpointBranch

Designing Digital Controllers

Page 40: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-18Standard Controller

C79000-G7076-C195-02

0

1

SPFC_OUT

QSP_HLM

QSP_LLM

0

1

SPEXT_ONSP_GEN

0

1

SP_INT

SP

RMPSK_ONSPGEN_ON

MP1

RMP_SOAK

SP_NORM

FAC

SP_EXT

MP2

+

X

SPFC_IN

SPFC

CALLFC

SPFC_ON

SPFC_IN

MP3

0

1

SP_OP_ON

1

0

SP_OP

0

1

SP_ROC

SPROC_ON

SP_LIMIT

QR_S_ACTNBR_ATMSRS_TMT_TMRT_TM

DB_NBR, CONT_ONTM_SNBR, TM_CONTCYC_ON, RMP_HOLDDFRMP_ON, TUPDT_ON

SPUP,SPDN

SP_FAC, SP_OFF

SPFC_NBR PVSPURLM_P, SPDRLM_PSPURLM_N, SPDRLM_N

SP_HLMSP_LLM ER

Figure 2-12 Signal Flow Diagram of Setpoint Processing

Designing Digital Controllers

Page 41: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-19Standard ControllerC79000-G7076-C195-02

� Process variable time lag (LAG1ST)

To reduce the effects of noise on process signals, a first order time lag isused in the process variable branch. This function dampens the analogprocess variable more or less depending on the time constantPV_TMLAG. Disturbance signals are therefore effectively suppressed.Overall, however, the time constant of the total control loop is increased,in other words, the control action becomes slower.

PV_IN

PV_PER

PVPER_ON

0

1%

SQRT

SQRT_ON

0

1

MP4

SP_NORM LAG1STON

0

1

MP5

PV_ALARM

QPVH_WRN

QPVH_ALM

QPVL_ALM

QPVL_WRN

ROCALARM QPVURLMP

QPVDRLMN

QPVURLMN

d/dt

PV

LAG1ST

CRP_IN

PV_FACPV_OFF

PV_TMLAG SQRT_FACSQRT_OFF

PVH_ALM, PVH_WRNPVL_WRN, PVL_ALMPV_HYS

PVURLM_P, PVDRLM_PPVURLM_N, PVDRLM_N

PVFC_ON

0

1

MP6

PV_OP_ON

1

0

PV_OP

PVFC_OUT

PVFC

CALLFC

PVFC_IN

PVFC_NBR

DEADBAND

DEADB_ON

0

1

QERP_WRN

QERP_ALM

QERN_ALM

QERN_WRN

ER (to PID controller)

+

SP ER_ALARM

ERP_ALM, ERP_WRNERN_WRN, ERN_ALMER_HYS

DEADB_W

QPVDRLMP

Figure 2-13 Signal Flow Diagram of the Process Variable and Error Signal Processing

Signal Processingin the ProcessVariable Branch

Designing Digital Controllers

Page 42: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-20Standard Controller

C79000-G7076-C195-02

� Extracting the root of the process variable (SQRT)

When the relationship of the measured signal to the physical value isquadratic (flow measurement using a differential flow meter) the processvariable must be linearized by extracting the root (square root algorithm).Only a linear value can be compared to the linear setpoint for the flowand processed in the control algorithm. For this reason, the SQRTfunction element can be included in the process value branch as anoption.

� Monitoring the rate of change of the process variable (ROCALARM)

If the rate of change of the process variable is extremely high or too high,this points to a dangerous process state to which the programmable logiccontroller may have to react. For this reason, the ROCALARM functiongenerates alarm signals if selectable rates of change (positive or negative)are detected in the process variable. The alarm signals can then be furtherprocessed to suit the particular situation.

� Monitoring the absolute values of the process variable and errorsignal

Two limit values are set for the process variable and the error signal andare monitored by the PV_ALARM and ER_ALARM functions.

� Effects of noise (DEADBAND)

To filter out noise on the channels of the process variable or the externalreference input, the error signal passes through a selectable dead bandcomponent. Depending on the amplitude of the noise, the dead bandwidth can be selected for the signal transmission. Falsification of thetransmitted signal must, however be accepted as a side effect of theselected dead band.

Designing Digital Controllers

Page 43: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-21Standard ControllerC79000-G7076-C195-02

� Normal PID controller function

The switch states shown in Figure 2-14 implement a PI controller withparallel processing of the signals of the P and I action. D_SEL=TRUEextends the control algorithm by adding parallel processing in the Dbranch. The proportional gain or controller gain is determined by �

GAIN, a negative sign means that the manipulated variable falls with arising process variable.

� PID in the feedback path

If the P and D actions are moved to the feedback path (PFDB_SEL andDFDB_SEL = TRUE) then step changes in the setpoint do not result instep responses in the manipulated variable. The factor has a negativeeffect on the feedback influence.

LMN_D

LMN_P

X

X X

ER

�GAIN

–1

INT

DIF

1

0

DFDB_SEL

1

0

1

0

P_SEL

1

0

I_SEL

1

0

D_SEL

0

0

0

+

0

1

0

DISV

(PID_OUTV)

LMN_I

1/TI

(INT_IN)X

DISV_SEL

PFDB_SEL

with PID_S:= I_SEL AND LMNR_ON

TDTM_LAG

PV

TI, INT_HOLDI_ITL_ONI_ITLVAL

(PD in the feed-back path) (only with PID_S without

position feedback signal)

Figure 2-14 Signal Flow Diagram of the Control Function

Signal Processingin the PIDController

Designing Digital Controllers

Page 44: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-22Standard Controller

C79000-G7076-C195-02

� Fine tuning of the manual value (MAN_GEN)

In the manual mode (open loop), the manipulated value is selected at themanual value generator MAN_GEN using a switch and is fixed.

� Limiting the rate of change of the manipulated variable (LMN_ROC)

Converting extremely fast step changes in the manipulated variable into aramp-shaped rise or fall in the manipulated variable prevents suddenchanges in the input to the process. The function (LMN_ROC) limits themanipulated value rate of change both up and down.

� Absolute value limitation of the manipulated variable (LMNLIMIT)

To avoid illegal process states or to restrict the movement of an actuator,the upper and lower limits of the range of the manipulated variable are setwith LMNLIMIT.

� Activating cascade control

Depending on the combination of switching states in the standardcontroller, the OR function generates an enable signal for the cascadeconnection.

0

1

LMNFC_ON

MP9

0

1

LMNOP_ON

1

LMN_OP

LMNLIMIT

QLMN_HLM

QLMN_LLM

01

0

MAN_ON

CAS_ON

LMN

LMN_PERCRP_OUT

%

MP8

CAS

(PID_OUTV)

MP7

MP10

SPEXT_ONSP_OP_ONCAS_ONMANGN_ONLMNOP_ON

QCASOR

LMN_NORM

LMNFCOUT

LMNFC

CALLFC

LMNFC_IN

SPFC_NBR

0

1LMN_ROC

LMNRC_ON

MAN_GEN0

1

MAN MANGN_ON

LMNFC_IN

MANUP, MANDN

LMN_FACLMN_OFF

LMN_HLMLMN_LLM

LMN_URLMLMN_DRLM

(Formatconversion)

Figure 2-15 Signal Flow Diagram of Actuating Signal Generation with the Continuous Controller

Signal Processingin the AnalogManipulatedVariable Branch

Designing Digital Controllers

Page 45: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-23Standard ControllerC79000-G7076-C195-02

� Fine tuning of the manual value and manipulated variable limitation

The functions for setting the manual value and for limiting the absolutevalue of the output variables are the same as for the controller with acontinuous output.

� Generating the binary actuating signal (THREE_ST, PULSEOUT)

Depending on the sign of the error signal, the three-step switchTHREE_ST generates a positive or negative output pulse via the pulseshaping stage PULSEOUT, that is applied until the input variabledisappears. The self-tuning hysteresis prevents the output switching toooften.

10

10

MP9

LMNOP_ON

1

LMN_OP

THREE_ST

LMNLIMIT

QLMN_HLMQLMN_LLM

0

MAN_ON

MP7

(PID_OUTV)

LMNRC_ON

LMNUP

LMNDN

PULSEOUT

AND

AND

AND

AND

LMNUP_OPLMNDN_OP

LMNSOPON

LMN

LMNR_HS

LMNR_LS

MP12

QLMNDN

QLMNUP

MP10

10

MP8

MAN_GEN01

MANMANGN_ON

LMNFC_IN

MANUP, MANDN

LMNR_IN

LMNR_PERLMNR_CRP

%

LMNRP_ON

01

LMN_NORM

LMN_HLMLMN_LLM

MTR_TM PULSE_TMBREAK_TM

LMNR_FACLMNR_OFF

LMN

LMNR

Figure 2-16 Signal Flow Diagram of Actuating Signal Generation on the Step Controller with Position FeedbackSignal (LMNR_ON = TRUE)

Actuating SignalProcessing: StepController withPosition FeedbackSignal

Designing Digital Controllers

Page 46: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2

2-24Standard Controller

C79000-G7076-C195-02

� Generating the binary actuating signal

The generation of the output signal by the three-step switch withhysteresis and a pulse generator stage is the same for all step controllers.The time parameters to take into account the actuating time of the motordrive (MTR_TM) and the setting for the pulse/break time (PULSE_TMand BREAK_TM) can be selected.

� Simulation of the position feedback value.

The automatic acquisition of the control parameters with the processidentification function of the configuration tool always requires a signalas an input variable representing the position of the actuator. Thesimulation function does not require parameter assignment and isirrelevant for the normal operation of the step controller.

10

10

THREE_ST

MP7

LMNRC_ON

LMNUP

LMNDN

PULSEOUT

AND

AND

AND

AND

LMNUP_OP

LMNDN_OPLMNSOPON

LMNR_HS

LMNR_LS

MP12

QLMNDN

QLMNUP

MP11

MTR_TM PULSE_TMBREAK_TM

10

100.0

0.0

10

-100.0

0.0

1/MTR_TM X

OR

10

0.0

+

INT10

0.0

LMNS_ON OR LMNSOPON

(INT_IN)

(PID_OUTV)

INTLMNR_SIM

LMNLIMIT

(Simulation of theposition feedback signal)

Figure 2-17 Block Diagram of Manipulated Variable Generation on the Step Controller without Position FeedbackSignal (LMNR_ON = FALSE)

Actuating SignalProcessing: StepController withoutPosition FeedbackSignal

Designing Digital Controllers

Page 47: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3-1Standard ControllerC79000-G7076-C195-02

Configuring and Starting the StandardController

This chapter describes the following:

� Defining the control tasks

� Configuring a project

� Assigning parameters for the standard controller

� Selecting the sampling time

� How the standard controller is called

� Ranges of values and normalization

What Does thisChapter Describe?

3

Page 48: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-2Standard Controller

C79000-G7076-C195-02

3.1 Defining the Control Task

Before you implement a control loop using the standard controller package,you must first clarify the technical aspects of the process you want toautomate, the programmable logic controller you will be using and theoperating and monitoring environment. To specify the task in detail, youtherefore require the following information:

1. You need to know the process you want to control, in other words thecharacteristic data of the process (gain, equivalent time constant,disturbance variables etc.).

2. You must choose the CPU on which you want to install the standardcontroller.

3. You must define the signal processing and monitoring functions alongwith the basic functions of the controller.

Section 2.1 already described the process characteristics and how todetermine the characteristic variables for the process response and if you arespecifying a concrete task, you should refer to the information there. Thissection and Section 11.6 contain information and explanations aboutidentifying system characteristics and controller parameters using theconfiguration tool.

Using the configuration tool relieves you of many of the tasks (point 1.)necessary for identifying the characteristic process variables.

Since the Standard Controller package creates software controllers based onthe standard function blocks (here PID_C or PID_S) from the range of S7blocks, you should be familiar with handling S7 blocks and with the structureof S7 user programs (for example in the S7 STL programming language).

Although the functions of the implemented controller are defined solely byassigning parameters, the connection of the controller block to the processI/Os and its integration in the call system of the CPU requires knowledge thatcannot be dealt with within the scope of this manual.You require the following information:

– Working with the STEP 7 (/231/)

– The basics of programming with STEP 7 (/232/, /234/)

– Data about the programmable logic controller you are using (/70/,/71/, /100/, /101/)

There are almost no restrictions in terms of the type and complexity of theprocesses that can be controlled with the standard controller. Providing thesystem is a single input-single output system without a derivative transferaction and without all-pass components, all process types whetherself-regulating processes or not, in other words without or with I componentscan be controlled (Figure 3-1).

Specifying theTask

What You ShouldKnow beforeWorking with theController

The Process

Configuring and Starting the Standard Controller

Page 49: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-3Standard ControllerC79000-G7076-C195-02

P-T1

TI

P-T1

LMN PV

P-TE-process(TE = T1 + T1 + ..)

P-T1

P-T1

LMN PV

I-TE-process(TE = T1 + ..)

P-T1 P-T2

LMN PV

P-T1-TE-process(TE = T2+ T2 + ..)

P-T2

P-T1 P-TS

LMN PV

P-TS-TE-process(TE = T1 + ..)

Figure 3-1 Types of Process that can be Controlled with the Standard Controller

The process variable (PV) to be processed by the standard controller isalways an analog physical variable (voltage, current, resistance etc.) that isdigitized by an S7 analog input module and converted to the uniform STEP 7PV_PER I/O signal.

The values of these signals are saved in memory cells or areas of the CPUuser memory. These areas can be addressed using absolute addresses or usingsymbolic addresses after making the appropriate entries in the symbol tableof the CPU.

If, in special situations, the process variable exists as a floating point numberwithin the range -100.0 to 100.0%, this value can be connected directly to thePV_IN input as the controlled variable (Figure 3-2).

–Analoginputmodule

PV_PER LMN

SP

PV_IN

Sensor Process

PID_CPID_S

(Percentage)

Figure 3-2 Connecting the Process Signals to the Standard Controller

Configuring and Starting the Standard Controller

Page 50: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-4Standard Controller

C79000-G7076-C195-02

To select a suitable configuration for the standard controller, the type ofactuator used to influence the process variable is important. The type ofsignal required by the actuator determines the way in which signals areoutput in the manipulated variable branch (continuous or discontinuous) andtherefore also the type of controller to be used (continuous controller or stepcontroller).

In the great majority of cases, some form of valve will be used to adjustmaterial or energy flow. Different actuating signals are required dependingon the drives used to adjust these valves.

1. Proportional actuators with a continuous actuating signal.

The opening of an orifice, the angle of rotation or a position is adoptedproportional to the value of the manipulated variable, in other wordswithin the actuating range, the manipulated variable operates in an analogmanner on the process.

The actuators in this group include pneumatic diaphragm actuators andelectro-mechanical actuators with position feedback signals with which apositioning control loop can be created.

2. Proportional actuators with pulse duration modulation

With these actuators, a pulse signal is output with a length proportional tothe value of the manipulated variable at the sampling time intervals. Thismeans that the actuator (for example a heating resistor or heat exchanger)is switched on for a length of time depending on the manipulatedvariable.

The actuating signal can be either monopolar representing the states on oroff or bipolar, representing for example the values open/close,forwards/backwards, accelerate/decelerate.

3. Actuators with an integral action and three-step actuating signal.

Actuators are often driven by motors in which the duration of the “on”time is proportional to the travel of the valve plug. Despite differentdesigns, these actuators all share the same characteristic in that theycorrespond to an integral action at the input to the process. The standardcontroller with a step output provides the most economical solution todesigning control loops including actuators with an integral action.

Type of Actuator

Configuring and Starting the Standard Controller

Page 51: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-5Standard ControllerC79000-G7076-C195-02

Depending on the type of actuating signal generated, the standard controllerprovides various structures in the manipulated variable branch.

� Actuators complying with points 1. and 2. in the previous description arecontrolled with the PID_C controller block. If a pulse duration modulatedsignal is required, the PULSEGEN block (FB) must be added to thecontroller FB.

� Actuators with an integral action (point 3.) are controlled by the PID_Scontroller block. If a position feedback signal is not available from theactuator, the controller structure with a simulated feedback signal(LMNR_ON=FALSE) is used.

If a transmitter is available to indicate the position of the actuator, thestructure can be configured with a positioning control loop(LMNR_ON=TRUE), refer to (Figure 3-3 bottom example).

Controller output:

PID_OUTV LMN, LMN_PER

PULSEGEN

LMNQPOS

QNEG

QLMNUP

QLMNDNPID_OUTV

On time is proportional tothe value LMN

As long as ER · 0, one of theoutputs is activated

Actuating signal:

LMNM

“LMNR_ON = FALSE”

“LMNR_ON = TRUE”

LMNR_IN or LMNR_PER

Position or flow of material isproportional to LMN

1.

2.

3.

PID_S

PID_C

analog output signal

Figure 3-3 Actuating Signal Outputs of the the Standard Controller

Note

The manipulated variables are represented as digital numerical values in thefloating point or peripheral (I/O) format or as binary signal states.Depending on the actuator being used, modules must always be connected tothe output to convert the signals to the required type and to provide therequired actuating energy.

Selecting theController inTerms of theActuating Signal

Configuring and Starting the Standard Controller

Page 52: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-6Standard Controller

C79000-G7076-C195-02

The relationships between the type of signal used for the manipulatedvariable, the type of control and the configuration of the controller blocksrequired to implement them is shown in the following table.

Table 3-1 Manipulated Variable, Type of Control and Required Controller Blocks

Type of Signal of theManipulated Variable

Range of Values Type of Controller Controller Structure

Proportional Floating point 0.0 to 100. 0 %

or peripheral range

Continuous PID_C

Pulse duration modulated,

with 2-step controller,outputs alternating

Bipolar or monopolar

Positive output: TRUENegative output: FALSE

Three-step/two-stepcontroller

PID_C + PULSEGEN

Three-step discontinuous Up – 0 – down Step controller PID_S(LMNR_ON = FALSE)

Three-step discontinuous

position feedback signal

Up – 0 – down

0..100 % or peripheralrange

Step controller withposition feedback signal

PID_S(LMNR_ON = TRUE)

The explanations above should provide you with all the information yourequire to select a suitable configuration of the standard controller for yourparticular situation. The best way of doing this and how you activate anddimension internal functions is explained in the following section.

Actuating Signalsand ControllerBlocks

Configuring and Starting the Standard Controller

Page 53: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-7Standard ControllerC79000-G7076-C195-02

The functions for monitoring and limiting the signals in the branches forinput and output signal processing are always active and cannot bedeactivated. These include the following:

– setpoint limitation SP_LIMIT

– process variable absolute limit alarms and warnings PV_ALARM

– process variable rate of change alarms ROCALARM

– error signal positive/negative limit alarms and warnings ER_ALARM

– and manipulated value limits LMNLIMIT

When you have decided which controller block to use and have defined itsinputs/outputs you must always make sure that suitable values are assigned tothe functions listed above.

Note

The defaults have been selected (usually at the extremes of the workingranges available) so that operation can be started without selecting anyindividual parameters. The parameters can then be adapted to therequirements.

PermanentFunctions thatCannot beDeactivated

Configuring and Starting the Standard Controller

Page 54: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-8Standard Controller

C79000-G7076-C195-02

3.2 Configuring a Project (Checklist)

Now that you have worked through the required control and monitoringfunctions (or information, refer to Sections 2.5 and 3.1), this section nowshows you the step-by-step implementation of these functions. Werecommend that you create your configuration following the steps outlinedbelow (checklist):

Step Activity Function in the Standard Controller Explanation

1. Select the controller blocks or blockconfiguration required for yourcontroller structure.

Select and copy a configurationexample closest to the configurationyou want to implement.

FB “PID_C” or “PID_S” or one of thesamples APP_1 to APP_5

– Section 3.3

2. Based on the selected example,configure the required controller byincluding or omitting preconfiguredfunctions or by including your own.

– Set the structure switch in the blockdiagram of the configuration tool;

– or set the switching bits of thestructure switch in the instance DB(�block diagrams in Appendix A).

The data structure ofthe instance DB issupplied by the therelevant FB.

3. Select the sampling time and and callsof the control loop:

– Specify the startup responsewith OB100

– Decide on the sampling timeand priority class, if necessary,change the call interval of thecyclic interrupt OB

– Configure the loop schedulerto suit the number of loops onthe CPU.

Parameter COM_RST

Parameter: CYCLE,Organization block: OB35

Loop scheduler: LP_SCHED, included insamples APP_3 to APP_5

– Section 3.4 andSection 3.5

– Section 7.1

4. Assign parameters and use theconversion functions for the measuringrange and zero point adaptation of theinput/output signals

– Normalization of the external setpoint(SP_NORM)

– Normalization of the external processvariable (PV_NORM)

– Manipulated value denormalization(LMNRNORM

(�Chapter 4)

– Section 3.6

– Section 3.6

5. Configure the setpoint branch – Setpoint generator (SP_GEN)

– Ramp soak (RMP_SOAK)

– Limits of the setpoint rate of change(SP_ROC)

– Limits of the absolute values of thesetpoint (SP_LIMIT)

(�Chapter 4)

– The function isalways active.

6. Configure the process variable branch– Process variable time lag (LAG1ST)

– Square root extraction (SQRT)

– Monitor the absolute values of theprocess variable (PV_ALARM)

– Monitor the rate of change of theprocess variable (ROCALARM)

(�Chapter 4)

– The function isalways active.

– The function isalways active.

Generating theControl ProjectConfiguration

Configuring and Starting the Standard Controller

Page 55: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-9Standard ControllerC79000-G7076-C195-02

Step ExplanationFunction in the Standard ControllerActivity

7. Configure error signal generation – Dead band of the error signal

– Monitoring the positive and negativeabsolute values of the error signal(ER_ALARM)

(�Chapter 4)

– The function isalways active.

8. Configure the manipulated valuebranch for continuous controllers

– Manual value generator(MAN_GEN)

– Limits of the rate of change of themanipulated value (LMN_ROC)

– Limits of the absolute values of themanipulated value (LMNLIMIT)

(�Chapter 5)

– The function isalways active.

Configure the manipulated valuebranch for step controllers

– Manual value generator(MAN_GEN)

– If there is a position feedback signal:Limits of the absolute values of themanipulated value (LMNLIMIT)

– Operating parameters for three-stepelements and and pulse generatorstage (THREE_ST and PULSEOUT)

(�Chapter 5)

– The function isalways active.

9. Configure controller – PID controller structure and PIDparameters

– Operating point for P and PDcontrollers

– Feedforward control (DISV)

(�Chapter 5)

10. If necessary, include extra functions inthe form of a user FC in the setpoint,process variable and/or manipulatedvalue branch.

– SPFC (SPFC_ON = TRUE)

– PVFC (PVFC_ON = TRUE)

– LMNFC (LMNFC_ON = TRUE)

11. Load the configured standardcontroller on the CPU of the PLC.

– Load the project in the S7 Manager.

12. If required, perform an off-line test ofthe configured standard controller withthe simulated third order delay process.

– Model process contained in APP_1and APP_2

13. Connect the blocks and outputs of theconfigured standard controller with theprocess I/Os.

– Program the connections of theinputs/outputs with the absolute orsymbolic I/O addresses in the usermemory of the CPU in STEP 7 STL.

The following section explains the activities for configuring individualfunctions or points in the checklist in greater detail where necessary.

A schematic parameter assignment plan summarizes the functions of thestandard controller with all the configuration and function parameters. Basedon this plan, you can see which parameters belong to a function and thepossible range of settings for the parameters.

Configuring and Starting the Standard Controller

Page 56: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-10Standard Controller

C79000-G7076-C195-02

3.3 Assigning Parameters for the Standard Controller

If you want to create your configuration directly in the instance DB, theparameter assignment plans provide you with a graphic overview of theindividual functions you need to select and assign parameters too.

When you are implementing an actual controller, remember that theconfiguration tool largely relieves you of the need to check your entries forcompleteness.

Setpointgenerator?

Setpoint normalization

Limit SP rate ofchange?

Ramp soak?

Limit SP absolutevalues

External setpoint?yes

Structure switch:

SPEXT_ON = TRUE

Input parameter:

FAC (REAL range)

SP_FAC (REAL range)SP_OFF (-100.0 ..100.0 %)

yesSPGEN_ON = TRUE

SPUP (BOOL)SPDN (BOOL)

yesRMPSK_ON = TRUE

DB_NBR (Block_DB)TM_SNBR (INT: � 0)TM_CONT (TIME range)DFRMP_ON (BOOL)CYC_ON (BOOL)RMP_HOLD (BOOL)CONT_ON (BOOL)TUPDT_ON (BOOL)

yesSPGEN_ON = TRUE

SPURLM_P (REAL: � 0)SPDRLM_P (REAL: �� 0)SPURLM_N (REAL: �� 0)SPDRLM_N (REAL: �� 0)

always active SP_HLM (SP_LLM ..100.0 %)SP_LLM (-100.0 ..SP_HLM %)

yesSPFC_NBR (BLOCK_FC)

Include a userFC? SPFC_ON = TRUE

Function:

Figure 3-4 Configuration of the Setpoint Branch of the Standard Controller (checklist points 4 and 5)

ParameterAssignment Planfor Configuring theStandardController

Configuring and Starting the Standard Controller

Page 57: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-11Standard ControllerC79000-G7076-C195-02

Process variabletime lag?

Process variablenormalization

PV absolute valuemonitoring

Square rootextraction?

PV rate of changemonitoring

External processvariable?

yes

Structure switch:

PVPER_ON = TRUE

Input parameter:

PV_TMLAG (TIME range)yes

LAG1STON = TRUE

PV_FAC ((REAL range))PV_OFF (REAL:-100.0 ..100.0)

yesSQRT_ON = TRUE

SQRT_FAC (REAL range)SQRT_OFF (REAL: -100.0 ..100.0)

PVH_ALM (PVH_WRN..100.0 %)PVH_WRN (PVL_WRN..PVH_ALM)PVL_WRN (PVL_ALM..PVH_WRN)PVL_ALM (-100.0toPVL_WRN)

always active

yesPVFC_NBR (BLOCK_FC)Include a user

FC?PVFC_ON = TRUE

Function:

always active

Dead band forER?

DEADB_W (REAL: 0.0 ..100.0 %)yes

DEADB_ON = TRUE

Monitoringpos/neg absolute

values of ER

always active

ERP_ALM (REAL: 0.0 to 200.0 %)

ERP_WRN (REAL: 0.0 to 200.0 %)

ERN_WRN (REAL: -200.0 to 0.0 %)

ERN_ALM (REAL: -200.0 to 0.0 %)

ER_HYS (REAL: � 0 %)

Processing the error signal

PVURLM_P (REAL: � 0)PVDRLM_P (REAL: �� 0)PVURLM_N (REAL: �� 0)PVDRLM_N (REAL: �� 0)

Figure 3-5 Configuration of the Process Variable and Error Signal Branch of the Standard Controller (checklistpoints 6, 7 and 8)

Configuring and Starting the Standard Controller

Page 58: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-12Standard Controller

C79000-G7076-C195-02

Include a userFC?

Manual mode?

Manual valuegenerator?

yes

Structure switch:

MANGN_ON = TRUE

Input parameter:

yesMAN_ON = TRUE

yesLMNFCNBR (BLOCK_FC)LMNFC_ON = TRUE

Function:

MANUP (BOOL)MANDN (BOOL)

Limit LMN rate ofchange?

yesLMNRC_ON = TRUE

LMN_URLM (REAL: � 0)LMN_DRLM (REAL: � 0)

Limit absolutevalues of LMN

PID_C

LMN_HLM (LMN_LLM ..100.0 %)LMN_LLM (-100.0 ..LMN_HLM %)

Manipulated valuedenormalization

always active LMN_FAC (REAL range)LMN_OFF (REAL range)

Peripheral manip.value signal?

yes

LMNRP_ON = TRUE

Normalization ofpos. feedb. signal

LMNR_FAC (REAL range)LMNR_OFF (-100.0 ..100.0 %)

Manual activationof binary outputs

yesLMNS_ON = TRUE

LMNUP (BOOL)LMNDN (BOOL)

always active

MTR_TM (TIME: � CYCLE)PULSE_TM (TIME: � CYCLE)BREAK_TM (TIME: � CYCLE)

PID_S with position feedback signal (LMNR_ON = TRUE)

Mode switchover

Simulation ofposition feedback

signalLMNRS_ON = TRUE

yesLMNS_ON = TRUE

LMNUP (BOOL)LMNDN (BOOL)

MTR_TM (TIME: � CYCLE)PULSE_TM (TIME: � CYCLE)BREAK_TM (TIME: � CYCLE)

PD_S without position feedback signal (LMNR_ON = FALSE)

Activated by the processidentification function of theconfiguration tool

Manual activationof binary outputs

Figure 3-6 Configuration of the Manipulated Value Branch (checklist point 8)

Configuring and Starting the Standard Controller

Page 59: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-13Standard ControllerC79000-G7076-C195-02

yes

Structure switch:

P_SEL = TRUE

Input parameter:Function:

GAIN (pos. REAL range)

PD controller?

I_ITLVAL (-100.0 ..100.0 %)

PV rises � LMN rises:

GAIN (neg. REAL range)

PV rises � LMN falls:

I_SEL = TRUEI_ITL_ON = TRUE

P operating point:

P controller?

yes P_SEL = TRUED_SEL = TRUE

GAIN (pos./neg. REAL range)TD (TIME: � CYCLE)TM_LAG (TIME: � CYCLE/2)

I_ITLVAL (-100.0 ..100.0 %)I_SEL = TRUEI_ITL_ON = TRUE

P operating point:

PI controller?yes P_SEL = TRUE

I_SEL = TRUEGAIN (pos./neg. REAL range)TI (TIME: � CYCLE)

INT_HOLD = TRUEI_ITL_ON = TRUE

Integrator on hold

I_ITLVAL (-100.0 ..100.0 %)

PID controller?yes P_SEL = TRUE

I_SEL = TRUED_SEL = TRUE

GAIN (pos./neg. REAL range)TI (TIME: � CYCLE)TD (TIME: � CYCLE)TM_LAG (TIME: � CYCLE/2)

INT_HOLD = TRUEI_ITL_ON = TRUE

Integrator on hold

I_ITLVAL (-100.0 ..100.0 %)

PID controllerPD in feedback?

P_SEL = TRUEI_SEL = TRUED_SEL = TRUEPFDB_SEL= TRUEDFDB_SEL= TRUE

GAIN (pos./neg. REAL range)TI (TIME: � CYCLE)TD (TIME: � CYCLE)TM_LAG (TIME: � CYCLE/2)

Feedforward?yes

DISV_SEL = TRUE

yes, only PID_C GAIN (pos./neg. REAL range)TI (TIME: � CYCLE)

PI controllerP in feedback?

P_SEL = TRUEI_SEL = TRUED_SEL = TRUEPFDB_SEL= TRUE

Integrator mode (seeabove)

yes, only PID_C

Integrator mode (seeabove)

Figure 3-7 Configuration of the Controller Functions PID_C and PID_S (checklist point 9)

Configuring and Starting the Standard Controller

Page 60: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-14Standard Controller

C79000-G7076-C195-02

If the procedure for configuration is in the checklist (Section 3.2) or theinformation in the parameter plans is too complicated or would involve toomuch time, we recommend that you use the configuration tool for thestandard controller (description in Chapters 10 to 11).

The configuration tool contains the following tools with which you canconfigure the standard controller quickly and free of errors:

Loop Editor

The block diagram of the loop editor contains the most important functionsof the standard controller represented as block symbols. By clicking theswitch symbols (dark point) you can specify the signal flow you require bothquickly and easily.

After you click a function field, the system opens a dialog box in which youcan dimension the functions by making entries in parameter fields. If thefunction is not displayed in the block diagram as an explicit switchingfunction, you can activate or deactivate it using the option buttons or checkboxes.

The ConfigurationTool

Configuring and Starting the Standard Controller

Page 61: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-15Standard ControllerC79000-G7076-C195-02

3.4 The Sampling Time CYCLE

The sampling time is the basic characteristic for the dynamic response of thestandard controller. This decides whether or not the controller reacts quicklyenough to process changes and whether the controller can maintain control inall circumstances. The sampling time also determines the limits for thetime-related parameters of the standard controller.

Selecting the sampling time is a compromise between several, oftencontradictory requirements. Here, it is only possible to specify a generalguideline.

� The time required for the CPU to process the control program, in otherwords to run the function block, represents the lowest limit of thesampling time (CYCLEmin).

� The acceptable upper limit for the sampling time is generally determinedby the process dynamics which in turn are characterized by the type andvalues of the controlled process.

The most important influence on the dynamics of the control loop is theequivalent system time constant (TE) that can be determined after entering astep change �LMN by recording the unit step response at the system input(Figure 3-8).

The system value TE represents a useful approximation of the effective timelag caused by several P-T1, P-TS and Tt elements in the loop. If, for examplethe same PT elements are connected in series, it is the sum of the single timeconstants.

PV

t

Tg

Ta

Legend:TE equivalent system time constantTa start up time (Tt + Tu)Tg settling time

TE

�LMN

Figure 3-8 Determining the Equivalent System Time Constant TE

The SamplingTime: CYCLE

Equivalent SystemTime Constant

Configuring and Starting the Standard Controller

Page 62: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-16Standard Controller

C79000-G7076-C195-02

If a minimum speed is required for the control, you can specify a maximumsampling time CYCLEmax.

With P-TE processes in which the first delay element is predominant andT1 � 0.5 TE, make sure that:

CYCLEmax � 0.1 * TE

For all other P-TE-processes

CYCLEmax � 0.2 * TE is adequate

See /352/ for a precise estimation of the sampling time.

Experience has shown that a sampling time of approximately 1/10 of the timeconstant TEG determining the step response of the closed loop producesresults comparable with the conventional analog controller.

The total time constant of the closed loop is obtained in a way similar to thatshown in Figure 3-8, by entering a setpoint step change and evaluating thesettling of the process variable.

CYCLE = TEG1

10

Sampling TimeEstimate

Rule of Thumb forSelecting theSampling time

Configuring and Starting the Standard Controller

Page 63: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-17Standard ControllerC79000-G7076-C195-02

3.5 How the Standard Controller is Called

Depending on the sampling time of the specific controller, the controllerblock must be called more or less often but always at the same time intervals.The operating system of the S7 PLC calls the cyclic interrupt organizationblock OB35 every 100 ms. The cyclic interrupt clock rate can be configuredfrom 1 ms to 1 minute. The standard setting for OB35 is 100 ms.

If you require several controllers or controllers with large sampling times,you should use the loop scheduler (LP_SCHED).

Complete restart:When the controller FB is called during a complete restart (OB100), thecomplete restart bit COM_RST is set and the CYCLE sampling time istransferred. The complete restart routine in the FB then sets a defined initialstatus for the standard controller.

Restart:During a restart, processing continues at the status that existed when theinterruption occurred. The controller continues working using the values thatit had calculated at the time of the interruption.

OB100(completerestart)

FB2“PID_S”OB35

(time-driven100 ms)

COM_RSTCYCLE

FC100 “APP_1”

FB100“PROC_S”

TRUE

FALSE

T#100ms

T#100ms

Figure 3-9 Connecting the Start-Up Blocks with the Sample APP_1

Calling theStandardController

Configuring and Starting the Standard Controller

Page 64: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-18Standard Controller

C79000-G7076-C195-02

If the cyclic interrupts of the priority class system are inadequate for therequired number of controllers or when controllers are being used with largersampling times than the longest timebase of the existing cyclic interrupts, aloop scheduler must be integrated into the cyclic interrupt OB.

The loop scheduler LP_SCHED allows several controllers to be incorporatedin one cyclic interrupt priority class. These can then be called more or lessfrequently but nevertheless at the same time intervals (see Section 7.1). Thisachieves a more uniform load on the processor.

The controller calls entered in the shared data block with the numberDB_NBR specify the order and how often the controllers must be processed(Figure 3-10).For detailed information about assigning parameters toLP_SCHED, refer to Section 7.1 of this manual. You assign parameters usingSTEP 7. Parameters cannot be assigned for LP_SCHED using theconfiguration tool.

Instance DBcontroller [1]

Global DBcontroller [1] “ [2] “ . “ [n]

e.g.OB35

DB_NBRTM_BASECOM_RST

LP_SCHED

COM_RSTCYCLE

PID_C/PID_S

Conditionalblock call

Call LP_SCHEDin cyclic int. OB

Figure 3-10 Calling a Controller with the Loop Scheduler LP_SCHED

Using the LoopScheduler

Configuring and Starting the Standard Controller

Page 65: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-19Standard ControllerC79000-G7076-C195-02

3.6 Range of Values and Signal Adaptation (Normalization)

When the algorithms in the function blocks of the standard controller areprocessed, the processor works with numbers in the floating point format(REAL). The floating point numbers have the single format complying withANSI/IEEE standard 754-1985:

Format: DD (32 bits)

Range of values: -3.37 * 1038 to -8.43 * 10-37 and

8.43 * 10-37 to 3.37 * 1038

This range is the total range of values for parameters in the REAL format. Toavoid limits being exceeded during processing, the input signal SP_EXTwhich is an analog physical value is defined as a technical range of values:

Techn. range of values: -105 to +105

To make them clearer and easier to handle, all internal input parameters havevalues related to percentages.

Internal range of values: -100.0 to 0.0 to 100.0 [%]

The CRP_IN function converts values in the S7 I/O (peripheral) format to theinternal format and the CRP_OUT function converts internal percentages tothe I/O (peripheral) format of the connected S7 module. These functions donot require any parameter assignment.

Time values are implemented and processed in the TIME format. A timevalue is a 32 bit long BCD number in which the four most significant bits arereserved for specifying the time base.

Format: DD (32 Bit)

range of values: 0 to +9 999 999 sec

Time base: 10 ms, 100 ms, 1 sec, 10 sec

The normalization function at the input for the external setpoint allows anycharacteristic curve of transmitters or sensors to be adapted to the internalrange of values .0 to 0.0 to 100.0 of the standard controller. By selectingsuitable values for the normalization parameters factor and offset any linearcharacteristic can be easily converted to a characteristic curve of the standardcontroller (Figure 3-11).

The offset parameter decides the offset of the point of intersection on the 0%axis by positive or negative values. The normalization parameters can becalculated from the start value of the characteristic curve ULL and the finalvalue of the characteristic curve UUL of the input value, as follows:

Internal NumericalRepresentation

Signal Adaptation

Configuring and Starting the Standard Controller

Page 66: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

3

3-20Standard Controller

C79000-G7076-C195-02

FAC�PUL – PLL

UUL – ULLOFF� PLL – FAC * ULL

Where:

PUL the start value of the characteristic curve in %

PLL the end value of the characteristic curve in %.

In the example in Figure 3-11, PUL = 100 % and PLL = 0 %.

100

SP_FAC =100

SP_EXT:T [�C]

85 – (-20)

20 40 60 80 100–20

MP2[%]

= 0.952450

SP_OFF= –ULL * FAC = –(–20) * 0.9524 = 19.05

Figure 3-11 Example of the Adaptation of the Temperature Range –20 to +85�� C Converted to 0.0 to 100.0 %

The conversion example shown in Figure 3-11 illustrates the inputnormalization of the external setpoint SP_EXT for the temperature range -20to +85�� C (PT 100), measured with a module of the measuring range typeclimate.

Using the measuring range start and end values (UUL = 85 andULL = -20) the parameters required for the normalization function (in thiscase SP_OFF and SP_FAC) can be calculated from the formulas above(Figure 3-11).

Note

When normalizing the process value, you must take into account theconversion and normalization algorithm of the CPR_IN function (see Section4.2.1). When normalizing the manipulated value you must take into accountthe conversion and normalization algorithm of the CPR_OUT function (seeSection 5.2.7)

Configuring and Starting the Standard Controller

Page 67: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4-1Standard ControllerC79000-G7076-C195-02

Signal Processing in the Setpoint/ProcessVariable Channels and PID ControllerFunctions

This chapter describes the following:

� The signal processing in the setpoint branch

� The signal processing in the process variable branch

� Error signal processing

� PID controller functions

� The signal processing in the PID controller algorithm.

What Does thisChapter Describe?

4

Page 68: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-2Standard Controller

C79000-G7076-C195-02

4.1 Signal Processing in the Setpoint Branch

4.1.1 Setpoint Generator (SP_GEN)

Using a higher/lower switch, you can adjust the internal setpoint. Theselected value can be monitored at MP1.

The SP_GEN function generates a setpoint that can be set or modified usingswitches. Using the binary inputs SPUP and SPDN, you can increase orreduce the OUTV output variable step-by-step.

The range of the setpoint is restricted by the high/low limitsSP_HLM/SP_LLM in the setpoint branch. The numerical values of the limits(as percentages) are set in the corresponding input parameters. The signaloutputs QSP_HLM and QSP_LLM indicate when these limits are exceeded.

To allow finer adjustments, the controller should not have a sampling time ofmore than 100 ms.

The rate of change of the output variable depends on the length of time theswitches SPUP or SPDN are activated and on the selected limits as shownbelow:

dOUTVdt

SP_HLM – SP_LLM100 s

During the first 3 seconds after settingSPUP or SPDN:

dOUTVdt

SP_HLM – SP_LLM10 s

then:

t

SP_HLM

SPUP

OUTV(t)

SP_LLM

3 sec.

Figure 4-1 Changing the Setpoint by Setting “SPUP”

Application

The SP_GENFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 69: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-3Standard ControllerC79000-G7076-C195-02

At a sampling time of 100 ms and a setpoint range of -100.0 to 100.0%, thesetpoint changes by 0.2% per cycle during the first three seconds. If SPUP isactivated for longer, the rate of change then changes to a ten fold value, inthis case 2% per cycle (Figure 4-1).

� During a complete restart, the OUTV output is reset to 0.0.

� Switch on the setpoint generator (SPGEN_ON=TRUE), at output OUTV,the signal value SPFC_IN is output. The transition to the setpointgenerator from a different mode is therefore always smooth. As long asthe SPUP and SPDN switches (up/down keys) are not activated, SPFC_INis applied to the output.

The OUTV output parameter is an implicit parameter. It can be monitoredusing the configuration tool at measuring point MP1.

Parameter Meaning Permitted Values

SPFC_IN Setpoint FC input -100.0 to +100.0 [%]

SP_INT Internal setpoint -100.0 to +100.0 [%]

Signal Type *)

(MP1) REAL 0.0

Parameter Type *)

SPGEN_ON BOOL FALSE

SPUP BOOL FALSE

SPDN BOOL FALSE

SPFC_IN REAL 0.0

SP_INT REAL 0.0

OutputSP_GEN

Input Parameters

#

1

0

OUTV

*) Default when the instance DB is created

Figure 4-2 Functions and Parameters of the Setpoint Generator

Start UP and Modeof Operation of theSetpoint Generator

Parameters of theSP_GEN Functions

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 70: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-4Standard Controller

C79000-G7076-C195-02

4.1.2 Ramp Soak (RMP_SOAK)

If you want the setpoint SP_INT to be changed automatically over a periodof time, for example when controlling processes according to a time-driventemperature program, you can configure a curve and activate the ramp soakRMP_SOAK. The curve is made up of a maximum of 256 coordinates.

The ramp soak RMP_SOAK in the setpoint branch supplies the outputvariable OUTV (Figure 4-3) according to a defined schedule. This function isstarted by setting the input bit RMPSK_ON. If the bit for cyclic repetitionCYC_ON is set, the function is started again at the first time slice OUTV[1]after the last time slice OUTV[NPR_PTS] has been output. There is nointerpolation between the last and first time slice when cyclic repetition is on.

The sequence of the ramp soak is defined by specifying a series of time slices(between coordinates) in a shared data block with the time values PI[i].TMVand the corresponding output values PI[i].OUTV (Figure 4-3).

PI[i].TMV specifies the length of time of the time slices. There is linearinterpolation between the coordinates.

t

PI[3].OUTV

OUTV(t)

PI[1].TMV

PI[2].TMV

PI[3].TMV PI[4].TMV PI[5].TMV PI[6].TMV

PI[4].OUTV

PI[1].OUTVPI[2].OUTV

PI[0].TMV

PI[5].OUTVPI[6].OUTV

65

43

21

0

= 0 ms

OUTV

Figure 4-3 Ramp Soak with Seven Coordinates (0 to 6)

Note

With n coordinates, the time value PI[n].TMV for the last coordinate n is 0 ms (end of processing). The processing time of a ramp soak is calculatedfrom the initial value down to 0.

Application

The RMP_SOAKFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 71: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-5Standard ControllerC79000-G7076-C195-02

� The time slice parameters NPR_PTS, PI[i].TMV and PI[i].OUTV are located in a shared data block.

� The parameter PI[i].TMV must be specified in the IEC TIME format.

� The way in which the maximum 256 coordinates and time slices arecounted is illustrated in the following diagram.

t

Coordinate 2

Coordinate 1OUTV

PI[1].TMV

Start point

PI[0].TMV

PI[0].OUTVPI[0].TMV

PI[1].OUTVPI[1].TMV

PI[2].OUTVPI[2].TMV

PI[2].TMV

Figure 4-4 Counting the Coordinates and Time Slices

In normal operation, the ramp soak interpolates according to the followingfunction where 0 � n < (NBR_PTS – 1):

OUTV(t)� PI[n� 1].OUTV–RS_TM

PI[n].TMV(PI[n� 1].OUTV–PI[n].OUTV)

The number of configured coordinates (NBR_PTS) and the values for thesetpoint SP assigned to the individual time slices can be monitored at MP1and are located in a shared data block with the number DB_NBR (Table 4-2).The output of the ramp soak begins at start point [0] and ends with thecoordinate [NBR_PTS].

By influencing the control inputs, the following ramp soak statuses andoperating modes can be implemented:

1. Ramp soak on for a single run.

2. Default value at output of ramp soak (for example SP_INT).

3. Repetition on (cyclic mode).

4. Hold processing of the ramp soak (hold setpoint value).

5. Set the time slice and time to continue (the remaining time RS_TM andthe time slice number TM_SNBR are redefined).

6. Update the total processing time and total time remaining.

Using the RampSoak

Configuring theRamp Soak

Modes of theRamp Soak

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 72: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-6Standard Controller

C79000-G7076-C195-02

The following truth table (Table 4-1) shows the values for the control inputsto set a particular mode:

Table 4-1 Modes of the Ramp Soak (RMP_SOAK)

Mode RMPSK_ON

DFRMP_ON

RMP_HOLD

CONT_ON

CYC_ON

TUPDT_ON

Output Signal OUTV

1. Ramp soak on TRUE FALSE FALSE FALSE OUTV(t)Final value retained oncompletion of processing.

2. Default output TRUE TRUE SP_INTor output of SP_GEN

3. Repetition on TRUE FALSE FALSE TRUE OUTV(t)Automatic start whencompleted

4. Hold setpoint value TRUE FALSE TRUE FALSE Last value of OUTV(t)retained *)

5. Set time slice and TRUE FALSE TRUE TRUE OUTV (old) *)

time to continue FALSE The ramp soak continueswith new values.

6. Update total time FALSE Does not affect OUTV

TRUE Does not affect OUTV

*) As far as the next time slice, the curve is not that set by the user.

The selected mode is executed regardless of the value of the control signalsin the shaded fields.

The change in RMPSK_ON from FALSE to TRUE activates the ramp soak(software switch in the block diagram of the configuration tool). Afterreaching the last time slice, the ramp soak (curve) is completed. If you wantto restart the function manually, RMPSK_ON must first be set to FALSE andthen back to TRUE.

During a complete restart, the OUTV output is reset to 0.0 and the total timeor total remaining time is calculated. When it changes to normal operation,the ramp soak is processed immediately from the start point according to theselected mode. If you do not require this, the parameter RMPS_ON in thecomplete restart OB must be set to FALSE.

!Note

The block does not check whether a shared DB with the number DB_NBRexists or not and whether the parameter NBR_PTS number of time slicesmatches the DB length. If the parameter assignment is incorrect, the CPUchanges to STOP due to an internal system error.

Modes

Switching on theRamp Soak

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 73: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-7Standard ControllerC79000-G7076-C195-02

If you want the ramp soak to start at a specific output value, you must setDFRMP_ON=TRUE. In this case the signal value SP_INT or the outputvalue SP_GEN is applied to the output.

Note

The signal for output of the constant setpoint DFRMP_ON has higherpriority than the start signal for the ramp soak RMPSK_ON.

The changeover from DFRMP_ON=FALSE is followed by the linearadjustment of OUTV from the selected setpoint (for example SP_INT) to theoutput value of the current time slice number PI[NBR_ATMS].OUTV.

Internal time processing is continued even when a fixed setpoint is applied tothe output (RMPSK_ON = TRUE and DFRMP_ON = TRUE).

t

OUTV(t)

PI[6].TMV

65

43

210

OUTV

RMPSK_ON

DFRMP_ON

SP_INT

T*

QR_S_ACT

configured curvecurrent curve

0 msPI[5].TMVPI[4].TMVPI[3].TMVPI[2].TMVPI[0].TMV PI[1].TMV

PI[6].TMV

Figure 4-5 Influencing the Ramp Soak with the Default Signal DFRMP_ON

When the ramp soak is started with RMPSK_ON = TRUE, the fixed setpointSP_INT is output until DFRMP_ON changes from TRUE to FALSE after thetime T* (Figure 4-5). At this point, the time PI[0].TMV and part of the timePI[1].TMV has expired. OUTV changes from SP_INT to PI[2].OUTV, inother words to coordinate 2.

The configured curve is only output starting at coordinate 2, where the outputsignal QR_S_ACT changes to the value TRUE. If the default signalDFRMP_ON changes during the ramp soak processing, the output valueOUTV jumps to SP_INT immediately.

Setting the Outputfor the Ramp SoakStart

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 74: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-8Standard Controller

C79000-G7076-C195-02

If the cyclic repetition mode is turned on (CYC_ON=TRUE), the ramp soakreturns to the start point automatically after outputting the last time slicevalue and begins a new cycle.

There is no interpolation between the last time slice and the start point. Thefollowing must apply to achieve a smooth transition: PI[NBR_PTS].OUTV =PI[0].OUTV.

With RMP_HOLD = TRUE, the value of the output variable (including thetime processing) is frozen. When this is reset (RMP_HOLD = FALSE), theramp soak continues at the point of interruption PI[x].TMV.

t

OUTV(t)

6*5*

43

20

OUTV

RMP_HOLD

DFRMP_ON

SP_INT

T*

QR_S_ACT

configured curvecurrent curvecurrent values

5

1

T*6

PI[4].TMV+T* PI[5].TMVCurrent time:

*

PI[4].TMV PI[5].TMVPI[1].TMV

Configured time

PI[2].TMVPI[0].TMV PI[3].TMV PI[6].TMV

Figure 4-6 The Effect of the Hold Signal RMP_HOLD on the Ramp Soak

The processing time of the ramp soak is extended by the hold time T*. Theramp soak follows the configured curve from the time slice to the signalchange for RMP_HOLD (FALSE → TRUE) and from coordinate 5* tocoordinate 6*, in other words the output signal QR_S_ACT has the valueTRUE (Figure 4-6).

If the CONT_ON bit is set, the frozen ramp soak continues from the selectedpoint TM_CONT.

Cyclic Mode On

Hold SetpointValue

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 75: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-9Standard ControllerC79000-G7076-C195-02

If the control input CONT_ON is set to TRUE to continue processing, thenprocessing continues at the time TM_CONT with the time slice TM_SNBR.The time parameter TM_CONT determines the time remaining that the rampsoak requires until it reaches the destination time slice TM_SNBR.

Current time:

t

OUTV(t)

65*

43

20

OUTV

CONT_ON

T*

QR_S_ACT

configured curvecurrent curvecurrent values

5

1

6*

PI[5].TMV

*

PI[4].TMV PI[5].TMVPI[1].TMV

Configured time T*

No reaction!

RMP_HOLD

PI[3].TMVPI[2].TMVPI[0].TMV

PI[6].TMV

Figure 4-7 How the RMP_HOLD Hold Signal and the CONT_ON Continue SignalAffect the Ramp Soak

The following applies to the example (Figure 4-7): If RMP_HOLD = TRUEand CONT_ON = TRUE and if the following is selected

time slice number to continue TM_SNBR = 5

and time remaining to selected time slice TM_CONT = T*

then the configured coordinates 3 and 4 are omitted in the processing cycle ofthe ramp soak. After a signal change at RMP_HOLD from TRUE to FALSEthe curve only returns to the configured curve starting at coordinate 5.

The output QR_S_ACT is only set when the ramp soak has worked throughthe curve configured by the user.

Selecting the TimeSlica and Time toContinue

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 76: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-10Standard Controller

C79000-G7076-C195-02

In every cycle, the current time slice number NBR_ATMS, the current timeremaining until the time slice RS_TM is reached, the total time T_TM andthe total time remaining until the end of the ramp soak RT_TM is reached areupdated.

If there are on-line changes to PI[n].TMV, the total time and the total timeremaining are changed. Since the calculation of T_TM and RT_TM greatlyincreases the run time of the function block if there are a lot of time slices,the calculation is only performed after a complete restart or whenTUPDT_ON = TRUE. The time slices PI[0toNBR_PTS].TMV between theindividual coordinates are totalled and indicated at the output for the totaltime T_TM and for the total remaining time RT_TM.

Please remember that the calculation of the total times requires a relativelylarge amount of CPU time.

The output parameter OUTV is an implicit parameter and is accessible withthe configuration tool at measuring point MP1.

Parameter Meaning Permitted Values

TM_SNBR Number of the next time slice > 0 (no dimension)

TM_CONT Time to continue Total range of values

SP_INT Internal setpoint -100.0 to +100.0 [%]

Parameter Type *)

RMPSK_ON BOOL FALSE

DFRMP_ON BOOL FALSE

CYC_ON BOOL FALSE

TM_SNBR INT 0

TM_CONT REAL T#0s

DB_NBR BLOCK_DB

RMP_HOLD BOOL FALSE

CONT_ON BOOL FALSE

TUPDT_ON BOOL FALSE

SP_INT REAL 0.0

Parameter Type *)

QR_S_ACT BOOL FALSE

NBR_ATMS INT 0

RS_TM INT 0

T_TM TIME T#0 s

RT_TM TIME T#0 s

MP1 REAL 0.0

#

Input Parameters Output ParametersRAMP_SOAK

# 1

0

OUTV

*) Default when the instance DB is created

Figure 4-8 Functions and Parameters of the Ramp Soak

Updating the TotalTime and TotalTime Remaining

Parameters of theRMP_SOAKFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 77: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-11Standard ControllerC79000-G7076-C195-02

The time slice coordinates and the number of time slices NBR_PTS arestored in a shared data block (Table 4-2).

Table 4-2 Shared Data Block (DB_NBR) with the Start Point and Four Time Slices Assigned

Parameter Data Type Comment Permitted Range Default

NBR_PTS INT Number of coordinates 1 to 256 4

PI[0].OUTV REAL Output value [0]: start point -100.0 to 100.0 [%] 0.0

PI[0].TMV TIME Time value [0]: start point Entire range of values T#1 s

PI[1].OUTV REAL Output value [1]: coordinate 1 -100.0 to 100.0 [%] 0.0

PI[1].TMV TIME Time value [1]: coordinate 1 Entire range of values T#1 s

PI[2].OUTV REAL Output value [2]: coordinate 2 -100.0 to 100.0 [%] 0.0

PI[2].TMV TIME Time value [2]: coordinate 2 Entire range of values T#1 s

PI[3].OUTV REAL Output value [3]: coordinate 3 -100.0 to 100.0 [%] 0.0

PI[3].TMV TIME Time value [3]: coordinate 3 Entire range of values T#1 s

PI[4].OUTV REAL Output value [4]: coordinate 4 -100.0 to 100.0 [%] 0.0

PI[4].TMV TIME Time value [4]: coordinate 4 Entire range of values T#0 s

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 78: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-12Standard Controller

C79000-G7076-C195-02

4.1.3 Normalization of the External Setpoint (SP_NORM)

If the external setpoint exists as a physical value, for example when it issupplied by a sensor, this value and its range of settings (for example 360 to800�C or 0 to 3000 rpm) must be converted to the required floating pointvalue within the range 0 to 100% as required for further processing in thestandard controller.

With this normalization of the input variable in the setpoint branch (and inthe process variable branch) of the standard controller, the range of values ofthe setpoint and process variable are matched. This means that logicoperations and calculations for any externally connected physical values arepossible.

The SP_NORM function normalizes an analog input value. The analogexternal setpoint is transferred to the OUTV output variable using thenormalization curve (straight line). The output value OUTV is accessiblewith the configuration tool at measuring point MP2 (Figure 2-12).

To establish the straight line normalization curve:

external physical values ⇒ internal percentage values (in the REAL format)

two parameters must be defined:

– the factor (for the slope): SP_FAC

– the offset of the curve from zero: SP_OFF

SP_EXT

OUTVNormalization curve

SP_OFF

SP_FAC

The normalization value is calculated from the input value SP_EXT using thefollowing function:

OUTV� SP_EXT* SP_FAC� SP_OFF

The function is effective when the control input SPEXT_ON = TRUE is set.

Within the function itself, no values are limited and the parameters are notchecked.

Application

The SP_NORMFunction

Startup

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 79: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-13Standard ControllerC79000-G7076-C195-02

The output parameter OUTV is an implicit parameter and is accessible withthe configuration tool only at measuring point MP2.

Parameter Meaning Permitted Values

SP_FAC Slope of the normalization curve Total technical range of values(no dimension)

SP_OFF Zero point of the normalization curveTechnical range of values

SP_EXT External setpoint Technical range of values[physical value]

Signal Type *)

MP2 REAL

Parameter Type *)

SP_EXT REAL 0.0

SP_FAC REAL 1.0

SP_OFF REAL 0.0

OutputSP_NORM

Input Parameters

*) Default when the instance DB is created

Figure 4-9 Functions and Parameters for Normalizing the External Setpoint

Parameters of theSP_NORMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 80: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-14Standard Controller

C79000-G7076-C195-02

4.1.4 FC Call in the Setpoint Branch (SPFC)

By inserting a user-specific FC block in the setpoint branch it is possible toprocess a setpoint set externally before it is connected to the controller (forexample a signal delay or linearization) (Figure 2-12).

If you activate the SPFC function with SPFC_ON = TRUE, a user-definedFC block is called. The number of the FC block is entered using theSPFC_NBR parameter.

The controller calls the user FC. Input and output parameters of the user FCare, however, not supplied with values. You must therefore program the datatransfer using S7 STL in the user FC. An example of a program is shownbelow:

STL Explanation

FUNCTION “ User FC”VAR_TEMPINV:REAL;OUTV:REAL;END_VARBEGINL “Controller DB” SPFC_INT #INV

//User function OUTV=f(INV)L #OUTVT “Controller DB” SPFC_OUTEND_FUNCTION

The value of SPFC_ON then determines whether a user-programmedfunction in the form of a standard FC (for example a characteristic curve) isinserted at this point in the setpoint channel or whether the setpoint isprocessed further without any such influence.

!Note:

The block does not check whether an FC exists. If the FC does not exist, theCPU changes to STOP with an internal system error.

Application

The SPFCFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 81: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-15Standard ControllerC79000-G7076-C195-02

The input value SPFC_IN is an implicit parameter. This can be monitoredusing the configuration tool either at measuring point MP1 (setpoint =SP_INT) or at measuring point MP2 (setpoint = SP_EXT). The output valueis accessible at measuring point MP3.

The SPFC_IN input is switched through to the setpoint branch whenSPFC_ON = FALSE is set (default).

Parameter Type *)

SPFC_OUT REAL

MP3 REAL

Parameter Type *)

SPFC_ON BOOL FALSE

SPFC_NBR BLOCK_FC

SPFC_IN REAL 0.0

Output ParametersSPFC

Input Parameters

FC “SPFC_NBR”

1

0

The connection must be programmed in the user FC

*) Default when the instance DB is created

Figure 4-10 Calling an FC Block in the Setpoint Branch

Parameters of theSPFC Function

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 82: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-16Standard Controller

C79000-G7076-C195-02

4.1.5 Limiting the Rate of Change of the Setpoint (SP_ROC)

Ramp functions are used in the setpoint branch when step-shaped changes inthe actuating signal are not acceptable for the process since a step change inthe setpoint normally means a step change in the manipulated variable of thecontroller. Such abrupt changes in the manipulated variable must, forexample, be avoided when there is gearing between a motor and the load andwhen a fast increase in the speed of the motor would overload the gear unit.

The SP_ROC function limits the rate of change of the setpoints processed inthe controller separately for the rate of change up and rate of change downand also separately for the positive and negative ranges.

The limits for the rate of change of the ramp function in the positive andnegative range of the setpoint are entered at the four inputs SPURLM_P,SPDRLM_P, SPURLM_N and SPDRLM_N. The rates of change relate to arise or fall as a percentage per second. Faster rates of change in the setpointare delayed by these limits.

If, for example, SPURLM_P is set to 10.0 [%/s] the following values areadded to the ’old value’ of OUTV in each sampling cycle as long as INV >OUTV:

Sampling time 1 s → OUTVold + 10 %

100 ms → OUTVold + 1 %

10 ms → OUTVold + 0.1 %

How signals are handled by the function is illustrated by the following figurebased on an example. Step functions at the input INV(t) become rampfunctions at output OUTV(t).

t

INV

SPDRLM_P (in %/s)

INV(t) OUTV(t)

SPURLM_P

OUTV

0SPURLM_N

SPDRLM_N

SPURLM_P

Figure 4-11 Limiting the Rate of Change of the Setpoint SP(t)

If the limits of the rate of change are reached, this is not indicated.

Application

The SP_ROCFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 83: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-17Standard ControllerC79000-G7076-C195-02

The INV input value is an implicit parameter and is accessible to theconfiguration tool only at measuring point MP3 (Figure 2-12).

The rate of change (in percent per second) is always entered as a positivevalue.

Parameter Ramp Meaning PermittedRange

SPURLM_P

SPDRLM_P

SPURLM_N

SPDRLM_N

OUTV > 0 and � �OUTV� rising

OUTV > 0 and � �OUTV� falling

OUTV < 0 and � �OUTV� rising

OUTV < 0 and � �OUTV� falling

SP up rate limit in pos. range

SP down rate limit in pos. range

SP up in neg. range

SP down limit in neg. range

� 0 [%/s]

� 0 [%/s]

� 0 [%/s]

� 0 [%/s]

Signal Type *)

(SP) REAL 0.0

Parameter Type *)

SPROC_ON BOOL FALSE

INV REAL 0.0

SPURLM_P REAL 10.0

SPDRLM_P REAL 10.0

SPURLM_N REAL 10.0

SPDRLM_N REAL 10.0

OutputSP_ROC

Input Parameters

0

1OUTV

*) Default when the instance DB is created

Figure 4-12 Functions and Parameters for Limiting the Rate of Setpoint Change

Parameters of theSP_ROC Function

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 84: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-18Standard Controller

C79000-G7076-C195-02

4.1.6 Limiting the Absolute Value of the Setpoint (SP_LIMIT)

The range of values of the setpoint determines the range within which theprocess variable can fluctuate, in other words, the range of values permittedfor the process. Since the limits for the permitted process values do notnormally match the 0 % or 100 % limits of the setpoint range, additionallimits are necessary.

To avoid critical or illegal process states, the setpoint of the standardcontroller has upper and lower limits in the setpoint branch.

The SP_LIMIT function limits the setpoint SP to the selectable upper andlower limits SP_LLM and SP_HLM as long as the input value INV is outsidethese limits. Since the function cannot be deactivated, an upper and lowerlimit must always be set for the configuration.

The numerical values of the limits (as percentages) are set with the inputparameters for the upper and lower limits. If the input value INV(t) exceedsthese limits, this is indicated at the corresponding signal outputs (Figure 4-14).

t

INV

SP_HLM

SP_LLM

QSP_LLM

QSP_HLM

SPINV(t)

SP(t)

0

Tolerance band

Figure 4-13 Limits for the Absolute Values of the Setpoint SP (t)

Application

The SP_LIMITFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 85: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-19Standard ControllerC79000-G7076-C195-02

� During a complete restart, all the signal outputs are set to 0.

� The limitation operates as follows:

SP = QSP_HLM = QSP_LLM = if

SP_HLM TRUE FALSE INV � SP_HLM

SP_LLM FALSE TRUE INV � SP_LLM

INV FALSE FALSE SP_HLM < INV < SP_LLM

The effective setpoint of the standard controller is indicated by the parameter SP.

The INV input value is an implicit parameter and can only be monitored withthe configuration tool at measuring point MP3.

For the limits to function correctly, the following must apply:

SP_HLM > SP_LLM

Parameter Meaning Permitted Values

SP_HLM Upper limit of the setpoint SP_LLM to +100.0 [%]

SP_LLM Lower limit of the setpoint -100.0 to SP_HLM [%]

Parameter Type *)

INV REAL 0.0

SP_HLM REAL 100.0

SP_LLM REAL 0.0

Parameter Type *)

QSP_HLM BOOL FALSE

SP REAL

QSP_LLM BOOL FALSE

Input Parameters Output ParametersSP_LIMIT

*) Default) when the instance DB is created

Figure 4-14 Functions and Parameters of the Absolute Value Limits of the Setpoint

Start Up and Modeof Operation

Parameters of thethe SP_LIMITFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 86: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-20Standard Controller

C79000-G7076-C195-02

4.1.7 Setpoint Adjustment Using the Configuration Tool

The configuration tool has its own interface to the controller FB. It istherefore possible at any time to interrupt the setpoint branch and to specifyyour own setpoint SP_OP, for example for test purposes when working on aPG/PC on which the configuration tool is loaded (Figure 4-15).

1 (TRUE)

0 (FALSE)

SP_OP_ON

SP_OP

MP3

(’PG: ’)

(Controller: ’)

(SP)

Figure 4-15 Intervention in the Setpoint Branch Using the Configuration Tool

One of the three fields (labeled setpoint) in the loop monitor is available forthis. Below this in the ’Controller’ field, the current setpoint at measuringpoint MP3 is displayed. The field below this (PG) is used to display andchange the parameter SP_OP.

If the switch in the configuration tool is set to “PG”, the signal of thestructure switch SPOP_ON is set to TRUE in the controller FB and SP_OP isconnected through to the setpoint SP.

If the rate of change limitation SP_ROC is activated in the setpoint branch,you can switch over between the “PG” and “Controller” settings without asudden change occurring in the setpoint. The value to which the programreturns (MP3) can be read in the “Controller” display field of the loopmonitor. The SP then approaches this value using the ramp set at SP_ROC.

These interventions, however, only affect the process when you transfer themto the programmable logic controller by clicking the “Send” button in theloop monitor.

SP Display andSetting in the LoopMonitor

Selecting theSetpoint Using theConfiguration Tool

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 87: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-21Standard ControllerC79000-G7076-C195-02

4.2 Signal Processing in the Process Variable Branch

4.2.1 Entering the Process Variable in the Peripheral Format (CRP_IN)

If the process variable to be processed is supplied by an analog input module,the numerical value of the data word in the FB of the standard controllerconnected to input PV_PER must be converted to a numerical value infloating point format (as a percentage). The CRP_IN function is responsiblefor this conversion.

You can monitor the process variable entered from the process I/Os atmeasuring point MP4 (normalized).

The CRP_IN function converts the numerical value of the process variable atinput PV_PER in the peripheral format to a normalized floating point valueas a percentage. There is no check for positive/negative overflow,over/underdrive and wire break.

The following table provides you with an overview of the ranges andnumerical values before and after processing by the conversion andnormalization algorithm of the CRP_IN function.

Peripheral Value PV_PER Output Value in %

32767 118.515

27648 100.000

1 0.003617

0 0.000

-1 - 0.003617

-27648 - 100.000

-32768 - 118.519

Application

The CRP_INFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 88: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-22Standard Controller

C79000-G7076-C195-02

4.2.2 Normalizing the Process Variable Input in the Floating PointFormat (PV_NORM)

Using the PV_NORM function, the process variable processed in thecontroller can be adapted to the peripheral area and an error corrected. If thevalue supplied by a sensor is a physical value, the value and its measuringrange (for example 360 to 800�C or 0 to 3000 rpm) must be normalized tothe floating point value required for further processing.

With this normalization of the input variable in the process variable branch(and setpoint branch) of the standard controller, the range of values of theprocess variable and setpoint are matched. This means that logic operationsand calculations for any externally connected physical values are possible.

Using the PV_FAC factor, the process variable can be adapted to theperipheral area. The process variable is already available at the input as apercentage. A zero error at the input can be corrected with PV_OFF.

To establish the normalization curve, the following parameters must bedefined:

– the factor (for the slope): PV_FAC

– the offset of the normalization curve from 0: PV_OFF

INV

OUTV Normalization curve

PV_OFF

PV_FAC

The normalization value OUTV is calculated from the input value INVaccording to the following expression:

OUTV (MP4)� INV * PV_FAC� PV_OFF

The rated value upper limit for voltage, current and resistance measuringranges (NHL) for the parameter PV_PER (peripheral input) is always 27648(decimal). This value is converted to 100% in CRP_IN:

PV_PER: INV:

0 0

27648 100

With temperature modules, the NHL is variable. The measuring range can beadapted using the PV_FAC factor. By selecting PV_FAC = 27648/NHL, theupper limit is set to 100% at measuring point MP4, as follows:

Application

The PV_NORMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 89: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-23Standard ControllerC79000-G7076-C195-02

PV_PER: INV: PV_FAC: MP4:

0 0 27648/NHL 0

NHL NHL*100/27648 27648/NHL 100

It is also possible to allow the standard controller to work with temperaturevalues directly. To achieve this, the following factors must be entered for thePV_FAC parameter:

Temperature MeasuringRange Type

PV_FAC: e.g. Measuring Range for aPT100:

“CLIMATE” 2.7648 -20 to +85 �C

“Standard” 27.648 -200 to +850 �C

The adapted process variable is displayed at measuring point MP4.

Note: When adapting temperature values, all the setpoints must also beselected as temperature values (see above).

The function is active when the control input PVPER_ON=TRUE is set.Internally, no values are limited and the parameters are not checked.

The PV_PER peripheral input is switched to the process variable branchwhen PVPER_ON = TRUE is set. The normalized peripheral processvariable can be monitored at measuring point MP4 (Figure 2-13).

Parameter Meaning Permitted Range

PV_PER Process variable in the peripheralformat

PV_FAC Slope of the PV normalization curve atinput PV_PER

Technical range of values (nodimension)

PV_OFF Zero point of the PV normalizationcurve

-100.0 to +100.0 [%]

Signal Type *)

MP4 REAL

Parameter Type *)

PVPER_ON BOOL FALSE

PV_IN REAL 0.0

PV_PER WORD W#16#0000

PV_FAC REAL 1.0

PV_OFF REAL 0.0

Output ParametersCRP_IN + PV_NORMInput Parameters

0

1%INV

OUTV

*) Default when the instance DB is created

Figure 4-16 Functions and Parameters for Normalizing Physical Process Variables

Startup

Parameters of theCPR_IN andPV_NORMFunctions

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 90: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-24Standard Controller

C79000-G7076-C195-02

4.2.3 Damping the Process Variable (LAG1ST)

The LAG1ST function is used as a delay element for the process variable.This can be used to suppress disturbances.

By incorporating a time delay, higher frequency fluctuations in the processvariable signal can be damped so that they are excluded from the processingin the control algorithm in particular to avoid affecting the derivative action.The amount of signal damping is determined by the time constantPV_TMLAG.

The damping effect is achieved by a first order time lag algorithm.

The transfer function in the Laplace transform is as follows:

OUTV(s)INV(s)

1(1� PV_TMLAG* s)

������ � �� ������� ������

The step response in the time domain is as follows:

OUTV(t) � INV0 (1–e–t�PV_TMLAG)

Legend:

INV0 the size of the process variable jump at the input

OUTV(t) = MP5 the output value

PV_TMLAG the delay time constant

t time

INV0

t

OUTV

PV_TMLAG 5*PV_TMLAG

< 1% Deviation fromsteady-state valueOUTV(t)

INV

= MP5

(MP5)

If PV_TMLAG � 0.5 * CYCLE, there is no lag in effect.

A sampling time (CYCLE) of less than a fifth of the time lag is necessary toachieve a time lag approaching the analog response.

Application

The LAG1STFunction

Conditions forParameterAssignment

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 91: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-25Standard ControllerC79000-G7076-C195-02

The INV input value is an implicit parameter and can only be monitored withthe configuration tool at measuring point MP4 (Figure 2-13).

If LAG1STON = FALSE, the peripheral input PV_PER or the internal inputPV_IN is switched to the process variable branch without a time lag(default).

Parameter Meaning Permitted Values

PV_TMLAG Process variable time lag Total range of values

Signal Type *)

MP5 REAL

Parameter Type *)

LAG1STON BOOL FALSE

INV (MP4) REAL 0.0

PV_TMLAG TIME T#5s

Output ParametersLAG1ST

Input Parameters

0

OUTV

*) Default when the instance DB is created

Figure 4-17 Functions and Parameters of the Absolute Value Limitation of the Setpoint

Parameters of theLAG1ST Function

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 92: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-26Standard Controller

C79000-G7076-C195-02

4.2.4 Extracting the Square Root (SQRT)

If the process variable supplied by a sensor is a physical value that is in aquadratic relationship to the measured process variable, the changes in theprocess variable must first be linearized before they can be processed furtherin the controller. This task is performed by the SQRT function in the processvariable branch of the standard controller.

The measured signal must always be linearized by extracting the square rootwhen flow measurements are performed with orifice plates or venturi tubes.The measured differential pressure (effective pressure) is then proportional tothe square of the flow.

If the SQRT_ON input signal is set to TRUE, the square root function isactivated in the process variable branch. The algorithm for the square rootfunction is as follows:

OUTV� SQRT_FAC* MP5�

� SQRT_OFF

The SQRT function linearizes a characteristic curve of the process variable(in the example the sensor voltage U), that is the square of the measuredphysical value PH.

Example:

UOff

PH

UCoeff

U U � Coeff* PH2� UOff (1)

WhereU: Sensor voltage/current/resistancePH: Physical dimensionCoeff: Coefficient from data sheetUOff: Offset of the sensor signal

The sensor signal is normalized using the peripheral function CRP_IN. Theprocess variable PV is therefore in the range PVLL to 100%. The conversionof the signal of the sensor to the process variable as a percentage is linear, asfollows:

PVin � (U–ULL) *(PVHL–PVLL)

UHL–ULL� PVLL, (2)

Application

The SQRTFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 93: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-27Standard ControllerC79000-G7076-C195-02

WherePVin: process variable (in %), corresponds to the output of the CRP_IN functionPVHL: process variable high range limit (always 100 %)PVLL: process variable low range limitUHL: Sensor signal, high limit of measuring rangeULL: Sensor signal, low limit of measuring range

U

PVHL

PVin

PVLL

ULL UHL

Including the previous equation (2) in the quadratic relationship of the sensor(1) results in the process variable PVin dependent on the measured physicalvalue of PH:

PVin � PVLL� ((UCoeff* PH2� UOff)–ULL) *

(PVHL–PVLL)UHL–ULL

The following is obtained at the input of the process variable branch orsquare root function:

MP4 or MP5� PVin * PV_FAC� PV_OFF, (3) and

OUTV� SQRT_FAC* MP5�

� SQRT_OFF, (4)

INV (MP5)

SQRT_OFF

OUTV orPVFC_IN

LegendOUTV: Linearized process variable (effective process variable)MP5: input value of the square root functionSQRT_FAC Square root factorSQRT_OFF: Square root zero offset

If the input value (3) is entered in the SQRT algorithm (4), the followinglinearized signal is obtained at the output of the square root function:

OUTV� SQRT_FAC* PVin * PV_FAC� PV_OFF�� SQRT_OFF

The SQRT function linearizes a sensor characteristic curve to produce thefollowing characteristic curve with which the physical value PH can beconverted to the effective process variable OUTV or PVFC_IN:

OUTV� (PH–PHHL) *PVHL–PVLL

PHHL–PHLL� PVLL

Calculating theNormalization andFunctionCoefficients

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 94: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-28Standard Controller

C79000-G7076-C195-02

WhereOUTV: Effective process variable (in %), corresponds to the output of the square root functionPVHL: Process variable high range limit (always 100 %)PVLL: Process variable low range limitPH: Physical valuePHHL: Physical value, high range limitULL: Physical value, low range limit

PVHL

OUTV

PVLL

PHLL PHHL

PH

The parameters of the square root function and the process variablenormalization (PV_NORM) can be calculated by comparing the coefficientsof the two equations above for OUTV:

– PV_FAC�UHL – ULL

PVHL – PVLL

– PV_OFF� ULL–UOffs–PVLL *UHL – ULL

PVHL – PVLL

– SQRT_FAC�PVHL – PVLL

(PHHL – PHLL) * UCoeff�

– SQRT_OFF� PVHL – PHLL *PVHL – PVLL

PHHL – PHLL

Parameter Meaning Permitted Values

SQRT_FAC Square root factor Entire range of values (no dimension)

SQRT_OFF Square root offset - 100.0 to + 100.0 [%]

Signal Type *)

(PVFC:IN) REAL

Parameter Type *)

SQRT_ON BOOL FALSE

(MP5) REAL 0.0

SQRT_FAC REAL 1.0

SQRT_OFF REAL 0.0

OutputSQRT

Input Parameters

0

OUTV1

*) Default when the instance DB is created

Figure 4-18 Functions and Parameters for Extracting the Square Root of the Process Variable Signals

Parameters of theSQRT Function

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 95: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-29Standard ControllerC79000-G7076-C195-02

4.2.5 FC Call in the Process Variable Branch (PVFC)

By including a user-defined FC block in the process variable branch, theprocess variable signal can be pre-processed (for example signal delay orlinearization) before further processing in the controller (Figure 2-13).

By activating the PVFC function with PVFC_ON = TRUE, a user-specificfunction (FC) is called. The number of the FC to be used is entered with thePVFC_NBR parameter.

The controller calls the user FC. Input and output parameters of the user FCare, however, not supplied with values. You must therefore program the datatransfer using S7 STL in the user FC. An example of a program is shownbelow:

STL Explanation

FUNCTION “User FC”VAR_TEMPINV:REAL;OUTV:REAL;END_VARBEGINL “Controller DB” PVFC_INT #INV

//User function OUTV=f(INV)L #OUTVT “Controller DB” PVFC_OUTEND_FUNCTION

The value of PVFC_ON then determines whether a user-programmedfunction in the form of a standard FC (for example a characteristic curve) isinserted at this point in the process variable channel or whether the processvariable is processed further without any such influence.

!Note:

The block does not check whether an FC exists. If the FC does not exist, theCPU changes to STOP with an internal system error.

Application

The PVFCFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 96: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-30Standard Controller

C79000-G7076-C195-02

The PVFC_IN input value is an implicit parameter. This can be monitored atmeasuring point MP4 using the configuration tool. The output value isaccessible at measuring point MP6 (Figure 2-13).

If PVFC_ON = FALSE, (default) the PVFC_IN input is switched through tothe process variable branch.

Parameter Type *)

PVFC_OUT REAL

MP6 REAL

Parameter Type *)

PVFC_ON BOOL FALSE

PVFC_NBR BLOCK_FC

PVFC_IN REAL 0.0

Output ParametersPVFC

Input Parameters

FC “PVFC_NBR”

1

0

The connection must be programmed in the user FC

*) Default when the instance DB is created

Figure 4-19 Calling an FC Block in the Process Variable Branch

Parameters of thePVFC Function

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 97: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-31Standard ControllerC79000-G7076-C195-02

4.2.6 Monitoring the Process Variable Limits (PV_ALARM)

Illegal or dangerous states can occur in a system if process values (forexample motor speed, pressure, level, temperature etc.) exceed or fall belowcritical values. In such situations, the PV_ALARM function is used tomonitor the permitted operating range. Limit violations are detected andsignaled to allow a suitable reaction.

The PV_ALARM function monitors four selectable limits in two tolerancebands for the process variable PV(t) . If the limits are reached or exceeded,the function signals a warning at the first limit and an alarm at the secondlimit.

The numerical values of the limits are set in the input parameters for“Warning” and “Alarm” (Figure 4-20). If the process variable (PV) exceedsor falls below these limits, the corresponding output bits QPVH_ALM,QPVH_WRN, QPVL_WRN and QPVL_ALM are set (Figure 4-21).

To prevent the signal bits “flickering” due to slight changes in the input valueor due to rounding errors, a hysteresis PV_HYS is set. The process variablemust pass the hysteresis before the messages are reset.

t

PV

PVH_ALM

PVH_WRN

PVL_WRN

PVL_ALM

QPVH_WRN

QPVL_WRN

QPVL_ALM

1st tolerance band2nd tolerance band

QPVH_ALM

PV_HYSPV (t)

Figure 4-20 Process Variable PV – Monitoring the Limit Values

Application

The PV_ALARMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 98: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-32Standard Controller

C79000-G7076-C195-02

� During a complete restart all the signal outputs are set to 0.

� The limit value indication operates according to the following functions:

QPVH_ALM

QPVH_WRN

QPVL_WRN

QPVL_ALM

if and:

TRUE TRUE FALSE FALSEPV �PV�

PV� � PVH_ALMPV� � PVH_ALM – PV_HYS

FALSE TRUE FALSE FALSEPV �PV�

PV � PVH_WRNPV � PVH_WRN – PV_HYS

FALSE FALSE TRUE FALSEPV �PV�

PV � PVL_WRNPV � PVL_WRN + PV_HYS

FALSE FALSE TRUE TRUEPV �PV �

PV � PVL_ALMPV � PVL_ALM + PV_HYS

For the block to function correctly, the following must apply:

PVL_ALM < PVL_WRN < PVH_WRN < PVH_ALM

You cannot disable the PV_ALARM function. When you configure astandard controller, you should therefore make sure that you set suitable limitvalues. Otherwise, limit value violations will be indicated using the defaultparameters (Figure 4-21).

Parameter Meaning Permitted Range of Values

PVH_ALMPVH_WRNPVL_ALMPVL_WRN

Upper PV limit ’alarm’Upper PV limit ’warning’Lower PV limit ’alarm’Lower PV limit ’warning’

PVH_WRN to +100.0 [%]PVL_WRN to PVH_ALM [%]PVL_ALM to PVH_WRN [%]-100.0 to PVL_WRN [%]

PV_HYS PV hysteresis � 0 [%]

Parameter Type *)

PV REAL 0.0

PVH_ALM REAL 100.0

PVH_WRN REAL 90.0

PV_HYS REAL 1.0

PVL_WRN REAL 10.0

PVL_ALM REAL 1.0

Parameter Type *)

QPVH_ALM BOOL FALSE

QPVH_WRN REAL FALSE

QPVL_WRN BOOL FALSE

QPVL_ALM BOOL FALSE

Input Parameters Output ParametersPV_ALARM

*) Default when the instance DB is created

Figure 4-21 Functions and Parameters of the Process Variable Limit Value Monitoring

Startup and Modeof Operation

Parameters of thePV_ALARMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 99: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-33Standard ControllerC79000-G7076-C195-02

4.2.7 Monitoring the Rate of Change of the Process Variable(ROCALARM)

If the rate of change in the process variable is too fast (for example motorspeed, pressure, level, temperature etc.), illegal or dangerous situations canoccur in the process or plant. Here, the ROCALARM function is used tomake sure that the process variable does not exceed or fall below a permittedrange of change or slope. Such limit violations are detected and signaled toallow an appropriate reaction.

The ROCALARM function monitors limits for the rate of change of theprocess variable PV(t).

The numerical values for the rate of change limits are set at the inputparameters for “up rate” and “down rate” in the positive and negative rangesof the process variable. The up/down rates are expressed as a rise or fall as apercentage per second.

If the rate of change of the process variable exceeds these limits, the outputsignal bits QPVURLMP to QPVDRLMN are set (Figure 4-22 and 4-23).

t

PV

QPVDRLMP

QPVURLMN

QPVDRLMN

QPVURLMP

PV (t)PVURLMP

PVDRLMP

PVDRLMN

PVURLMN

PVURLMN

Figure 4-22 Monitoring the Rate of Change (Slope) of the Process Variable PV(t)

Application

The ROCALARMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 100: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-34Standard Controller

C79000-G7076-C195-02

The ramp parameters have the following names:

Parameter PV Change

PVURLM_P PV > 0 and � �PV� up

PVDRLM_P PV > 0 and � �PV� down

PVURLM_N PV < 0 and � �PV� up

PVDRLM_N PV < 0 and � �PV� down

You cannot disable the ROCALARM function. When you configure astandard controller, you should therefore make sure that you set suitable limitvalues. Otherwise, limit value violations will be indicated using the defaultparameters (Figure 4-23).

Parameter Meaning Permitted Range

PVURLM_PPVDRLM_PPVURLM_NPVDRLM_N

PV up limit in pos. rangePV down limit in pos. rangePV up limit in neg. rangePV down limit in neg. range

� � � 0 [%/s] �� 0 [%/s] �� 0 [%/s] �� 0 [%/s]

The rate of change (as a percentage per second) is always entered as apositive value.

Parameter Type *)

PV REAL 0.0

PVURLM_P REAL 10.0

PVDRLM_P REAL 10.0

PVDRLM_N REAL 10.0

PVURLM_N REAL 10.0

Parameter Type *)

QPVURLMP BOOL FALSE

QPVDRLMP REAL FALSE

QPVDRLMN BOOL FALSE

QPVURLMN BOOL FALSE

Input Parameters Output ParametersROCALARM

PV/dt

*) Default when the instance DB is created

Figure 4-23 Functions and Parameters of the Rate of Change Monitoring of the Process Variable PV(t)

Parameters of theROCALARMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 101: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-35Standard ControllerC79000-G7076-C195-02

4.2.8 Changing the Manipulated Variable Using the Configuration Tool

The configuration tool has its own interface to the controller FB. It istherefore possible at any time to interrupt the process variable branch and tospecify your own process variable values PV_OP, for example, for testpurposes when working on a PG/PC on which the configuration tool is loaded(Figure 4-24).

1 (TRUE)

0 (FALSE)

PV_OP_ON

PV_OP

MP6

(’PG: ’)

(’Controller: ’)

(PV)

Figure 4-24 Intervening in the Process Variable Branch Using an Operator Panel

One of the three fields (labeled process variable) in the loop monitor isavailable for this. Below this in the ’Controller’ field, the current processvariable at measuring point MP6 is displayed. The field below this (PG:) isused to display and change the parameter PV_OP.

If the switch in the configuration tool is set to “PG”, the signal of thestructure switch PV_OP_ON is set to TRUE in the controller FB and PV_OPis connected through to the process variable PV.

The value to which the program returns (MP6) can be read in the“Controller” display field of the loop monitor.

These interventions, however, only affect the process when you transfer themto the programmable logic controller by clicking the “Send” button in theloop monitor.

Process VariableDisplays andSettings in theLoop Monitor

Setting theProcess Variablewith theConfiguration Tool

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 102: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-36Standard Controller

C79000-G7076-C195-02

4.3 Processing the Error Signal

4.3.1 Filtering the Signal with DEADBAND Function

If the process variable or the setpoint is affected by higher frequency noiseand the controller is optimally set, the noise will also affect the controlleroutput. This can, for example, lead to large fluctuations in the manipulatedvalue at high control again when the D action is activated. Due to theincreased switching frequency (step controller) this leads to faster wear andtear on the final control element.

This function suppresses noise in the error signal of the standard controller inthe settled state and prevents unwanted oscillation of the controller output.

The DEADBAND function is a selectable band in which small fluctuations inthe input variable around a specified zero point are suppressed. Outside thisband, the error signal ER rises or falls in proportion to the input value. Youcan specify the width of the DEADBAND using the parameter DEADB_W.The DEADBAND width can only have positive values.

If the input variable is within the DEADBAND, the value 0 is output (errorsignal = 0). The output only rises or falls by the same values as the inputvariable INV only when the input variable leaves this DEADBAND. Thisalso falsifies the transferred signal when it is outside the DEADBAND. Thisis, however, an acceptable compromise to avoid step changes at the limits ofthe DEADBAND (Figure 4-25). The amount to which the signal is falsifiedcorresponds to the value DEADB_W and can therefore be checked easily.

The DEADBAND operates according to the following functions:

(ER) = INV + DEADB_W where INV < – DEADB_W

(ER) = 0 where –DEADB_W �� INV �� � + DEADB_W

(ER) = INV – DEADB_W where INV > + DEADB_W

INV

OUTV

DEADB_W

(ER)

Figure 4-25 Filtering Noise Affecting the Error Signal ER using a DEADBAND

Application

The DEADBANDFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 103: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-37Standard ControllerC79000-G7076-C195-02

The DEADBAND function can be disabled. The effects of signal filteringcan be monitored at the “ER” output using the curve recorder (configurationtool) (Figure 2-13).

The DEADB_W parameter can be selected between 0.0 and 100%.

Parameter Meaning Permitted Values

DEADB_W DEADBAND width(= Range zero to DEADBAND upperlimit)

0 to 100.0 [%]

Parameter Type *)

DEADB_ON BOOL FALSE

INV REAL 0.0

DEADB_W REAL 1.0

Parameter Type *)

ER REAL 0.0

Input Parameters Output ParametersDEADBAND

0

1OUTV

*) Default when the instance DB is created

Figure 4-26 Functions and Parameters of the DEADBAND Function in the Error Signal Channel

Parameters of theDEADBANDFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 104: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-38Standard Controller

C79000-G7076-C195-02

4.3.2 Monitoring the Error Signal Limit Values (ER_ALARM)

If the process variable deviates from the setpoint by a large amount,undesirable states can occur in the process. The ER_ALARM functionmonitors the error signal and detects when it exceeds or falls below thepermitted range. ER_ALARM detects and indicates any such limit violationsso that a suitable reaction can be started.

The ER_ALARM function monitors four selectable limits in two tolerancebands for the error signal ER(t). If the limits are reached or exceeded, thefunction signals a warning at the first limit and an alarm at the second limit.

The numerical values of the limits are set in the input parameters for“Warning” and “Alarm” (Figure 4-28). If the error signal (ER) exceeds orfalls below these limits, the corresponding output bits QERN_ALM toQERP_ALM are set.

To prevent the signal bits “flickering” due to slight changes in the input valueor due to rounding errors, a hysteresis ER_HYS is set. The error signal mustpass the hysteresis before the messages are reset.

t

ER

ERP_ALM

ERP_WRN

ERN_WRN

ERN_ALM

QERP_WRN

QERN_WRN

QERN_ALM

1st tolerance band

2nd tolerance band

QERP_ALM

ER_HYSER (t)

Figure 4-27 Monitoring the Limit Values of the Error Signal ER

Application

The ER_ALARMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 105: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-39Standard ControllerC79000-G7076-C195-02

� During a complete restart all the signal outputs are set to 0.

� The limit value indication operates according to the following functions:

QERP_ALM

QERP_WRN

QERN_WRN

QERN_ALM

if and:

TRUE TRUE FALSE FALSEER �ER�

ER� � ERP_ALMER� � ERP_ALM – ER_HYS

FALSE TRUE FALSE FALSEER �ER�

ER � ERP_WRNER � ERP_WRN – ER_HYS

FALSE FALSE TRUE FALSEER �ER �

ER � ERN_WRNER � ERN_WRN + ER_HYS

FALSE FALSE TRUE TRUEER �ER �

ER � ER_ALMER � ERN_ALM + ER_HYS

For the block to function correctly, the following must apply:

ERN_ALM < ERN_WRN < ERP_WRN < ERP_ALM

You cannot disable the ER_ALARM function. When you configure astandard controller, you should therefore make sure that you set suitable limitvalues. Otherwise, limit value violations will be indicated using the defaultparameters (Figure 4-28).

Parameter Meaning Permitted Values

ERP_ALMERP_WRNERN_WRNERN_ALM

Upper ER limit ’alarm’Upper ER limit ’warning’Unterer ER limit ’warning’Unterer ER limit ’alarm’

ERP_WRN to +200.0 [%]0 to ERP_ALM [%]ERN_ALM to 0 [%]-200.0 to ERN_WRN [%]

Parameter Type *)

ER REAL 0.0

ERP_ALM REAL 100.0

ERP_WRN REAL 90.0

ER_HYS REAL 1.0

ERN_WRN REAL -90.0

ERN_ALM REAL -100.0

Parameter Type *)

QERP_ALM BOOL FALSE

QERP_WRN REAL FALSE

QERN_WRN BOOL FALSE

QERNL_ALM BOOL FALSE

Input Parameters Output ParametersER_ALARM

*) Default when the instance DB is created

Figure 4-28 Functions and Parameters of the Error Difference ER Limit Value Monitoring

Startup and Modeof Operation

Parameters of theER_ALARMFunction

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 106: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-40Standard Controller

C79000-G7076-C195-02

4.4 The PID Controller Functions

Within the cycle of the configured sampling time, the manipulated variableof the continuous standard controller is calculated from the error signal in thePID algorithm. The controller is designed as a parallel structure(Figure 4-29). The proportional, integral and derivative actions can bedeactivated individually.

+X

P

I

D

GAIN

ER PID_OUTV

P_SEL

I_SEL *)

D_SEL

DISV_SELDISV

(Linear combination)

*) I_SEL AND LMNR_ON on the Step Controller (PID_S)

Figure 4-29 Control Algorithm of the Standard Controller (Parallel Structure)

Feedforward control:A disturbance DISV can also be connected to the PID_OUTV output signalof the controller. This function is enabled or disabled in the PID dialog boxof the configuration tool using the DISV_SEL structure switch or with“Disturbance Variable On”.

PD action in the feedback path:In the parallel structure, each action of the control algorithm receives theerror signal as its input signal. In this structure, step changes in the setpointaffect the controller directly. The manipulated variable is affectedimmediately by step changes in the setpoint via the P and the D components.

Designing the controller differently, however, so that the P and D actions arein the feedback path, guarantees that step changes in the setpoint do notcause sudden changes in the manipulated variable (Figure 4-30). Using thisstructure, the I action processes the error signal as its input signal and onlythe negative error signal (factor = -1) is connected to the P and D actions.

Control Algorithmand ControllerStructure

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 107: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-41Standard ControllerC79000-G7076-C195-02

X

D

I

P

GAIN

ER

XPVPID_OUTV

-1

X+

Figure 4-30 Control Algorithm with the P and D Actions in the Feedback Path

To define an effective controller structure, there are five switches available(Table 4-3). These structure switches are set in the configuration tool byselecting the actions to be activated (P, I and D) and decifding whether or notthe P or D actions should be included in the feedback path. You make theseselections in the “PID” dialog box after selecting the PID controller (blockdiagram).

Table 4-3 Selecting the Controller Structure

ModeSwitch P_SEL I_SEL

*)D_SEL PFDB_

SELDFDB_

SEL

P controller TRUE FALSE FALSE FALSE FALSE

P controller (P in f. path) TRUE FALSE FALSE TRUE FALSE

PI controller TRUE TRUE FALSE FALSE FALSE

PI controller (P in f. path) TRUE TRUE FALSE TRUE FALSE

PD controller TRUE FALSE TRUE FALSE FALSE

PD controller (P in f. path) TRUE FALSE TRUE FALSE TRUE

PID controller TRUE TRUE TRUE FALSE FALSE

PID controller (P/D in f. path) TRUE TRUE TRUE FALSE TRUE

*) With the step controller without position feedback signal (PID_S with LMNR_ON =FALSE), the I action in the PID algorithm is set to zero.

You can reverse the controller from

rising process variable PV(t) → rising man. variable PID_OUTV(t) to

rising process variable PV(t) → falling man. variable PID_OUTV(t)

by setting a negative proportional gain for the GAIN parameter. The sign ofthis parameter value decides the direction of the control action of thecontinuous controller.

In a P controller, the I and D actions are disabled. (I-SEL and D-SEL =FALSE). This means that if the error signal ER is 0, the output signal OUTVis also 0. If an operating point other than 0 is required, in other words anumerical value for the output signal when the error signal is zero, the Iaction must be activated (Figure 4-31).

Defining theControllerStructure

Reversing theControllerFunctions

P Controller

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 108: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-42Standard Controller

C79000-G7076-C195-02

With the I action, an operating point other than zero can be specified for theP controller by setting an initialization value I_ITLVAL. To do this, setswitch ’I_ITL_ON’ and ’I_SEL’ to TRUE.

X

P

I

GAIN

ERPID_OUTV+

P_SEL

I_SEL *)

I_ITL_ON

0

1

I_ITLVAL

*) I_SEL AND LMNR_ON: with the step controller (PID_S)

Figure 4-31 P Controller with Operating Point Setting

The step response of the P controller in the time domain is as follows:

PID_OUTV(t) � I_ITLVAL � GAIN * ER(t)

Legend

PID_OUTV(t) the man. variable in the automatic controller mode

I_ITLVAL the operating point of the P controller

GAIN the controller gain

ER(t) the error signal input value

PID_OUTV(t)PID_OUTV

ER

ER(t)

t

Figure 4-32 Step Response of the P Controller

In a PI controller, the D action is disabled (D_SEL=FALSE). A PI controlleradjusts the output variable OID_OUTV using the I action until the errorsignal ER becomes zero. This only applies when the output variable does notexceed the limits of the manipulated value. If the manipulated value limitsare exceeded, the I action retains the value that was set when the limit wasreached (anti reset wind-up).

The step response in the time domain (Figure 4-33) is as follows:

PID_OUTV(t) � GAIN * ER0�1�1TI

* t �

PI Controller

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 109: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-43Standard ControllerC79000-G7076-C195-02

Legend

PID_OUTV(t) the man. variable in the automatic controller mode

GAIN the controller gain

ER0 the value of the step in the error signal

TI reset time

PID_OUTV(t)PID_OUTVER

ER(t)

t

GAIN * ER(t)

TI

GAIN * ER0

GAIN * ER0

Figure 4-33 Step Response of the PI Controller

To allow a smooth changeover from the manual mode to the automatic modeof the PI controller, the output signal LMNFC_IN – LMN_P – DISV isswitched to the internal memory of the integrator when the manipulatedvariable is being adjusteded manually (Figure 4-34). When using the stepcontroller with position feedback signal, the integrator is corrected to theoutput signal LMN.

X

P

IER

PID_OUTV+

MAN_ON

1

0

MAN

LMN

GAIN

LMNFC_IN – LMN_P – DISV (PID_C)

DISV

P_SEL

I_SEL *)

LMN (PID_S)

*) I_SEL AND LMNR_ON: with the step controller (PID_S)

Figure 4-34 PI Controller with Smooth Switchover from Manual to Automatic

To achieve a purely integrating control action, the P action can be disabledwith P_SEL.

In the PD controller, the I action is deactivated (I-SEL = FALSE). Thismeans that if the error signal ER is zero, the output signal OUTV is also zero.If an operating point other than zero is required, in other words a numericalvalue must be set for the output signal when the error signal is zero, then theI branch must be activated (Figure 4-31).

PD Controller

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 110: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-44Standard Controller

C79000-G7076-C195-02

With the I action, an operating point other than 0 can be specified for the Pcontroller by setting an initialization value I_ITLVAL. To do this, set switch’I_ITL_ON’ and ’I_SEL’ to TRUE.

The PD controller forms the input value ER(t) proportional to the outputsignal and adds the D action formed by differentiating ER(t) that iscalculated with twice the accuracy according to the trapezoidal rule (Padéapproximation). The time response is determined by the derivative actiontime TD.

To damp the signal and to suppress noise, a first order time lag (selectabletime constant: TM_LAG) is integrated in the algorithm for the D action.Generally a small value is adequate for TM_LAG to achieve a successfuloutcome. If TM_LAG � CYCLE/2 is selected, the time lag is disabled.

The step response in the time domain (Figure 4-35) is as follows:

PID_OUTV(t) � GAIN * ER0�1�TD

TM_LAG* e– t

TM_LAG�

Legend

PID_OUTV(t) the man. variable in the automatic controller mode

GAIN the controller gain

ER0 the step value of the error signal

TD derivative action time

TM_LAG time lag

GAIN * TDTM_LAG

ER0

t

PID_OUTV

TM_LAG

ER

PID_OUTV(t)

GAIN * ER0ER(t)

Figure 4-35 Step Response of the PD Controller

In a PID controller, the P, I and D actions are activated (P_SEL, I_SEL,D_SEL = TRUE). A PID controller adjusts the output variable PID_OUTVusing the I action until the error signal ER becomes zero. This only applieswhen the output variable does not exceed the range limits. If the manipulatedvariable range limits are exceeded, the I action retains the value that was setwhen the limit was reached (anti reset wind-up)

PID Controller

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 111: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-45Standard ControllerC79000-G7076-C195-02

The PID controller forms the input value ER(t) proportional to the outputsignal and adds the actions formed by differentiating and integrating ER(t)that are calculated with twice the accuracy according to the trapezoidal rule(Padé approximation). The time response is determined by the derivativeaction time TD and the reset time TI.

To damp the signal and to suppress noise, a first order time lag (selectabletime constant: TM_LAG) is integrated in the algorithm for the D action.Generally a small value is adequate for TM_LAG to achieve a successfuloutcome. If TM_LAG � CYCLE/2 is selected, the time lag is disabled.

The step response in the time domain (Figure 4-36) is as follows:

PID_OUTV(t) � GAIN * ER0�1�1TI

* t � TDTM_LAG

* e– tTM_LAG�

Legend

PID_OUTV(t) the man. variable in the automatic controller mode

ER0 the step value of the the error signal

GAIN the controller gain (= GAIN)

TI reset time

TD derivative action time

TM_LAG time lag

GAIN * TDTM_LAG

ER0

t

PID_OUTV

TM_LAG

ER

PID_OUTV(t)

ER(t)

TI

GAIN * ER0

GAIN * ER0

Figure 4-36 Step Response of the PID Controller

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 112: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-46Standard Controller

C79000-G7076-C195-02

The PI/PID functions of the standard controller are capable of controllingmost processes in industry. Functions and methods beyond the scope of thiscontroller are only necessary in special situations (� see Section 1.2, further S7 software packages for control tasks).

One practical problem nevertheless remains the assignment of parameters toPI/PID controllers, in other words finding the “right” settings for thecontroller parameters. The quality of the parameter assignment is thedecisive factor in the quality of the PID control and demands eitherconsiderable practical experience, specialist knowledge or a lot of time.

These difficulties can be eliminated by using the configuration tool. Theprocess identification function provided by this tool allows the controllerparameters to be set initially using an adaptive method. The processidentification creates a process model and then calculates the most suitablesettings for the controller parameters. This largely automatic procedure savesthe user from having to tune the installed PID controller manually usingon-line techniques.

Using andAssigningParameters to thePID Controller

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 113: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-47Standard ControllerC79000-G7076-C195-02

4.5 Signal Processing in the PID Controller Algorithm

4.5.1 Integrator (INT)

The function of the integrator is used in standard PI and PID controllers toimplement the I action. The integral action in these controllers ensures thatby correcting the operating point, the error signal can become zero at anyvalue of the manipulated variable.

The integral action generates an output signal whose rate of change isproportional to the change in the absolute value of the input variable. Thetime response is determined by the reset time TI.

The transfer function in the time domain is as follows:

OUTV(t) � 1TI� INV(t) dt

The step response to an input step INV0 is as follows:

INV(t)

t

INV

TI

OUTV(t)OUTV

INV0

OUTV(t) � 1TI INV 0 * t

Legend

OUTV(t) the output value of the integrator

INV0 the step size at the integrator input

TI reset time

Due to the limited accuracy of the REAL numbers calculated in the CPU, thefollowing effect can occur during integration: If the sampling time CYCLE istoo small compared with the reset time TI and if the input value INV of theintegrator is too small compared with its output value OUTV, the integratordoes not respond and remains at its current output value.

This effect can be avoided by remembering the following rule whenassigning parameters:

CYCLE > 10-4 * TI

With this setting, the integrator reacts to changes in the input values that arein the range of ten millionths of a percent of the current output value:

INV > 10-10 * OUTV

Application

The INT Function

Permitted Rangesfor TI and CYCLE

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 114: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-48Standard Controller

C79000-G7076-C195-02

To ensure that the transfer function of the integrator algorithm corresponds tothe analog response, the sampling time should be less than 20% of the resettime TI, in other words TI should be five times higher than the selectedsampling time:

CYCLE < 0.2 * TI

The algorithm permits values for the sampling time up to CYCLE � 0.5 xTI.

� Initializing the I action

If I_ITL_ON = TRUE is activated, the initialization value I_ITLVAL isswitched to the output. At the change to the normal mode whenI_ITL_ON = FALSE is set, the integrator starts to integrate its input valuestarting at I_ITLVAL (Figure 4-37).

� Manual Mode

If the actuating signal is set manually, either when MAN_ON=TRUE orLMNOP_ON = TRUE is set, the internal memory value of the integratoris corrected to the LMNFC_IN – LMN_P – DISV value (Figure 4-34). Inthe step controller with a position feedback signal (PID_S) the integratoris corrected to the output signal LMN.

� Freezing the Integrator

If INT_HOLD = TRUE is set, the integrator can be stopped at its currentoutput value OUTV. If the parameter is reset (INT_HOLD = FALSE), theintegration is resumed at the point at which it was interrupted.

� Integration

If the switch I_SEL = TRUE is set, integration is activated starting at theI_ITLVAL value. The dynamic response of the function is determined bythe reset time TI.

If integration is deactivated (I_SEL = FALSE), the I action, in otherwords the internal memory and the output LMN_I of the integrator, is setto zero.

Mode

Switch I_ITL_ON MAN_ON orLMNOP_ON

INT_HOLD

Initialize (LMN_I) TRUE any any

Manual mode FALSE TRUE any

Integral action hold FALSE FALSE TRUE

Integration FALSE FALSE FALSE

Startup and Modes

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 115: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-49Standard ControllerC79000-G7076-C195-02

X

P

IER +

P_SEL

MAN_ON

1

0

MAN

LMNGAIN

0

1

I_ITL_ON

I_ITLVAL

INT_HOLD

LMNOP_ON

1

0

LMNOP

I_SEL *)

LMN (PID_S)

LMNFC_IN – LMN_P – DISV (PID_C)

*) I_SEL AND LMNR_ON: with step controller (PID_S)

Figure 4-37 Modes of the Integrator in the PI/PID Controller

The output and the memory of the integrator are limited by upper and lowerlimits LMN_HLM and LMN_LLM (anti reset wind-up).

The OUTV output value of the integrator can be monitored at parameterLMN_I.

Parameter Meaning Permitted Values

TI Reset time � 5 * CYCLE

I_ITLVAL Initialization value for I Action -100.0 to +100.0 [%]

Signal Type *)

OUTV (LMN_I) REAL

Parameter Type *)

I_SEL BOOL FALSE

I_ITL_ON BOOL FALSE

INT_HOLD BOOL FALSE

INV (ER) REAL 0.0

TI TIME T#20s

L_ITLVAL REAL 0.0

OutputINT

Input Parameters

0

1

#

0

1

*) Default when the instance DB is created

Figure 4-38 Functions and Parameters of the Integrator

Limits

Parameters of theINT Function

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 116: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-50Standard Controller

C79000-G7076-C195-02

4.5.2 Derivative Unit (DIF)

The function of the derivative unit is used to implement the D action forstandard PD and PID controllers. The process variable is differentiateddynamically.

The derivative action generates an output signal whose value changesproportional to the rate of change of the input value. The time response isdetermined by the derivative action time TD and the time lag of thederivative unit TM_LAG.

To damp signals and to suppress disturbances, a first order time lag isintegrated and the time constant can be set with the parameter TM_LAG.

The step response to an input step INV0 is as follows:

TDTM_LAG

INV0

t

OUTV

TM_LAG

INV0

OUTV(t)� TDTM_LAG

INV0� e–t

TM_LAG

Legend

OUTV(t) the output value of the derivative unit

INV0 the step value at the derivative unit input

TD the derivative action time

TM_LAG time lag

To allow the derivative unit to process its calculation algorithm correctly inthe CPU, keep to the following rules when assigning the time constants:

TD � CYCLE and

TM_LAG � 0.5 * CYCLE

If a value less than CYCLE is set, the derivative unit operates as if TD hadthe same value as CYCLE.

If TM_LAG is set to a value � 0.5 x CYCLE, the derivative unit operateswithout a time lag. The input step change is then multiplied by the factorTD/CYCLE and this value is applied to the output as a “needle pulse”. Thismeans that in the next processing cycle, OUTV is reset to 0.

Application

The DIF Function

Permitted Rangesfor TD and CYCLE

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 117: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-51Standard ControllerC79000-G7076-C195-02

� Manual mode

If the actuating signal is set manually, in other words when MAN_ON orLMNOP_ON = TRUE is set, the internal memory value of the derivativeunit is corrected to the input signal INV and zero is output at LMN_D.The derivative unit is matched.

The change to the derivative action mode when the controller is switchedover to automatic is smooth. If the analog or binary actuating signals areset manually, the derivative unit is not matched.

� Derivative action

If the D_SEL = TRUE switch is set, the derivative action is activated.The dynamic response of the function is determined by the value of thederivative action time TD and the time lag TM_LAG.

If the derivative action is turned off (D_SEL = FALSE), the D action, inother words the internal memory and the LMN_D output of the derivativeunit, is set to zero.

ModeSwitch MAN_ON or LMNOP_ON

Manual TRUE

Derivative action FALSE

The OUTV output value of the derivative unit can be monitored at parameterLMN_D.

Parameter Meaning Permitted Values

TD Derivative action time � CYCLE

TM_LAG Time lag of the D action � 0.5 * CYCLE

Signal Type *)

OUTV (LMN_D) REAL 0.0

Parameter Type *)

D_SEL BOOL FALSE

INV (ER) REAL 0.0

TD TIME T#10s

TM_LAG TIME T#2s

OutputDIFInput Parameters

0

1

*) Default when the instance DB is created

Figure 4-39 Functions and Parameters of the Derivative Unit

Startup and Modes

Parameters of theDIF Function

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 118: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

4

4-52Standard Controller

C79000-G7076-C195-02

Signal Processing in the SP/PV Channels and PID Controller Functions

Page 119: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5-1Standard ControllerC79000-G7076-C195-02

The Continuous Controller (PID_C)

This chapter describes the following:

� The control functions of the continuous PID controller

� Signal processing in the manipulated variable branch (PID_C)

� The continuous controller in a cascade control system

� The pulse generator

What Does ThisChapter Describe?

5

Page 120: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-2Standard Controller

C79000-G7076-C195-02

5.1 Control Functions of the Continuous PID Controller

Apart from the functions in the setpoint and process variable branch, thefunction block (FB) implements a complete PID controller with continuousmanipulated variable output with the option of adjusting the manipulatedvalue manually. Subfunctions can be enabled or disabled.

Using the FB, you are in a position to control technical processes andsystems with continuous input and output variables on SIMATIC S7programmable logic controllers. The controller can be used as a fixedsetpoint controller either individually or in multi-loop control systems as acascade, blending or ratio controller.

The mode of operation is based on the PID control algorithm of the samplingcontroller with an analog output signal, if necessary, supplemented by a pulsegenerator stage for generating pulse-duration modulated output signals fortwo or three-step controllers with proportional actuators.

PV –

SP

ER

QPOS_P

QNEG_P

LMN

Figure 5-1 Block Diagram of the Controller with Continuous Actuating Signal(“Standard Controller” Software Package)

The PID_C function block has a complete restart routine that is run throughwhen the input parameter COM_RST = TRUE is set.

Ramp soak (RMP_SOAK)When the ramp soak is activated, the time slices DB_NBR PI[0 toNBR_PTS].TMV are totalled between the coordinates and indicated at thetotal time T_TM and total time remaining RT_TM outputs.

If PI[n].TMV is modified on-line or if TM_CONT and TM_SNBR are set,the total time and total time remaining of the ramp soak also change. Sincethe calculation of T_TM and RS_TM greatly increases the processing time ofthe RMP_SOAK function when a large number of time slices are involved,this calculation is only performed after a complete restart or whenTUPDT_ON = TRUE is set.

Integral action (INT)When the controller starts up, the integrator is set to the initialization valueI_ITLVAL. When it is called by a cyclic interrupt, it starts at this value.

All other outputs are set to their default values.

The PID_CFunction Block

Block Diagram ofthe ContinuousController

CompleteRestart/Restart

The Continuous Controller (PID_C)

Page 121: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-3Standard ControllerC79000-G7076-C195-02

5.2 Processing the Manipulated Variable Signal

5.2.1 Modes affecting the Manipulated Variable Signal

Apart from the “automatic” mode with the output switched to the output ofthe PID algorithm (PID_OUTV), the standard controller also has two modesin which the manipulated variable can be influenced manually: “Manualmode without generator” and “manual mode with up/down generator”(MAN_GEN).

Using the parameter MAN (–100.0% to 100.0%) the manipulated variablecan be adjusted externally either setting the value manually or by the userprogram setting the value.

The structure of the manual value function and how it is connected can beseen in the following diagram (Figure 5-2). If MAN_GEN is activated whenthe controller is in a different mode, the manipulated value at the LMNFCoutput is adopted. This means that the change to the manual value generatordoes not cause a step change.

PID_OUTV(controller)

MANGN_ON

1

0

MAN_ON

1

0

MP8MAN

MP7

MP9

LMNMAN_GENSPFC_IN

Figure 5-2 Manual Value Generation with the Standard Controller

If MAN_ON = FALSE (block diagram in the configuration tool) is selected,the manipulated value of the PID algorithm is connected to the output. Thechange from manual to automatic mode is then always smooth when themanipulated variable rate of change limitation LMN_ROC is active(LMRC_ON = TRUE). The output of the PID algorithm is accessible atmeasuring point MP7.

In this mode (MANGN_ON = FALSE and MAN_ON = TRUE) the manualvalue is entered as an absolute value at the MAN input. The manualmanipulated value is indicated at measuring point MP8.

In this mode (MANGN_ON = TRUE and MAN_ON = TRUE), the currentmanipulated value is increased or decreased using the MAN_GEN switchwithin the limits of the manipulated variable.

Manual Mode andChanging Modes

Automatic Mode

Manual ModeWithout Generator

Manual Mode WithGenerator

The Continuous Controller (PID_C)

Page 122: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-4Standard Controller

C79000-G7076-C195-02

The following table illustrates the possible modes of the continuouscontroller with the required values for the structure switches.

Table 5-1 Modes of the Continuous Controller

ModeSwitch MANGN_ON MAN_ON

Automatic mode any FALSE

Manual mode without generator FALSE TRUE

Manual mode with up/down switch TRUE TRUE

Switch Settings forthe Modes

The Continuous Controller (PID_C)

Page 123: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-5Standard ControllerC79000-G7076-C195-02

5.2.2 Manual Value Generator (MAN_GEN)

This function influences the manipulated value manually with the aid of anup/down switch. The selected value is indicated simultaneously at MP8.

The MAN_GEN function generates a manipulated value that can be set andmodified using a switch. The output variable OUTV can be increased ordecreased in steps at the binary inputs MANUP and MANDN.

The range through which the manual manipulated value can be adjusted islimited by the upper/lower limits LMN_HLM/LMN_LLM that can be setwith the limit function LMNLIMIT. The numerical values of the limits (aspercentages) are set using the corresponding input parameters. The signaloutputs QLMN_ HLM and QLMN_LLM indicate when these limits areexceeded.

To allow small changes to be made, the controller should not have asampling time of more than 100 ms.

The rate of change of the output variable depends on the length of time thatMANUP or MANDN is activated and on the currently selected limits, asfollows: During the first 3 seconds after setting MANUP or MANDN:

LMN_HLM – LMN_LLM100 s

afterwards:

the increase in OUTV

LMN_HLM – LMN_LLM10 s

t

LMN_HLM

MANUP

OUTV(t)

LMN_LLM3 sec.

Figure 5-3 Changing the Manipulated Variable by Setting “MANUP”

At a sampling time of 100 ms and a manipulated variable range of –100.0 to100.0%, the manipulated value changes during the first three seconds by0.2% per cycle. If the time for which MANUP is activated is increased, therate of change is then increased ten fold, in this case to 2% per cycle(Figure 5-3).

Application

The MAN_GENFunction

The Continuous Controller (PID_C)

Page 124: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-6Standard Controller

C79000-G7076-C195-02

� During a complete restart, the OUTV output is reset to 0.0.

� If you then turn on the manipulated value generator (MANGN_ON =TRUE) the signal value LMNFC_IN is first output at the OUTV output.This means that the changeover to the manipulated value generator froma different mode is always smooth. Providing MANUP or MANDN(up/down switches of the configuration tool) are not activated,LMNFC_IN remains set at the output.

The output parameter OUTV is an implicit parameter. It is accessible atmeasuring point MP8 using the configuration tool.

Parameter Meaning Permitted Values

MAN Manual manipulated value –100.0 to 100.0 [%]

Signal Type *)

MP8 REAL

Parameter Type *)

MANGN_ON BOOL FALSE

MANUP BOOL FALSE

MANDN BOOL FALSE

LMNFC_IN REAL 0.0

MAN REAL 0.0

OutputMAN_GEN

Input parameter

#

1

0

OUTV

*) Default when the Instance DB is created

Figure 5-4 Functions and Parameters of the Manual Manipulated Value Generator

Startup and Modeof Operation of theSetpoint Generator

Parameters of theMAN_GENFunction

The Continuous Controller (PID_C)

Page 125: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-7Standard ControllerC79000-G7076-C195-02

5.2.3 FC Call in the Manipulated Variable Branch (LMNFC)

If you include a user-defined function (FC) in the manipulated variablebranch, you can process the signal of the manipulated variable PID_OUTVgenerated in the controller (for example setting a signal time lag) before it isconnected to the output of the controller.

If you activate the LMNFC function with LMNFC_ON = TRUE, auser-defined function (FC) is called. The number of the FC to be called isentered using the LMNFCNBR parameter.

The controller calls the user FC. Input/output parameters of the user FC arenot supplied with values. You must therefore program the data transfer withS7 STL. A programming example is shown below.

STL Explanation

FUNCTION “User FC”VAR_TEMPINV:REAL;OUTV:REAL;END_VARBEGINL “Controller_DB” LMNFC_INT #INV

//User function OUTV=f(INV)L #OUTVT “Controller DB” LMNFC_OUTEND_FUNCTION

The value of LMNFC_ON decides whether a freely programmed function inthe form of a standard FC (for example a PT element) is included in themanipulated variable branch at this point or whether the manipulated value isfurther processed without this form of preprocessing (Figure 2-15).

!Note:

The block does not check whether an FC exists. If the FC does not exist, theCPU changes to STOP with an internal system error.

Application

The LMNFCFunction

The Continuous Controller (PID_C)

Page 126: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-8Standard Controller

C79000-G7076-C195-02

The LMNFC_IN input value is an implicit parameter. This can be monitoredat LMNFC_IN or at measuring point MP9 using the configuration tool.

Parameter Type *)

LMNFC_OUT REAL

(MP10) REAL

Parameter Type *)

LMNFC_ON BOOL FALSE

LMNFC_NBR BLOCK_FC

LMNFC_IN REAL 0.0

Output parameterLMNFC

Input parameter

FC “LMNFCNBR”

OUTV

0

The connection must be programmed in the user FC

*) Default when the instance block is created

Figure 5-5 Calling an FC Block in the Manipulated Variable Branch

Parameters of theLMNFC Function

The Continuous Controller (PID_C)

Page 127: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-9Standard ControllerC79000-G7076-C195-02

5.2.4 Limiting the Rate of Change of the Manipulated Value(LMN_ROC)

Ramp functions are used in the manipulated variable branch when stepchanges in the process input signal are not acceptable for the process. Abruptchanges in the manipulated value must, for example, be avoided when thereis gearing between a motor and the load and when a fast rate of change in thespeed of the motor would cause overload in the gearing.

The LMN_ROC limits the up and down rate of change of the manipulatedvalue at the output of the controller. Starting from zero, two ramps one withascending and one with descending values can be selected for the entirerange of values. The function is activated when LMNRC_ON = TRUE is set.

The limit values for the rate of change of the ramp functions in the positiveand negative range of the manipulated variable are entered at the two inputsLMN_URLM and LMN_DRLM. The rate of change is an up or down rate asa percentage per second. Faster rates of change are reduced to these limitrates.

If, for example, ’LMN_URLM’ is selected as 10.0 [%/s], the followingvalues are added to the “old” value of OUTV in each sampling cycle as longas �INV �� < �OUTV�:

Sampling time 1 s → OUTVold + 10 %

100 ms→ OUTVold + 1 %

10 ms → OUTVold + 0.1 %

The following diagram illustrates the way in which the signals are processed(Figure 5-6). The step functions at the INV(t) input become ramp functions atthe OUTV(t) output.

t

INV

LMN_DRLM (in %/s)

INV(t)OUTV(t)

LMN_URLM

OUTV

0LMN_URLM

LMN_DRLM

LMN_URLM

Figure 5-6 Limitation of the Rate of Change of the Manipulated Variable LMN(t)

No signal is output when the rate of change limits are reached.

Application

The LMN_ROCFunction

The Continuous Controller (PID_C)

Page 128: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-10Standard Controller

C79000-G7076-C195-02

The ramp parameters are as follows:

Parameter Ramp

LMN_URLM OUTV > 0 and � �OUTV� rising

LMN_DRLM OUTV > 0 and � �OUTV� falling

The input value is an implicit parameter. The parameter can be monitored atoutput LMNFC_IN or at measuring point MP9 using the configuration tool(Figure 2-15).

Parameter Meaning Permitted Values

LMN_URLMLMN_DRLM

Manipulated value up rate limitManipulated value down rate limit

� � �� 0 [%/s]� � �� 0 [%/s]

The rates of change (as a percentage per second) are always entered as apositive value.

Signal Type *)

(MP10) REAL 0.0

Parameter Type *)

LMNRC_ON BOOL FALSE

INV REAL 0.0

LMN_URLM REAL 10.0

LMN_DRLM REAL 10.0

OutputLMN_ROC

Input parameter

0

1OUTV

*) Default when the instance block is created

Figure 5-7 Functions and Parameters of the Manipulated Value Rate of Change Limits

Parameters of theLMN_ROCFunction

The Continuous Controller (PID_C)

Page 129: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-11Standard ControllerC79000-G7076-C195-02

5.2.5 Limiting the Absolute Value of the Manipulated Variable(LMNLIMIT)

The operating range, in other words the range through which the actuator canmove within the permitted range of values, is determined by the range of themanipulated variable. Since the limits for permitted manipulated values donot normally match the 0% or 100% limit of the manipulated value range, itis often necessary to further restrict the range.

To avoid illegal statuses occurring in the process, the range for themanipulated variable has an upper and lower limit in the manipulatedvariable branch.

The ’LMNLIMIT’ function limits the LMN(t) to selected upper and lowervalues LMN_HLM and LMN_LLM. The input variable INV must, however,be outside these limits. Since the function cannot be disabled, a suitableupper and lower limit must always be assigned during the configuration.

The numerical values of the limits (as percentages) are set at the inputparameters for the upper and lower limits. If these limits are violated by theinput variable INV(t), this is indicated at the signaling outputs (Figure 2-15).

t

INV

LMN_HLM

LMN_LLM

QLMN_LLM

QLMN_HLM

OUTVINV (t)

OUTV (t)

0

Tolerance band

Figure 5-8 Absolute Value Limits of the Manipulated Variable LMN(t) = OUTV (t)

Application

The LMNLIMITFunction

The Continuous Controller (PID_C)

Page 130: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-12Standard Controller

C79000-G7076-C195-02

� During a complete restart, all the signalling outputs are set to zero.

� The limitation operates as shown in the following table:

LMN = QLMN_HLM QLMN_LLM when:

LMN_HLM TRUE FALSE INV � LMN_HLM

LMN_LLM FALSE TRUE INV � LMN_LLM

INV FALSE FALSE LMN_HLM < INV < LMN_LLM

The effective manipulated value of the controller is indicated at the output(parameter LMN) and at measuring MP10.

The input value INV is an implicit parameter. It is only accessible at theparameter LMNFC_IN or at measuring point MP9 using the configurationtool.

For the limitation function to operate properly, the following must apply:

LMN_HLM > LMN_LLM

Parameter Meaning Permitted Values

LMN_HLM Upper limit of the man. variable LMN_LLM to 100.0 [%]

LMN_LLM Lower limit of the man. variable –100.0 to LMN_HLM [%]

Parameter Type *)

INV REAL 0.0

LMN_HLM REAL 100.0

LMN_LLM REAL 0.0

Parameter Type *)

QLMN_HLM BOOL FALSE

OUTV (LMN) REAL 0.0

QLMN_LLM BOOL FALSE

Input parameter Output parameterLMNLIMIT

*) Default when the instance block is created

Figure 5-9 Functions and Parameters of the Absolute Value Limits of the Manipulated Variable

Startup and Modeof Operation

Parameters of theLMNLIMITFunction

The Continuous Controller (PID_C)

Page 131: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-13Standard ControllerC79000-G7076-C195-02

5.2.6 Normalization of the Manipulated Variable to the Format of aPhysical Variable (LMN_NORM)

If the manipulated variable applied to the input of the process must be aphysical dimension, the floating point values in the range 0 to 100% must beconverted to the physical range (for example 150 to 3000 rpm) of themanipulated variable.

The LMN_NORM function converts the analog output variable of thecontroller. The analog manipulated value is converted to the output valueLMN using the normalization curve. The output value can be monitored atparameter LMN using the configuration tool.

To obtain the normalization curve:

internal percentage value (in REAL-Format)⇒ external physical values

two parameters must be defined:

– the factor (for the slope): LMN_FAC

– the offset of the straight line normalization curve from zero:LMN_OFF

INV (MP10)

LMNNormalization curve

LMN_OFF

LMN_FAC

INV

The normalization value is calculated from the input value INV (MP10) asfollows:

LMN� INV * LMN_FAC� LMN_OFF

Internally, the function does not limit any values and the parameters are notchecked.

Application

The LMN_NORMFunction

The Continuous Controller (PID_C)

Page 132: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-14Standard Controller

C79000-G7076-C195-02

The output is an implicit parameter and can be monitored at LMN using theconfiguration tool (Figure 2-15).

To define the slope used to convert the value to the physical variable at theLMN output, the parameter LMN_FAC can be selected throughout the entiretechnical range of values.

Parameter Meaning Permitted Values

LMN_FAC Manipulated value factor (slope ofthe normalization curve)

Total range (no dimension)

LMN_OFF Manipulated value offset Technical range of values(physical value)

Signal Type *)

LMN REAL 0.0

Parameter Type *)

INV REAL 0.0

LMN_FAC REAL 1.0

LMN_OFF REAL 0.0

OutputLMN_NORM

Input parameter

*) Default when the instance block is created

Figure 5-10 Functions and Parameters for Manipulated Value Normalization to a Physical Value

Parameters of theLMN_NORMFunction

The Continuous Controller (PID_C)

Page 133: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-15Standard ControllerC79000-G7076-C195-02

5.2.7 Manipulated Value Output in the Peripheral Format (CRP_OUT)

If the manipulated value is transferred to an analog output module, thenumerical value of the internal manipulated variable in floating point format(as a percentage) must be converted to the numerical value of the data wordconnected to the output LMN_PER. This task is performed by theCRP_OUT function.

The CRP_OUT function sets the floating point value of the manipulatedvariable at input LMN to a value converted to the peripheral format. There isno check for positive or negative overflow or over/underdrive. Module typesare not taken into account.

The following table provides an overview of the ranges and numerical valuesbefore and after processing by the normalization algorithm of the CRP_OUTfunction.

Manipulated Value LMN in % Peripheral value LMN_PER

118.515 32767

100.000 27648

0.003617 1

0.000 0

–0.003617 –1

–100.000 –27648

–118.519 –32768

The input value is an implicit parameter in the floating point format. This canbe monitored at output LMN using the configuration tool.

Parameter Type *)

LMN REAL 0.0

Parameter Type *)

LMN_PER WORD W#16#0000

Input parameter Output parameterCRP_OUT

%

*) Default when the instance block is created

Figure 5-11 Functions and Parameters of Manipulated Variable Conversion to the Peripheral Format

Application

The CRP_OUTFunction

Parameters of theCRP_OUTFunction

The Continuous Controller (PID_C)

Page 134: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-16Standard Controller

C79000-G7076-C195-02

5.2.8 Influencing the Manipulated Value With the Configuration Tool

The configuration tool has its own interface to the controller FB. It istherefore always possible to interrupt the manipulated variable branch and tospecify a manipulated value LMN_OP (for example for test purposes whenworking on a PG/PC on which the configuration tool is loaded) (Figure 5-12).

1 (TRUE)

0 (FALSE)

LMN_OP_ON

LMN_OP

MP9

(’PG: ’)

(’Controller: ’)

(LMN)

Figure 5-12 Intervening in the Manipulated Variable Branch From an Operator Panel

One of the three boxes in the loop monitor window is available for thispurpose and is labeled manipulated variable. Here, the manipulated valuecurrently applied to measuring point MP9 is displayed in the “Controller:”field. The field below this (PG:) is used to display and change the LMN_OPparameter.

If the switch of the configuration tool is set to “PG:”, the signal of thestructure switch LMNOP_ON is set to TRUE in the controller FB andLMN_OP is switched to the manipulated value LMN.

If the rate of change limitation LMN_ROC is active in the manipulatedvariable branch, the change from switch settings “PG:” and “Controller:” issmooth without any step change. The value adopted with the changeover(MP9) can be seen in the “Controller:” display field of the loop monitor.LMN is returned to this value at a speed dictated by the rate of change limitLMN_ROC.

These interventions only affect the process when they are sent to theprogrammable logic controller by clicking the “Send” button in the loopmonitor.

LMN Display andSetting in the LoopMonitor

Setting theManipulated ValueWith theConfiguration Tool

The Continuous Controller (PID_C)

Page 135: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-17Standard ControllerC79000-G7076-C195-02

5.3 Continuous Controller in Cascade Control

In a cascade, several controllers are directly dependent on each other. Youmust therefore make sure that if the cascade structure is interrupted at anypoint, the cascade operation can be resumed without causing any problems.

In the secondary or slave controllers of a cascade control system, a QCASsignal is formed by ORing the status signals of the switches in the setpointand manipulated variable branches. This signal operates a switch in thesecondary controllers that changes the controller to the correction mode. Thecorrection variable is always the process variable PV of the secondary loop(Figure 5-13).

This mean that the difference between the input signals at the controllercomparators become zero. The return to closed loop or cascade mode is thensmooth.

The continuous controller (PID_C) can be used as the primary controller incascade control systems or as the secondary controller in slave loops.

SP1-

PV1

SP2-

PV2

Controller 2Controller 1

SPEXT_ONSP_OP_ONCAS_ONMANGN_ONLMNOP_ON

QCASOR

CAS_ON

PV1 PV2

Figure 5-13 Two-Loop Cascade Control System

Interrupting theCascade

The Continuous Controller (PID_C)

Page 136: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-18Standard Controller

C79000-G7076-C195-02

The following diagram illustrates the principle of how the controllers orblocks are connected in multi-loop cascades.

Controller 3

QCAS

SPEXT_ONSP_OP_ONCAS_ONMANGN_ONLMNOP_ON

QCASOR

SP1-

CAS_ON

PV1

SP2-

CAS_ON

PV2

SP3-

PV3

Controller 2Controller 1

LMN

QCASPV

SP_EXT

CAS_ONCAS

PID_C”

LMN

QCASPV

SP_EXT

PID_C”

LMN

CAS_ONCAS

PID_C”

SPEXT_ONSP_OP_ONCAS_ONMANGN_ONLMNOP_ON

OR

Figure 5-14 Connecting a Cascade With Two Slave Control Loops

Connecting theBlocks

The Continuous Controller (PID_C)

Page 137: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-19Standard ControllerC79000-G7076-C195-02

5.4 Pulse Generator (PULSEGEN)

The PULSEGEN function generates the pulse output of a continuouscontroller so that proportional actuators can be controlled by pulses using thestandard controller. This allows PID two-step and three-step controllers to beimplemented with pulse duration modulation. The function is usually used inconjunction with the continuous PID_C controller (see Figure below).

PID_C

LMN

PULSEGEN

QPOS_PINVQNEG_P

During a complete restart of the pulse generator, all outputs are set to zero.

The PULSEGEN function modulates the pulse duration of the input variableINV ( = LMN of the PID controller) to produce a pulse train with a constantperiod. This period corresponds to the cycle time with which the input valueis updated and must be specified in PER_TM.

The duration of a pulse per period is proportional to the input value. Thecycle set by PER_TM is not identical to the processing cycle of the“PULSEGEN” SFB. A PER_TM cycle consists of several processing cyclesof the “PULSEGEN” SFB and the number of “PULSEGEN” calls perPER_TM cycle is a measure of the accuracy of the pulse duration.

t

INV

QPOS_P

(LMN)

0

50

100

1

0 t

PER_TMCYCLE

30

50

80

Figure 5-15 Pulse Duration Modulation

Application

CompleteRestarts/Restart

The PULSEGENFunction

The Continuous Controller (PID_C)

Page 138: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-20Standard Controller

C79000-G7076-C195-02

An input variable of 30% and ten SFB-PULSEGEN calls every PER_TMcycle mean:– ”one” at the output QPOS for the first three SFB ”PULSEGEN” calls(30% of ten calls),– ”zero” at the output QPOS for seven further SFB ”PULSEGEN” calls(70% of 10 calls).

The implementation of this function in the CPU requires a decision about thecurrent status of the binary signal n times at points in the cycle during a pulseperiod. The higher the number n, the more accurate is the pulse durationmodulation.

While the controller FB PID_C is placed in a slow cyclic interrupt priorityclass, PULSEGEN must be implemented in a far faster cyclic interruptpriority class. The faster the cyclic interrupts, the more accurately themanipulated value represented by a pulse duration can be output. If the cyclicinterrupt for the pulse generator is 100 times faster than that of the controller,a resolution of 1% of the manipulated variable range can be achieved.

It is possible to synchronize pulse output with the controller FBautomatically. This ensures that a change in the value of the manipulatedvariable LMN(t) can be output as quickly as possible as a proportionallymodified pulse duration of the binary signal.

The pulse generator evaluates the input value INV at the intervals of theperiod duration PER_TM. Since, however, INV is calculated in a slowercyclic interrupt class, the pulse generator should begin to convert the discretevalue into a pulse signal as soon as possible after INV has been updated. Toallow this, the block can synchronize itself with the start of the periods usingthe following procedure.

If INV changes and if the block call is not in the first or last two call cyclesof a period, a synchronization is performed. The pulse duration isrecalculated and output with a new period is begun in the next cycle (Figure5-16).

The period PER_TM must correspond to the sampling time CYCLE of thecontroller.

Accuracy of thePulse Generation

AutomaticSynchronization

The Continuous Controller (PID_C)

Page 139: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-21Standard ControllerC79000-G7076-C195-02

CYCLE ofPULSEGEN

t

0

ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ

ÇÇÇÇ

ÇÇÇÇ

t

ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ

ÇÇÇÇÇÇÇÇ

LMN = INV = 30.0 LMN = INV = 80.0 LMN = INV = 50.0

CYCLE of PID_C

ÇÇ

PER_TM PER_TM

00 0 01 1 0 0 11 1 11 1 1 11 0 0 11

. . . .

. . . .

Period start

Synchronization of theperiod start

PULSEGEN detects: INV has changedand the call is not in the first cycle orlast two cycles of the period

PULSEGEN detects: INV has changedto 80.0 or 50.0 and the call is in the firstcycle or last two cycles of the period

ÇÇ

Processing PULSEGEN Processing PULSEGEN in the first cycle or in the last two cycles of the period

Processing PID_C

No synchronization necessary

Figure 5-16 Synchronization of the Start of the Period

Automatic synchronization can be deactivated at the “SYN_ON”(= FALSE) input.

Note

By beginning a new period, the old value of INV (in other words of LMN) issimulated on the pulse signal with greater or lesser inaccuracy after thesynchronization.

Depending on the assignment of parameters for the pulse generator, PIDcontrollers with three-step, with a bipolar or monopolar two-step output canbe configured. The following table shows the settings of the switchcombinations for the possible modes.

ModeSwitch MAN_ON STEP3_ON ST2BI_ON

Three-step controller FALSE TRUE any

Two-step controller with bipolarrange (-100 % to 100 %)

FALSE FALSE TRUE

Two-step controller with monopolarrange (0 % to 100 %)

FALSE FALSE FALSE

Manual mode TRUE any any

Modes of theController WithPulse Output

The Continuous Controller (PID_C)

Page 140: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-22Standard Controller

C79000-G7076-C195-02

In the “three-step controller” mode, the actuating signal can have three states,for example depending on the actuator and process; more – off – less,forwards – stop – backwards, heat – off – cool etc. Depending on therequirements of the controlled process, the states of the binary output signalsQPOS_P and QNEG_P are assigned to the operating states of the particularactuator. The table shows two examples.

HeatForwards

OffStop

CoolBackwards

QPOS_P TRUE FALSE FALSE

QNEG_P FALSE FALSE TRUE

Suitably dimensioning the minimum pulse or minimum break time P_B_TMcan prevent extremely short on and off times that can greatly reduce theworking life of actuators and control elements (Figure 5-17). To achieve this,a response threshold is set for pulse output.

Note

Small absolute values in the input variable LMN that would generate a pulseduration less than P_B_TM are suppressed. For large input values that wouldgenerate a pulse duration greater than PER_TM – P_B_TM, a pulse durationof 100% or –100% is set.

A setting of P_B_TM � 0.1 * PER_TM is recommended.

PER_TM PER_TM

min. on timeP_B_TM

min. off timeP_B_TM

1

PER_TM

Figure 5-17 How the Pulse Output Switches On and Off

The duration of the positive or negative pulses can be calculated from theinput variable (as a percentage) multiplied by the pulse duration:

INV * PER_TM [s]100

Pulse duration =

If the minimum pulse or break time is suppressed, the conversioncharacteristic curve develops “dog legs” at the start and end of the range(Figure 5-18).

Three-StepController

The Continuous Controller (PID_C)

Page 141: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-23Standard ControllerC79000-G7076-C195-02

Duration of thepos. pulse

-100 %

100 %

PER_TM

PER_TM – P_B_TM

P_B_TM

Off continuously

On continuously

Duration of theneg. pulse

Figure 5-18 Symmetrical Curve of the Three-Step Controller (Ratio Factor = 1)

Using the ratio factor RATIOFAC, the ratio of the duration of positive andnegative pulses can be changed. In a thermal process, this, for example,allows different system time constants to be taken into account for heatingand cooling.

If, at the same absolute value for the input variable |INV |, the pulse durationof the negative pulse output must be shorter than the positive pulse, a ratiofactor less than 1 must be set (Figure 5-19):

pos. pulse > neg. pulse: RATIOFAC < 1

INV * PER_TM * RATIOFAC100

Pulse duration negative:

INV * PER_TM100

Pulse duration positive:

AsymmetricalThree-stepController

The Continuous Controller (PID_C)

Page 142: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-24Standard Controller

C79000-G7076-C195-02

Duration of thepos. pulse

-100 %

100 %

PER_TM

PER_TM – P_B_TM

P_B_TM

Duration of theneg. pulse

0.5 * PER_TM0.5 * (PER_TM – P_B_TM)

0.5 * P_B_TM

Figure 5-19 Asymmetrical Curve of the Three-Step Controller (Ratio Factor = 0.5)

If, on the other hand, with the same absolute value for the input variable|INV |, the pulse duration at the positive pulse output must be shorter than thatof the negative pulse, a ratio factor greater than 1 must be set:

pos. pulse < neg. pulse: RATIOFAC > 1

INV * PER_TM100

Pulse duration negative:

INV * PER_TM100 * RATIOFAC

Pulse duration positive:

The ratio factor also influences the minimum pulse or minimum break time(Figure 5-19). Mathematically, this means that at RATIOFAC < 1, theresponse value for negative pulses is multiplied by the ratio factor and atRATIOFAC > 1, the response value for positive pulses is divided by the ratiofactor.

In a two-step controller, only the positive pulse output QPOS_P is connectedto the corresponding on/off element by PULSEGEN. Depending on the rangebeing used (LMN = –100.0 to 100.0% or LMN = 0.0% to 100.0%), thetwo-step controller can have either a bipolar or a monopolar range (Figure5-20 and Figure 5-21).In the monopolar mode, the input value INV can only have values between0.0 and 100%.

Two-stepController

The Continuous Controller (PID_C)

Page 143: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-25Standard ControllerC79000-G7076-C195-02

Duration of the pos. pulse

–100.0 % 100.0 %

PER_TMPER_TM – P_B_TM

P_B_TM

Off continuously

On continuously

0.0 %

Figure 5-20 Two-Step Controller With Bipolar Range (–100% to 100%)

Duration of the pos. pulse

100.0 %

PER_TMPER_TM – P_B_TM

P_B_TM

0.0 %

Figure 5-21 Two-Step Controller With a Monopolar Range (0% to 100%)

The negated output signal is available at QNEG_P if the connection of thetwo-step controller in the control loop requires a logically inverted binarysignal for the actuator pulses.

On Off

QPOS_P TRUE FALSE

QNEG_P FALSE TRUE

In the manual mode (MAN_ON = TRUE), the binary outputs of thethree-step or two-step controller can be set using the signals POS_P_ON andNEG_P_ON independent of INV.

POS_P_ON NEG_P_ON QPOS_P QNEG_P

Three-step controller FALSE FALSE FALSE FALSE

TRUE FALSE TRUE FALSE

FALSE TRUE FALSE TRUE

TRUE TRUE FALSE FALSE

Two-step controller FALSE any FALSE TRUE

TRUE any TRUE FALSE

The values of the input parameters are not limited by the block. Theparameters are not checked.

During a complete restart, all the parameters are set to zero.

Manual Mode WithTwo or Three-stepControllers

Parameters of thePULSEGENFunction

The Continuous Controller (PID_C)

Page 144: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

5

5-26Standard Controller

C79000-G7076-C195-02

Parameter Meaning Permitted Values

CYCLE Sampling time � 1 ms

PER_TM Duration of pulse duration mod. � 20 * CYCLE

P_B_TM Minimum pulse or break time � CYCLE

RATIOFAC Ratio factor for asymmetrical curves0.1 to 10.0 (no dimension)

Signal Type *)

QPOS_P BOOL FALSE

QNEG_P BOOL FALSE

Parameter Type *)

COM_RST BOOL FALSE

CYCLE TIME T#10ms

MAN_ON BOOL FALSE

POS_P_ON BOOL FALSE

NEG_P_ON BOOL FALSE

SYN_ON BOOL FALSE

STEP3_ON BOOL TRUE

ST2BI_ON BOOL FALSE

INV REAL 0.0

PER_TM TIME T#1s

P_B_TM TIME T#50ms

RATIOFAC REAL 1.0

PULSEGENInput Parameter

#

1

0

Output Parameter

*) Default when the instance DB is created

Figure 5-22 Functions and Parameters of the Pulse Generator

The Continuous Controller (PID_C)

Page 145: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6-1Standard ControllerC79000-G7076-C195-02

The Step Controller (PID_S)

This chapter describes the following:

� The control functions of the PID step controller

� Processing the manipulated variable on a step controller with a positionfeedback signal

� Processing the manipulated variable on a step controller without aposition feedback signal

� The step controller in cascade control systems

What Does ThisChapter Describe?

6

Page 146: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-2Standard Controller

C79000-G7076-C195-02

6.1 Control Functions of the PID Step Controller

Apart from the functions in the setpoint and process variable branch, thefunction block (FB2) also implements a complete PID controller with abinary manipulated value output. It is possible to adjust the manipulatedvalue manually. Subfunctions can be enabled of disabled.

With the FB, it is possible to control technical processes and systems withintegrating actuators on SIMATIC S7 programmable logic controllers. Thecontroller can be used as a fixed setpoint controller singly or in secondarycontrol loops in cascade, blending or ratio control systems, however it cannotbe used as a primary or master controller.

The processing of the signals in the setpoint and process variable branchesand the processing and monitoring of the error signal is identical to that ofthe continuous controller. Detailed descriptions of these functions for bothcontrollers can be found in Chapter 4 of this manual.

The mode of operation of the step controller with a position feedback signalis based on the PID control algorithm of the sampling controller and issupplemented by the function elements for generating the binary outputsignal from the analog actuating signal of the controller (Figure 6-1).

The three-step element changes deviations between the manipulated variableLMN and the actual position of the actuator depending on the sign intopositive or negative pulses for the output signal, that can then be transferredto a motorized valve drive. In practical terms, this represents a cascadecontrol with a secondary position control loop.

PV

SP

ER QLMNUP

QLMNDN–

LMNRposition feedback signal

LMN

Figure 6-1 Functions of the Step Controller With a Position Algorithm

The I action of the step controller without a position feedback signal iscalculated in an integrator in the feedback path. The feedback signalcompared with the LMN controller output of the PD controller is derivedfrom the indirectly acquired valve position.

The PID_SFunction Block

Outline of theFunctions of theStep ControllerWith PositionFeedback Signal

Outline of theFunctions of theStep ControllerWithout PositionFeedback Signal

The Step Controller (PID_S)

Page 147: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-3Standard ControllerC79000-G7076-C195-02

As soon as one of the outputs is activated, the value (ER*GAIN)/TI is set tozero, in other words when the actuator is operating, one of the values �

100/MTR_TM is applied to the input of the integrator. When the outputs areoff, the situation is the opposite, the integrator input now has the value(ER*GAIN)/TI, so that the difference zero is applied to the manipulatedvariable comparator when the process is settled.

The three-step element converts deviations between the manipulated variableand feedback variable depending on the sign into positive or negative pulsesfor the output signal, that can, for example, be transferred to a motor-drivenvalve.

PV–

SP

ERQLMNUP

QLMNDN–

LMN

+

+OR

X Integrator

ER*GAINTI

�100.0MTR_TM

GAINTI

Figure 6-2 Functions of the Step Controller Without Position Feedback Signal

The FB PID_S function block has a complete restart routine that is runthrough when the input parameter COM_RST = TRUE is set.

Ramp soak (RMP_SOAK)When the ramp soak is activated, the time slices DB_NBR PI[0 toNBR_PTS].TMV are totalled between the coordinates and indicated at thetotal time T_TM and total time remaining RT_TM outputs.

If PI[n].TMV is modified on-line or if TM_CONT and TM_SNBR are set,the total time and total time remaining of the ramp soak also change. Sincethe calculation of T_TM and RS_TM greatly increases the processing time ofthe RMP_SOAK function when a large number of time slices are involved,this calculation is only performed after a complete restart or whenTUPDT_ON = TRUE is set.

Integral action (INT)When the controller starts up, the integrator is set to the initialization valueI_ITLVAL. When it is called by a cyclic interrupt, it starts at this value.

All other outputs are set to their default values.

CompleteRestart/Restart

The Step Controller (PID_S)

Page 148: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-4Standard Controller

C79000-G7076-C195-02

6.2 Manipulated Variable Processing on the Step Controller WithPosition Feedback Signal

6.2.1 Modes of the Step Controller

The step controller (PID_S) with a feedback signal consists of two parts: thecontroller section working with the continuous signals that is largely identicalto the structure of the PID_C function block and a second part in which thebinary actuating signals are generated and in which a position control loop isformed using the position feedback signal (Figure 6-3).

The output of the PID algorithm acts as a reference input for the positioncontroller and therefore specifies the position of the motor-driven actuator.

Step controller PID_S

–Processvariable

Setpoint

Position feedback signal

Limit stop signals

(actuator)

Figure 6-3 Step Controller With Position Feedback Signal

To avoid the motor being overloaded, its limit stop signals(LMNR_HS/LMNR_LS) can be used to interlock the controller outputs(Figure 2-16). If the actuator drive does not provide limit stop signals, theinput parameters LMNR_HS and LMNR_LS = FALSE must be set.

Note

If no limit stop signals exist, the controller cannot detect whether or not amechanical limit stop has been reached. It is possible that the controller thenoutputs signals, for example, to open the valve although it is already fullyopen.

Structure of theStep Controller

The Step Controller (PID_S)

Page 149: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-5Standard ControllerC79000-G7076-C195-02

Step controller with position feedback signal

Whenever a position feedback signal is available with the type of actuatorbeing used, the controller structure as shown in Figure 6-3 is activated bysetting LMNR_ON = TRUE.

If no position signal can be received from the motor-driven actuator, thestep controller structure without a position feedback signal must beselected with LMNR_ON = FALSE (see Section 6.3).

Note

The mode selector switch LMNR_ON must not be used when the controlleris in the on-line mode.

� Modes

The step controller can be operated in the same modes as the continuouscontroller, in other words in the “automatic” mode using a closed loopand in the “manual” mode where the actuator is driven manually in theopen loop. The option of generating manual signals by entering anabsolute value (MAN) or using the manipulated value generator(MAN_GEN) is extended with the step controller by the possibility ofswitching the output signals directly using LMNS.

If MAN_ON = FALSE is selected, the manipulated value of the PIDalgorithm is switched to the three-step element. The changeover from manualto automatic produces a step change in the manipulated value LMN. Thisdoes not have a detrimental effect, however, since the process is driven usingthe integrating actuator (a ramp change is produced). The output of the PIDalgorithm is applied to measuring point MP7.

Apart from the “automatic” mode, the step controller has three modes inwhich the actuating signal can be influenced manually:

– manual mode using the MAN signal,

– manual mode with the up/down switch (MAN_GEN),

– manual mode by direct switching of the binary outputs.

The way in which manual values can be generated and connected isillustrated in Figure 6-4. Using the MAN parameter (–100.0% to 100.0%) themanipulated variable can be influenced by connecting an absolute value orfrom within the user program.

Modes of the StepController

Automatic Mode

Manual Mode

The Step Controller (PID_S)

Page 150: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-6Standard Controller

C79000-G7076-C195-02

PID_OUTV(controller)

MANGN_ON

MAN_GEN

MAN_ON

MP8

MAN

MP7 MP9

LMNLMNLIMIT QLMNUP

QLMNDN

THREE_ST

LMNUP

LMNDN

PULSEOUT

LMNR

LMNUP_OP

LMNDN_OP

LMNSOPON

LMNS_ON

Figure 6-4 Modes and Generating Manual Values on the Step Controller With a Position Feedback Signal

If MAN_GEN is activated from within a different mode the manipulatedvalue at the output (MP9) is adopted. The changeover to the manual valuegenerator is therefore always smooth. The manual manipulated value can beincreased or decreased within the limits LMN_HLM and LMN_LLM.

Due to the direct effect on the states of the output signals, manual switchingof the actuator using LMNUP or LMNDN always has priority. When themode is deactivated with LMNS_ON=FALSE, the next mode is alwaysadopted without a step change.

The following table shows the possible modes of the step controller with therequired values of the structure switches.

Table 6-1 Modes of the Step Controller

ModeSwitch MNGN_ON MAN_ON LMNS_ON

Automatic mode any FALSE FALSE

Manual mode with absolute value FALSE TRUE FALSE

Manual mode with MAN_GEN TRUE TRUE FALSE

Manual mode with pulse switch any any TRUE

Changing theModes

The Step Controller (PID_S)

Page 151: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-7Standard ControllerC79000-G7076-C195-02

6.2.2 Influencing the Manipulated Variable With the Configuration Tool

The configuration tool has its own interface to the controller FB. It istherefore possible to interrupt the manipulated variable branch using theconfiguration tool on a PG/PC and to set your own manipulated value (Figure 6-5).

LMNOP_ON

LMNLMNLIMITQLMNUP

QLMNDN

THREE_ST

LMNUP

LMNDN

PULSEOUT

LMNR

LMNUP_OP

LMNDN_OP

MP9

LMN_OP

LMNSOPON

LMN

LMNS_ON

Figure 6-5 Interventions in the Manipulated Variable Branch Using an Operator Panel(OP)

One of the three boxes in the loop monitor window is available for thispurpose and is labeled manipulated variable. Here, the manipulated valuecurrently applied to measuring point MP9 is displayed in the “Controller:”field. The field below this (PG:) is used to display the current LMNparameter.

If the switch of the configuration tool is set to “PG:”, the signal of thestructure switch LMNOP_ON is set to TRUE in the controller FB andLMN_OP is switched to the manipulated value.

Switching over between the settings “PG:” and “Controller:” is onlycompletely smooth when the rate of change limitation LMN_ROC isactivated in the manipulated variable branch. The value to which themanipulated variable returns (MP9) can be seen in the “Controller” field ofthe loop monitor. LMN then returns to this value limited by the rate ofchange limits set with LMN_ROC.

After LMNSOPON = TRUE is set, the configuration tool can be used toadjust the manipulated value outputs directly with LMNUP_OP orLMNDN_OP.

These manual interventions only affect the process after they have beentransferred to the programmable logic controller by clicking the “Send”button in the loop monitor.

LMN Display andSetting in theLoop Monitor

Setting theManipulated ValueWith theConfiguration Tool

The Step Controller (PID_S)

Page 152: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-8Standard Controller

C79000-G7076-C195-02

6.2.3 Limiting the Absolute Value of the Manipulated Variable (LMNLIMIT)

The range of the manipulated variable determines the operating range, inother words the range through which the actuator can move within thepermitted range of values. Since the limits for permitted manipulated valuesdo not normally match the 0% or 100% limit of the manipulated value range,it is often necessary to further restrict the range

To avoid illegal statuses occurring in the process, the range for themanipulated variable has an upper and lower limit in the manipulatedvariable branch.

The ’LMNLIMIT’ function limits the LMN(t) to selected upper and lowervalues LMN_HLM and LMN_LLM. The input variable INV must, however,be outside these limits. Since the function cannot be disabled, an upper andlower limit must always be assigned during the configuration.

The numerical values of the limits (as percentages) are set at the inputparameters for the upper and lower limits. If these limits are exceeded by theinput variable INV(t), this is indicated at the signaling outputs (Figure 6-7).

t

INV

LMN_HLM

LMN_LLM

QLMN_LLM

QLMN_HLM

OUTVINV (t)

OUTV (t)

0

Tolerance band

Figure 6-6 Absolute Value Limits of the Manipulated Variable LMN(t) = OUTV (t)

Application

The LMNLIMITFunction

The Step Controller (PID_S)

Page 153: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-9Standard ControllerC79000-G7076-C195-02

� During a complete restart, all the signal outputs are set to zero.

� The limitation operates as shown in the following table:

LMN = QLMN_HLM QLMN_LLM when:

LMN_HLM TRUE FALSE INV � LMN_HLM

LMN_LLM FALSE TRUE INV � LMN_LLM

INV FALSE FALSE LMN_HLM � INV � LMN_LLM

The effective manipulated value of the controller is indicated at the output(parameter LMN).

The input value INV is an implicit parameter. It is only accessible atmeasuring point MP9 using the configuration tool.

For the limitation function to operate properly, the following must apply:

LMN_HLM > LMN_LLM

Parameter Meaning Permitted Values

LMN_HLM Upper limit of the man. variable LMN_LLM ... 100.0 [%]

LMN_LLM Lower limit of the man. variable –100.0 ... LMN_HLM [%]

Parameter Type *)

INV REAL

LMN_HLM REAL 100.0

LMN_LLM REAL 0.0

Parameter Type *)

QLMN_HLM BOOL FALSE

OUTV (LMN) REAL

QLMN_LLM BOOL FALSE

Input Parameters Output ParametersLMNLIMIT

*) Default when the instance DB is created

Figure 6-7 Functions and Parameters of the Absolute Value Limitation of the Manipulated Value

Start Up and Modeof Operation

Parameters of theLMNLIMITFunction

The Step Controller (PID_S)

Page 154: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-10Standard Controller

C79000-G7076-C195-02

6.2.4 Processing the Position Feedback Signal (LMNR)

Inputs with suitable signal processing functions are available for connectingthe position feedback signal to the comparator in the manipulated variablebranch of the step controller (Figure 6-8). Input LMNR_PER is used toconnect signals in the format of SIMATIC I/Os (peripheral format) andLMNR_IN to connect signals in floating point format.

The corresponding internal value is accessible at measuring point MP10 as apercentage.

LMNRNORM

LMNR_IN

LMNR_PERLMNR_CRP

%LMNRP_ON

01

MP10LMNR

Figure 6-8 Processing the Position Feedback Signal With the Step Controller

If the value of the position feedback signal is provided by an analog inputmodule, the numerical value of the I/O data word must be converted to anumerical value in the floating point format (as a percentage).

The LMNR_CRP function converts the numerical value of the positionfeedback signal at input LMNR_PER to a floating point value normalized toa percentage. There is no check for positive/negative overflow,over/underdrive or wire break.

The following table provides an overview of the ranges and numerical valuesbefore and after processing with the conversion and normalization algorithmof the LMNR_CRP function.

LMNR_PER Peripheral (I/O) Value Output Value in % (MP10)

32767 118.515

27648 100.000

1 0.003617

0 0.000

– 1 – 0.003617

– 27648 – 100.000

– 32768 – 118.519

Signal Adaptation

The LMNR_CRPFunction

The Step Controller (PID_S)

Page 155: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-11Standard ControllerC79000-G7076-C195-02

If the position feedback signal is a physical value (for example 240 to 800mm or 0 to 60�), then the feedback input that has already been converted to afloating point value (as a percentage) must also be normalized to the requiredinternal floating point value in the range between 0 and 100%.

To specify the straight line normalization curve, the following parametersmust be defined:

– the factor (for the slope): LMNR_FAC

– the offset of the normalization curve from zero: LMNR_OFF

OUTV

MP10 Normalization curve

LMNR_OFF

LMNR_FAC

The normalization value MP10 (Figure 6-8) is calculated from the inputvalue OUTV (LMNR_PER) as follows:

MP10� OUTV * LMNR_FAC� LMNR_OFF

The function is effective when the control input LMNRP_ON = TRUE is set.Internally, the values are not limited. The parameters are not checked.

The LMNR_PER peripheral input is switched to the feedback branch whenLMNRP_ON = TRUE is set. The value of LMNR_PER (in the internalformat) is accessible at measuring point MP10.

Parameter Meaning Permitted Range

LMNR_PER Feedback value in peripheral format

LMNR_FAC Slope of the curve at the input of theposition feedback signal LMNR_PER

Technical range of values (nodimension)

LMNR_OFF Zero point of the LMNR normalizationcurve

–100.0 ... + 100.0 [%]

The LMNRNORMFunction

Startup

Parameters of theLMNR_CRP andLMNRNORMFunctions

The Step Controller (PID_S)

Page 156: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-12Standard Controller

C79000-G7076-C195-02

Signal Type *)

LMNR REAL

Parameter Type *)

LMNRP_ON BOOL FALSE

LMNR_IN REAL 0.0

LMNR_PER WORD W#16#0000

LMNR_FAC REAL 1.0

LMNR_OFF REAL 0.0

Output ParametersLMNR_CRP + LMNRNORMInput Parameters

0

1% OUTV

MP10

*) Default when the instance DB is created

Figure 6-9 Functions and Parameters of the Peripheral Value Conversion for the Position Feedback Signal

The Step Controller (PID_S)

Page 157: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-13Standard ControllerC79000-G7076-C195-02

6.2.5 Generating the Actuating Signals (QLMNUP/QLMNDN)

The difference between the manipulated value LMN and the positionfeedback signal LMNR is switched to the three-step element with hysteresisTHREE_ST. The PULSEOUT pulse generator that follows this elementensures that a minimum pulse time and minimum break time are maintainedto reduce wear and tear on the actuators (Figure 6-10). If the limit positionswitches of the actuator (LMNR_HS/LMNR_LS) are triggered, thecorresponding output is disabled.

The minimum pulse time PULSE_TM and minimum break timeBREAK_TM are also taken into account if the binary output signals areactivated manually (LMNS_ON=TRUE or LMNSOPON=TRUE). If a limitposition switch is activated, the output is also disabled in manual operation.

LMNQLMNUP

QLMNDN

THREE_ST

LMNS_ON

LMNUP

LMNDN

PULSEOUT

LMNR

AND

AND

LMNUP_OP

LMNDN_OP

LMNSOPON

LMNR_HS

LMNR_LS

AND

ANDadaptive

Figure 6-10 Generating the Binary Actuating Signal on the Step Controller WithPosition Feedback Signal

The deviation between the values of the actuating signal of the controller andthe actual position reached by the actuator forms the input variable of thethree-step element. Two binary signals are generated at its output and areeither set or reset depending on the value and sign of the difference at theinput.

The three-step switch THREE_ST reacts to the input signal INV as shown inthe table below (ThrOn=on threshold, ThrOff=off threshold) and then adoptsone of the three possible combinations of output signals UP/DOWN (Figure6-11):

UP DOWN Input Combination

TRUE FALSE INV � � ThrOn or INV > (ThrOff and UPold = TRUE)

FALSE TRUE INV � � -ThrOn or INV < (-ThrOff and DOWNold = TRUE)

FALSE FALSE |INV|� � ThrOff

Signal Processing

The Three-stepElement WithHysteresisTHREE_ST

The Step Controller (PID_S)

Page 158: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-14Standard Controller

C79000-G7076-C195-02

adaptive 1

1

UP

DOWN

DOWN

UP

LMN – LMNR

ThrOnThrOff

(MP12)

INV

Figure 6-11 Functions of the Three-Step Element THREE_ST

The off threshold ThrOff must be higher than the change in the positionfeedback signal after the duration of one pulse. This value depends on theactuating time of the motor MTR_TM and is calculated as follows:

ThrOff� 0.5 * 110MTR_TM

* MAX (PULSE_TM, CYCLE)

PULSE_TM must be a whole multiple of CYCLE.

Note

If the motor actuating time is set too high (10% above the real actuatingtime) the actuating signals QLMNUP and QLMNDN are switched on and offconstantly.

To reduce the switching frequency when correcting larger error signals, theresponse threshold �ThrOn is adapted automatically during operation.ThrOff remains constant, in other words ThrOff functions as the lower limitfor ThrOn. This adaptation uses the following algorithm:

ThrOn = MIN (|LMN – LMN-I|, |LMNR – LMN-I|)

This automatic adaptation means that during the time that the controllerrequires to correct larger errors in the process variable the on threshold ishigh. The difference between the manipulated variable and I action is alsohigh during this time. The same applies to the difference between theposition feedback signal and I action during the time required to settle to anew operating point.

The minimum for these two values determines the current value of the onthreshold and therefore how often the three-step element switches its outputs.A high on threshold reduces the switching frequency.

In contrast, the differences mentioned above are extremely small approachingzero when the control loop is settled. The adaptive on threshold then adoptsthe minimum value ThrOff. This small on threshold makes sure that thecontroller reacts to small process disturbances immediately. In the manualmode (MAN_ON = TRUE), the adaptation is disabled and ThrOn = ThrOff isset.

The pulse generator makes sure that when the output pulses are set and reset,a minimum value is maintained for the pulse duration and pulse break.

Adapting theResponseThreshold ThrOn

The PULSEOUTPulse Generator

The Step Controller (PID_S)

Page 159: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-15Standard ControllerC79000-G7076-C195-02

To protect the actuator, you can therefore select a minimum pulse timePULSE_TM and a minimum break time BREAK_TM. The duration of theoutput pulses QLMNUP or QLMNDN is always greater than PULSE_TMand the break between two pulses is always larger than BREAK_TM. Figure6-12 illustrates the functions of PULSEOUT based on the example of the UPsignal.

1

t

UPin

UPout

BREAK_TM

1

t

PULSE_TM

Figure 6-12 Functions of the Pulse Generator PULSEOUT

The values set for the parameters PULSE_TM and BREAK_TM must be awhole multiple of the cycle time CYCLE. If the values set are smaller thanCYCLE, then the cycle time CYCLE is used for the minimum pulse andminimum break times.

Signal Type **)

QLMNUP BOOL FALSE

QLMNDN BOOL FALSE

Parameter Type *)

LMNSOPON BOOL FALSE

LMNUP_OP BOOL FALSE

LMNDN_OP BOOL FALSE

LMNS_ON BOOL TRUE

LMNUP BOOL FALSE

LMNDN BOOL FALSE

LMNR_HS BOOL FALSE

LMNR_LS BOOL FALSE

INV (MP12) REAL 0.0

MTR_TM TIME T#30s

PULSE_TM TIME T#3s

BREAK_TM TIME T#3s

Output ParametersTHREE_STPULSEOUT

Input Parameters

LMNR_HS/_LS

#

*) Default when the instance DB is created

Figure 6-13 Functions and Parameters for Generating Actuating Signals on the Step Controller

Parameters ofTHREE_ST andPULSEOUT

The Step Controller (PID_S)

Page 160: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-16Standard Controller

C79000-G7076-C195-02

6.3 Manipulated Variable Processing on the Step Controller WithoutPosition Feedback Signal

The step controller (PID_S) without a position feedback signal consists oftwo parts: the PD section that operates with continuous signals and a secondsection in which the binary actuating signals are generated from thedifference between the PD action and feedback (Figure 6-14).

The integrator in the feedback path of this step controller totals the errorsignal from � 100/MTR_TM and ER*GAIN/TI. The difference between theassumed motor position and the I action is applied to the output of theintegrator. In the settled state, the output of the integrator and the PD actionbecome zero. Since the input of the three-step element also becomes zero,the binary actuating signals QLMNUP and QLMNDN are set to FALSE.

The I action of the PID algorithm is disabled, in other words LMN_I = 0.Functions for assigning defaults to the I action or holding the I action are notimplemented on the step controller without position feedback signal. Amanual mode using the MAN parameter is also omitted because there is noinformation about the position of the actuator.

+–PV

SP

100

0

–100

0X

+

X

QLMNUP

QLMNDN

0

1MTR_TM

QLMNUP OR QLMNDN

GAINTI

0.0

LMNS_ON OR LMNSOPON

1

0

1

0

Figure 6-14 Step Controller Without Position Feedback Signal

To avoid overloading the drive, its limit stop signals(LMNR_HS/LMNR_LS) can be used to interlock the controller outputs(Figure 2-17). If the drive does not provide limit position signals, the inputparameters LMNR_HS and LMNR_LS = FALSE must be set.

Note

If no limit position signals exist, the controller cannot recognize when amechanical limit is reached. It is possible that the controller outputs signalsto open the value although it is already completely open.

Structure andFunction of theStep Controller

The Step Controller (PID_S)

Page 161: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-17Standard ControllerC79000-G7076-C195-02

� Selection: Step controller without position feedback signal

If there is no position feedback signal available to indicate the position ofthe actuator, the control structure illustrated in Figure 6-14 is activated bysetting LMNR_ON = FALSE.

� Modes

Due to the absence of information about the position of the actuator, thereis no manual mode with the MAN parameter or with the manual valuegenerator MAN_GEN on the step controller without position feedbacksignal. Apart from the “automatic” mode, in other words closed loopcontrol, the “manual” mode with direct keying of the output pulses canalso be set in the open loop with LMNS_ON = TRUE.

When the manual mode is active (LMNS_ON = TRUE), the binary outputsignal QLMNUP and QLMNDN can be set using the switches LMNUP andLMNDN (Figure 6-15). The minimum pulse time PULSE_TM and minimumpulse break are maintained.

If one of the limit position switches LMNR_HS or LMNR_LS is set, thecorresponding output signal is also disabled in the manual mode.

LMNQLMNUP

QLMNDN

THREE_ST

LMNS_ON

LMNUPLMNDN

PULSEOUT

AND

AND

LMNUP_OP

LMNDN_OP

LMNR_HS

LMNR_LS

AND

ANDadaptive

LMNSOPON

Figure 6-15 Manual Mode With the Step Controller Without Position Feedback Signal

The direct manual mode using LMNUP or LMNDN directly affects theoutput signals and therefore always has priority. When the controller switchesback to the automatic mode with LMNS_ON = FALSE, the change is alwayssmooth.

The following table shows the possible modes of the step controller withoutposition feedback signal:

Modes of the StepController

Manual Mode

The Step Controller (PID_S)

Page 162: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-18Standard Controller

C79000-G7076-C195-02

Table 6-2 Modes of the Step Controller Without Position Feedback Signal

ModeSwitch LMNS_ON

Automatic mode FALSE

Manual mode setting binary output signals TRUE

The difference between the PD component of the controller and the feedbackvalue (MP 11) is switched to the three-step element with hysteresisTHREE_ST. The PULSEOUT pulse generator that follows this elementensures that a minimum pulse time and minimum break time are maintainedto reduce wear and tear on the actuators (Figure 6-16). If the limit positionswitches of the actuator (LMNR_HS/LMNR_LS) are triggered, thecorresponding output is disabled.

The minimum pulse time PULSE_TM and minimum break timeBREAK_TM are also taken into account if the binary output signals areactivated manually (LMNS_ON=TRUE or LMNSOPON=TRUE (Figure6-15). If a limit position switch is activated, the output is also disabled inmanual operation.

+–

100

0

–100

0X

+

QLMNUP

QLMNDN

0

1MTR_TM

MP11

MP12 THREE_ST PULSEOUT

INT

OR

PID_OUTV

ER�GAIN

0.0

LMNS_ON OR LMNSOPON

1

0

TI

Figure 6-16 Generating the Binary Actuating Signal on the Step Controller WithoutPosition Feedback Signal

The difference between the values of the PD component of the controller andthe feedback value forms the input variable of the three-step element. Twobinary signals are generated at its output and are either set or reset dependingon the value and sign of the difference at the input.

The three-step switch THREE_ST reacts to the input signal INV (PDcomponent – feedback) as follows (ThrOn=on threshold, ThrOff=offthreshold) and then adopts one of the three possible combinations of outputsignals UP/DOWN (Figure 6-17):

Generating theActuating SignalsQLMNUP/QLMNDN

The Three-stepElement WithHysteresisTHREE_ST

The Step Controller (PID_S)

Page 163: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-19Standard ControllerC79000-G7076-C195-02

UP DOWN Input Combination

TRUE FALSE INV � � ThrOn or INV > (ThrOff and UPold = TRUE)

FALSE TRUE INV � � -ThrOn or INV < (-ThrOff and DOWNold = TRUE)

FALSE FALSE |INV|� � ThrOff

adaptive 1

1

UP

DOWN

DOWN

UPINV

LMN – LMNR

ThrOnThrOff

(MP12)

Figure 6-17 Functions of the Three-Step Element THREE_ST

The off threshold ThrOff must be higher than the change in the positionfeedback signal after the duration of one pulse. This value depends on theactuating time of the motor MTR_TM and is calculated as follows:

ThrOff � 0.5 * 110MTR_TM

* MAX (PULSE_TM, CYCLE)

To reduce the switching frequency when correcting larger error signals, theresponse threshold �ThrOn is adapted automatically during operation.ThrOff remains constant in other words ThrOff functions as the lower limitfor ThrOn. This adaptation uses the following algorithm:

ThrOn = MIN (|PD action|, |feedback value (MP11)|)

This automatic adaptation means that during the time that the controllerrequires to correct larger errors in the process variable the on threshold ishigh. The value of the PD component is also high during this time. The sameapplies to the value of the position feedback signal during the time requiredto settle to a new operating point.

The minimum for these two values determines the current value of the onthreshold and therefore how often the three-step element switches its outputs.A high on threshold reduces the switching frequency.

In contrast, the differences mentioned above are extremely small approachingzero when the control loop is settled. The adaptive on threshold then adoptsthe minimum value ThrOff. This small on threshold makes sure that thecontroller reacts to small process disturbances immediately.

In the manual mode (MAN_ON = TRUE), the adaptation is disabled andThrOn = ThrOff is set.

Adapting theResponseThreshold ThrOn

The Step Controller (PID_S)

Page 164: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-20Standard Controller

C79000-G7076-C195-02

In this configuration of the step controller, the pulse generator has the samefunctions as step controllers with position feedback signals(see Section 6.2.5).

If no position feedback signal is available as a measurable value, this canalso be simulated (LMNRS_ON = TRUE). When optimizing the PIDcontroller parameters using the configuration tool, the position feedbacksignal is always required as an input variable.

The position feedback signal is simulated by an integrator using the motoractuating time MTR_TM as the reset time (Figure 6-18). In the statusLMNRS_ON = FALSE, the start value of the parameter LMNRSVAL isoutput at the integrator output LMNR_SIM. After switching to TRUE, thesimulation starts using this value.

If LMNR_HS = TRUE is set, the integration is limited upwards, isLMNR_LS = TRUE is set, it is limited downwards. There is no matching ofthe simulated position feedback signal to the limit positions.

LMNR_SIMLMNLIMITINT

+

100

0

–100

0X

QLMNUP

QLMNDNPULSEOUT

INT

LMNR_HSLMNR_LS

LMNRS_ONLMNRSVALMTR_TM

Simulation of the position feedback signal

Figure 6-18 Simulation of the Position Feedback Signal

Note

The position feedback signal is only simulated. It does not necessarily matchthe actual position of the actuator. If a real position feedback exists, thisshould always be used.

The PULSEOUTPulse Generator

Simulating thePosition FeedbackSignal

The Step Controller (PID_S)

Page 165: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-21Standard ControllerC79000-G7076-C195-02

The values set for the parameters PULSE_TM and BREAK_TM must be awhole multiple of the cycle time CYCLE. If the values set are smaller thanCYCLE, then the cycle time CYCLE is used for the minimum pulse andminimum break times.

Signal Type **)

QLMNUP BOOL FALSE

QLMNDN BOOL FALSE

LMNR/SIM REAL

Parameter Type *)

LMNSOPON BOOL FALSE

LMNUP_OP BOOL FALSE

LMNDN_OP BOOL FALSE

LMNS_ON BOOL TRUE

LMNUP BOOL FALSE

LMNDN BOOL FALSE

LMNR_HS BOOL FALSE

LMNR_LS BOOL FALSE

INV (MP12) REAL 0.0

MTR_TM TIME T#30s

PULSE_TM TIME T#3s

BREAK_TM TIME T#3s

LMNRS_ON BOOL FALSE

INV REAL 0.0

LMNRSVAL REAL 0.0

Output ParametersTHREE_ST, PULSEOUT,Simulation of the position feedback signal

Input Parameters

# #

LMNR_HS/_LS

MTR_TM

LMNR_HS/_LS

#

*) Default when the instance DB is created

Figure 6-19 Functions and Parameters for Generating Actuating Signals on the Step Controller Without PositionFeedback Signal

Parameters forManipulatedVariableProcessing

The Step Controller (PID_S)

Page 166: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-22Standard Controller

C79000-G7076-C195-02

6.4 Step Controllers in Cascade Controls

In a cascade, several controllers are directly dependent on each other. Youmust therefore make sure that if the cascade structure is interrupted at anypoint, the cascade operation can be resumed without causing any problems.

In the secondary or slave controllers of a cascade control system, a QCASsignal is formed by ORing the status signals of the switches in the setpointand manipulated variable branches. This signal operates a switch in thesecondary controllers that changes the controller to the correction mode. Thecorrection variable is always the process variable PV of the secondary loop(Figure 6-20).

This means that the difference between the input signals on the controllercomparators become zero. The return to closed loop or cascade mode is thensmooth.

Note

Step controllers (PID_S) can only be used in cascade controls as slavecontrollers in secondary control loops.

SP-

PV

SP2-

PV2

Controller 2Controller 1SPEXT_ONSP_OP_ONLMNS_ONLMNSOPONMAN_ONLMNOP_ON

QCASOR

CAS_ON

PV1 PV2 MAN_ONLMNOP_ON

Not present on the stepcontroller without posn.feedback signal or whenLMNR_ON = FALSE

Figure 6-20 Two-Loop Cascade Control With a Step Controller

Interrupting theController Cascade

The Step Controller (PID_S)

Page 167: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-23Standard ControllerC79000-G7076-C195-02

The following diagram illustrates the principle of the controller or blockconnections in multi-loop cascades.

Controller 3

SPEXT_ONSP_OP_ONLMNS_ONLMNSOPONMAN_ONLMNOP_ON

QCASOR

Controller 2

SPEXT_ONSP_OP_ONCAS_ONMANGN_ONLMNOP_ON

QCASOR

SP-

CAS_ON

PV1

SP-

CAS_ON

PV2

SP-

PV3

Controller 2Controller 1

LMN

QCASPV

SP_EXT

CAS_ONCAS

PID_C”

LMN

QCASPV

SP_EXT

PID_S”

LMN

CAS_ONCAS

PID_C”

Figure 6-21 Connecting a Cascade With Two Secondary Control Loops and a Step Controller

Block Connections

The Step Controller (PID_S)

Page 168: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

6

6-24Standard Controller

C79000-G7076-C195-02

The Step Controller (PID_S)

Page 169: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7-1Standard ControllerC79000-G7076-C195-02

The Loop Scheduler and Examples ofController Configurations

This chapter describes the following:

� The loop scheduler

� An example of a step controller with process simulation

� An example of the continuous controller with process simulation

� An example of a multi-loop ratio controller

� An example of a blending controller

� An example of a cascade control system

What Does ThisChapter Describe?

7

Page 170: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-2Standard Controller

C79000-G7076-C195-02

7.1 The Loop Scheduler (LP_SCHED)

If a large number of controllers with different sampling times and inparticular slow control systems with long sampling times must be called, thenumber of usable cyclic interrupts in the priority class system is inadequate.With the loop scheduler (LP_SCHED) it is possible to incorporate severalcontrollers with different sampling times in one cyclic interrupt priorityclass. Each individual controller is called cyclically as dictated by itssampling time.

The loop scheduler is an optional feature. The standard FBs (PID_C, PID_S)can also be called directly from within the OB without using the schedulingfunctions.

The LP_SCHED function (FC) schedules the calls for several controllers inone cyclic interrupt priority class. The block must be called before all controlloops. The data for the individual controller calls are stored in a shared datablock (DB_LOOP).

Std FCLP_SCHED

Shared DB”DB_LOOP”

The loop scheduler processes the shared data block and sets the ENABLEbits depending on the order and sampling times of the controllers. The timebase of the cyclic interrupt class is effectively increased. The individualcontrol loops in this cyclic interrupt class are called and processed at theintervals of their sampling time. Once the block has been called, theENABLE bit must be reset. The block calls and the ENABLE bit reset mustbe programmed.

The calls for individual control loops can be manually disabled. Individualcontrol loops can also be reset (complete restart).

!Note

The block does not check whether or not there is really a shared DB with thenumber DB_NBR nor whether the parameter GLP_NBR (highest controlloop number) matches the length of the data block. If the parameters areincorrectly assigned, the CPU changes to STOP with an internal systemerror.

The LP_SCHED function is integrated in the call strategy of the CPU usingthree input parameters (Figure 7-1). The time base of the cyclic interruptclass is specified at the TM_BASE input. The control loops are called usinga conditional block call in one cyclic interrupt class (OB35) and theENABLE bits are queried in the shared data block.

Application

How LP_SCHEDFunctions

Calling a ControlLoop UsingLP_SCHED

The Loop Scheduler and Examples of Controller Configurations

Page 171: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-3Standard ControllerC79000-G7076-C195-02

If the call is made at the complete restart level, the input COM_RST =TRUE is set. This call must be reset to FALSE in the cyclic interrupt class.The shared data block (Table 7-1) with the time data for the control loops inthe cyclic interrupt class is assigned using the input parameter DB_NBR.

The loop scheduler must be programmed without the support of theconfiguration tool.

The data block (DB_LOOP) contains both a parameter for the total numberof control loops to be processed in the cyclic interrupt class (a maximum of256) and a parameter to indicate the control loop currently being processed,as follows:

GLP_NBR Highest control loop numberALP_NBR Number of the control loop being processed in the cycle

The number of each control loop is decided by the position of its call in thesequence of entries in the DB (Table 7-1).

The parameters COM_RST and CYCLE must be linked to the correspondinginput parameters of the FB belonging to the called control loop. Thisconnection must be programmed by the user. If the ENABLE parameter isset, the corresponding control loop will be called. After the controller hasbeen called, the ENABLE bit must be reset. The user must program theconditional controller call and the ENABLE bit reset.

Using the parameters MAN_CYC / MAN_DIS / MAN_CRST that can be setmanually, you can decide whether or not a control loop is called. You canchange these calls on-line (in other words during operation) as long as youonly overwrite parameters and do not regenerate the entire DB. The meaningof the parameters is as follows:

MAN_CYC Sampling time of the corresponding controller (rounded up to a whole multiple of TM_BASE * GLP_NBR in CYCLE).

MAN_DIS Disable the controller call.

MAN_CRST Complete restart for the controller.

Table 7-1 Shared Data Block ”DB_LOOP” for the Controller Call

Parameter Type Values Description

GLP_NBR INT 1...256 Highest loop number

ALP_NBR INT 1...256 Current loop number

MAN_CYC [1] TIME � 20ms Manual sampling time, call loop [1]

MAN_DIS [1] BOOL Disable controller call: Loop [1]

MAN_CRST [1] BOOL Set man. restart for loop [1]

ENABLE [1] BOOL Enable loop [1]

COM_RST [1] BOOL Complete restart loop [1]

ILP_COU [1] INT Internal loop counter

CYCLE [1] TIME � 20ms Sample time for loop [1]

MAN_CYC [2] TIME � 20ms Manual sampling time, call loop [2]

MAN_DIS [2] BOOL Disable man. controller call: Loop [2]

... .. ...

Programming aControl Loop Call(Shared DB)

The Loop Scheduler and Examples of Controller Configurations

Page 172: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-4Standard Controller

C79000-G7076-C195-02

Each loop is processed according to the parameters set in the DB if theENABLE signal of the controller call data is set.

The data block is worked through from top to bottom. Per cycle, the loopscheduler moves on one loop number (ALP_NBR) further in the order inwhich they are entered in the DB. The internal counter ILP_COU is thendecremented by one. If ILP_COU = 0 is set, the loop scheduler sets theENABLE bit of the corresponding loop. The ENABLE bit must be reset afterthe call and this must be programmed by the user.

When CYCLE is processed, the parameter MAN_CYC is transferred:

CYCLE = GV (MAN_CYC), GV = whole multiple

Instance DBController [1]

Global DBController [1] ” [2] ” . ” [n]

e.g. OB35

DB_NBRTM_BASECOM_RST

LP_SCHED

COM_RSTCYCLE

PID_C/PID_S

Conditionalblock call

Call LP_SCHEDin cyclic interrupt priorityclass

Figure 7-1 Principle of the Controller Call Using the Loop Scheduler LP_SCHED

� Disabling selected loops:

If you set the ”MAN_DIS” bit in the DB, the ENABLE bit is reset toFALSE and the loop involved is excluded from processing in the loopscheduler.

� Resetting selected loop (complete restart):

If you set the ”MAN_CRST” bit in the DB, COM_RST = TRUE is setand then MAN_CRST is reset. The complete restart routine of the controlloop is then processed. In the following call cycle, COM_RST is then setto FALSE.

Note

If you want to insert or delete a control loop and regenerate the entire DBwithout a complete restart of the loop scheduler, the internal loop counters(ILP_COU[n]) and the parameter for the current loop number must be set tozero.

Processing Calls

The Loop Scheduler and Examples of Controller Configurations

Page 173: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-5Standard ControllerC79000-G7076-C195-02

To ensure that the intervals between the calls of a particular controller remainconstant and to spread the load on the CPU, only one control loop can beprocessed per time base unit of the cyclic interrupt class. When you assignthe sampling times MAN_CYC, remember the following conditions withrespect to the time base (TM_BASE):

� The processing times of the individual loops must be shorter than the timebase (TM_BASE) of the cyclic interrupt class.

� The sampling time of a control loop (MAN_CYC) must be a wholemultiple (GV) of the product of the time base and number of controllersto be processed (GLP_NBR):

MAN_CYC = GV (TM_BASE * GLP_NBR).

The following example illustrates the sequence of calls of four loops in onecyclic interrupt class (Figure 7-2). Only one loop is processed per time baseunit. The sequence in which the loops are called and with it the timedisplacement (TD1 to TD5) result from the sequence of the call data withinthe shared data block.

ÇÇÇ

Control loop 1: CYCLE[1] = 1 (TM_BASE * GLP_NBR), TD1= 0 * TM_BASControl loop 2: CYCLE[2] = 3 (TM_BASE * GLP_NBR), TD1= 1 * TM_BASControl loop 3: CYCLE[3] = 1 (TM_BASE * GLP_NBR), TD1= 2 * TM_BASControl loop 4: CYCLE[4] = 2 (TM_BASE * GLP_NBR), TD1= 3 * TM_BAS

ÉÉÉÉÉÉ

TM_BASE

ÇÇÇÇÇÇ

ÉÉÉ

ÉÉÉ

ÉÉÉÉÉÉ

t

TM_BASE time base of the cyclic interrupt classGLP_NBR highest loop number (here = 4)CYCLE[1] ...[4] sampling time of the controller [1] to [4]TD1...TD4 time displacement 1 to 4

Figure 7-2 Call Sequence of Four Loops Called at Different Intervals

Conditions forCalling a LoopWith LP_SCHED

Example of LoopScheduling

The Loop Scheduler and Examples of Controller Configurations

Page 174: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-6Standard Controller

C79000-G7076-C195-02

During a complete restart (COM_RST = TRUE) the following defaults areset:

– Current loop number ALP_NBR: 0

The call data of all loops up to the highest loop number GLP_NBRhave the following defaults:

– Enable ENABLE: NOT MAN_DIS

– Sample time CYCLE: GV(MAN_CYC)

– Complete restart COM_RST: TRUE

– Local call number ILP_COU 0

GV(MAN_CYC) = whole multiple of TM_BASE * GLP_NBR

This function controls the call of individual controllers within one cyclicinterrupt class.

The values of the input parameters are not limited in the block. Theparameters are not checked.

Parameter Type Parameter Type *)

DB_NBR Block_DB DB0

TM_BASE TIME 100 ms

COM_RST BOOL FALSE

LP_SCHEDInput Parameter Output Parameter

*) Default when the instance DB is created

Figure 7-3 Block Diagram and Parameters of the LP_SCHED Function

CompleteRestart/Restart

Parameters of theLP_SCHEDFunction (FC)

The Loop Scheduler and Examples of Controller Configurations

Page 175: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-7Standard ControllerC79000-G7076-C195-02

7.2 APP_1: Step Controller (Fixed Setpoint Controller) With ProcessSimulation

This example (APP_1) contains a standard step controller (PID_S) inconjunction with a simulated process consisting of an integrating actuatorand a connected third order time delay element (PT3).

Using APP_1, you can generate a step controller and try it out with differentparameters in off-line interaction with a typical process.

The example will help inexperienced users to understand how controllerswith a discontinuous output are used and configured in commonlyencountered control systems involving processes with motor-driven actuators.This example can be used as an introduction or for training purposes.

By selecting the parameters, you can change the loop to approximate a realprocess. Using the configuration tool, you can go through an identificationrun using the model process to obtain a set of suitable controllercharacteristic data.

The APP_1 example essentially consists of the two function blocks PID_Sand PROC_S. The PID_S block is the standard controller and PROC_Ssimulates a process with the ”valve” and PT3 elements (Figure 7-4). Apartfrom the process variable, the controller also receives information about theposition of the actuator and limit position signals if limit stops are reached.

Step controllerPID_S

Standard controller Process

–Processvariable

DISV

PT3

Setpoint

Position feedback signal

Limit stop signals

(Actuator)

Figure 7-4 Example APP_1, Control Loop

The PROC_S function block simulates a series connection consisting of theintegrating actuator and three first order delay elements (Figure 7-5). Thedisturbance variable DISV is always added to the output signal of theactuator so that process disturbances can be connected manually at this point.Using the GAIN factor, you can select the static loop gain.

Application

Functions ofAPP_1

The Loop Scheduler and Examples of Controller Configurations

Page 176: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-8Standard Controller

C79000-G7076-C195-02

The parameter for the motor actuating time MTR_TM defines the timerequired by the actuator to move from one limit stop to the other.

MTR_TM

DISV

INV_UP

INV_DOWN

GAIN

LMNR_HLMLMNR_LLM

TM_LAG1 TM_LAG2 TM_LAG3

OUTVX+

QLMNR_HSQLMNR_LS

Figure 7-5 Structure and Parameters of the Process Block PROC_S

Example 1 is made up of the APP_1 function with the blocks for thecontroller and simulated process and the call blocks for a complete restart(OB100) and cyclic interrupt class (OB35) with a 100 ms time base.

Table 7-2 Blocks for Example 1

Block Name(in the symbol table)

Description

OB100 Complete restart OB

OB35 Time-driven OB: 100 ms

FC100 APP_1 Example 1

FB2 PID_S Step controller

FB100 PROC_S Process for step controller

DB100 PROCESS Instance DB for PROC_S

DB101 CONTROL Instance DB for PID_S

Block Structure

The Loop Scheduler and Examples of Controller Configurations

Page 177: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-9Standard ControllerC79000-G7076-C195-02

The two function blocks (Figure 7-6) are assigned the instance data blocksDB100 for the process and DB 101 for the controller.

OB100(completerestart)

FB2”PID_S”

OB35(time-driven: 100 ms)

COM_RSTCYCLE

FC100 ”APP_1”

FB100”PROC_S”

TRUE

FALSE

T#100ms

T#100ms

Figure 7-6 Blocks for Example 1: Connection and Call

The parameters of the PID_S controller block and their meaning aredescribed in Chapter 6. The parameters of the process block PROC_S arelisted in the following table.

Table 7-3 Parameters of the Process Block ”PROC_S” (DB100: FB100)

Parameter Type Values Description

INV_UP BOOL Input signal up (more)

INV_DOWN BOOL Input signal down (less)

COM_RST BOOL Complete restart

CYCLE TIME � 1ms Sampling time

DISV REAL Disturbance value

GAIN REAL Loop gain

MTR_TM TIME Motor actuating time

LMNR_HLM REAL LMNR_LLM...100.0 [%]

High limit of the position feedbacksignal

LMNR_LLM REAL -100.0...LMNR_HLM [%]

Low limit of the position feedbacksignal

TM_LAG1 TIME � CYCLE/2 Time lag 1

TM_LAG2 TIME � CYCLE/2 Time lag 2

TM_LAG3 TIME � CYCLE/2 Time lag 3

OUTV REAL Output variable

LMNR REAL Position feedback signal

QLMNR_HS BOOL Actuator at upper limit stop

QLMNR_LS BOOL Actuator at lower limit stop

After a complete restart of the process, the output value OUTV and allinternal memory values are set to zero.

The Parameters ofthe Model Process

The Loop Scheduler and Examples of Controller Configurations

Page 178: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-10Standard Controller

C79000-G7076-C195-02

How the step controller is connected internally to the model process viafunction FC100 to form a control loop can be seen in Figure 7-7.

By opening the connection between LMNR and LMNR_IN, it is, of course,possible to implement a step controller without a position feedback signal.

Output

OUTVLMNRQLMNR_HSQLMNR_LS

COM_RST

CYCLE

”APP_1” (FC100)Input

COM_RSTCYCLEPV_INLMNR_INLMNR_HSLMNR_LS

”CONTROL:PID_S”DB101:FB2

COM_RSTCYCLE

INV_UPINV_DOWN

”PROCESS:PROC_S”DB100:FB100

QLMNUP

QLMNDN

Figure 7-7 FC100 (APP_1), Connections and Call

Connecting andCalling theExample APP_1

The Loop Scheduler and Examples of Controller Configurations

Page 179: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-11Standard ControllerC79000-G7076-C195-02

Figure 7-8 illustrates the functions and parameters of the process.

After a complete restart or restart, the controller operates as described inSection 3.5.

Signal Type **)

QLMNR_HS BOOL FALSE

OUTV REAL 0.0

QLMNR_LS BOOL FALSE

LMNR REAL 0.0

Parameter Type *)

COM_RST BOOL FALSE

CYCLE TIME T#1s

GAIN REAL 0.0

DISV REAL 0.0

INV_UP BOOL FALSE

INV_DOWN BOOL FALSE

LMNR_HLM REAL 100.0

LMNR_LLM REAL 0.0

MTR_TM TIME T#30s

TM_LAG1 TIME T#10s

TM_LAG2 TIME T#10s

TM_LAG3 TIME T#10s

Output ParameterPROC_S (FB100)

Input Parameter

+

*) Default when the instance DB is created

Figure 7-8 Functions and Parameters of the PROC_S Process Model

The reaction of a control loop with a simulated third order PT process isillustrated based on a concrete situation with the parameters assigned to astep controller with a PI action and the dead band activated. The selectedloop parameters with a 10 sec. time lag approximate the response of a fasttemperature process or a level controlling system.

Setting one of the time lags TM_LAGx = 0 sec. reduces the process fromthird to second order.

Parameters of theModel Process fora Step Controller

Parameters andStep Response

The Loop Scheduler and Examples of Controller Configurations

Page 180: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-12Standard Controller

C79000-G7076-C195-02

The curve (configuration tool) shows the step and settling response of theclosed loop after a setpoint change of 60% (Figure 7-9). The table containsthe values set for the relevant parameters of the controller and process.

Parameter Type ParameterValue

Description

Controller :

CYCLE TIME 100ms Sampling time

GAIN REAL 0.31 Proportional gain

TI TIME 19.190s Reset time

MTR_TM TIME 20s Motor actuating time

PULSE_TM TIME 100ms Minimum pulse time

BREAK_TM TIME 100ms Minimum break time

DEADB_ON BOOL TRUE Dead band on

DEADB_W REAL 0.5 Dead band width

Process:

GAIN REAL 1.5 Loop gain

MTR_TM TIME 20s Motor actuating time

TM_LAG1 TIME 10s Time lag 1

TM_LAG2 TIME 10s Time lag 2

TM_LAG3 TIME 10s Time lag 3

Position feedbacksignal

100

–10015:53 15:54 15:55 15:56 15:57 15:58 15:59 16:00 16:01

0

50

–50

Setpoint Process variable

Figure 7-9 Control Loop With Step Controller Following a Step Change in theSetpoint

The Loop Scheduler and Examples of Controller Configurations

Page 181: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-13Standard ControllerC79000-G7076-C195-02

7.3 APP_2: Continuous Controller With Process Simulation

The example (APP_2) involves a continuous standard controller (PID_C) inconjunction with a simulated process consisting of a third order delayelement (PT3).

Using APP_2, you can generate a continuous controller and try it out withdifferent parameters in off-line interaction with a typical process.

The example will help inexperienced users to understand how controllerswith an analog output are used and configured in control systems involvingprocesses with proportional actuators. This example can be used as anintroduction or for training purposes.

After approximating the process to the characteristics of the real process byselecting suitable parameters, a set of controller characteristic data can beobtained by going through a process identification run using theconfiguration tool.

The APP_2 example consists essentially of the two function blocks PID_C(FB1) and PROC_C (FB100). PID_C represents the standard controller beingused and PROC_C simulates a third order self regulating process (Figure7-10).

PID controllerPID_C

Standard controller Process

–PV

DISV

PT3

SP LMN

Figure 7-10 Example APP_2, Control Loop

Application

Functions ofAPP_2

The Loop Scheduler and Examples of Controller Configurations

Page 182: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-14Standard Controller

C79000-G7076-C195-02

The PROC_C function block simulates a series connection consisting ofthree first order delay elements (Figure 7-11). The disturbance variable DISVis always added to the output signal of the actuator so that processdisturbances can be connected manually at this point. Using the GAIN factor,you can select the static loop gain.

DISV GAIN

TM_LAG1 TM_LAG2 TM_LAG3

OUTVX+

INV

Figure 7-11 Structure and Parameters of the Process Block PROC_C

Example 2 is made up of the APP_2 function with the blocks for thecontroller and simulated process and the call blocks for a complete restart(OB100) and cyclic interrupt class (OB35) with a 100 ms time base.

Table 7-4 Blocks for Example 2

Block Name(in the symbol table)

Description

OB100 Complete restart OB

OB35 Time-driven OB: 100 ms

FC100 APP_2 Example 2

FB1 PID_C Continuous PID controller

FB100 PROC_C Process for a continuous controller

DB100 PROCESS Instance DB for PROC_C

DB101 CONTROL Instance DB for PID_C

Block Structure

The Loop Scheduler and Examples of Controller Configurations

Page 183: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-15Standard ControllerC79000-G7076-C195-02

The two function blocks (Figure 7-12) are assigned the instance data blocksDB100 for the process and DB101 for the controller.

OB100(Completerestart)

FB1”PID_C”OB35

(time–driven:100 ms)

COM_RSTCYCLE

FC100 ”APP_2”

FB100”PROC_C”

TRUE

FALSE

T#100ms

T#100ms

Figure 7-12 Blocks of Example 2: Connection and Call

The parameters of the controller block PID_C and their meaning aredescribed in Chapter 6. The parameters for the process block PROC_C arelisted in the following table.

Table 7-5 Parameters of the Process Block ”PROC_C” (DB100: FB100)

Parameter Type Values Description

INV REAL Input value

COM_RST BOOL Complete restart

CYCLE TIME � 1ms Sampling time

DISV REAL Disturbance value

GAIN REAL Proportional gain

TM_LAG1 TIME � CYCLE/2 Time lag 1

TM_LAG2 TIME � CYCLE/2 Time lag 2

TM_LAG3 TIME � CYCLE/2 Time lag 3

OUTV REAL Output value

The Parameters ofthe Process Model

The Loop Scheduler and Examples of Controller Configurations

Page 184: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-16Standard Controller

C79000-G7076-C195-02

How the continuous controller is connected internally to the model processvia function FC100 to form a control loop can be seen in Figure 7-13.

Output

OUTV

COM_RST

CYCLE

”APP_2” (FC100)Input

COM_RSTCYCLE

PV_IN

”CONTROL:PID_C”DB101:FB1

COM_RSTCYCLE

INV

”PROCESS:PROC_C”DB100:FB100

LMN

Figure 7-13 Connecting and Calling FC100 (APP_2)

Connecting andCalling ExampleAPP_2

The Loop Scheduler and Examples of Controller Configurations

Page 185: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-17Standard ControllerC79000-G7076-C195-02

Figure 7-14 illustrates the functions and parameters of the process.

After a complete restart or restart, the controller operates as described inSection 3.5.

Signal Type **)

OUTV REAL 0.0

Parameter Type *)

COM_RST BOOL FALSE

CYCLE TIME T#1s

GAIN REAL 0.0

DISV REAL 0.0

INV REAL 0.0

TM_LAG1 TIME T#10s

TM_LAG2 TIME T#10s

TM_LAG3 TIME T#10s

Output ParameterPROC_C (FB100)

Input Parameter

+

*) Default when the instance DB is created

Figure 7-14 Functions and Parameters of the Process Model PROC_C

The reaction of a control loop with a simulated third order PT process isillustrated based on a concrete situation with parameters assigned to acontinuous controller with a PID action. The process parameters selectedwith a 10 sec. time lag approximate the response of a pressure control or atank level control.

Setting one of the time lags TM_LAGx = 0 sec. reduces the process fromthird to second order.

Parameters of theModel Process forContinuousControllers

Parameters andStep Response

The Loop Scheduler and Examples of Controller Configurations

Page 186: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-18Standard Controller

C79000-G7076-C195-02

The curve (configuration tool) illustrates the transfer and settling response ofthe closed loop after a series of setpoint changes of 20% of the measuringrange (Figure 7-15). The table contains the selected values of the relevantparameters for the controller and process.

Parameter Type ParameterValue

Description

Controller :

CYCLE TIME 100ms Sampling time

GAIN REAL 0.31 Proportional gain

TI TIME 22.720s Reset time

TD TIME 5.974s Derivative time

TM_LAG TIME 1.195s Time lag of the D action

Process:

GAIN REAL 1.5 Loop gain

TM_LAG1 TIME 10s Time lag 1

TM_LAG2 TIME 10s Time lag 2

TM_LAG3 TIME 10s Time lag 3

100

–10017:15 17:16 17:17 17:18 17:19 17:20 1/:21 17:22 17:23

0

50

–50Setpoint

Manipulated variable

Process variable

Figure 7-15 Controlling With a Continuous Controller and Setpoint Step Changes Overthe Entire Measuring Range

The Loop Scheduler and Examples of Controller Configurations

Page 187: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-19Standard ControllerC79000-G7076-C195-02

7.4 APP_3: Multi-Loop Ratio Control

The example (APP_3) contains all the blocks required to configure atwo-loop ratio controller.

Using APP_3, you can generate the type of ratio controller for twocomponents as often required in combustion processes. The structure caneasily be extended to create a controller for more than two process variableswith a constant ratio.

The example APP_3 includes the loop scheduler (LP_SCHED) with itsshared data block (DB_LOOP) and the function block (FB1) for continuousstandard controllers with two instance DBs for the configuration data of thetwo controllers.

Process 1LMN1SP1

PV1

Controller 1

(PID_C)

Process 2LMN2Controller 2

(PID_C)

FACX

SP2

PV2

-

-

Figure 7-16 Ratio Control With Two Loops (APP_3)

The controllers (Figure 7-16) are called by the loop scheduler from the cyclicinterrupt class with a 100 ms time base at fixed points in the cycle.

Controller 1 acts as the primary controller for setting the setpoint to controlthe second process variable. The ratio between PV1 and PV2 therefore alsoremains constant when process variable PV 1 fluctuates due to disturbances.

Application

Functions of aAPP_3

The Loop Scheduler and Examples of Controller Configurations

Page 188: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-20Standard Controller

C79000-G7076-C195-02

Example 3 is made up of the function APP_3 comprising the blocks for theloop scheduler and the two controllers and the call blocks for completerestart (OB100) and cyclic interrupt class (OB35) with a 100 ms time base.

Table 7-6 Blocks for Example 3

Block Name(in the symbol table)

Description

OB100 Complete restart OB

OB35 Time-driven OB: 100 ms

FC100 APP_3 Example 3

FC1 LP_SCHED Loop scheduler

FB1 PID_C Continuous PID controller

DB1 DB_LOOP Shared DB for call data for LP_SCHED

DB100 CONTROL1 First instance DB for PID_C

DB101 CONTROL2 Second instanceDB for PID_C

The function block PID_C (FB1) is assigned the two instance data blocksDB100 and DB101 to implement the two-loop ratio control system.

OB100(Completerestart)

FC1LP_SCHEDOB35

(time-driven: 100 ms)

COM_RSTCYCLE

FC100 ”APP_3”

FB1”PID_C”

TRUE

FALSE

T#100ms

T#100ms

DB1DB_LOOP

Figure 7-17 Blocks for Example 3: Connection and Call

Block Structure

The Loop Scheduler and Examples of Controller Configurations

Page 189: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-21Standard ControllerC79000-G7076-C195-02

* The way in which the PID controllers are connected internally with the loopscheduler and with each other via FC100 can be seen in Figure 7-18.

After a complete restart or restart, the controller operates as described inSection 3.5.

Output

PV

COM_RST

CYCLE

”APP_3” (FC100)Input

COM_RSTTM_BASE

DB_NBR

”LP_SCHED” FC1

COM_RSTCYCLE

CONTROL1:PID_C”DB100:FB1

COM_RSTCYCLE

SP_EXT

CONTROL2:PID_C”DB101:FB1

GLP_NBRALP_NBRMAN_CYC1MAN_DIS1MAN_CRST1ENABLE1COM_RST1ILP_COU1CYCLE1MAN_CYC2MAN_DIS2MAN_CRST2ENABLE2COM_RST2ILP_COU2CYCLE2

”DB_LOOP” DB1

”DB_LOOP” DB1

Figure 7-18 Circuit Diagram and Parameters for the FC Block APP_3

ParameterAssignment forExample APP_3

The Loop Scheduler and Examples of Controller Configurations

Page 190: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-22Standard Controller

C79000-G7076-C195-02

7.5 APP_4: Blending Control

The example (APP_4) contains all the blocks required to configure ablending control system with one main and two secondary components.

Using APP_4, you can generate a controller for blending processes in whichthe final product contains constant proportions of the individual constituents(in this case three components). The structure can be extended easily toinclude more than three components.

The example APP_4 contains the loop scheduler (LP_SCHED) with itsshared data block (DB_LOOP) and the function block (FB1) for continuousstandard controllers and the function block (FB2) for step controllers alongwith four instance DBs for the configuration data of the four controllers.

Process 1QLMNUPSP1

PV1

Controller 1(PID_S)

Controller 2(PID_S)

FAC2

X

PV2

-

-

PV3

Controller 3(PID_S)-

+

+

QLMNDN

X

X

FAC1

LMNController(PID_C)

SP

PV

Process 2

Process 3

QLMNUP

QLMNDN

QLMNUP

QLMNDN

SP2

SP3

FAC3

Main componentTotal amount

Figure 7-19 Blending Control for Three Components (APP_4)

The four controllers are called using the loop scheduler in the cyclic interruptclass with a 100 ms time base at fixed points in the cycle.

The controller with a continuous output for the total volume (PID_C)functions as a primary controller and controls the setting of the othersetpoints (the amounts of the other components). The volumes of the maincomponent and the two secondary components are controlled in APP_4 bystep controllers (PID_S) according to the blending ratios selected with FAC1 to 3.

Application

Functions ofAPP_4

The Loop Scheduler and Examples of Controller Configurations

Page 191: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-23Standard ControllerC79000-G7076-C195-02

Remember that the values assigned to the blending factors FAC1 to FAC3must add up to 100%.

Example 4 is made up of the function APP_4 comprising the blocks for theloop scheduler and the four controllers and the call blocks for completerestart (OB100) and a cyclic interrupt class (OB35) with a 100 ms time base.

Table 7-7 Blocks for Example 4

Block Name(in the symbol table)

Description

OB100 Complete restart OB

OB35 Time-driven OB: 100 ms

FC100 APP_4 Example 4

FC1 LP_SCHED Loop scheduler

FB1 PID_C Continuous PID controller

FB2 PID_S Step controller

DB1 DB_LOOP Shared DB for call data for LP_SCHED

DB100 CONT_C1 Instance DB for PID_C

DB101 CONT_S1 First instance DB for PID_S

DB102 CONT_S2 Second instance DB for PID_S

DB103 CONT_S3 Third instance DB for PID_S

The function block PID_S (FB2) is assigned three instance data blocks(DB101, DB102 and DB103) to implement the volume controls of the threeindividual components.

OB100(completerestart)

FC1LP_SCHED

OB35(time-driven: 100 ms)

COM_RSTCYCLE

FC100 ”APP_4”

FB1”PID_C”

TRUE

FALSE

T#100ms

T#100msFB2”PID_S”

DB1DB_LOOP

Figure 7-20 Blocks for Example 4: Connection and Call

Block Structure

The Loop Scheduler and Examples of Controller Configurations

Page 192: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-24Standard Controller

C79000-G7076-C195-02

* How the controllers are connected internally with the loop scheduler andamong themselves via function FC100 can be seen in Figure 7-21.

After a complete restart or restart, the controller operates as described inSection 3.5.

Output

LMN

COM_RST

CYCLE

”APP_4” (FC100)Input

COM_RSTTM_BASE

DB_NBR

”LP_SCHED” FC1

COM_RSTCYCLE

CONT_C1:PID_CDB100:FB1

COM_RSTCYCLE

SP_EXT

CONT_S2:PID_S”DB101:FB2

GLP_NBRALP_NBRMAN_CYC1MAN_DIS1MAN_CRST1ENABLE1COM_RST1ILP_COU1CYCLE1MAN_CYC2MAN_DIS2MAN_CRST2ENABLE2COM_RST2ILP_COU2CYCLE2MAN_CYC3MAN_DIS3MAN_CRST3ENABLE3COM_RST3ILP_COU3CYCLE3MAN_CYC4MAN_DIS4MAN_CRST4ENABLE4COM_RST4ILP_COU4CYCLE4

”DB_LOOP” DB1

”DB_LOOP” DB1

COM_RSTCYCLE

SP_EXT

CONT_S2:PID_S”DB102:FB2

COM_RSTCYCLE

SP_EXT

CONT_S3:PID_S”DB103:FB2

Figure 7-21 Block Diagram and Parameters of the FC Block APP_4

AssigningParameters forExample APP_4

The Loop Scheduler and Examples of Controller Configurations

Page 193: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-25Standard ControllerC79000-G7076-C195-02

7.6 APP_5: Cascade Control

The example (APP_5) contains all the blocks required to configure a cascadecontrol with a main and a secondary manipulated variable.

Using APP_5, you can generate a cascade control with a primary and asecondary control loop. The structure can be easily extended to include morethan one secondary loop.

The example APP_5 contains the loop scheduler (LP_SCHED) with itsshared data block (DB_LOOP), the function blocks FB1 for the continuousstandard controller (primary controller) and FB2 for the step controller(secondary or slave controller) with the two instance DBs for theconfiguration data of the controllers.

Processsection 1

QLMNUPController 2(PID_S)-

LMNController 1(PID_C)

SP

PV

-Processsection 2QLMNDN

PV

Figure 7-22 Two-Loop Cascade Control System (APP_5)

The controllers are called cyclically by the loop scheduler from within thecyclic interrupt class with a 100 ms time base.

The controller with the continuous output (PID_C) acts as the primarycontroller setting the setpoint for the secondary controller so that the mainmanipulated variable at the output of process Section 2 is kept to the setpointSP. Disturbances affecting process Section 1 are controlled by the stepcontroller in the secondary control loop (PID_S) without influencing themain process variable PV.

Application

Functions ofAPP_5

The Loop Scheduler and Examples of Controller Configurations

Page 194: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-26Standard Controller

C79000-G7076-C195-02

Example 5 is made up of the function APP_5 comprising the blocks for theloop scheduler and the two controllers and the call blocks for completerestart (OB100) and the cyclic interrupt class (OB35) with a 100 ms timebase.

Table 7-8 Blocks of Example 5

Block Name(in the symbol table)

Description

OB100 Complete restart OB

OB35 Time-driven OB: 100 ms

FC100 APP_5 Example 5

FC1 LP_SCHED Loop scheduler

FB1 PID_C Continuous PID controller

FB2 PID_S Step controller

DB1 DB_LOOP Share DB for call data for LP_SCHED

DB100 CONT_C Instance DB for PID_C

DB101 CONT_S Instance DB for PID_S

The function blocks PID_C and PID_S are assigned the instance data blocksDB100 and DB101 respectively.

OB100(completerestart)

FC1LP_SCHED

OB35(time-driven: 100 ms)

COM_RSTCYCLE

FC100 ”APP_5”

FB1”PID_C”

TRUE

FALSE

T#100ms

T#100ms

FB2”PID_S”

DB1DB_LOOP

Figure 7-23 Blocks of Example 4: Connection and Call

Block Structure

The Loop Scheduler and Examples of Controller Configurations

Page 195: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-27Standard ControllerC79000-G7076-C195-02

* How the controllers are connected to the loop scheduler internally viafunction FC100 and how they are connected to each other can be seen inFigure 7-24.

After a complete restart or restart, the controller operates as described inSection 3.5.

Output

LMN

COM_RST

CYCLE

”APP_5” (FC100)Input

COM_RSTTM_BASE

DB_NBR

”LP_SCHED” FC1

COM_RSTCYCLE

CASCAS_ON

CONT_C1:PID_C”DB100:FB1

PVQCAS

COM_RSTCYCLE

SP_EXT

CONT_S2:PID_S”DB101:FB2

GLP_NBRALP_NBRMAN_CYC1MAN_DIS1MAN_CRST1ENABLE1COM_RST1ILP_COU1CYCLE1MAN_CYC2MAN_DIS2MAN_CRST2ENABLE2COM_RST2ILP_COU2CYCLE2

”DB_LOOP” DB1

”DB_LOOP” DB1

Figure 7-24 Block Diagram and Parameters of the FC Block APP_5

AssigningParameters forExample APP_5

The Loop Scheduler and Examples of Controller Configurations

Page 196: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

7

7-28Standard Controller

C79000-G7076-C195-02

The Loop Scheduler and Examples of Controller Configurations

Page 197: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8-1Standard ControllerC79000-G7076-C195-02

Technical Data and Block Diagrams 8

Page 198: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-2Standard Controller

C79000-G7076-C195-02

8.1 Technical Data: Function Blocks

To be able to estimate the load on a particular CPU resulting from installingstandard controllers, you can use the following guidelines:

� The controller FB only needs to exist once in the user memory of theCPU for any number of controllers.

� Per controller a DB with � 1.0 Kbytes is required

� Data for typical run times (processing times) of the blocks when thedefault parameters are assigned for controller operation:

Block name Processingtime in [ms]

CPU 314

Processingtime in [ms]

CPU 416

PID_C FB 1 4.0 3) 0.25 4)

PID_S FB 2 4.6 1) 3)

5.0 2) 3)0.3 4)

PULSEGEN FB 3 0.2 0.03

LP_SCHED FC 1 0.4 0.4

1) Step controller without position feedback signal2) Step controller with position feedback signal3) The “modify and monitor variables” function extends the cycle so that the processingtime may exceed 10 ms in certain cycles, for this reason the block should be called in acyclic interrupt class � 20 ms.4) The “modify and monitor variables” function extends the cycle so that the processingtime may exceed 1 ms in certain cycles, for this reason the block should be called in acyclic interrupt class � 2 ms.

The size of the area required in the user memory and therefore the number ofcontrol loops that could theoretically be installed with the available memorycapacity can be seen in the following table:

Block name Block length in thememory

Block length whenrunning

PID_C FB 1 6864 bytes 5910 bytes

PID_S FB 2 7880 bytes 6818 bytes

PULSEGEN FB 3 1086 bytes 892 bytes

LP_SCHED FC 1 1140 bytes 1050 bytes

CPU Load

Work MemoryUsed

Technical Data and Block Diagrams

Page 199: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-3Standard ControllerC79000-G7076-C195-02

Instance DB orshared DB

Block length in thememory

Block length whenrunning

DB_PID_C 992 bytes 442 bytes

DB_PID_S 1072 bytes 472 bytes

DB_PULSEGEN 184 bytes 70 bytes

DB_LP_SCHED(with 5 loops)

184 bytes 100 bytes

DB_RMPSOAK(with a start pointand 4 time slices)

142 bytes 78 bytes

The shortest selectable sampling time depends on the performance of theCPU being used.

Note

The limited accuracy in calculation restricts the sampling time that can beimplemented. As the sampling time becomes smaller, the constants of thealgorithms adopt smaller and smaller numerical values. This can lead toincorrect calculation of the manipulated variable.

Depending on the sampling time, the function block for a particular controlloop must be called at constant intervals. The operating system of the S7PLC calls the cyclic interrupt OB.

The sampling time and cyclic interrupt time must match.

Sampling Time

Calling theController

Technical Data and Block Diagrams

Page 200: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-4Standard Controller

C79000-G7076-C195-02

8.2 Block Diagrams of the Standard Controller

A maximum of eight characters are used to identify the parameters and blocknames. This saves having to write long names when implementing controllersusing STEP 7 STL or SCL and takes up less space on the monitor.

The names of the parameters are based largely on the IEC 1131-3 standard.The following conventions were used to name the parameters:

SP setpoint

PV process variable

ER error signal

LMN manipulated variable

DISV disturbance variable

MAN manual value

CAS cascade

SQRT square root

.._ROC rate of change

Q.. output

.._INT internal value

.._EXT external value

.._ON Boolean value = switching signal

..URLM up rate limit

..DRLM down rate limit

Conventions UsedWith Parametersand Field Names

Technical Data and Block Diagrams

Page 201: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-5Standard ControllerC79000-G7076-C195-02

Technical Data and Block Diagrams

Page 202: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-6Standard Controller

C79000-G7076-C195-02

Figure 8-1 Block Diagram of the Continuous Controller: PID_C

Technical Data and Block Diagrams

0

1SPFC

CALLFC

SPFC_IN

SPFC_ON

SPFC_OUT MP3

0

1

SP_OP_ON

1

0

SP_OP

0

1SP_ROC

SPROC_ON

SP_LIMIT

QSP_HLM

QSP_LLM

0

1

SPEXT_ONSP_GEN

0

1

SP_INT

SP

RMPSK_ONSPGEN_ON

MP1

RMP_SOAK

SP_NORM

FAC

SP_EXT

MP2

DEADBAND

DEADB_ON

0

1

ER_ALARM

PV_IN

PV_PERCRP_IN

PVPER_ON

0

1

%

SQRT

SQRT_ON

0

1PVFCCALLFC

PVFC_ON

PVFC_OUT

0

1

MP6

PV_OP_ON

1

0

PV_OP

PV_ALARM

QPVH_WRN

QPVH_ALM

QPVL_ALM

QPVL_WRN

ROCALARM

QPVDRLMP

QPVURLMP

QPVDRLMN

QPVURLMN

MP4

d/dt

X

SPFC_IN

SP_NORM

LAG1ST

LAG1STON

0

1

MP5

PV

PVFC_IN

ER

+

Continuous Controller: PID_C

Setpoint branch

Process variable branch

QERP_WRN

QERP_ALM

QERN_ALM

QERN_WRN

Error difference branch

Page 203: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-7Standard ControllerC79000-G7076-C195-02

Technical Data and Block Diagrams

LMN_D

LMN_P

X

X X

GAIN

– 1

INT

DIF

1

0

DFDB_SEL

1

0

1

0

P_SEL

1

0

I_SEL

1

0

D_SEL

0

0

0

+

0

1

0

DISV

(PID_OUTV)

LMN_I

DISV_SEL

PFDB_SEL

LMNFC

CALLFC

LMNFC_IN

LMNFC_ON

LMNFC_OUTMP9

0

1

LMNOP_ON

1

LMN_OP

0

1LMN_ROC

LMNRC_ON

LMNLIMIT

QLMN_HLM

QLMN_LLM

0

MAN_ON

LMN

LMN_PERCRP_OUT

%

SPEXT_ONSP_OP_ONCAS_ONMANGN_ONLMNOP_ON

QCASOR

LMN_NORM

MAN_IN

0

1

0

1

1

0

MAN_GEN

MANGN_ON

CAS_ON

MP8

CAS

MP7

LMNFC_IN

Manipulated valuebranch

PID structure

MP10

Page 204: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-8Standard Controller

C79000-G7076-C195-02

Figure 8-2 Block Diagram of the Step Controller: PID_S (with position feedback signal “LMNR = TRUE”)

Technical Data and Block Diagrams

0

1SPFC

CALLFC

SPFC_IN

SPFC_ON

SPFC_OUT MP3

0

1

SP_OP_ON

1

0

SP_OP

0

1SP_ROC

SPROC_ON

SP_LIMIT

QSP_HLM

QSP_LLM

0

1

SPEXT_ONSP_GEN

0

1

SP_INT

SP

RMPSK_ONSPGEN_ON

MP1

RMP_SOAK

SP_NORM

FAC

SP_EXT

MP2

DEADBAND

DEADB_ON

0

1

ER_ALARM

PV_IN

PV_PERCRP_IN

PVPER_ON

0

1

%

SQRT

SQRT_ON

0

1PVFCCALLFC

PVFC_ON

PVFC_OUT

0

1

MP6

PV_OP_ON

1

0

PV_OP

PV_ALARM

QPVH_WRN

QPVH_ALM

QPVL_ALM

QPVL_WRN

ROCALARM

QPVDRLMP

QPVURLMP

QPVDRLMN

QPVURLMN

MP4

d/dt

X

SPFC_IN

SP_NORM

LAG1ST

LAG1STON

0

1

MP5

PV

PVFC_IN

ER

+

Step controller: PID_Swith position feedback signal

Setpoint branch

Process variablebranch

QERP_WRN

QERP_ALM

QERN_ALM

QERN_WRN

Error signal branch

Page 205: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-9Standard ControllerC79000-G7076-C195-02

Technical Data and Block Diagrams

LMN_D

LMN_P

X

X X

GAIN

– 1

INT

DIF

1

0

DFDB_SEL

1

0

1

0

P_SEL

1

0

1

0

D_SEL

0

0

0

+

0

1

0

DISV

(PID_OUTV)

LMN_I

DISV_SEL

PFDB_SEL

I_SEL AND LMNR_ON

MAN_ONMAN_IN

0

11

0

MAN_GEN

MANGN_ON

MP8

MP7

LMNFC_IN

Manipulated value branch

PID structure

1

0

1

0

MP9

LMNOP_ON

1

THREE_STLMNLIMIT

QLMN_HLMQLMN_LLM

0

LMNR_IN

LMNR_PERLMNR_CRP

%

LMNRC_ON

LMNUP

LMNDN

PULSEOUT

AND

AND

AND

AND

LMNUP_OP

LMNDN_OPLMNSOPON

LMN

LMNR_HS

LMNR_LS

MP12

LMNRP_ON

0

1

QLMNDN

QLMNUP

Stellungs-Rückmeldung

LMN_NORM

MP10

SPEXT_ONSP_OP_ONMAN_ONLMNOP_ONLMNS_ONLMNSOPON

QCASOR

LMN_OP

Page 206: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-10Standard Controller

C79000-G7076-C195-02

Figure 8-3 Block Diagram of the Step Controller: PID_S (without position feedback signal “LMNR = FALSE”)

Technical Data and Block Diagrams

0

1SPFC

CALLFC

SPFC_IN

SPFC_ON

SPFC_OUT MP3

0

1

SP_OP_ON

1

0

SP_OP

0

1SP_ROC

SPROC_ON

SP_LIMIT

QSP_HLM

QSP_LLM

0

1

SPEXT_ONSP_GEN

0

1

SP_INT

SP

RMPSK_ONSPGEN_ON

MP1

RMP_SOAK

SP_NORM

FAC

SP_EXT

MP2

DEADBAND

DEADB_ON

0

1

ER_ALARM

PV_IN

PV_PERCRP_IN

PVPER_ON

0

1

%

SQRT

SQRT_ON

0

1PVFCCALLFC

PVFC_ON

PVFC_OUT

0

1

MP6

PV_OP_ON

1

0

PV_OP

PV_ALARM

QPVH_WRN

QPVH_ALM

QPVL_ALM

QPVL_WRN

ROCALARM

QPVDRLMP

QPVURLMP

QPVDRLMN

QPVURLMN

MP4

d/dt

X

SPFC_IN

SP_NORM

LAG1ST

LAG1STON

0

1

MP5

PV

PVFC_IN

ER

+

Step controller: PID_Swithout position feedback signal

Setpoint branch

Process variable branch

QERP_WRN

QERP_ALM

QERN_ALM

QERN_WRN

Error signal branch

Page 207: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-11Standard ControllerC79000-G7076-C195-02

Technical Data and Block Diagrams

LMN_D

LMN_P

X

X X

GAIN

– 1DIF

1

0

DFDB_SEL

1

0

1

0

P_SEL

1

0

D_SEL

0

0

+

0

1

0

DISV

(PID_OUTV)

LMN_I

DISV_SEL

PFDB_SEL

MP7

Manipulated value branch

PID structure

THREE_ST

INTLMNR_SIM

LMNRC_ON

LMNUP

LMNDN

PULSEOUT

AND

AND

AND

AND

LMNUP_OP

LMNDN_OP

LMNSOPON

LMNR_HS

LMNR_LS

QLMNDN

QLMNUP

MP11

MP12 1

0

100.0

0.0

1

0

–100.0

0.0

1/MTR_TMX

INT

LMNLIMIT

OR

1

0

0.0

+

+

1

0

1

0

0

1

0

1

1

0

0.0

LMNS_ON OR LMNSOPON

Simulation of theposition feedback signal

1/TIX

SPEXT_ONSP_OP_ONLMNS_ONLMNSOPON

QCASOR

Page 208: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

8

8-12Standard Controller

C79000-G7076-C195-02

Technical Data and Block Diagrams

Page 209: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9-1Standard ControllerC79000-G7076-C195-02

Parameter Lists of the Standard Controller

Notes:

� The parameter lists in this appendix represent the order and content of thestructures in the instance blocks of the SIMATIC S7 standard functionblocks.

� The Range of Values is shown for each parameter.

”Entire range of values” means the numerical range fixed for theparticular STEP 7 address type.

”Technical range of values” means a restricted range which representsreality with adequate accuracy, here –105 to +105. This avoids awkwardlarge or small numerical ranges for the parameters.

� All parameters have the specified Default value when the instance DB iscreated.

These values have been selected so that it is unlikely that a critical statecan arise if they are used as they stand.

Using the STEP 7 program editor, you can change the default to any othervalue in the permitted range of values. It is , however, more convenient touse the configuration tool with its parameter assignment functions(see Chapters 10 to 11).

� For the conventions used in naming the parameters, refer to Section 8.2.

9

Page 210: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-2Standard Controller

C79000-G7076-C195-02

9.1 Parameters of the PID_C Function Block

COM_RSTCAS_ONCYCLESP_INTSP_EXTPV_INPV_PERDISVCASMANDB_NBRSPFC_NBPVFC_NBRLMNFCNBR

LMNLMN_PERPVQCAS

PID_C

Table 9-1 Input Parameters of PID_C (continuous controller)

Parameter Data Type Explanation Range of Values Default

COM_RST BOOL Complete restart(complete restart routine of the FB isprocessed)

FALSE

CAS_ON BOOL Cascade control on(connected to QCAS of the secondarycontroller)

FALSE

CYCLE TIME Sampling time(time between block calls = constant)

> 20 ms (S7-300) T#1s

SP_INT REAL Internal setpoint(for setting the setpoint with operatorinterface functions)

–100.0 to 100.0 [%] 0.0

SP_EXT REAL External setpoint(SP in floating-point format)

–100.0 to 100.0 [%](physical value)

0.0

PV_IN REAL Process variable input(PV in floating-point format)

technical range ofvalues (physical value)

0.0

PV_PER WORD Process variable from I/Os(PV in peripheral format)

W#16#0000

DISV REAL Disturbance variable –100.0 to 100.0 [%] 0.0

CAS REAL Input for cascade(connection to PV of secondary controller)

–100.0 to 100.0 [%] 0.0

MAN REAL Manual manipulated value(for setting the manipulated value withoperator interface functions)

–100.0 to 100.0 [%] 0.0

DB_NBR BLOCK_DB Data block number(DB with the time slices of the ramp soak)

DB0

Parameter Lists of the Standard Controller

Page 211: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-3Standard ControllerC79000-G7076-C195-02

Table 9-1 Input Parameters of PID_C (continuous controller)

Parameter DefaultRange of ValuesExplanationData Type

SPFC_NBR BLOCK_FC Setpoint FC number(self-defined FC in the setpoint branch)

FC0

PVFC_NBR BLOCK_FC Process variable FC number(self-defined FC in the process variablebranch)

FC0

LMNFCNBR BLOCK_FC Manipulated value FC number(self-defined FC in the manipulated valuebranch)

FC0

Table 9-2 Output Parameters of PID_C (continuous controller)

Parameter Data Type Explanation Default

LMN REAL Manipulated value(manipulated value in floating-point format)

0.0

LMN_PER WORD Manipulated value for I/Os(LMN in peripheral format)

W#16#0000

PV REAL Process variable(output of the effective process variable in cascade control)

0.0

QCAS BOOL Signal for cascade control(connected to CAS_ON of the primary controller)

FALSE

Parameter Lists of the Standard Controller

Page 212: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-4Standard Controller

C79000-G7076-C195-02

Table 9-3 Static Local Data of PID_C (inputs)

Parameter Data Type Explanation Range of Values Default

SP_HLM REAL Setpoint high limit SP_LLM to 100.0 [%] 100.0

SP_LLM REAL Setpoint low limit – 100.0...SP_HLM [%] 0.0

PVH_ALM REAL Process variable: high alarm limit PVH_WRN...100.0 [%] 100.0

PVH_WRN REAL Process variable: high warning limit PVL_WRN...PVH_ALM [%]

90.0

PVL_WRN REAL Process variable: low warning limit PVL_ALM...PVH_WRN [%]

– 90.0

PVL_ALM REAL Process variable: low alarm limit –100.0...PVL_WRN [%] – 100.0

LMN_HLM REAL Manipulated value: high limit LMN_LLM to 00.0 [%] 100.0

LMN_LLM REAL Manipulated value: low limit –100.0 to LMN_HLM[%]

0.0

GAIN REAL Proportional gain(= controller gain)

Entire range of values(no dimension)

2.0

TI TIME Reset time TI � CYCLE T#20s

TD TIME Derivative action time TD � CYCLE T#10s

TM_LAG TIME Time lag of the D component TM_LAG � CYCLE/2 T#2s

SPGEN_ON BOOL Setpoint generator on(to adjust the setpoint using up/downswitches)

FALSE

SPUP BOOL Setpoint up FALSE

SPDN BOOL Setpoint down FALSE

RMPSK_ON BOOL Ramp soak on(setpoint follows preset curve)

FALSE

SPEXT_ON BOOL External setpoint on(to connect to other controller blocks)

FALSE

MAN_ON BOOL Manual mode on(loop opened, LMN set manually)

FALSE

MANGN_ON BOOL Manual generator on(LMN set by generator)

FALSE

MANUP BOOL Manual manipulated value up FALSE

MANDN BOOL Manual manipulated value down FALSE

DFRMP_ON BOOL Set ramp soak output to default(SP_INT is set at the output)

FALSE

CYC_ON BOOL Repetition on(ramp soak automatically repeated)

FALSE

RMP_HOLD BOOL Hold ramp soak (setpoint value)(the output of the ramp soak is frozen)

FALSE

CONT_ON BOOL Continue ramp soak(the ramp soak is continued at the next timeslice)

FALSE

TUPDT_ON BOOL Total time update on(the total time of the ramp soak isrecalculated)

FALSE

SPFC_ON BOOL Call the setpoint FC FALSE

Parameter Lists of the Standard Controller

Page 213: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-5Standard ControllerC79000-G7076-C195-02

Table 9-3 Static Local Data of PID_C (inputs), continued

Parameter DefaultRange of ValuesExplanationData Type

SPROC_ON BOOL Rate of change limits on(the rate of change of the setpoint is limited)

FALSE

PVPER_ON BOOL Process variable from I/Os on(connection to I/O modules)

FALSE

LAG1STON BOOL 1st order time lag on FALSE

SQRT_ON BOOL Square root function on FALSE

PVFC_ON BOOL Call process variable FC FALSE

DEADB_ON BOOL Dead band on(small disturbances and noise are filtered)

FALSE

P_SEL BOOL P action on TRUE

PFDB_SEL BOOL P action in feedback path FALSE

I_SEL BOOL I action on TRUE

INT_HOLD BOOL Hold I action FALSE

I_ITL_ON BOOL Initialize I action FALSE

D_SEL BOOL D action on FALSE

DFDB_SEL BOOL D action in feedback path FALSE

DISV_SEL BOOL Disturbance variable on FALSE

LMNFC_ON BOOL Call manipulated value FC FALSE

LMNRC_ON BOOL manipulated value rate of change limits on(LMN rate of change limited)

FALSE

TM_SNBR INT No. of time slice to continue � 0 (no dimension) 0

TM_CONT TIME Time to continue(time after time slice TM_SNBR at which theramp soak is resumed)

Entire range of values(no dimension)

T#0s

FAC REAL Factor(ratio or blending factor)

Entire range of values(no dimension)

1.0

SP_FAC REAL Setpoint factor(factor for adapting the setpoint range)

Entire range of values(no dimension)

1.0

SP_OFF REAL Setpoint offset(zero point of the setpoint normalization)

Entire range of values(no dimension)

0.0

SP_FCOUT REAL Setpoint FC output(connected to the output of the FC in thesetpoint branch)

–100.0 to 100.0 [%] 0.0

SPURLM_P REAL Setpoint up rate limit in the pos. range � � 0 [%/s] 10.0

SPDRLM_P REAL Setpoint down rate limit in the pos. range � � 0 [%/s] 10.0

SPURLM_N REAL Setpoint up rate limit in the neg. range � � 0 [%/s] 10.0

SPDRLM_N REAL Setpoint down rate limit in the neg. range � � 0 [%/s] 10.0

PV_FAC REAL Process variable factor(factor for adapting the process variablerange)

Entire range of values(no dimension)

1.0

PV_OFF REAL Process variable offset(zero point of the process variablenormalization)

–100.0 to 100.0 [%] 0.0

Parameter Lists of the Standard Controller

Page 214: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-6Standard Controller

C79000-G7076-C195-02

Table 9-3 Static Local Data of PID_C (inputs), continued

Parameter DefaultRange of ValuesExplanationData Type

PV_TMLAG TIME Process variable time lag(time lag of the PT1 element in the PVbranch)

Entire range of values T#5s

SQRT_FAC REAL Square root factor(factor with which the root can be multiplied)

Entire range of values(no dimension)

1.0

SQRT_OFF REAL Square root offset(zero point of the square root function)

–100.0 to 100.0 [%] 0.0

PV_FCOUT REAL Process variable FC output(connected to the output of the FC in theprocess variable branch)

–100.0 to 100.0 [%] 0.0

PVURLM_P REAL Process variable up rate limit in the pos.range

� � 0 [%/s] 10.0

PVDRLM_P REAL Process variable-down rate limit in the pos.range

� � 0 [%/s] 10.0

PVURLM_N REAL Process variable up rate limit in the neg.range

� � 0 [%/s] 10.0

PVDRLM_N REAL Process variable down rate limit in the neg.range

� � 0 [%/s] 10.0

PV_HYS REAL Process variable hysteresis(avoids flickering of the indicator)

� � 0 [%] 1.0

DEADB_W REAL Dead band width(= range zero to dead band upper limit)(determines size of dead band)

0.0 to 100.0 [%] 1.0

ERP_ALM REAL Error signal: positive alarm limit 0 to 200.0 [%] 100.0

ERP_WRN REAL Error signal: positive warning limit 0 to 200.0 [%] 90.0

ERN_WRN REAL Error signal: negative warning limit –200.0 to 0 [%] –90.0

ERN_ALM REAL Error signal: negative alarm limit –200.0 to 0 [%] –100.0

ER_HYS REAL Error signal hysteresis(avoids flickering of the indicator)

� 0 [%] 1.0

I_ITLVAL REAL Initialization value for I action –100.0 to 100.0 [%] 0.0

LMNFCOUT REAL Manipulated value FC output(connected to the output of the FC in themanipulated value branch)

–100.0 to 100.0 [%] 0.0

LMN_URLM REAL Manipulated value up rate limit � � 0 [%/s] 10.0

LMN_DRLM REAL Manipulated value down rate limit � � 0 [%/s] 10.0

LMN_FAC REAL Manipulated value factor(factor for adapting the manipulated valuerange)

Entire range of values(no dimension)

1.0

LMN_OFF REAL Manipulated value offset(zero point of the manipulated valuenormalization)

Entire range of values(no dimension)

0.0

Parameter Lists of the Standard Controller

Page 215: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-7Standard ControllerC79000-G7076-C195-02

Table 9-4 Static Local Data of PID_C (outputs)

Parameter Data Type Explanation Default

SP REAL Setpoint(effective setpoint)

0.0

QPVH_ALM BOOL Process variable: high alarm limit triggered FALSE

QPVH_WRN BOOL Process variable: high warning limit triggered FALSE

QPVL_WRN BOOL Process variable: low warning limit triggered FALSE

QPVL_ALM BOOL Process variable: low alarm limit triggered FALSE

QR_S_ACT BOOL Time table for ramp soak being processed FALSE

QSP_HLM BOOL Setpoint: high limit triggered FALSE

QSP_LLM BOOL Setpoint: low limit triggered FALSE

QPVURLMP BOOL Process variable: up rate limit in the positive range triggered FALSE

QPVDRLMP BOOL Process variable: down rate limit in the positive range triggered FALSE

QPVURLMN BOOL Process variable: up rate limit in the negative range triggered FALSE

QPVDRLMN BOOL Process variable: down rate limit in the negative range triggered FALSE

QERP_ALM BOOL Error signal: positive alarm limit triggered FALSE

QERP_WRN BOOL Error signal: positive warning limit triggered FALSE

QERN_WRN BOOL Error signal; negative warning limit triggered FALSE

QERN_ALM BOOL Error signal: negative alarm limit triggered FALSE

QLMN_HLM BOOL Manipulated value: high limit triggered FALSE

QLMN_LLM BOOL Manipulated value: low limit triggered FALSE

NBR_ATMS INT Number of the time slice the ramp soak is moving to 0

RS_TM TIME Time remaining until the next time slice T#0s

T_TM TIME Total elapsed time of the ramp soak T#0s

RT_TM TIME Total time remaining to end of ramp soak T#0s

ER REAL Error signal 0.0

LMN_P REAL P action 0.0

LMN_I REAL I action 0.0

LMN_D REAL D action 0.0

SPFC_IN REAL Setpoint FC input(connected to the input of the user-defined FC)

0.0

PVFC_IN REAL Process variable FC input(connected to the input of the user-defined FC)

0.0

LMNFC_IN REAL Manipulated value FC input(connected to the input of the user-defined FC)

0.0

Parameter Lists of the Standard Controller

Page 216: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-8Standard Controller

C79000-G7076-C195-02

Table 9-5 Static Local Data used by the Configuration Tool PID_C

Parameter Data Type Explanation Default

SP_OP_ON BOOL Setpoint generator on(the value of SP_OP is used as the setpoint)

FALSE

PV_OP_ON BOOL Process variable operation on(the value of PV_OP is used as the setpoint)

FALSE

LMNOP_ON BOOL Manipulated value operation on(the value of LMN_OP is used as the setpoint)

FALSE

SP_OP REAL Setpoint generator of configuration tool 0.0

PV_OP REAL Process variable operation of configuration tool 0.0

LMN_OP REAL Manipulated value operation of configuration tool 0.0

MP1 REAL Measuring point 1: Internal setpoint 0.0

MP2 REAL Measuring point 2: External setpoint 0.0

MP3 REAL Measuring point 3: Unlimited setpoint 0.0

MP4 REAL Measuring point 4: Process variable from I/O module 0.0

MP5 REAL Measuring point 5: Process variable after 1st order time lag 0.0

MP6 REAL Measuring point 6: Effective process variable (PV) 0.0

MP7 REAL Measuring point 7: Manipulated value from PID algorithm 0.0

MP8 REAL Measuring point 8: Manual manipulated value 0.0

MP9 REAL Measuring point 9: Unlimited manipulated value 0.0

MP10 REAL Measuring point 10: Limited manipulated value 0.0

The static local data used by the configuration tool are at the start of the range of values of the staticlocal data.

Parameter Lists of the Standard Controller

Page 217: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-9Standard ControllerC79000-G7076-C195-02

9.2 Parameters of the PID_S Function Block

COM_RSTLMNR_HSLMNR_LSCYCLESP_INTSP_EXTPV_INPV_PERDISVMANLMNR_INLMNR_PERDB_NBRSPFC_NBPVFC_NBR

QLMNUPQLMNDNQCASLMNPV

PID_S

Table 9-6 Input Parameters of PID_S (step controller)

Parameter Data Type Explanation Range of Values Default

COM_RST BOOL Complete restart(Complete restart routine of the FB is processed)

FALSE

LMNR_HS BOOL Upper limit stop signal of the position feedback signal FALSE

LMNR_LS BOOL Lower limit stop signal of the position feedback signal FALSE

CYCLE TIME Sampling time(time between block calls = constant)

� 20 ms (S7-300) T#1s

SP_INT REAL Internal setpoint(for setting the setpoint with operatorinterface functions)

–100.0 to 100.0 [%] 0.0

SP_EXT REAL External setpoint(SP in floating-point format)

technical range ofvalues (physical value)

0.0

PV_IN REAL Process variable input(PV in floating-point format)

technical range ofvalues (physical value)

0.0

PV_PER WORD Process variable from I/Os W#16#0000

DISV REAL Disturbance variable –100.0 to 100.0 [%] 0.0

MAN REAL Manual manipulated value(for setting the manipulated value withoperator interface functions)

–100.0 to 100.0 [%] 0.0

LMNR_IN REAL Position feedback signal(LMNR in floating-point format)

–100.0 to 100.0 [%] 0.0

LMNR_PER WORD Position feedback signal from I/Os(LMNR in peripheral format)

W#16#0000

DB_NBR BLOCK_DB Data block number(DB with the time slices of the ramp soak)

DB0

Parameter Lists of the Standard Controller

Page 218: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-10Standard Controller

C79000-G7076-C195-02

Table 9-6 Input Parameters of PID_S (step controller)

Parameter DefaultRange of ValuesExplanationData Type

SPFC_NBR BLOCK_FC Setpoint FC number(user-defined FC in the setpoint branch)

FC0

PVFC_NBR BLOCK_FC Process variable FC number(user-defined FC in the process variablebranch)

FC0

Table 9-7 Output Parameters of PID_S (step controller)

Parameter Data Type Explanation Default

QLMNUP BOOL Manipulated value signal up FALSE

QLMNDN BOOL Manipulated value signal down FALSE

QCAS BOOL Signal for cascade control(connected to CAS_ON of the primary controller)

FALSE

LMN REAL Manipulated value signal (after control algorithm) 0.0

PV REAL Process variable(output of the effective process variable in cascade control)

0.0

Parameter Lists of the Standard Controller

Page 219: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-11Standard ControllerC79000-G7076-C195-02

Table 9-8 Static Local Data of PID_S (inputs)

Parameter Data Type Explanation Range of Values Default

SP_HLM REAL Setpoint high limit SP_LLM to 100.0 [%] 100.0

SP_LLM REAL Setpoint low limit –100.0...SP_HLM [%] 0.0

PVH_ALM REAL Process variable: high alarm limit PVH_WRN...100.0 [%] 100.0

PVH_WRN REAL Process variable: high warning limit PVL_WRN...PVH_ALM [%]

90.0

PVL_WRN REAL Process variable: low warning limit PVL_ALM...PVH_WRN [%]

–90.0

PVL_ALM REAL Process variable: low alarm limit –100.0...PVL_WRN [%] –100.0

LMN_HLM REAL Manipulated value: high limit LMN_LLM to 0.0 [%] 100.0

LMN_LLM REAL Manipulated value: low limit 0.0 to LMN_HLM [%] 0.0

GAIN REAL Proportional gain(= controller gain)

Entire range of values(no dimension)

2.0

TI TIME Reset time TI � CYCLE T#20s

TD TIME Derivative action time TD � CYCLE T#10s

TM_LAG TIME Time lag of the D component TM_LAG � CYCLE/2 T#2s

SPGEN_ON BOOL Setpoint generator on(to adjust the setpoint with up/down switches)

FALSE

SPUP BOOL Setpoint up FALSE

SPDN BOOL Setpoint down FALSE

RMPSK_ON BOOL Ramp soak on(setpoint preset as curve)

FALSE

SPEXT_ON BOOL External Setpoint on(to connect to other controller blocks)

FALSE

MAN_ON BOOL Manual mode on(loop opened, LMN set manually)

FALSE

MANGN_ON BOOL Manual generator on(LMN set by generator)

FALSE

MANUP BOOL Manual manipulated value up FALSE

MANDN BOOL Manual manipulated value down FALSE

LMNS_ON BOOL Manual mode actuating signals on FALSE

LMNUP BOOL Manipulated value signal up(the output signal QLMNUP is set manually)

FALSE

LMNDN BOOL manipulated value signal down(the output signal QLMNDN is set manually)

FALSE

DFRMP_ON BOOL Set ramp soak output to default(SP_INT is set at the output)

FALSE

CYC_ON BOOL Repetition on(ramp soak automatically repeated)

FALSE

RMP_HOLD BOOL Hold ramp soak (setpoint value)(the output of the ramp soak is frozen)

FALSE

CONT_ON BOOL Continue ramp soak(the ramp soak is continued at the next time slice)

FALSE

TUPDT_ON BOOL Total time update on(the total time of the ramp soak is recalculated)

FALSE

Parameter Lists of the Standard Controller

Page 220: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-12Standard Controller

C79000-G7076-C195-02

Table 9-8 Static Local Data of PID_S (inputs), continued

Parameter DefaultRange of ValuesExplanationData Type

SPFC_ON BOOL Call the setpoint FC FALSE

SPROC_ON BOOL Rate of change limits on(the rate of change of the setpoint is limited)

FALSE

PVPER_ON BOOL Process variable from I/Os on(connection with I/O modules)

FALSE

LAG1STON BOOL 1st order time lag on FALSE

SQRT_ON BOOL Square root function on FALSE

PVFC_ON BOOL Call process variable FC FALSE

DEADB_ON BOOL Dead band on(small disturbances and noise are filtered)

FALSE

P_SEL BOOL P action on TRUE

PFDB_SEL BOOL P action in feedback path FALSE

I_SEL BOOL I action on TRUE

INT_HOLD BOOL Hold I action FALSE

I_ITL_ON BOOL Initialize I action FALSE

D_SEL BOOL D action on FALSE

DFDB_SEL BOOL D action in feedback path FALSE

DISV_SEL BOOL Connect disturbance variable FALSE

LMNR_ON BOOL position feedback signal on(Modes: step controller with/without positionfeedback signal.) Do not switch to closed loopcontrol!

FALSE

LMNRP_ON BOOL Position feedback signal from I/Os on FALSE

TM_CONT TIME Time to continue(time after time slice TM_SNBR at which theramp soak is resumed)

Entire range of values(no dimension)

T#0s

FAC REAL Factor(ratio or blending factor)

Entire range of values(no dimension)

1.0

SP_FAC REAL Setpoint factor(factor for adapting the setpoint range)

Entire range of values(no dimension)

1.0

SP_OFF REAL Setpoint Offset(zero point of the setpoint normalization)

Entire range of values(no dimension)

0.0

SP_FCOUT REAL Setpoint FC output(connected to the output of the FC in the setpointbranch)

–100.0 to 100.0 [%] 0.0

SPURLM_P REAL Setpoint up rate limit in the pos. range � 0 [%/s] 10.0

SPDRLM_P REAL Setpoint down rate limit in the pos. range � 0 [%/s] 10.0

SPURLM_N REAL Setpoint up rate limit in the neg. range � 0 [%/s] 10.0

SPDRLM_N REAL Setpoint down rate limit in the neg. range � 0 [%/s] 10.0

PV_FAC REAL Process variable factor(factor for adapting the process variable range)

Entire range of values(no dimension)

1.0

PV_OFF REAL Process variable offset(zero point of the process variable normalization)

–100.0 to 100.0 [%] 0.0

Parameter Lists of the Standard Controller

Page 221: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-13Standard ControllerC79000-G7076-C195-02

Table 9-8 Static Local Data of PID_S (inputs), continued

Parameter DefaultRange of ValuesExplanationData Type

PV_TMLAG TIME Process variable time lag(time lag of the PT1 element in the PV branch)

Entire range of values T#5s

SQRT_FAC REAL Square root factor(factor with which the root can be multiplied)

Entire range of values(no dimension)

1.0

SQRT_OFF REAL Square root Offset(zero point of the square root function)

–100.0 to 100.0 [%] 0.0

TM_SNBR INT No. of time slice to continue � � 0 (no dimension) 0

PV_FCOUT REAL Process variable FC output(connected to the output of the FC in the processvariable branch)

–100.0 to 100.0 [%] 0.0

PVURLM_P REAL Process variable up rate limit in the pos. range � 0 [%/s] 10.0

PVDRLM_P REAL Process variable down rate limit in the pos. range � 0 [%/s] 10.0

PVURLM_N REAL Process variable up rate limit in the neg. range � 0 [%/s] 10.0

PVDRLM_N REAL Process variable down rate limit in the neg. range � 0 [%/s] 10.0

PV_HYS REAL Process variable hysteresis(avoids flickering of the indicator)

� � 0 [%] 1.0

DEADB_W REAL Dead band width(determines the size of the dead band)

0.0 to 100.0 [%] 1.0

ERP_ALM REAL Error signal: positive alarm limit 0 to 200.0 [%] 100.0

ERP_WRN REAL Error signal: positive warning limit 0 to 200.0 [%] 90.0

ERN_WRN REAL Error signal: negative warning limit –200.0 to 0 [%] –90.0

ERN_ALM REAL Error signal: negative alarm limit –200.0 to 0 [%] –100.0

ER_HYS REAL Error signal hysteresis(avoids flickering of the indicator)

� � 0 [%] 1.0

I_ITLVAL REAL Initialization value for I action –100.0 to 100.0 [%] 0.0

LMNR_FAC REAL Position feedback signal factor(factor for adapting the position feedback range)

Entire range of values(no dimension)

1.0

LMNR_OFF REAL Position feedback signal offset(zero point of the position feedbacknormalization)

–100.0 to 100.0 [%] 0.0

PULSE_TM TIME Minimum pulse time = n � CYCLE /n=0,1,2... T#3s

BREAK_TM TIME Minimum break time = n � CYCLE /n=0,1,2... T#3s

MTR_TM TIME Motor actuating time � CYCLE T#30s

Parameter Lists of the Standard Controller

Page 222: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-14Standard Controller

C79000-G7076-C195-02

Table 9-9 Static Local Data of PID_S (outputs)

Parameter Data Type Explanation Default

SP REAL Setpoint(effective setpoint)

0.0

QPVH_ALM BOOL Process variable: high alarm limit triggered FALSE

QPVH_WRN BOOL Process variable: high warning limit triggered FALSE

QPVL_WRN BOOL Process variable: low warning limit triggered FALSE

QPVL_ALM BOOL Process variable: low alarm limit triggered FALSE

QR_S_ACT BOOL Time table for ramp soak being processed FALSE

QSP_HLM BOOL Setpoint: high limit triggered FALSE

QSP_LLM BOOL Setpoint: low limit triggered FALSE

QPVURLMP BOOL Process variable: up rate limit in the positive range triggered FALSE

QPVDRLMP BOOL Process variable: down rate limit in the positive range triggered FALSE

QPVURLMN BOOL Process variable: up rate limit in the negative range triggered FALSE

QPVDRLMN BOOL Process variable: down rate limit in the negative range triggered FALSE

QERP_ALM BOOL Error signal: positive alarm limit triggered FALSE

QERP_WRN BOOL Error signal: positive warning limit triggered FALSE

QERN_WRN BOOL Error signal; negative warning limit triggered FALSE

QERN_ALM BOOL Error signal: negative alarm limit triggered FALSE

QLMN_HLM BOOL Manipulated value: high limit triggered FALSE

QLMN_LLM BOOL Manipulated value: low limit triggered FALSE

NBR_ATMS INT Number of the time slice the ramp soak is moving to 0

RS_TM TIME Time remaining until the next time slice T#0s

T_TM TIME Total elapsed time of the ramp soak T#0s

RT_TM TIME Total time remaining to end of ramp soak T#0s

ER REAL Error signal 0.0

LMN_P REAL P action 0.0

LMN_I REAL I action 0.0

LMN_D REAL D action 0.0

SPFC_IN REAL Setpoint FC input(connected to the input of the user-defined FC)

0.0

PVFC_IN REAL Process variable FC input(connected to the input of the user-defined FC)

0.0

Parameter Lists of the Standard Controller

Page 223: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-15Standard ControllerC79000-G7076-C195-02

Table 9-10 Static Local Data used by the Configuration Tool (step controller PID_S)

Parameter Data Type Explanation Default

SP_OP_ON BOOL Setpoint generator on(the value of SP_OP is used as the setpoint)

FALSE

PV_OP_ON BOOL Process variable operation on(the value of PV_OP is used as the setpoint)

FALSE

LMNOP_ON BOOL Manipulated value operation on(the value of LMN_OP is used as the setpoint)

FALSE

LMNSOPON BOOL Manipulated value signal operation on(LMNUP_OP and LMNDN_OP are used as actuating signals)

FALSE

LMNUP_OP BOOL Manipulated value signal up FALSE

LMNDN_OP BOOL Manipulated value signal down FALSE

LMNRS_ON BOOL Simulation of the position feedback signal on FALSE

SP_OP REAL Setpoint generator of configuration tool 0.0

PV_OP REAL Process variable operation of configuration tool 0.0

LMN_OP REAL Manipulated value operation of configuration tool 0.0

LMNRSVAL REAL Start value of simulated position feedback signal 0.0

LMNR_SIM REAL Current value of simulated position feedback signal 0.0

MP1 REAL Measuring point 1: Internal setpoint 0.0

MP2 REAL Measuring point 2: External setpoint 0.0

MP3 REAL Measuring point 3: Unlimited setpoint 0.0

MP4 REAL Measuring point 4: Process variable from I/O module 0.0

MP5 REAL Measuring point 5: Process variable after 1st order time lag 0.0

MP6 REAL Measuring point 6: Effective process variable (PV) 0.0

MP7 REAL Measuring point 7: Manipulated value from PID algorithm 0.0

MP8 REAL Measuring point 8: Manual manipulated value 0.0

MP9 REAL Measuring point 9: Unlimited manipulated value 0.0

MP10 REAL Measuring point 10: Position feedback signal I/Os 0.0

MP11 REAL Measuring point 10: Feedback value (without position feedback signal) 0.0

MP12 REAL Measuring point 10: Three-step element input 0.0

The static local data used by the configuration tool are at the start of the range of values of the staticlocal data.

Parameter Lists of the Standard Controller

Page 224: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-16Standard Controller

C79000-G7076-C195-02

Table 9-11 RMP_SOAK Function (PID_C and PID_S): Shared Data Block (DB_NBR), with Default of Start Pointand Four Time Slices

Parameter DataType

Comment Range of Values Default

NBR_PTS INT Number of coordinates 0 to 255 4

PI[0].OUTV REAL Output value [0]: start point –100.0... 100.0 [%] 0.0

PI[0].TMV TIME Time value [0]: start point Entire range of values T#1 s

PI[1].OUTV REAL Output value [1]: coordinate 1 –100.0... 100.0 [%] 0.0

PI[1].TMV TIME Time value [1]: coordinate 1 Entire range of values T#1 s

PI[2].OUTV REAL Output value [2]: coordinate 2 –100.0... 100.0 [%] 0.0

PI[2].TMV TIME Time value [2]: coordinate 2 Entire range of values T#1 s

PI[3].OUTV REAL Output value [3]: coordinate 3 –100.0... 100.0 [%] 0.0

PI[3].TMV TIME Time value [3]: coordinate 3 Entire range of values T#1 s

PI[4].OUTV REAL Output value [4]: coordinate 4 –100.0... 100.0 [%] 0.0

PI[4].TMV TIME Time value [4]: coordinate 4 Entire range of values T#0 s

Parameter Lists of the Standard Controller

Page 225: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-17Standard ControllerC79000-G7076-C195-02

9.3 Parameters of the PULSEGEN Function Block

INVPER_TMP_B_TMRATIOFACSTEP3_ONST2BI_ONMAN_ONPOS_P_ONNEG_P_ONSYN_ONCOM_RSTCYCLE

QPOS_PQNEG_P

PULSEGEN

Table 9-12 Input Parameters of PULSEGEN

Parameter Data Type Explanation Range of Values Default

INV REAL Input variable(analog step value LMN)

–100.0 to 100.0 [%] 0.0

PER_TM TIME Period � 20 * CYCLE T#1s

P_B_TM TIME Minimum pulse/ break time � CYCLE T#50ms

RATIOFAC REAL Ratio factor(ratio of the time for pos. and neg. pulses)

0.1 to 10.0(no dimension)

1.0

STEP3_ON BOOL Three-step control on FALSE

ST2BI_ON BOOL Two-step control for binary manipulated variable range on(for monopolar range STEP3_ON = FALSE must be set)

FALSE

MAN_ON BOOL Manual mode on(for monopolar range STEP3_ON = FALSE must be set)

FALSE

POS_P_ON BOOL Positive pulse on FALSE

NEG_P_ON BOOL Negative pulse on FALSE

SYN_ON BOOL Synchronization on(the pulse output is updated with the block that updates INV)

FALSE

COM_RST BOOL Complete restart(complete restart routine of the FB is processed)

FALSE

CYCLE TIME Sampling time(time between block calls = constant)

� 20 ms (S7-300) T#20ms

Table 9-13 Output Parameters of PULSEGEN

Parameter Data Type Explanation Range of Values Default

QPOS_P BOOL Output signal positive pulse FALSE

QNEG_P BOOL Output signal negative pulse FALSE

Parameter Lists of the Standard Controller

Page 226: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

9

9-18Standard Controller

C79000-G7076-C195-02

9.4 Parameter of the LP_SCHED Function

DB_NBRTM_BASECOM_RST

LP_SCHED

Figure 9-1 LP_SCHED Function

Table 9-14 Input Parameters of LP_SCHED

Parameter Data Type Explanation Range of Values Default

TM_BASE TIME Time base(time base of the cyclic interrupt class inwhich LP-SCHED is called)

� 20 ms (S7-300) 100 ms

COM_RST BOOL Complete restart(complete restart routine of LP_SCHED is processed)

FALSE

DB_NBR BLOCK_DB Data block number(DB with the call data of the control loops)

DB0

Table 9-15 Global Data Area “DB_NBR”

Parameter Data Type Explanation Range of Values Default

GLP_NBR INT Highest control loop number 1 to 256 2

ALP_NBR INT Current control loop number 1 to 256 0

LOOP_DAT[1]MAN_CYC

TIME Control loop data [1]: manual samplingtime

� 20 ms (S7-300) T#1s

LOOP_DAT[1]MAN_DIS

BOOL Control loop data [1]: disable manual controller call FALSE

LOOP_DAT[1]MAN_CRST

BOOL Control loop data [1]: set manual complete restart(user can reset the particular control loop)

FALSE

LOOP_DAT[1]ENABLE

BOOL Control loop data [1]: controller enable(User must program the conditional call for the control loop)

FALSE

LOOP_DAT[1]COM_RST

BOOL Control loop data [1]: complete restart(this parameter is connected to COM_RST of the control loop)

FALSE

LOOP_DAT[1]ILP_COU

INT Control loop data [1]: internal control loopcounter(internal count variable)

0

LOOP_DAT[1]CYCLE

TIME Control loop data [1]: sampling time � 20 ms (S7-300) T#1s

. . . . . . . . . . . .

. . . . . . . . . . . .

Parameter Lists of the Standard Controller

Page 227: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

10-1Standard ControllerC79000-G7076-C195-02

Configuration Tool - Product Overview

This chapter describes the following:

� The purpose of the configuration tools

� The functions of the configuration tools

� The basic program and data structure

What Does ThisChapter Describe?

10

Page 228: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

10

10-2Standard Controller

C79000-G7076-C195-02

10.1 Purpose of the Configuration Tool

The configuration tool supports you when installing and assigning parametersto the standard controller block so that you can spend more time on the actualcontrol problems.

Using the configuration tools, you can assign parameters to the standard controller blocks

� PID_C (controller with continuous output)

� PID_S (controller with output for step control)

and optimize the parameters to match the characteristics of the process.

Purpose

Configuration Tool

Page 229: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

10

10-3Standard ControllerC79000-G7076-C195-02

10.2 Functions

The overall performance of the configuration tool can be divided intoindividual functions. Each of these functions runs in its own window. Afunction can also be called more than once, in other words, you can, forexample, display the loop windows of several controllers simultaneously.

Based on a block diagram of the controller, you can modify the structure andthe parameters of the controller using the appropriate configuration tool.

Parameters that you do not change retain their default values.

The parameters are entered in the function block assigned to the instance datablock.

The parameters become effective when the function block and correspondinginstance data block are loaded on a CPU and then started by a time-of-dayinterrupt.

Using the Curve Recorder function, you can record and display the valuesof a selected variable of the control loop over a defined period of time. Up tofour variables can be displayed simultaneously.

With the Loop Monitor function, you can display the relevant control loopvariables (set point, manipulated variable and process variable) of a selectedcontroller. Values exceeding the limit values of the process variable are alsodisplayed.

Using the Process Identification function, you can determine the optimumcontroller setting for a specific control loop. The characteristic parameters ofthe control loop are calculated experimentally. The ideal controllerparameters are then calculated so that you can use them as required.

During this procedure, it is irrelevant whether the values recorded while theprocess is settling originate from a controller acting on a simulated process oracting on a real process on-line.

Using the Loop Monitor function, you can change the control loop variablesof the currently displayed controller or enter new values.

The Functions ofthe ConfigurationTool

AssigningParameters to aController

Monitoring theController

ProcessIdentification

Modifying aController

Configuration Tool

Page 230: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

10

10-4Standard Controller

C79000-G7076-C195-02

10.3 Program and Data Structure

The fundamental program and data structures of the configuration tools forthe PID_C and PID_S controller blocks are the same.

The operator interface is based on the same principles as that of STEP 7. Youactivate all functions using menus.

The program structure and the most important menus are as shown in thediagram below.

Configuration Tool for PID_C or PID_S

Parameter Assignment

Loop Monitor

Curve Recorder with on-line data

Process Identification with on-line data

Parameter List

Figure 10-1 Program Structure

Program and DataStructure of theController Blocks

Program Structure

Configuration Tool

Page 231: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

10

10-5Standard ControllerC79000-G7076-C195-02

All the data required for a controller block are located in an instance datablock assigned to the controller block. The structure within the data block isdetermined by the definition of the variables in the declaration part of thefunction block.If this data block is on the PG/PC, only off-line access is possible.

If the data block is loaded on a CPU using STEP 7 functions or theconfiguration tool, on-line access is also possible.

Configurationtool

Instancedatablock

Instancedatablock

Controllerblock

On the PGOn the CPU

Figure 10-2 Data Structure

Data Structure

Configuration Tool

Page 232: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

10

10-6Standard Controller

C79000-G7076-C195-02

Configuration Tool

Page 233: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11-1Standard ControllerC79000-G7076-C195-02

Working with the Configuration Tool

This chapter describes the following:

� The necessary preparations

� General operating instructions

� Configuring and assigning parameters

� Monitoring the control loop

� Controlling the loop

� Process identification (optimizing the controller)

� Completing the configuration

What does thisChapter Describe?

11

Page 234: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-2Standard Controller

C79000-G7076-C195-02

11.1 Preparations

Before you can start to assign parameters, make sure that you havecompleted or clarified the points below.

You should analyze the characteristics of the process and control loop to theextent that you can decide on the required automation hardware and software(controller type).

Depending on the control task, you must specify the structure of thecontroller block, for example, as shown below:

� Which controller inputs will be used?

� Which controller functions are required and which functions can bedisabled?

� Will you use your own FC?

� How will the controllers be connected in a cascaded control system?

You must specify the controller variables sent to the process or received fromthe process. The controller inputs and outputs must then be defined to matchthese variables. You can assign symbolic names to inputs and outputs.

Work through the steps below in STEP 7:

� Create a project directory and a user program.You must load the required controller block, if necessary with a differentnumber, in this user program.

� Define the assignment between the user program and CPU.

Before You AssignParameters

Process Analysis

ControllerStructure

Input and OutputVariables

Opening aProject// Creating aProgram

Configuration Tool

Page 235: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-3Standard ControllerC79000-G7076-C195-02

11.2 General Operating Instructions

The operator interface of the configuration tool corresponds to the STEP 7user interface based on MS Windows.

You call all the functions using menus

The menu options under Debug and Window are only available after youhave opened a data block.

You can control the cursor in the menus using the mouse and/or the keys.

– With the left mouse button, you can select and activate all the menuoptions and input fields.

– If you do not want to work with the mouse or if you do not have amouse available, you can position the cursor on the menu commandsof the main menu and on the options of the submenus and activatethem using the cursor control keys. Using the tab key, you can selectfunction fields and open them with the space bar. Within dialog boxesand parameter lists, you can select the individual parameters with thecursor control keys.

All the parameters you enter are saved in an instance data block assigned tothe controller block.

� In the off-line mode, the data block is addressed in the PG/PC.

� In the on-line mode, the data block is addressed on the CPU.

Certain functions are only available in the on-line mode. These on-linefunctions are as follows:

� Loop monitor

� Curve recorder with on-line data

� Measure motor actuating time (only step controller)

� Process identification with on-line data

Errors are displayed by the configuration tool with self-explanatory messagesor are indicated by STEP 7.

Operator Interface

Operation with theCursor Keys andMouse

On-line/Off-lineMode

Errors

Configuration Tool

Page 236: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-4Standard Controller

C79000-G7076-C195-02

11.3 Configuring and Assigning Parameters

After successful installation of the configuration tools, the icons for the toolsare displayed in the window of the STEP 7 program group.

� Position the mouse pointer on the icon of the configuration tool you wantto use and double click the icon. The main menu of the selectedconfiguration tool appears.

� You can also start the configuration tool by locating it in the Explorer anddouble-clicking it.

Note

Before you can continue and assign parameters or use other functions, youmust first create a new data block with the configuration tool or open anexisting data block.

Using the configuration tool, you can create or open a new data block.

– You create a new data block with the menu optionFile � New. You must assign the data block to an FB. The values ofthe parameters have defaults assigned.

– You open an existing data block using the menu option File � Open.In the next dialog box, you specify whether you want to load the datablock from the CPU (on-line) or from the PG/PC (off-line specifyingthe path).

When you load the data block from the PG/PC off-line, you mustspecify the path to the data block using the Open Project menu optionof the browse function of the load menu.

You can load (on-line) from the assigned CPU using “AccessibleNodes” only when a point-to-point connection exists.

If the two blocks were loaded successfully, the block diagram of the standardcontroller belonging to the selected configuration tool is displayed in themain window of the tool.

You can open more than one data block at a time. The commands alwaysrefer to the currently active data block. This is indicated by the colored titlebar.

Once this window is displayed, you can continue using the main menu bar toactivate functions or to assign parameters to data blocks.

Starting theConfiguration Tool

Creating / Opening a DataBlock

Configuration Tool

Page 237: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-5Standard ControllerC79000-G7076-C195-02

You enter the parameters in two stages:

First stage – in the block diagram of the controller

Second stage – in a dialog box of the block diagram or in parameter lists

– Entries in the block diagram.In the block diagram, you can enter all the input parameters directlyby clicking the fields.You select the various input and output routes by clicking the option(radio) buttons in the switching boxes.

– Entries in function fieldsIf you click the function fields in the block diagram, you open theparameter assignment dialog boxes for the function field. In theseboxes, you can click the option buttons for particular controllerfunctions switching them on or off. You can enter the controllerparameters directly by clicking them.

– Entries in parameter listswith the Debug � Parameter List menu option, you can select thefollowing parameter lists:– Loop Configurator – Loop Alarms – Loop TuningThese lists contain all the parameters that can be selected in the blockdiagram and in the function fields. By clicking switches in these lists,you can switch certain controller functions on or off or enter thecontroller parameters directly by clicking them.

You can obtain further information about the function fields and theindividual parameters using the on-line help system.

Once you have assigned parameters to the controller data block, you can saveit on the PG/PC in your program using the File � Save menu option.

If you created a new data block for assigning the parameters, before you cansave it, you will be requested to establish the connection to an existingcontroller block (FB) or to a copy that you have renamed and to assign anumber to the data block.

If you opened an existing data block, it will be saved in its old location. Theold data block is overwritten.

Using the File � Save As menu option, you can save the edited data blockusing a path you have selected.

Using the File � Download menu option, you can load the data blockdirectly on a CPU.

AssigningParameters to aController

Saving a DataBlock on thePG/PC

Transferring a DataBlock to the CPU

Configuration Tool

Page 238: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-6Standard Controller

C79000-G7076-C195-02

Using the File � Exit menu option, you can close the currently open datablock. If you have modified the data block since you opened it or since youlast saved it, a message will be displayed. If you close the data block withoutsaving, the data you have modified will be lost. The content of the data blockthen remains as it was when you opened it or when you last saved it.

An operational controller requires not only the data block but also a cyclicinterrupt OB (for example OB35) and the complete restart OB (OB100) aswell as the controller function block assigned to the data block.

Program the function block and data block calls in the organization blockusing STEP 7.

The symbol table should also contain the assignment of the symbolic to thephysical addresses.

All the blocks and lists required must be loaded in your user program file.

If you have already downloaded the data block to the CPU, you must alsodownload the other required blocks to the CPU using STEP 7.

If you have only saved your data block in your user program file on thePG/PC, use STEP 7 to download all the required blocks to the appropriateCPU.

!Caution

You can download these programs to the CPU in both the STOP and in theRUN mode. Remember, however, that if you download a program in theRUN mode it will be transferred block by block. If you overwrite an “old”user program with the download function, conflicts and errors can occur.

Starting up a controller is the same as starting up other user PLC programs.

It is possible to reload modified blocks (FB and DB) on the CPU on the PG.

You can monitor the controller using the configuration program functionsCurve Recorder and Loop Monitor.

These functions are available with the Debug � Curve Recorder andDebug � Loop Monitor menu options.There must be a connection between the PG/PC and the CPU.

You can also monitor and modify the controller using STEP 7.

Exit

Integrating theData Block

Transferring theController to theCPU

Starting Up theController

Reloading Blocks

Monitoring andModifying theController

Configuration Tool

Page 239: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-7Standard ControllerC79000-G7076-C195-02

11.4 Curve Recorder

Using the Curve Recorder, you can display and record the values of up tofour selected variables of the control loop over a period of time. You can alsouse this function in conjunction with the Loop Monitor (process stimulation)and process identification (automatic analysis) functions.

The Curve Recorder window displays up to a maximum of 4 curves in adiagram window with the time entries on the X axis and the parameter valuesas a percentage on the Y axis (–100% to +100%).

Click the “Settings...” button to open the settings dialog.

You can assign a parameter to the corresponding curve with the arrows in thefields “curve 1” to “curve 4”.

You can enter an upper or lower limit for the display of the X axis for everycurve.

The curve can be assigned another color with the button “Change Color”button. If the curve is the setpoint, process variable or manipulated value, thesame color is adopted in the Loop Monitor.

With the arrow beside the acquisition cycle, you open a list of possible inputvalues. The length of the time axis is limited depending on the acquisitioncycle, as follows:

10 * acquisition cycle � length of the time axis � 500 * acquisition cycle

How you use the Curve Recorder with On-line-Data function is describedbelow.

You start the function with the Debug � Curve Recorder menu option.

The Curve Recorder window is displayed. Call the Settings dialog with the“Settings...” button.

– If you want to record the parameter values you have selected in anarchive file, click the New button.

– If you do not want to record the values, continue at Step 3.

Function

Content of theWindow

Settings in theCurve Recorder

Assigning CurvesAssigning Curves

Resolution

Curve Recorderwith On-line Data

Step 1

Configuration Tool

Page 240: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-8Standard Controller

C79000-G7076-C195-02

Step 2 Click on the arrows in the fields “curve 1” to “curve 2”.

A parameter list is opened in which you can select the parameter you want toassign to the curve.

Step 3 Set up the upper and lower limit of the X axis.

Step 4 Click the “change color” button.

The dialog box “Color Selection” is opened. You can then assign a specificcolor for the curve.

Step 5 Set the acquisition cycle by selecting a cycle suitable for the dynamics of theprocess using the arrow in the archive field (200 ms, 300ms ... 900ms, 1 s, 2 s... 9 s, 10 s, 20 s ... 90 s). Then specify the length of the time axis.

Step 6 Start the measured value acquisition by exiting the settings dialog with “OK”and activating the “Start” button.

Step 7 Follow the recording in the diagram window. You will see the current sectionof the recording of your selected parameter. The current values are displayedat the top right of the window

Step 8 To stop the recording, click the “Stop” button.

In this status, you can move the window over the recorded curves using theslider below the diagram.

To continue the recording, click the “Start” button again.

Step 9 To terminate the Curve Recorder function, click the “Close” button.

If you want to terminate this function, click the Close button.

The Curve Recorder function is completed and terminated.End of the CurveRecorder withOn-Line Data

Configuration Tool

Page 241: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-9Standard ControllerC79000-G7076-C195-02

11.5 Loop Monitor

The Loop Monitor function is a simple means of monitoring and controllingthe control loop.

Unless stated otherwise, all the following explanations apply to both thePID_C and PID_S controllers.

The bar diagrams display the values of the parameters effective in the controlloop (Setpoint, Process Variable and Manipulated Variable) at 500 msintervals.

The bar for the process variable also includes the high and low warning andalarm limits. If one of these limits is exceeded, the color of the processvariable bar changes. If one of the warning limits is exceeded, the processvariable bar is displayed as bright yellow, and if an alarm limit is exceededthe bar changes to bright red.

You can switch over the control loop parameters Setpoint, Process Variableand Manipulated Variable from the Controller setting to the manual modeand then change the parameter values.

To change control loop parameters, you switch from the Controller setting tothe PG setting and then enter your manual value in the numerical input field.

After this, click the Send button to make your changes effective on the CPU.

Note

Changed settings and values are only effective on the CPU after you haveclicked the Send button.

The Loop Monitor window also displays the most important parameters ofthe PID algorithm (proportional gain, reset time and derivative time) updatedat 500 ms intervals.

The selected warning and alarm limits for the error signal are monitored. Ifthe error signal exceeds one of these limits, this is indicated by one of thevirtual LEDs being lit (bright red).

In the Loop Monitor window for the PID_S-controller, the actuating signalsfor process control are indicated by virtual LEDs.

Function

Displaying theControl LoopParameters

Switching to theManual Mode

Changing ControlLoop Parameters

Displaying the PIDParameters

Monitoring theError Signal

MonitoringActuating Signals

Configuration Tool

Page 242: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-10Standard Controller

C79000-G7076-C195-02

In the Loop Monitor window for the PID_S-controller, you can also enter thevalues manually. Switch the setting from controller to PG and click one ofthe options up or down.

Click the “Send” button to make the changes effective on the CPU.

Note

When you complete the Loop Monitor function, all the values you changedin the Loop Monitor window are set back to the controller value. This cancause a step change in these values in the control loop.

Entering ActuatingSignals

Configuration Tool

Page 243: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-11Standard ControllerC79000-G7076-C195-02

11.6 Process Identification

Using the Process Identification function, you can obtain the optimumcontroller setting for a selected control loop. After adequate stimulation ofthe process, the measured data of the control loop are recorded in anexperimental procedure. The parameters of a mathematical process model arecalculated from this. From the process model, the optimum PID controllerparameters are calculated and are then available for further use.

Parts of the Loop Monitor and Curve Recorder functions are also used.

You select the process identification function using the Debug � ProcessIdentification menu option.

The step controller also has the extra function Motor Actuating Time as partof the Process Identification. This function must be called before the actualrecording of measured data and process identification. With this function,you can determine the motor actuating time of the final control elementexperimentally.

During the acquisition of the measured data and the program identificationyou are guided through a series of dialogs (steps).

You can stop and terminate the procedure at any time using the “Exit”button.

Using the “Help” button, you can request detailed information about eachstep.

You can run the Process Identification function for the PID_C controller andPID_S controller is only possible in the on-line mode.

In the on-line mode, process identification is possible both with

– a closed control loop and with

– an open control loop.

The motor actuating time for the step controller can only be measured on-linein the open loop.

Function

Operator Prompts

On-line Mode

Configuration Tool

Page 244: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-12Standard Controller

C79000-G7076-C195-02

In an open loop configuration (Figure 11-1), the controller block operatesindependent of the PID algorithm with the user directly influencing themanipulated variable. The manipulated variable must be switched to manualin the Loop Monitor.

G(s)LMN(t) PV(t)

LMN(t) =manipulated variablePV(t) = process variableG(s) = open loop transfer function

Figure 11-1 Open Control Loop

In a closed loop configuration (Figure 11-2), the controller block uses its PIDalgorithm to control the process. The user influences the controller using thesetpoint in the Loop Monitor (you must select PG and specify the value). Thecontroller must be in the automatic mode (block diagram).

G(s)LMN(t) PV(t)

R(s)E(t)SP(t)

SP(t) = setpointE(t) = error signalR(s) = closed loop transfer function

Figure 11-2 Closed Control Loop

If the process does not have an integral action (self-regulating process), theprocess identification should always be done in the open loop mode since thedynamics of the step response in the closed loop are affected by thecontroller. Furthermore, a process identification in the automatic mode isonly useful when the controller has already been assigned feasible parametersand only needs to be optimized.

In processes with an integral action, a pulse-shaped stimulation is necessaryin the open loop, in other words before and after the stimulation, themanipulated value must be zero. In such processes, it is sometimes difficultto approach the operating point in the open loop. In such situations, a closedloop process identification is preferable.

Open Loop

Closed Loop

Without IntegralAction

With IntegralAction

Configuration Tool

Page 245: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-13Standard ControllerC79000-G7076-C195-02

With a step controller without a position feedback signal, processidentification in the closed loop is also recommended since the manipulatedvariable can be entered manually.

Whether or not you use a PI or PID controller depends on the process to becontrolled.

With a step controller, the PI action should always be selected.

The following table shows the most important criteria:

Table 11-1 Criteria for PI and PID Controllers

Type of ProcessController Type

Type of ProcessPI Controller PID Controller

Self-regulating andsecond order.

Suitable if steady-stateerror is not wanted.More overshoot thanwith P controller.

Suitable.

Overshoot like Pcontroller

Self-regulating higherorderorSelf-regulating anddelay time and controlsettling time

Usually useful, mainapplicationGain limited upwards,reset time limiteddownwards

Control quality betterthan PI controller byfactor of 2

Tv limited upwards.Unsuitable if dead timein control loop.

The optimization of the controller parameters by program-supported processidentification requires a mathematical model (process model) of thecontrolled process. For processes without an integral component, this is thePTn model. For processes with an integral component, it is the ITn model.

Before you start process identification you should select or find out thefollowing characteristics

– type of process (with or without an integral component)

– the mode (manual or automatic, in other words whether process data isacquired in the open or closed loop).

and

– the controller type (PID or PI controller)

– the operating point of the controller.

These parameters are required for the process identification.

In the closed loop, you assign parameters to the controller and then switch toautomatic.

Step Controllerwithout PositionFeedback

PI or PIDController

Process Model

Selecting BasicParameters

Configuration Tool

Page 246: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-14Standard Controller

C79000-G7076-C195-02

The measurement must be made before process identification with on-linedata.

In the off-line mode, it is not possible to measure the motor actuating time.

If neither the position feedback signal nor the limit position signals of theactuator are available or they have not been selected, you must enter themotor actuating time manually.

Note

Due to the restricted measured value update rate, the motor actuating time tobe measured should not be too short (approx. � 10 seconds).

The following sections describe the sequence of the Motor Actuating Timefunction. You are supported step by step through the sequence by dialogboxes.

Start the measurement with the Debug � Motor Actuating Time menuoption.The first dialog box is displayed.

Step 1 Prepare for measuring the motor actuating time.

Check the information in the displayed dialog box and make any necessarycorrections.

To measure the motor actuating time, you can use either the positionfeedback value or the actuator limit position signals. If the final controlelement does not have a position feedback value, you can only use theactuator limit position signals. If you select none, you cannot measure themotor actuating time. In this case, the time must be entered manually at thethree-position element in the block diagram.

If you have selected position feedback value, the current value of theposition feedback signal is displayed beside current manipulated value. Inthe new manipulated value input field, you must specify the newmanipulated value. This must be at least 10% higher or lower than thecurrent manipulated value.

Start the measurement of the motor actuating time by clicking the “Start”button. You can stop the measurement before it is completed by clicking the“Stop” button.

– If you selected position feedback value, the final control element isadjusted to the new manipulated value.

– If you selected actuator limit position signals, the final controlelement is first adjusted down to the low limit and then up to the highlimit and down again to the low limit.

In both cases, the result is displayed in the form of the operating range as apercentage and the time taken and motor actuating time in milliseconds.

Measuring theMotor ActuatingTime

Measuring theMotor ActuatingTime

Configuration Tool

Page 247: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-15Standard ControllerC79000-G7076-C195-02

To continue, click the “OK” button.

If you select the position feedback value or the actuator limit positionsignals as the measurement signal, the Loop Monitor is opened.

Set up an open loop to suit the type of measurement signal:

– When measuring with the position feedback signal: select the optionPG for the manipulated variable and the option controller for theactuating signals in the Loop Monitor.

– When measuring with the actuator limit position signals: select theoption controller for the actuating signals in the Loop Monitor.

Confirm your input by clicking the “Send” button.

Step 3 The parameters of the step controller that depend on the motor actuating timeare calculated and displayed. Check the information in the dialog box andmake any necessary corrections.

A step controller has more parameters than a continuous controller. Theadditional parameters are motor actuating time, minimum pulse time andminimum break time.

The minimum dead band width is calculated based on the minimum pulsetime according to the following formulas:

– minimum pulse time = 0.005 * motor actuating time

– dead band width = 100 * abs(K) * minimum pulse time / motoractuating timeThe factor K is the process gain. Since K is unknown at this time, K = 1 is assumed.

If you change the minimum pulse time manually, the new values rounded upto the sampling time and the minimum dead band width are recalculatedwhen you exit the input field.

Click the “Save” button in the dialog.

The motor actuating time, minimum pulse time, minimum break time anddead band width are entered in the block diagram.

The Motor Actuating Time function is now completed.

Step 2

MeasurementCompleted

Configuration Tool

Page 248: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-16Standard Controller

C79000-G7076-C195-02

The following sections describe the process identification with on-line-datafunction. During the process identification, you are supported by dialogboxes.

Note

If you need to make a change in the block diagram (automatic mode) toallow a measurement in the closed loop, you must make this change andthen use the Download function before starting the process identification.

Start the process identification with the Debug � Process Identificationmenu option.The first dialog box and the Loop Monitor window are displayed.

Step 1 Set the controller mode.

– Select identification in the open loop by setting PG for themanipulated variable option and controller for the process variableoption in the Loop Monitor window.

– Select identification in the closed loop by setting the switch in theblock diagram to automatic. After making changes in the blockdiagram, you must select the PLC �� Download menu option(disabled when the Loop Monitor is open).

– With a step controller without position feedback value, theidentification should be made in the closed loop.

If you select identification in the closed loop, you must also set thecontroller option for the manipulated variable and the processvariable and the option PG for the setpoint in the Loop Monitorwindow.

Click the “Send” button in the dialog box to continue.

Step 2 Prepare for acquisition of process data.

Check the information in the displayed window Process Identification:Prepare for Data Acquisition and correct it where necessary.

Select the setting for the process behavior based on the type of process.

The data recording is started automatically according to the defaults as soonas the manipulated variable in the CPU passes a certain threshold.

You can also change the threshold for the manipulated variable in thenumeric field. This value should be greater than the disturbances that can beexpected to avoid premature self-stimulation of the process.

During the data recording, after approximately 130 sets of three measuredvalues (setpoint, manipulated variable and process variable) the processvariable is checked continuously to establish whether it has reached its finalstate. If your process has an integral action, you should switch off theautomatic final state recognition.

ProcessIdentificationOn-line

Configuration Tool

Page 249: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-17Standard ControllerC79000-G7076-C195-02

At a sampling time of 500 ms, this number (130) represents a recording timeof 65 seconds. You should take this into account if you switch off the dataacquisition manually in step 6.

Click the “OK” button in the dialog box to continue.

Step 3 Set the initial situation for process stimulation.

In this step, you move the setpoint to the operating point around which theprocess will later be controlled. As an alternative, you can also move theprocess away from the operating point by the amount of the step change withwhich you intend to stimulate the process later.

In the manual mode, adjust the manipulated variable to the operating point(in the automatic mode the setpoint) in the Loop Monitor window byentering the required value in the PG parameter field. Then click the “Send”button.

Step 4 Wait until the process variable has settled.

For successful identification, the process must first be settled before the stepchange is applied to it. Wait until you are sure that the process variable hassettled. To help you, the setpoint, manipulated variable and process variableare displayed on the Curve Recorder.

Once the controller is completely settled, click the “OK” button to continue.

Step 5 Apply the step change.

In the manual mode, set a step change in the manipulated variable in theLoop Monitor window (in the automatic mode, the setpoint) by entering therequired value in the numeric input field.

With a step controller without a position feedback signal and with themanual mode selected, the process must be stimulated using the actuatingsignals. The automatic mode is therefore recommended.

Click the Send button to start the stimulation.

Step 6 Wait until the process data have been recorded.

Data acquisition is started as soon as the manipulated variable in the CPU haspassed a selected threshold or, if you have switched off the changemonitoring, as soon as the step change is applied.

If automatic recognition of the final state is active, the data acquisition stopsautomatically when the process variable has settled.

If the process variable does not adopt a steady-state value, or if therecognition of the final state is switched off, you must stop data acquisitionyourself with the “Cancel” button.

Configuration Tool

Page 250: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-18Standard Controller

C79000-G7076-C195-02

Before you stop the data acquisition, at least 75 sets of measured values(setpoint, process variable, manipulated variable) should be recorded. Thisnumber corresponds to a recording time of 38 seconds at a sampling time of500 ms.

Step 7 Close the Loop Monitor window.

Note

When you close the Loop Monitor window, step changes to the value in theblock diagram can occur in the manipulated variable in the manual mode orin the setpoint in the automatic mode.

Step 8 If you are using the step controller or the continuous controller with a nonself–regulating process, skip step 8.

Now, make the preparations for process identification.

You already set the process behavior in step 2 and this is displayed again inthe dialog box.

When selecting the tuning mode, you can choose one of two settings.

– Select with 10 % overshoot and the controller parameters arecalculated so that a 10% overshoot results.

– Select aperiodic and the controller parameters are selected so that theprocess variable settles aperiodically in the closed loop.

When assigning parameters for the controller experimentally for thefirst time, a slow aperiodic setting is preferable, since theidentification of a transfer function with overshoot is less accurate.

If the process settling time is, however, under 10 seconds, a slightovershoot of the process variable occurs in the closed loop despite theaperiodic setting.

Click the “OK” button to start the calculation.

Step 9 Transfer the calculated PI or PID parameters to the internal data storage ofthe configuration tool.

Click the “Save PI” button in the displayed window Result of ProcessIdentification .

The calculated parameters for a PI or a PID controller are entered in theblock diagram. If you want the calculated parameters to be used on the CPU,the controller instance DB must be transferred with the PLC → Downloadfunction.

The Process Identification with on-line data function is now complete.End of ProcessIdentification withOn-line Data

Configuration Tool

Page 251: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-19Standard ControllerC79000-G7076-C195-02

11.7 Final Jobs

You can print out your data block using STEP 7.

If you did not save the data block on the PG/PC after assigning parametersbut loaded it immediately on the CPU, you should now save your data blockin your program using the menu option File � Save.

Close the configuration tool with the menu option File � Exit.

Printing the DataBlock

Saving the DataBlock

Exiting theConfiguration Tool

Configuration Tool

Page 252: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

11

11-20Standard Controller

C79000-G7076-C195-02

Configuration Tool

Page 253: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

A-1Standard ControllerC79000-G7076-C195-02

References

/70/ Manual: S7-300 Programmable Controller, Hardware and Installation

/71/ Reference Manual: S7-300, M7-300 Programmable ControllersModule Specifications

/100/ Manual: S7-400/M7-400 Programmable Controllers,Hardware and Installation

/101/ Reference Manual: S7-400/M7-400 Programmable ControllersModule Specifications

/231/ User Manual: Standard Software for S7 and M7,STEP 7

/232/ Manual: Statement List (STL) for S7-300 and S7-400, Programming

/234/ Programming Manual: System Software for S7-300 and S7-400Program Design

/352/ J. Gißler, M. Schmid: Vom Prozeß zur Regelung. Analyse, Entwurf,Realisierung in der Praxis. Siemens AG. ISBN 3-8009-1551-0. (inGerman)

A

Page 254: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

A-2Standard Controller

C79000-G7076-C195-02

Literaturverzeichnis

Page 255: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-1Standard ControllerC79000-G7076-C195-02

Glossary

In blending and cascade controls with several secondary loops, the setpointof the secondary loops can be influenced by a specific factor. This determinesthe degree of intervention at this point in the system resulting in the overalladjustment profile.

In a ratio controller, the alignment factor FAC is used to align the setpoints ofthe control loops with each other so that the set ratio corresponds to theactual ratio of the two process variables.

The analog input/output is an algorithm (function) for converting an inputvalue in the peripheral (I/O data) format to a floating point and normalizingthe value to a percentage and in the other direction, converting an internalpercentage to an output value in the I/O (peripheral) format.

The controller operates and calculates the manipulated variable with the aimof minimizing the error signal x – w (closed loop).

Blending control involves a controller structure in which the setpoint for thetotal amount SP is converted to percentages of the individual components.The total of the blending factors FAC must be 1 (= 100 %).

–Controller 1 Process 1

–Process 4Controller 4

FAC1SP1

FAC4SP4

SP1 LMN1 PV1

LMN4 PV4

Adjustment Profile

Alignment Factor

AnalogInput/Output

Automatic Mode

Blending Control

Page 256: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-2Standard Controller

C79000-G7076-C195-02

Cascade control involves a series of interconnected controllers, in which themaster controller adjusts the setpoint for the secondary (slave) controllersaccording to the instantaneous error signal of the main process variable.

A cascade control system can be improved by including additional processvariables. A secondary process variable PV2 is measured at a suitable pointand controlled to the reference setpoint (output of the maser controller SP2).The master controller controls the process variable PV1 to the fixed setpointSP1 and sets SP2 so that the target is achieved as quickly as possiblewithout overshoot.

Secondary loop

Main loop

Controller 2 Process 2Controller 1

PV1

SP1SP2

PV2

ProcessControl

Process 1

Disturbance variableMaster controller

Slave controller

LMN

A closed-loop controller is a device in which the error signal is continuouslycalculated and an actuating signal generated with the aim of eliminating theerror signal quickly and without overshoot.

During a complete restart, a controller is set to a defined initial status. Theoutput parameters and local static data of the controller are assigned defaultvalues during the complete restart routine. If the complete restart bit is set atthe COM_RST input, the complete restart routine is run.

A software tool for creating and designing a standard controller andoptimizing the controller settings using the data from a process identificationprocedure.

The control loop is the connection between the process output (processvariable) and the controller input and the controller output (manipulatedvariable) with the process input, so that the controller and process form aclosed loop.

Controller parameters are characteristic values for the static and dynamicadaptation of the controller response to the given loop or processcharacteristics.

Cascade Control

Closed-LoopController

Complete Restart

Configuration

Control Loop

ControllerParameters

Glossary

Page 257: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-3Standard ControllerC79000-G7076-C195-02

Dead time is the time delay in the process variable reaction to disturbances ormanipulated value changes in processes involving transport. The inputvariable of a dead time element is displaced by the value of the dead time 1 : 1 at the output.

A method (algorithm) for differentiating an analog variable whereby the timeresponse is determined by the derivative time TD (= reset time). The outputsignal of the derivative unit is proportional to the rate of change of deviationof its input signal. A first order time lag TM_LAG is provided to suppresspeak derivative values or disturbance signals. The step function has thefollowing format:

TM_LAG

OUTV(t) � TDTM_LAG

INV0 * e–t�TM_LAG

INV0

TDTM_LAG

INV0

t

OUTVINV

The derivative component is the differentiating component of the controller.D elements alone are unsuitable for control since they do not produce anoutput signal if the input signal remains at a constant value.

DDC is a discrete controller in which the error signal is updated at thesampling point (� sampling time, �� digital controller).

A controller that acquires a new value for the controlled variable (processvariable) constant intervals (� sampling time) and then calculates a newvalue for the manipulated variable depending on the value of the currenterror signal.

Memory

yk = A(xk – wk)

A = controlalgorithm

xk

wk

Pulsegen.

Actuator

SensorSamplingADC

Pro

cess

y (t)

x (t)

yk

All influences on the process variable (with the exception of the manipulatedvariable) are known as disturbances. Influences adding to the process outputsignal can be compensated by superimposing the actuating signal.

Dead Time

Derivative Action

DerivativeComponent

DDC

Digital Control

DisturbanceVariable

Glossary

Page 258: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-4Standard Controller

C79000-G7076-C195-02

The error signal function forms the error signal ER = SP-PV. At the point atwhich the comparison is made, the difference between the desired value(setpoint) and the actual process value is calculated. This value is applied tothe input of the control algorithm.

This function monitors four selectable limits for the the value (amplitude) ofthe error signal. If these limits are reached or exceeded a warning (1st limit)or an alarm (2nd limit) is generated. A hysteresis can be set for the offthreshold of the limit signals to prevent signal “flickering”.

Feedforward control is a technique for reducing or eliminating the influenceof a dominant (measurable) disturbance (for example ambient temperature)in the control loop. The measured disturbance variable DISV, is compensatedbefore it affects the process. Ideally, the influence can be fully compensatedso that the controller itself does not need to take corrective action itself (withthe I action).

ControllerPVSP

Process

DISV (disturbancevariable)DISV

Control loop

connected

LMN

A first order lag is a function for damping (applying a time lag) the changesin the analog process variable (LAG1ST). The time lag constant TM_LAGspecifies the time required by the output signal to reach 63 % of thestationary end value. The transfer ratio in the settled state is 1 : 1.

OUTV(t) � INV0 (1–e–t�TM_LAG)

INV0

t

OUTV

TM_LAG 5* TM_LAG

< 1% deviation fromstationary valueOUTV(t)

INV

63%

100%

A fixed setpoint controller is a controller with a fixed setpoint that is onlychanged occasionally. This controller is used to compensate for disturbancesoccurring in the process.

Error Signal (ER)

Error SignalMonitoring

FeedforwardControl

First Order Lag

Fixed SetpointControl

Glossary

Page 259: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-5Standard ControllerC79000-G7076-C195-02

Follow–up control involves a controller in which the setpoint is constantlyinfluenced externally (secondary controller of a multi–loop control system).The task of the secondary controller is to correct the local process variable asquickly and accurately as possible so that it matches the setpoint.

Integral action or component of the controller.After a step change in the process variable (or error signal) the outputvariable changes with a ramp function over time at a rate of changeproportional to the integral–action factor KI (= 1/TI). The integralcomponent in a closed control loop has the effect of correcting the controlleroutput variable until the error signal becomes zero.

A procedure (algorithm) for integrating an analog value where the timeresponse is determined by the reset time TI. The rate of change of the outputsignal of the integrator is proportional to the static change in the input signal.The integral action coefficient KI = 1/TI is a measure of the rate of rise of theoutput signal when the input signal is not zero. The step response is asfollows:

OUTV(t)� 1TI INV0 * t

INV0

t

INVOUTV

TI

Interpolation is a method of calculating interim values based on the valuesknown at the start and end of an interval (� ramp soak).

An algorithm (function) for monitoring four selectable limits of an analogvalue. When these limits are reached or exceeded, a warning (first limit) oralarm (second limit) signal is generated. To avoid signal flickering, the offthreshold of the limit signals can be selected with a hysteresis parameter.

An algorithm (function) for restricting the range of values of constantvariables to selectable upper or lower limit values.

Linear scaling is a function in which the values of an input value areconverted to percentage values of the output variable before they areprocessed in internal comparator and controller algorithms.

Algorithm: OUTV = INV * FACTOR + OFFSET

The loop gain is the product of the proportional gain (GAIN) and the gain ofthe process (KS)

Follow-Up Control

IntegralComponent

Integral Action

Interpolation

Limit AlarmMonitor

Limiter

Linear Scaling

Loop Gain

Glossary

Page 260: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-6Standard Controller

C79000-G7076-C195-02

The loop scheduler organizes the calls for several controllers in one cyclicinterrupt priority class and the calls for all controllers during a completerestart. The loop scheduler is used when there are too many controllers forone cyclic interrupt priority class or when controllers with long samplingtimes are used.

The manipulated variable is the output variable of the controller or inputvariable of the process. The actuating signal can take the form of an analogpercentage or a pulse duration value. With integrating actuators (for examplemotor-driven) binary up/down or forwards/backwards signals are adequate.

The master controller is the primary controller in a multi–loop controlsystem. It generates the setpoint for the secondary controller (S) (� cascadecontrol).

The master control response is the time response of the process variable inthe closed loop after a step change in the setpoint.

A modular control system is a controller structure in which the user canconfigure the signal processing and control functions extremely freely.Controllers configured in this way can be structured to meet the specificrequirements of a task (separate S7 software package).

In the manual mode, the value of the manipulated variable (LMN) isinfluenced manually. The current manipulated value is specified by theoperator or by a STEP 7 user program as a percentage of the possible range.

If rate of change limitations for the up rate and down rate are selected(function: LMN_ROC), the changeover between the automatic and manualmode can be achieved smoothly without sudden changes in the manipulatedvariable.

A value injected into the interrupted loop (� manual mode) as an absolutevalue or as an increment (using the up or down switch) as a percentage of therange.

A non balanced process is a process in which the slope of the processvariable as a step response to a disturbance or manipulated variable change isproportional to the input step in the steady-state condition (I action).

Loop Scheduler

ManipulatedVariable

Master Controller

Master ControlResponse

Modular Control

Manual Mode

Manual Value

Non BalancedProcess

Glossary

Page 261: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-7Standard ControllerC79000-G7076-C195-02

Steady-state conditiont

Settling

PV

Normalization is a technique (algorithm) for converting the physical valuesof a process to the internal percentages used by the standard controller andconverting the percentages to physical values at the output. Thenormalization curve is determined by the start value (OFFSET from zero)and the slope (FACTOR).

The operating point identifies the manipulated value at which the deviationof the process variable from the setpoint becomes zero. This value isimportant for controllers without an I action in which a steady state error isnecessary to maintain the required manipulated value. If no steady state erroris required, the operating point parameters must be adapted accordingly.

The parallel structure is a special type of signal processing in the controller(mathematical processing). The P, I and D components are calculated parallelto each other with no interaction and then totalled.

Linearcombination

LMN_ISP

PV

+TI = 0

TD = 0

GAIN = 0INT

DIF LMN_D

GAIN

X

LMN_P

PID_OUTV

Algorithm for calculating an output signal in which there is a proportionalrelationship between the error signal and manipulated variable change.Characteristics: steady-state error signal, not to be used with processesincluding dead time.

Algorithm for calculating an output signal in which the change in themanipulated variable is made up of a component proportional to the errorsignal and an I component proportional to the error signal and time.Characteristics: no steady-state error signal, faster compensation than with anI algorithm, suitable for all processes.

Normalization

Operating Point

Parallel Structure

P Algorithm

PI Algorithm

Glossary

Page 262: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-8Standard Controller

C79000-G7076-C195-02

Algorithm for calculating an output signal formed by multiplication,integration and differentiation of the error signal. The PID algorithm is a �

parallel structure. Characteristics: high degree of control quality can beachieved providing the dead time of the process is not greater than the othertime constants.

A programmable logic controller consisting of one or more centralprocessing units (CPU), peripheral units with digital/analog inputs and oroutputs, units for interconnection and communication with other system unitsand in some cases with a power supply unit.

The process is the part of the system in which the process variable isinfluenced by the manipulated variable (by changing the level of energy ormass). The process can be divided into the actuator and the actual processbeing controlled.

t

Process (e.g. PT3)

t

LMN

PV

PV

LMN

Process identification is a function of the configuration tool that providesinformation about the transfer function and structure of the process. Theresult is a device-independent process model that describes the static anddynamic response of the process. The optimum settings and design of thecontroller are calculated based on this model

LMNSP

PV

Controller Process

Control loop

Processmodel

Controllerdesign

GAIN, TI, TD Identification

Adaptation

Process simulation is a function for simulating a control loop with specifictime lag elements so that a real process can be simulated. After stimulatingthe ”process” with disturbance variables or a setpoint step change, theprocess variables can be archived or displayed in the form of a curve.

PID Algorithm

PLC

Process

ProcessIdentification

ProcessSimulation

Glossary

Page 263: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-9Standard ControllerC79000-G7076-C195-02

Process variable (output variable of the process) that is compared with theinstantaneous value of the setpoint.

Pulse duration modulation is a method of influencing the manipulatedvariable at a discontinuous output. The calculated manipulated value as apercentage is converted to a proportional signal pulse time Tp at themanipulated variable output, for example, 100 % Tp = TA or = CYCLE.

Method of limiting the rate of change of analog values (separate for up anddown rate). Step changes at the input become finite slopes at the output.

� Single loop ratio controller

A single loop ratio controller is used when the ratio of two processvariables is more important than the absolute values of the variables.

SP

LMN

Quotient

RatioPV1

PV2

Controller Process

� Multi-loop ratio controller

In a multi-loop ratio controller, the ration of the two process variablesPV1 and PV2 must be kept constant. To do this, the setpoint of the 2ndcontrol loop is calculated from the process variable of the 1st controlloop. Even if the process variable PV1 changes dynamically, the ratio ismaintained.

SP

LMN1Controller 1 Process 1

Factor

PV2

PV1

Process 2Controller 2LMN2

If the manipulated variable of step controllers has a value close to 0 or 100%,the extremely short on and off signals that would otherwise cause wear andtear on switch elements can be suppressed by two parameters (for example anon time of 100 ms would be absolutely pointless for a fan).

The minimum pulse time (PULSE_TM) or the minimum break time(BREAK_TM) determine the minimum time that an output must be on or off.

Process Variable

Pulse DurationModulation

Rate of Change(ROC)

Ratio Control

ResponseThreshold

Glossary

Page 264: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-10Standard Controller

C79000-G7076-C195-02

A sampling controller is a controller that acquires the analog input values(setpoint, process variable) at constant intervals, saves them until the nextsampling point and calculates the manipulated variable.

The sampling time is the time between two sampling points or processingcycles of the control algorithm for a particular measurement/control channel.These intervals are constant and can be adapted to the time response of theprocess:TA = CYCLE.

Selection control is used in processes that demand different control structuresunder different operating conditions. A criterion must be selected to triggerthe changeover from one structure to another.

A self-regulating process is a process in which a steady state is achieved aftera step response (1st order time lag).

Point of inflexion

Final value

t

PV

The setpoint is the instantaneous reference input that specifies the desiredvalue or course of the process variable being controlled. The setpoint is thevalue that the process variable should adopt under the influence of thecontroller.

The setpoint generator is a function with which the user can change thesetpoint value using switches. During the first 3 seconds after activating thefunction, the rate of change is only 10% of the final rate of change that isproportional to the size of the permitted adjustment range.

With a step response in a higher order self-regulating process, the sectioncreated where the tangent intersects the line parallel to the time axis drawnfrom the start to end value.

SamplingControll er

Sampling Time T A

Selection Control

Self-RegulatingProcess

Setpoint

Setpoint Generator

Settling Time

Glossary

Page 265: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-11Standard ControllerC79000-G7076-C195-02

PV

t

LMN

t

� LMN

� PV

Tg

Tu

Legend:Tu time lagTg settling timeP point of inflexionWT tangent

WT

P

Figure Step Response of a Self–Regulating Third Order Process

The control settling time is the time between leaving the previous steadystate until the process variable is finally re–established within the toleranceband (� 5 %) around the setpoint after changes in the setpoint or afterdisturbances.

The signal flow chart represents the important relationships within a controlsystem or process. The chart consists of transfer blocks representing thetransfer response of the real elements of the control loop and lines indicatingthe direction in which influence is exerted.

The square root function SQRT linearizes quadratic relationships of the typeFAC * INV2 = OUTV - OFF, where FAC is the adaptation factor, OFF is theoffset in %. The SQRT function calculates the following characteristic curve:

INV �

OUTV – OFFFAC

� where FAC�KDB * 100%nominal range

(KDB = coefficient from data sheet)

An ”automatic startup” is started when power returns after a power down, ”amanual startup” is triggered by a switch or by a command (�� completerestart,� �� restart).

A step controller is a quasi continuous controller with a discontinuous output(and motor-driven actuator with an I action). The actuator has a three-stepresponse, for example up – stop – down (or open – hold – close)(� Three-step controller).

Signal Flow Chart

Square Root

Startup

Step Controller

Glossary

Page 266: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Glossary-12Standard Controller

C79000-G7076-C195-02

A standard controller is a complete and fixed controller structure containingall the functions of a controller application. The user can activate ordeactivate functions using software switches.

Method for algorithmic simulation of continuous I and D and delay elementsby means of recursive differential calculation. When the trapezoidal rule isused, the control algorithm of the digital controller can be considered as ananalog controller.

The controller operates internally with percentages in the floating pointformat (for example –100,0 to +100,0). At certain input parameters, forexample at external setpoints, physical values can also be entered in thefloating point range of STEP 7 (� Numerical representation).

When a controller is restarted, it starts up again using the data and operatingstate it had when it was interrupted. This means that the controller continuesto work with the values calculated at the time of the interruption.

The values of analog values are implemented as floating point numbers(format: 32 bit words, range of values: 8,43*10-37 to 3,37*1038). Valuesdenoting times are implemented as time values in the form of 16-bit BCDnumbers (format: 16-bit words, range of values: 0 to 9990 seconds).

The ramp soak is a function for generating curves for the setpoint accordingto a fixed program. The time-dependent settings of the output variable aredefined using time slices and linear interpolation. The ramp soak can berepeated cyclically.

A controller that can only adopt three discrete states; for example ”heat – offcool” or ”right – stop – left”(� step controller).

A two-step controller is a controller that can only set two states for themanipulated variable (for example, on – off).

StandardController

Trapezoidal Rule

Value Range

Restart

NumericalRepresentation

Ramp Soak

Three-StepController

Two-StepController

Glossary

Page 267: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-1Standard ControllerC79000-G7076-C195-02

Index

�Actuating signal

controller selection, 3-5modes of the continuous controller, 5-3modes of the step controller, 6-4

Actuating signal outputs, 3-5Actuating signals

entering, 11-10monitoring, 11-9

Actuator, 3-4limit stop signals, 6-16type of actuating signal, 3-4

Adjustment profile, Glossary-1Alignment factor, Glossary-1Analog value input, Glossary-1Anti reset wind-up, 4-42Automatic mode, 5-3

step controller, 6-5

�Blending control, Glossary-1Blending control, 2-10

controller structure, 2-10Blending control (APP_4), 7-22

application, 7-22block structure, 7-23

�Call processing, 7-4Call to process the standard controller, 3-17Calling the controller, 3-17Cascade control, 2-11, 5-17, Glossary-1

block connections, 5-18connecting blocks, 6-23interrupting, 5-17

Cascade control (APP_5), 7-25block structure, 7-26

Characteristic data of the process, 2-2Check list, 3-8Circuit diagrams, 2-16Closed loop, 11-12Closed-loop controller, Glossary-2Complete restart, 3-17Configuration, Glossary-2

controller functions, 3-13manipulated variable branch, 3-12procedure, 1-3process variable and error signal branch,

3-11setpoint branch, 3-10

Configuration tool, 3-14block diagram, 10-3, 11-5exiting, 11-19off-line mode, 11-3on-line mode, 11-3starting, 11-4user interface, 11-3

Configuring a controller, 3-8Continuous controller

block diagram, 5-2cascade control, 5-17complete restart/restart, 5-2control functions, 5-2derivative unit, 4-50example APP_2, 7-13integrator, 4-47mode change, 5-4P controller, 4-41PD controller, 4-44PI controller, 4-42PID controller, 4-45reversing direction, 4-41

Control algorithm, 2-13Control loop, Glossary-2

Page 268: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-2Standard Controller

C79000-G7076-C195-02

Control loop parameters, 11-9changing, 11-9displaying, 11-9

Control task, specifying, 3-2Controllability, 2-3Controller

assigning parameters, 11-5creating (principle), 1-3inputs and outputs, 11-2modifying, 10-3, 11-6monitoring, 10-3, 11-6starting up, 11-6transferring, 11-6

Controller calls, 8-3Controller configuration

prior knowledge, 3-2procedure (check list), 3-8

Controller design, 2-2Controller FB, size, 1-7Controller functions when supplied, 2-16Controller parameters, Glossary-2Controller selection, 3-5Controller structure, 11-2

defining, 4-41Controlling blending processes, 2-10CPU load, 8-2Creating a program, 11-2CRP_IN, 4-21CRP_OUT, 5-15Curve recorder, 10-3

on-line data, 11-7Cyclic interrupt OB35, 3-17

�Damping, 4-24Data block

closing, 11-6creating, 11-4integrating in program, 11-6opening, 11-4printing, 11-19saving, 11-5, 11-19transferring, 11-5

Data per controller, 1-7DDC, Glossary-3Dead band, function, 4-36Dead band element, 4-36Dead time, 2-4, Glossary-2

DEADBAND, 4-36parameters, 4-37

Delaying the D action (TM_LAG), 4-44Derivative action, 4-50Derivative action time, 4-50Derivative component, Glossary-3Derivative unit, 4-50

start up and mode of operation, 4-51DIF, parameters, 4-51Digital control, Glossary-3Disabling loops, 7-4Disturbance, measuring, 2-8Disturbance variable, Glossary-3

�Equivalent time constant, acquiring, 3-15ER_ALARM, 4-38

parameters, 4-39Error difference

dead band, 4-36limit monitoring, 4-38

Error signal, Glossary-3monitoring, 11-9

Error signal monitoring, Glossary-4functions, 4-39hysteresis, 4-38

Errors, 11-3Example APP_1

application, 7-7block structure, 7-8connection and call, 7-9, 7-10functions, 7-7parameters of the model process, 7-11process parameters, 7-9step response of the loop, 7-11

Example APP_2application, 7-13block structure, 7-14connection and call, 7-15, 7-16functions, 7-13parameters of the process model, 7-15, 7-17step response of the loop, 7-17

Example APP_3block structure, 7-20functions, 7-19parameter assignment, 7-21

Index

Page 269: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-3Standard ControllerC79000-G7076-C195-02

Example APP_4block structure, 7-23functions, 7-22parameter assignment, 7-24

Example APP_5, parameter assignment, 7-27Example APP_5 (cascade control)

application, 7-25block structure, 7-26functions, 7-25

�Feedforward control, 2-8, 4-40, Glossary-4

principle, 2-8First order lag, Glossary-4Fixed setpoint control, Glossary-4Follow-up control, Glossary-4Function block

PID_C, 5-2PID_S, 6-2

�Hardware environment, 1-6

�I process, 2-5Instance data block, 1-2, 10-5INT, parameters, 4-49Integral action, 4-47Integral component, Glossary-4Integrator

limitation, 4-49start up and mode of operation, 4-48

Integrator (INT), 4-47Interrupting the cascade, 6-22

�LAG1ST, 4-24

parameters, 4-25Limit alarm monitor, Glossary-5Limit values for PV, 4-31LMN_NORM, 5-13

parameters, 5-14LMN_ROC, 5-9

parameters, 5-10

LMNFC, 5-7parameters, 5-8

LMNLIMIT, 5-11parameters, 5-12, 6-9

LMNR_CRP, 6-10parameters, 6-11

LMNRNORM, 6-11parameters, 6-11

Loop call (LP_SCHED), 7-2Loop calls

conditions, 7-5example, 7-5

Loop editor, 3-14Loop gain, Glossary-5Loop monitor, 10-3, 11-9Loop scheduler, 1-2, 1-7, 3-18, 7-2, Glossary-5

complete restart/restart, 7-6functions, 7-2parameter assignment, 7-3shared data block, 7-3

LP_SCHED, 7-2parameter list, 9-17parameters, 7-6

�MAN_GEN, 5-5, 5-6Manipulated value

changing to configuration tool, 6-7user functions, 5-7

Manipulated value limits, functions, 6-9Manipulated variable, Glossary-6

absolute value limits, 5-11changing to the configuration tool, 5-16functions, 5-12limiting the range, 5-11pulse output, 5-19range limits, 6-8rate of change limits, 5-9setting with the configuration tool, 5-16, 6-7signal types, 3-4user function, 5-7

Manipulated variable limits, signaling outputs,5-11, 6-8

Manipulated variable normalization, 5-13Manual mode, 5-3, Glossary-6

step controller (with feedback), 6-5step controller (without position feedback

signal), 6-17Manual value, Glossary-6

Index

Page 270: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-4Standard Controller

C79000-G7076-C195-02

Manual value generation, 5-3Manual value generator, 5-5

range of values, 5-5rate of change, 5-5start up and mode of operation, 5-6

Master control response, Glossary-6Master controller, Glossary-6Menu command

Open Project, 11-4Window, 11-3

Menu optionClose, 11-6Curve Recorder, 11-7Download, 11-5exiting the configuration tool, 11-19New, 11-4Open (file), 11-4Process Identification, 11-11, 11-16Process Identification with on-line data,

11-14Save, 11-5, 11-19

Minimum break time, 5-22Minimum pulse time, 5-22Mode change, 5-3Multi-loop controls, 1-5, 2-9

�Non self–regulating process, 2-5Normalization, 3-19, Glossary-7

example of conversion, 3-20manipulated variable, 5-13parameter selection, 3-19position feedback signal, 6-11process variable, 4-22setpoint, 4-12

Normalization curve, 4-12, 4-22, 5-13, 6-11Normalization function, 3-19, 4-12, 4-22, 5-13Number of loops, 1-7Numerical representation, 3-19, Glossary-11

�Open loop, 11-12Opening a project, 11-2Operating point, Glossary-7Overview of functions, 2-13

�P controller

operating point, 4-41step response, 4-42

Package, contents, 1-4Parallel structure (PID), Glossary-7Parameter assignment plan, 3-10PD action in the feedback path, 4-40PD controller

delaying the D action, 4-44operating point, 4-44step response, 4-44

PI controllerintegrator in manual mode, 4-43step response, 4-43

PID controllercontrol algorithm, 4-40controller structure, 4-40parameter assignment, 4-46step response, 4-45

PID_Cinput parameters, 9-2output parameters, 9-3static local data (inputs), 9-4static local data (outputs), 9-7static local data for the configuration tool,

9-8PID_S

input parameters, 9-9output parameters, 9-10static local data (inputs), 9-11static local data (outputs), 9-14static local data for the configuration tool,

9-14Position feedback signal, 2-23

signal normalization, 6-10simulation, 2-24, 6-20

Primary controller, 2-11Priority class system, 3-18Process, Glossary-8

equivalent time constant, 3-15with integral component, 11-12without integral component, 11-12

Process analysis, 2-2, 11-2Process characteristics, 3-2Process characteristics and control, 2-2

Index

Page 271: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-5Standard ControllerC79000-G7076-C195-02

Process identification, 2-6, 10-3, 11-11, Glos-sary-8controller data, 2-6loop off-line/on-line, 2-7method, 2-6on-line, 11-14, 11-16step response, 2-6

Process model, 11-13Process response, controllable processes, 3-3Process simulation, Glossary-8Process simulation (APP_1), 7-8Process simulation (APP_2), 7-14Process variable, Glossary-8

adjusting with the configuration tool, 4-35limit value monitoring, 4-31normalization, 4-22rate of change monitoring, 4-33setting with the configuration tool, 4-35square root extraction, 4-26time lag, 4-24user function, 4-29

Process variable delay, 4-24Process variable monitoring, hysteresis, 4-31Process with dead time, 2-4Process with I component, 2-5Project, configuring, 3-8Pulse duration modulation, 5-19, Glossary-8Pulse generator, 5-19, 6-14

accuracy, 5-20automatic synchronization, 5-20mode of operation, 5-19, 6-15modes, 5-21

Pulse output, switching, 5-22PULSEGEN, 5-19

parameter list, 9-16parameters, 5-26

PULSEOUT, 6-14parameters, 6-15

PV limits, signaling, 4-32PV_ALARM, 4-31

parameters, 4-32PV_NORM, 4-22

parameters, 4-23PVFC, 4-29

parameters, 4-30

�Ramp soak, 4-4, Glossary-12

activating, 4-6configuring, 4-5cyclic mode, 4-8hold, 4-8hold, continue, 4-9modes, 4-5, 4-6on-line changes, 4-10parameters, 4-10setting the output, 4-7starting, 4-7time slice parameters, 4-5

Range of functions, 1-8Range of values

internal, 3-19technical range, 3-19times, 3-19

Rate of change, Glossary-8Ratio control, Glossary-9

two loops, 2-9Ratio control (APP_3), 7-19

application, 7-19block structure, 7-20

Ratio controls, 2-9Reloading, 11-6Reset time, 4-47Reset time TI, permitted range for TI and

CYCLE, 4-47Response threshold, 6-14, Glossary-9

automatic adaptation, 6-14, 6-19Restart, 3-17RMP_SOAK, 4-4ROCALARM, 4-33

parameters, 4-34Run time (controller FB), 8-2Runtimes per controller, 1-7

�Sample structures, 1-5Samples, preconfigured structures, 1-5Sampling control, 2-12

Index

Page 272: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-6Standard Controller

C79000-G7076-C195-02

Sampling controller, Glossary-9Sampling time, 2-12, 3-15, 8-3, Glossary-9

estimating, 3-16rule of thumb, 3-16

Secondary controller, 2-11Secondary manipulated variable, 2-11Selecting the controller structure, 3-6Self–regulating process, 2-3Setpoint, Glossary-10

absolute value limits, 4-18changing to the configuration tool, 4-20normalization, 4-12ramp function, 4-16range limits, 4-18rate of change limits, 4-16setting with the configuration tool, 4-20user function, 4-14

Setpoint generator, 4-2, Glossary-10parameters, 4-3range, 4-2rate of change, 4-2start up and mode of operation, 4-3

Setpoint limitsfunctions, 4-19signaling outputs, 4-18

Settling time, 2-3, Glossary-10Signal adaptation, 3-19Signal conversion

internal format –> peripheral format, 5-15peripheral format –> internal format, 4-21

Signal flow chart, Glossary-11Signal flow diagrams, 2-16

symbols, 2-16Signal processing

analog manipulated variable, 2-22binary actuating signals, 6-13continuous controller, 4-47error difference, 4-36in the process variable branch, 4-21in the setpoint branch, 4-2manipulated value of the step controller,

2-23, 6-4manipulated variable, 5-3PID controller, 2-21position feedback signal, 6-10process variable, 2-19setpoint, 2-17

Simulation of the position feedback signal, 6-20Software environment, 1-6SP_GEN, 4-2SP_LIMIT, 4-18

parameters, 4-19

SP_NORM, 4-12parameters, 4-13

SP_ROC, 4-16parameters, 4-17

SPFC (user FC), 4-14parameters, 4-15

SQRT, 4-26parameters, 4-28

Square root, Glossary-11Square root function

algorithm, 4-26example of calculating coefficient, 4-26selecting parameters, 4-27

Standard controller, 1-2, Glossary-11applications and limitations, 1-7area of application, 1-6basic functions, 1-2block diagrams, 8-4calls, 3-17concept, 1-2examples, 1-5functions, 1-2mode of operation, 2-12overview diagrams, 2-13overview of the functions, 1-3permanently active functions, 3-7product structure, 1-4range of functions, 1-8software packages, 1-4structure, 2-12

Standard function block, controller FB, 1-2Start-up blocks, 3-17Start-up time, 2-4Startup, Glossary-11Step controller, Glossary-11

block diagram, 6-2cascade control, 6-22complete restart/restart, 6-3control functions, 6-2example APP_1, 7-7mode change, 6-5, 6-6structure, 6-4with position feedback signal, 2-23without position feedback signal, 2-24, 6-2

Step controller without position feedback sig-nal, generating the actuating signals, 6-18

Step controller without position feedback signalmanipulated variable signal processing, 6-16modes, 6-17parameters for manipulated variable proces-

sing, 6-21structure and functions, 6-16

Index

Page 273: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-7Standard ControllerC79000-G7076-C195-02

Subfunctions, 1-2circuit diagrams, 2-16

System framework, 1-7

�Three-step controller, 5-22

asymmetrical characteristics, 5-23characteristics, 5-23manual mode, 5-26

Three-step element, 6-13, 6-18on threshold, 6-14

Three–step controller, Glossary-12THREE_ST, 6-13, 6-18Time delay element, 4-24Time lag, 2-3

Time lag (TM_LAG), 4-50Time slice, 4-5TM_LAG, 4-44, 4-50Tolerance bands, 4-31, 4-38Trapezoidal rule, Glossary-11Two-step controller, 5-24, Glossary-12Types of controller, 1-8

�Value range, Glossary-11

�Work memory, 8-2

Index

Page 274: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Index-8Standard Controller

C79000-G7076-C195-02

Index

Page 275: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

Standard Controller6ES7 830-2AA20-8BG0-02 1✄

Siemens AG

AUT E 146

Östliche Rheinbrückenstr. 50

D–76181 Karlsruhe

Federal Republic of Germany

Please check any industry that applies to you:

❒ Automotive

❒ Chemical

❒ Electrical Machinery

❒ Food

❒ Instrument and Control

❒ Nonelectrical Machinery

❒ Petrochemical

❒ Pharmaceutical

❒ Plastic

❒ Pulp and Paper

❒ Textiles

❒ Transportation

❒ Other _ _ _ _ _ _ _ _ _ _ _

From:

Your Name:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Your Title: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Company Name: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Street: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

City, Zip Code_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Country: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Phone: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Page 276: SIMATIC Standard Controller - cc.puv.fijun/Vat/S7_PID_Dokumentti.pdf · To help you to become familiar with SIMATIC S7 programmable logic ... 4.1.1 Setpoint Generator ... 4.1.2 Ramp

2Standard Controller

6ES7 830-2AA20-8BG0-02

Additional comments:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Remarks Form

Your comments and recommendations will help us to improve the quality and usefulnessof our publications. Please take the first available opportunity to fill out this questionnaireand return it to Siemens.

Please give each of the following questions your own personal mark within the rangefrom 1 (very good) to 5 (poor).

1. Do the contents meet your requirements?

2. Is the information you need easy to find?

3. Is the text easy to understand?

4. Does the level of technical detail meet your requirements?

5. Please rate the quality of the graphics/tables:

6.

7.

8.


Recommended