Professional Documents
Culture Documents
SIMATIC S7-1500
Application Description September 2013
The Application Examples are not binding and do not claim to be complete with
regard to configuration, equipment or any contingencies. The application
examples do not represent customer-specific solutions; they are only intended to
provide support for typical applications. You are solely responsible for the correct
operation of the described products. These Application Examples do not relieve
you of the responsibility to use safe practices in application, installation,
operation and maintenance. Through using these Application Examples, you
acknowledge that we will not be liable for any damage/claims beyond the liability
clause described. We reserve the right to make changes to these Application
Examples at any time without prior notice. If there are any deviations between
the recommendations provided in these Application Examples and other
Siemens publications e.g. Catalogs the contents of the other documents
have priority.
Copyright
We do not accept any liability for the information contained in this document.
Any claims against us based on whatever legal reason resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (Produkthaftungsgesetz), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
(wesentliche Vertragspflichten). The damages for a breach of a substantial
contractual obligation are, however, limited to the foreseeable damage, typical for
the type of contract, except in the event of intent or gross negligence or injury to
life, body or health. The above provisions do not imply a change in the burden of
proof to your disadvantage.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the express consent of Siemens Industry Sector.
1 Task Description
Table of Contents
Warranty and Liability ................................................................................................. 2
1
Solution............................................................................................................... 6
Overview............................................................................................... 6
Scenarios of the application ................................................................. 7
Visualization user interface .................................................................. 9
Hardware and software components ................................................. 10
Validity ................................................................................................ 10
Components used .............................................................................. 10
Commissioning ................................................................................................ 45
6.1
6.1.1
6.1.2
6.1.3
6.1.4
6.2
6.2.1
6.2.2
6.2.3
Copyright
2.1
2.2
2.3
2.4
2.4.1
2.4.2
Overview............................................................................................. 52
Operation via WinCC Runtime ........................................................... 52
Operating units ................................................................................... 52
Monitoring scenario 3 with WinCC ..................................................... 54
Operator control and monitoring via the online access ...................... 55
1 Task Description
History............................................................................................................... 56
Copyright
1 Task Description
Task Description
Introduction
Influencing technical variables in systems requires controlling these variables.
There are miscellaneous uses for controllers in automation technology, for
example, for controlling temperatures in processes.
In the SIMATIC world, the PID_Compact block of version 2.0 is provided for the
S7-1500 CPUs for controlling processes.
Overview of the automation task
The automation task consists of setting up a control loop for influencing physical
parameters in a technological process. The control loop shall consist of the
following elements here:
PID_Compact as controller.
Simulated technological processes as controlled system.
Figure 1-1
Simulation Library
Sim_controlprocess
Copyright
PID_Compact
Controller
Controlled
system
Step response
2 Solution
2.1 Overview
Solution
2.1
Overview
Schematic layout
The following scheme shows the most important components of the solution:
Figure 2-1
Field PG
Field PG:
Configuration and
Startup
PC station
PC-Station:
HMI visualization
of the scenarios
(WinCC Runtime)
TIA V12
PC station:
HMI visualization of
the scenarios
Industrial Ethernet
S7-1500 CPU:
Program with
PID_Compact and
system simulation
Controlled
system
PID_Compact
controller
Copyright
PC station:
HMI visualization of
the scenarios
Simulation library
SIM_controlprocess
Advantages
This application offers you the following advantages:
Step by step description for the initial commissioning of a PID_Compact
controller.
Fast introduction into handling the functions of the PID_Compact.
Time and cost reduction by simulating controlled systems using the controlled
system library Sim_controlprocess.
Adjustable split-range block for controlling with PID_Compact.
2 Solution
2.2 Scenarios of the application
Topics not covered
This application does not include a description of
STEP 7 V12
WinCC Runtime Professional V12
SCL programming language
Basic knowledge of these topics is assumed.
2.2
Copyright
Scenario
Controlling of an asymmetrical
temperature system simulation. The
controlled system simulates heating and
cooling processes with different time
constants.
2 Solution
2.2 Scenarios of the application
Thematic content of the scenarios
The following table provides an overview of the tasks existing in the scenarios. The
right column contains the reference to the step-by-step instruction of the task in the
documentation.
Table 2-2
Task
Scenario
Description
in chapter (link)
PID_Compact configuration
Chapter 5.3.1.
Chapter 5.3.2.
Chapter 4.3.3.
Chapter 5.4.
Chapter 5.5.
Copyright
2 Solution
2.3 Visualization user interface
2.3
WinCC Runtime
In the PC station of the TIA project, a visualization interface (WinCC Runtime) is
provided for operating the examples.
Using WinCC Runtime enables:
monitoring the state of the scenarios of the project
modifying individual tags of the scenarios.
Overview screen
The figure below shows the visualization interface of WinCC Runtime: a detailed
description of WinCC Runtime is available in chapter 7.2.
Copyright
2 Solution
2.4 Hardware and software components
2.4
2.4.1
Validity
This application is valid for
STEP 7 as of V12
S7-1500 as of FW 1.0
2.4.2
Components used
This application has been generated using the following components:
Hardware components
Table 2-3
Copyright
Component
No.
Order number
Note
PS 25W 24VDC
6ES7 505-0KA00-0AB0
6ES7 516-3AN00-0AB0
PC station
e.g. 6ES7647-6C...-....
Software components
Table 2-4
Component
No.
Order number
Note
6ES78221AE02-0YA5
6AV2103-0DA02-0AA5
Note
79047707_PID_CompactV2_CODE_v1_0.zip
79047707_Sim_controlprocess_lib.zip
Controlled system
simulation library
Sim_controlprocess
79047707_Regeln_PID_CompactV2_DOKU_v1_0_en.pdf
This document.
79047707_Description_RegelSimBib_DOKU_V1_0_en.pdf
Description of the
controlled system
simulation library
Sim_controlprocess
10
Overview
Control engineering is an engineering science researching how to influence
specific given parameters in technological systems, with the aim of reaching and
maintaining the desired value of this parameter under certain conditions.
This chapter contains a very short extract on the topic of Control technology.
The system manual of STEP 7 Professional V12.0 discusses PID control with
basics on control technology in chapter 11.3 (\4\).
Controlled system
A controlled system contains the parameter to be controlled, such as the
temperature of a room. In order to identify the type of a system and then
dynamically controlling it in an optimal way requires a precise analysis of the
system to be controlled.
One possibility of identification is to look at the step response of a controlled
system. The picture below depicts the example of a PTn system (temperature in a
room, for example).
Delay time Tu
Compensation time Tg
Maximal value Xmax
Figure 3-1 Step response PTn system
Copyright
Tu
Tg
y
x
Delay time
Compensation time
Output value
Actual value
11
Controller
The controller controls an actuator to bring the controlled system to a desirable
state. The simplest controllers are two-point controllers, which only know the states
ON and OFF and control the controlled system via the actuator.
The frequently used PID controllers consist of three parts:
The P-part creates an output signal proportional to the control deviation:
The I-part integrates the control deviation over time and affects the controlled
system due to this integration.
The D-part, on the other hand, reacts to the changed control deviation
(temporal deviation of the control deviation).
These three parts of the ideal PID controller are weighted by the coefficients
proportional gain, reset time and rate time.
With the PID_Compact and PID_3Step blocks, SIMATIC S7-1500 already offers
a possibility integrated into the firmware of the software control.
In this application, PID_Compact is used. Further information on PID_3Step is
available in the manual \3\ and in the help of the TIA Portal.
Control loop
The control deviation between setpoint and actual value is determined and a
manipulated variable derived from it. The manipulated variable acts on the
controlled system via an actuator (see Figure 3-2).
Figure 3-2 Control loop, single-loop
Copyright
Note
Control deviation
Setpoint
Controller
-
Control
variable
Controlled
system
Actual
value
A simple example for a control loop is the control of the room temperature through
a heater. The room temperature is measured with a sensor and fed to a controller,
which compares the current room temperature with a setpoint value and calculates
an output value (control value) for controlling the heater.
12
4 Mode of Operation
4.1 Structure of the example project
Mode of Operation
Structure
This chapter introduces the individual scenarios of the STEP 7 program and
describes the individual blocks in greater detail.
The exact behavior of the three scenarios is described and a picture of the entire
control loop provided.
Configuration
This chapter does not describe the configuration, commissioning and optimization
of PID_Compact. For respective step-by-step instructions please refer to
chapter 5.
4.1
Scenarios
Copyright
The example project consists of the scenarios which are named in chapter 2.2 and
are independent of each other.
Program overview
The S7 program of the CPU 1516-3 PN/DP is set up as follows:
Figure 4-1
OB100
Startup
Initialization
FB
PID_Compact
OB30
Scenario1
Scenario
1
FB
Sim_PT3
FB
Scenario2_Split
Range
OB31
Scenario2
FB
PID_Compact
Scenario
2
FB
Sim_TempProc
ess
FB
Sim_PT3
FB
Sim_PT3
FB
Sim_PT3
OB32
Scenario3
FB
Sim_PT3
FB
Sim_PT3
Scenario
3
13
4 Mode of Operation
4.1 Structure of the example project
Assignment
With the exception of FB PID_Compact (FB1130), which is used in all scenarios,
and OB Startup (OB100), the individual blocks can be uniquely assigned to the
existing scenarios.
User blocks
Table 4-1 Blocks and instructions of the simulation library
OB100
Startup
Startup OB:
Initializes the program
OB30
Scenario1
DB2
PID_Scenario1
DB100
Param_Scenario1
FB54
Sim_PT3
DB101
Sim_PT3_DB
OB31
Scenario2
DB7
PID_Scenario2
DB200
Param_Scenario2
FB201
Scenario2_SplitRange
DB201
Scenario2_SplitRange_DB
Instance DB of the FB
Scenario2_SplitRange (FB201)
FB58
Sim_TempProcess
Simulation of an asymmetrical
temperature system.
DB202
Sim_TempProcess_DB
Instance DB of the FB
Sim_TempProcess (FB58)
OB32
Scenario3
DB6
PID_Scenario3
DB300
Param_Scenario3
Scenario1
Description
Scenario2
Symbolic name
Scenario3
Copyright
Element
14
4 Mode of Operation
4.1 Structure of the example project
Element
Symbolic name
Description
FB50
Sim_PT1
DB303
Sim_PT1_DB
FB52
Sim_PT2osz
DB306
Sim_PT2osz_DB
FB55
Sim_PDT1
DB304
Sim_PDT1_DB
FB59
Sim_Lagging
DB305
Sim_Lagging_DB
Instance DB of FB Sim_Lagging
(FB59).
FB1130
PID_Compact
Copyright
In the project, blocks from the Sim_controlprocess simulation library are also
used which are provided on the same HTML page as this document.
The following blocks
Sim_PT3
Sim_TempProcess
Sim_PT1
Sim_PDT1
Sim_Lagging
Sim_PT2osz
originate from the library. The simulation library offers you further simulation blocks
for the simulation of controlled systems.
An exact description of the individual simulation blocks is available in the document
79047707_Beschreibung_RegelSimBib_ DOKU_V1_0_en.pdf
Software controller FB PID_Compact (FB1130)
System block PID_Compact (FB1130) realizes a PID software controller with the
following interface:
Figure 4-2
15
4 Mode of Operation
4.2 Scenario 1: Calling up and commissioning PID_Compact
4.2
4.2.1
Task
The task is to illustrate how to simulate a controlled PT3 system with the simulation
library.
The controlled PT3 system shall be controlled with the PID_Compact block.
Principle scheme
Figure 4-3
Control
parameter
PID
Controller
Control
variable
Controlled PT3
system
Feedback
Step response
The figure below shows the step response of the controlled PT3 system at a jump
of the input from 0 50:
Figure 4-4
Copyright
Setpoint value
Actual value
(step response)
4.2.2
Procedure
Overview
The following tasks need to be implemented for realizing the user program:
Inserting and configuring the PT3 system simulation into the user program.
Adding the PID_Compact block in the user program.
Configuring the PID_Compact block.
Commissioning the software controller with pretuning and fine tuning.
Step-by-step instruction
The respective step-by-step description for the individual processes is available in
chapter 5.
16
4 Mode of Operation
4.2 Scenario 1: Calling up and commissioning PID_Compact
Note
4.2.3
Overview
After commissioning the example project, as described in chapter 6, you can
directly monitor the behavior of the controlled system.
Parameters and formula for PID_Compact
The following parameters are active in the PID_Compact software controller after
the fine tuning:
Table 4-2 Symbols and parameters
Copyright
Symbol
Description
Value
GAIN,
Kp
Proportional gain
10.770338
TI
Integration time
21.10933
TD
Derivative time
5.337515
0.1
Weighing of P component
0.2586402
Weighting of D component
0.0
Laplace operator
Setpoint value
Actual value
17
4 Mode of Operation
4.2 Scenario 1: Calling up and commissioning PID_Compact
Monitoring the controlled system
Chapter 7 describes how to monitor and control the controlled system via WinCC
Runtime Advanced using the provided visualization.
Control behavior of the system
After commissioning Scenario1, the following behavior results for a setpoint jump
from 0 50%:
Copyright
Figure 4-5
18
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
4.3
4.3.1
Task
A simulated temperature process shall be controlled with different characteristic
values for heating and cooling using a PID controller.
Processes controlled by two different actuators (heating and cooling) can be
controlled by a split-range controller. A split-range controller divides its output
between two different actuators.
A block shall be developed for realizing the PID_Compact as a split-range
controller.
Principle scheme
The simulated temperature process internally consists of two asymmetrical PT1
elements.
Figure 4-6
Parameter set
Cooling
Control
variable
Command
variable
Heating
PID
Controller
Temp_Process
Cooling
Feedback
Copyright
Parameter set
Heating
19
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
The developed split-range block FB Scenario2_SplitRange (FB201) scales the
input value to the inputs of the PID controller. The produced relative output value
(range: 0-100%) is then prepared accordingly for the inputs of the temperature
system.
The output of the PID controller is split according to the following principle:
Figure 4-7
Heating output
(in %)
100
50
Heating
Cooling output
(in %)
100
Copyright
50
Cooling
25
50
75
Output
controller (%)
4.3.2
Procedure
Overview
The controlled temperature system simulation approximately consists of two PT1
systems with different parameters for heating and cooling.
The following tasks are realized in the user program:
Separated simulation of the heating and cooling system.
Determining the suitable PID parameters for heating and cooling.
Programming FB Scenario2_SplitRange (FB201)
Commissioning the temperature system
Commissioning PID_Compact.
20
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
Simulation of the subsystem
To obtain the parameter records for the PID controller, heating and cooling is
respectively simulated as PT1 system.
The actions described in Table 5-2 are performed with the following frame
conditions:
Ambient temperature: 22C
Maximum heating power: 50 (Watt)
Maximum cooling power: 50 (Watt)
Step response to the power jump from 0 to 50 (Watt) (for heating as well as
cooling)
Table 4-3 Specifying the PID parameter sets
Copyright
No.
Action
1.
2.
The characteristic value readings for heating and cooling the system are determined by
experiment.
Procedure:
Creating a jump of the heating/cooling power at the input of the simulation block.
Reading the characteristic values from the respective jump response
Readings for characteristic heating values:
k = 0.28
T = 28.6s (for 0.63*end value)
Readings for characteristic cooling values:
k = 0.53
T = 16.6s (for 0.63*end value)
21
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
No.
The simulation of the controlled temperature system consists approximately of two PT1 systems.
The procedure for receiving suitable parameters for the PID controller is the following:
Inserting a PT1 system with the parameters from 2.
Inserting PID_Compact.
Configuring PID_Compact.
Commissioning PID_Compact.
The parameters received after the fine tuning are read (see Table 4-4) and used for the split-range
controller.
PID parameters
The following parameter sets for the PID controller were determined by experiment
(see Table 4-3):
Copyright
3.
Action
PT1 system:
cooling
GAIN
20.48825
11.07108
TI [s]
2.595915
2.630034
TD [s]
0.6573617
0.6651893
0.1
0.1
0.2560457
0.2581466
0.0
0.0
The determined parameters are used for controlling using the split-range block
Scenario2_SplitRange (FB201).
Chapter 4.3.3 describes the functioning of FB Scenario2_SplitRange (FB201)
Note
22
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
Step-by-step description
Step-by-step instructions for commissioning the controlled temperature system are
available in chapter 5.
Monitoring the controlled system
Chapter 7 describes how to monitor and control the controlled system via WinCC
Runtime Advanced using the provided visualization.
Control behavior of the system
You receive the following behavior at the inputs and outputs of the controller if the
setpoint value at FB Scenario2_SplitRange (FB201) is reduced from 22C to
10C.
Copyright
Figure 4-8
23
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
4.3.3
FB Scenario2_SplitRange (FB201)
Function
Using a call of PID_Compact, FB Scenario2_SplitRange (FB201) realizes a
split-range control which controls two actuators (heating and cooling).
For a certain output range of the software controller (0-50%), the cooling is
controlled from 100-0% of its maximal cooling power. For the output range between
50-100% at the controller, the heating is controlled to 0-100% of the maximal
heating output (see Figure 4-7).
Parameter
The interface of FB Scenario2_SplitRange (FB201) looks as follows:
Copyright
Table 4-5
Parameter
Type
Note
Setpoint
IN:
Real
Setpoint value.
Input
IN:
Real
Input value.
max_Temp
IN:
Real
min_Temp
IN:
Real
max_Heat
IN:
Real
max_Cool
IN:
Real
Output_rel
OUT:
Real
Heat_on
OUT:
Bool
Cool_on
OUT:
Bool
Switching on cooling.
HeatPower
OUT:
Real
CoolPower
OUT:
Real
24
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
Mode of Operation
FB Scenario2_SplitRange (FB201) can be divided into the following steps:
Figure 4-10
Start
Scenario2_
SplitRange
1
no
Next cycle
2
Loading PID
parameters from DB
yes
3
PID_Compact call
Next cycle
Copyright
PID_Compact in
automatic mode
?
no
5
Reset all outputs to 0
yes
6
Calculation and
scaling of the
output values
Output
Table 4-6
Step
Action
Note
If FB Scenario2_SplitRange (FB201)
is called up several times in a project, a
separate instance of PID_Compact
must be used for each block call.
25
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
Step
Action
Note
Commissioning
Commissioning the FB Scenario2_SplitRange (FB201) is not possible via preand fine tuning since the parameters need to be specified directly for the controller.
For loading the parameters, the LoadBackUp parameter is used in the FB.
Copyright
26
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
Table 4-7
No.
Action
Add FB Scenario2_SplitRange (FB201) into a cyclic interrupt OB.
2.
Interconnect the inputs of the block with the parameters provided by you.
Copyright
1.
If you wish to use several instances of the function block, please ensure that you do not use the
same technology object for PID_Compact in both calls.
You need to change the instance of the block in the SCL code.
27
4 Mode of Operation
4.3 Scenario 2: temperature control with split-range block
Copyright
No.
Action
3.
4.
5.
Interconnect the outputs of the block with controlled system used by you.
6.
Via Online > Download and Reset PLC program you download your user program into the CPU.
Alternative
You can also control an asymmetrical temperature system through other methods
then a split-range controller.
One possibility is the application of two separate PID_Compact controllers with
default parameter sets which only control the respective actuator heating or
cooling.
28
4 Mode of Operation
4.4 Scenario 3: simulation and control of a complex controlled system
4.4
4.4.1
Task
Using the controlled system simulation library Sim_controlprocess, a more
complex controlled system shall be simulated and controlled by the PID_Compact
block. Commissioning shall be performed via the pretuning and fine tuning
function.
The controlled system shall consist of the following elements:
Table 4-8
Copyright
Type
Note
Example:
real process
PT1 element
PDT1 element
Vibration-capable
mechanical system,
lifting/rotary motions
Simulating a real controlled system can help save time and costs during
commissioning!
29
4 Mode of Operation
4.4 Scenario 3: simulation and control of a complex controlled system
Principle scheme
The more complex controlled system consists of the following elements:
Figure 4-11
Controlled system
Command
variable
PID
Controller
PT1
PDT1
Lagg
PT2osz
Control
variable
Feedback
Step response
The step response of the combined controlled system is displayed below:
Copyright
Figure 4-12
Jump
Step response
TM_LAG2
(PT2: DAMP)
GAIN
delay_cycle
PT1
12.0
1.0
PDT1
3.0
5.0
1.0
Lagging
15
Periodic PT2
0.4
0.2
1.0
30
4 Mode of Operation
4.4 Scenario 3: simulation and control of a complex controlled system
4.4.2
Procedure
Overview
The procedure for this scenario corresponds to that in scenario 1:
Inserting and configuring the individual elements of the controlled system into
the program.
Adding the PID_Compact software controller, configuring and starting up.
Note
Step-by-step description
For the step-by-step description, please refer to chapter 5.
Monitoring the controlled system
Copyright
Chapter 7 describes how to monitor and control the controlled system via WinCC
Runtime Advanced using the provided visualization.
PID_Compact parameter
The following fine-tuned parameters result for the PID_Compact block:
Table 4-10 Parameter set of a complex controlled system
PID_Compact
GAIN
0.2142379
TI [s]
4.044378
TD [s]
0.8554038
0.1
1.0
0.0
31
Content
This chapter discusses the configuration and settings in the
79047707_PID_CompactV2 project realized on the S7-1500 CPU side.
Step-by-step instructions illustrate how to set up and optimize a simulated control
loop.
Structure
The following chapters are available for handling FB PID_Compact (FB1130):
Inserting FB PID_Compact (FB1130).
Configuring FB PID_Compact (FB1130).
Commissioning FB PID_Compact (FB1130).
Handling the Lib_controlprocess simulation library is described in the following
chapter:
Inserting a function block of the simulation library.
Copyright
Scenario
Description
in chapter (link)
PID_Compact configuration
Chapter 5.3.1.
Chapter 5.3.2.
Chapter 4.3.3.
Chapter 5.4.
Chapter 5.5.
32
5.1
Variants
There are several options of inserting FB PID_Compact into a project as
technology object.
Please note that calling PID_Compact as multi-instance does not generate a
technology object. You can keep using the FB further, however, without graphic
support of the technology object.
Procedure
The table below gives you and option of adding the PID_Compact technology
object to a project.
Table 5-2
No.
Add a cyclic OB ( ), e.g. with a cycle time of 300 ms ( ). The used cycle time is the scan time
of your controller.
To ensure a constant scan time of the controller calling a PID controller must always be executed
in a cyclic OB
1.
Action
Copyright
.
2.
In the instructions you double-click an instance of the PID_Compact to add it to any network of
the OB created in step 2.
33
Action
Select a name for the instance data block, respectively the technology object.
Note!
When calling the PID_Compact function as multi-instance, no technology object is created.
4.
Copyright
Explanation:
A technology object is the comfortable, graphics supported representation of a data block. The
classic display of the data block is possible by clicking on Open DB Editor in the context menu
of the technology object.
34
5.2
Parameters
FB PID_Compact already contains many settable parameters in the technology
object.
If you do not wish to use parameters not listed in the technology object (such as
backup parameters, see Table 4-6, step 2), then the help of TIA V12 offers you
support.
Procedure
Table 5-3
No
Action
In the project navigation you open the object Technology objects > [Your_PID_instance] >
Configuration.
2.
In the Basic Settings window, you select the type of the controller (e.g. Temperature). In dropdown menu Input you define whether you wish to use a floating point number or the hexadecimal
value of an analog input as actual value. The Output drop-down list furthermore offers the option
of using a PWM output as manipulated variable.
Furthermore, you define the start behavior of the controller at a CPU new start here. You can
choose between inactive, pretuning, fine tuning, manual or automatic mode.
In addition, you can invert the control direction here. This is necessary, for example, for cooling
since in this case a higher actuating signal (cooling power) reduces the actual value (temperature).
4.
The input parameters are interconnected directly at the block in the user program and cannot be
interconnected in the configuration view of the technology object.
3.
In Process value settings the limits and scaling of the actual value are set.
Copyright
1.
35
4.
In Advanced Settings you can also read the current PID parameters and change them, if
necessary. However, you do not need to manually enter these parameters since they are adjusted
during the optimization.
Output value contains the settings for the reaction to errors. You can chose whether the controller
shall be inactive or output a substitute value, or the last valid value for the duration of the error.
5.
Save your changes and load the user program into the CPU via Online > Download and Reset PLC
program.
Copyright
No
36
5.3
5.3.1
Copyright
1.
Action
Check whether the correct controller structure
(PI or PID parameters) has been set.
In the individual scenarios, the PID controller
structure is used exclusively.
2.
3.
4.
Note
In project navigation you navigate to
[Your_CPU] > Technology objects >
[Your_PID_Compact]> Configuration > PID
Parameters > Controller structure.
To find the suitable controller for a controlled
system please refer to the expert literature,
such as \3\, page 8624.
37
Copyright
No.
Action
5.
6.
7.
Note
Possible pretuning curve:
38
5.3.2
Table 5-5
No.
Action
In the Technology objects of the Project view you open the configuration window of the
controller you wish to set.
2.
Navigate to PID Parameter and activate the Enable manual entry checkbox.
Now you can enter your parameters for the PID controller.
3.
Then go to the Basic settings, activate the Activate Mode after CPU restart checkbox and
select the Automatic mode entry in the drop-down menu.
Copyright
1.
Note!
After the Mode and ModeActivate entries have been interconnected, ensure that Mode = 3
(corresponds to automatic mode).
39
Action
Via Online > Download and reset PLC program you load the user program into the CPU.
Copyright
Your manually entered parameters are now adopted and the PID_Compact controls the
system with these parameters.
40
5.4
Documentation
Document 79047707_Description_RegelSimBib_DOKU_V1_0_en.pdf contains a
description of the STEP 7 V12 library provided with the project.
Procedure
The table below shows, how simulation block FB Sim_PT3 (FB54) is inserted and
configured in a user program. The integration of the other simulation elements is
performed the same way.
Table 5-6 Inserting the system simulation
No.
Action
Unzip the Sim_controlprocess file into a
directory of your choice on the engineering
station.
2.
1.
Note
Copyright
3.
4.
41
5.5
Action
Note
Note
Parameter CYCLE must correspond to the
cycle time of the calling OB.
Copyright
Command
variable
PID
Controller
Feedback
The actions for inserting a controlled system from several elements are described
below. Specifically, this is the example from Scenario3.
42
Copyright
No.
Action
1.
2.
3.
4.
Note
43
Command
variable
PT1
PID
Controller
+
PDT1
Feedback
The control elements both receive the same input signal from the PID controller.
Your output signals are added and returned to the controller.
Table 5-8
Copyright
No.
Action
1.
Add the control elements you wish to use as described in Table 5-6. In this
example, these are the following.
PT1 (FB Sim_PT1)
PDT1 (FB Sim_PDT1)
2.
With two Move commands you interconnect the output of the PID controller with
the input
of the PT1 element.
of the PDT1 element.
3.
4.
Direct the added and, if necessary, scaled output signal to the PID controller as
an input.
44
6 Commissioning
6.1 Commissioning with entire hardware
Commissioning
This chapter describes how to start up the attached TIA Portal project.
You can either use the hardware described in chapter 2.4.2 (commissioning see
chapter 6.1) or completely simulate the project with PLCSIM (commissioning see
chapter 6.2).
6.1
6.1.1
Hardware installation
The figure below shows a possible hardware setup of the application. A setup
without the intermediate switch is also possible.
Figure 6-1
Field PG
230V
Industrial
Ethernet
Copyright
Switch
PC station
230V
Note
The setup guidelines for SIMATIC S7 systems must generally be met (see also
\6\ and \7\).
45
6 Commissioning
6.1 Commissioning with entire hardware
Table 6-1
No.
Action
1.
2.
3.
4.
5.
Set the IP address of the X1 port of the S71500 via the display to the IP address used in
the example (192.168.0.1).
The IP address can be adjusted in the display
via Settings > Addresses >X1 (IE/PN).
Note
Copyright
Note
Note
For loading into the CPU the engineering
station should be located in the same subnet.
6.1.2
Action
Note
1.
2.
3.
Download the
79047707_PID_CompactV2_CODE_
v10.zip example project from the
Siemens Online Support page.
46
6 Commissioning
6.1 Commissioning with entire hardware
6.1.3
1.
2.
3.
4.
Note
Alternatively, you can also adjust the name to
your engineering station in the project.
Copyright
No.
Action
1.
2.
3.
4.
5.
Note
47
6 Commissioning
6.1 Commissioning with entire hardware
6.1.4
Table 6-5
Action
1.
Download the
79047707_PID_CompactV2_CODE_v1_0.zip
file to your engineering station and unzip the
folder.
2.
3.
4.
5.
6.
7.
Copyright
No.
Note
48
6 Commissioning
6.2 Commissioning with PLCSIM V12
6.2
NOTICE
6.2.1
In order to start up the project with PLCSIM, scenario 2 and hence block FB
Sim_TempProcess (FB58) must be removed from the project. The FB
Sim_TempProcess (FB58) block is know-how protected and can
therefore not be simulated in PLCSIM V12.
Copyright
No.
Action
Note
1.
2.
3.
4.
Download the
79047707_PID_CompactV2_CO
DE_v10.zip example project from
the Siemens Online Support page.
6.2.2
http://support.automation.siemens.com/WW/view/en/7
9047707
Action
1.
2.
3.
Note
49
6 Commissioning
6.2 Commissioning with PLCSIM V12
Starting PLCSIM V12
Table 6-8
No.
Action
Start by double-clicking on the PLCSIM V12
icon.
2.
3.
Copyright
1.
Note
50
6 Commissioning
6.2 Commissioning with PLCSIM V12
6.2.3
Table 6-9
Copyright
No.
Action
1.
Unzipping the
79047707_PID_CompactV2_CODE_v10.zip
file in any folder of your engineering station.
2.
Double-click on the
79047707_PID_CompactV2.ap12 icon.
The TIA V12 project opens.
3.
4.
5.
Note
51
7.1
Overview
For a better overview regarding the behavior of the implemented scenarios, several
options are available to the user:
Insight into the behavior of the control loops via the HMI system WinCC
Runtime Advanced.
Detailed insight into the current status of the control loop by the watch tables
already prepared in the CPU.
7.2
7.2.1
Operating units
The various scenarios can be selected from the start screen of the WinCC Runtime
system running in PC station VisuPC.
Table 7-1
No.
Element
1.
2.
3.
Copyright
52
4.
5.
6.
Selection switch between manual and automatic mode of the PID controller. The
output value is given in manual mode via Manual value.
In automatic mode, the PID controller controls the output value.
7.
Navigation switch for the overview screen and for stopping WinCC Runtime.
Copyright
No.
53
7.2.2
Table 7-2
Action
1.
2.
In order to initially monitor a step response of the controlled system, select manual mode (
Set the Manual output to any value (
Copyright
No.
).
).
Now you can monitor step response of the controlled system for the excitation:
54
Action
For monitoring the control behavior, you select the automatic mode (
value (
).
1
2
Copyright
7.3
Overview
You can analyze the S7 program of the CPU via the online access on the CPU and
the monitoring of blocks.
Watch tables
Three watch tables have already been inserted into the project as a support, which
respectively contain important parameters of the individual blocks on the individual
scenarios. You reach the watch table via 79047707_PID_CompactV2 >
PID_Compact_CPU1516 > Watch and force tables):
WatchTable_Scenario1
WatchTable_Scenario2
WatchTable_Scenario3
55
8 Related Literature
Related Literature
Book directory
Table 8-1
Topics
\1\
Title
Link directory
Table 8-2
Title
\1\
http://support.automation.siemens.com/WW/view/en/79047707
\2\
http://support.automation.siemens.com
\3\
SIMATIC
STEP 7 Professional V12.0
SP1
System manual
http://support.automation.siemens.com/WW/view/en/77991795
\4\
https://www.automation.siemens.com/mdm/default.aspx?DocVersi
onId=51499858571&Language=deDE&TopicId=49233574283&guiLanguage=en
\5\
SIMATIC
S7-1500 Automation system
S7-1500
System manual
http://support.automation.siemens.com/WW/view/en/59191792
\6\
SIMATIC
Installing the assembly
Getting Started
http://www.automation.siemens.com/salesmaterial-as/interactivemanuals/getting-started_simatic-s71500/documents/EN/mount_en.pdf
\7\
SIMATIC
Wiring
Getting Started
http://www.automation.siemens.com/salesmaterial-as/interactivemanuals/getting-started_simatic-s71500/documents/EN/wire_en.pdf
\8\
http://support.automation.siemens.com/WW/view/en/78327231
Copyright
Topics
History
Table 9-1
Version
Date
V1.0
09/2013
Modifications
First version
56