DOCU Bottling Plant en
DOCU Bottling Plant en
DOCU Bottling Plant en
https://support.industry.siemens.com/cs/ww/de/view/77362399
Warranty and liability
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
Siemens AG 2015 All rights reserved
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 of the burden of
proof to your detriment.
Any form of duplication or distribution of these application examples or excerpts
hereof is prohibited without the expressed consent of the Siemens AG.
Security Siemens provides products and solutions with industrial security functions that
Infor- support the secure operation of plants, solutions, machines, equipment and/or
mation networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens’ products and solutions undergo continuous
development. Siemens recommends that you keep yourself regularly informed
about product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Products
used from other manufacturers should also be taken into account here.
For more information about industrial security, visit
http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For further information, visit
http://support.industry.siemens.com.
Preface
Aim of this Application Example
The aim of this application example is to introduce additional functions and libraries
in a practical example, in addition to the SIMIT Simulation Framework Getting
Started. The associated example project includes a complete simulation from the
signals to the process.
Key Content
The following main topics are covered in this application example:
The structure of a simulation project from the signal level to the process level
(partly with reference to existing documentation)
Customizing templates
The structure of the process level with the FLOWNET library
The simulation of a conveyor system with components of the CONTEC library
Automatic generation of the device level using the simulated conveyor system
Pre-prepared scripts which can be used for operator training, for example.
Validity
SIMIT Simulation Framework V8.1
Siemens AG 2015 All rights reserved
Table of contents
Warranty and liability................................................................................................... 2
Preface .......................................................................................................................... 3
1 Task Description and Solution ......................................................................... 6
1.1 Task ...................................................................................................... 6
1.2 Solution................................................................................................. 6
1.2.1 Overview of the complete solution ....................................................... 7
1.2.2 Core Functionality ................................................................................ 8
1.2.3 Hardware and Software Components .................................................. 8
2 Initial Work on the Project .............................................................................. 10
2.1 Presentation of the Project ................................................................. 10
2.2 Configuring the PLCSIM Interface in the SIMATIC Manager ............. 10
2.3 Configuring the PLCSIM Interface in SIMIT ....................................... 11
2.4 Verifying Communication between PLCSIM and SIMIT .................... 12
2.5 The Current Status of your Project ..................................................... 12
3 Creating the Device Level ............................................................................... 14
3.1 Creating a Template ........................................................................... 14
3.2 CMT Import ........................................................................................ 18
3.3 Generating the Device Level .............................................................. 21
3.3.1 Adapting the Template ....................................................................... 21
Siemens AG 2015 All rights reserved
1.2 Solution
This application example given here describes how to use the SIMIT simulation
software to easily and quickly create the required simulation for a unit for the
manufacture and packaging of soft drinks. The plant sections raw material tanks,
reactors and a bottling plant are used for the simulation.
The basis for the simulation project described here is the PCS 7 project "bottling
Siemens AG 2015 All rights reserved
Diagram
The following figure shows parts of a possible style depth of a simulation solution
of a filling unit.
Figure 1–1
Siemens AG 2015 All rights reserved
Description
The application example "virtual commissioning with SIMIT Simulation Framework
for typical process and production automation" includes a PCS 7 project from
a beverage blending and bottling plant and the associated simulation model.
The PCS 7 project does not form part of the description given here and serves
solely as a basis for the description of the simulation model.
The simulation model is divided into three levels:
Signal level
Device level
Process level
You can find a description of the levels and of SIMIT in the application example
"SIMIT Getting Started" in chapter 1 "SIMIT at a glance" (\3\).
Aim
The aim of the application example given here is to introduce functions and
libraries which are not described in Getting Started. In this example, the following
topics will be highlighted in particular:
FLOWNET library
CONTEC library
The function "Generating the device level"
Script function
Creating/optimizing templates
Delimitation
Physically speaking, the technical process is illustrated in a simplified way by
assuming ideal conditions.
Required Knowledge
Fundamental knowledge of the following specialist fields is a prerequisite:
Basic knowledge of process technology
Basic knowledge of physical modeling
Engineering with SIMATIC PCS 7 and Advanced Process Library (APL)
Siemens AG 2015 All rights reserved
The individual components of the PCS 7 project "Bottling Plant" simulation are
described in the following section. The simulation consists of three main
components:
Raw material tanks
Reactors
Filling
The main components with the associated technical functions are derived from
the technological hierarchy of the PCS 7 project.
You can find information on the generation procedure and the individual
components such as signals, devices and processes in the application example
"Simulation of a PCS 7 stirred tank reactor with SIMIT simulation framework"
chapter 1.2. "Solution" (\4\).
The application example has been created with the following components:
Hardware Components
Table 1–1
Component Instructions
SIMATIC PCS 7 ES/OS IPC847D W7 For the PCS 7 V8.1 example project
and the SIMIT V8.1 example project
Note In case of different hardware, please take heed of the suggested hardware
configuration for installing the software components.
The suggested hardware configuration can be found in the read me file of the
PCS 7 (online) \5\.
Software Components
Table 1–2
Component Instructions
SIMATIC PCS 7 V8.1 SP1 Part of SIMATIC PCS 7 ES/OS IPC847D
W7
S7-PLCSIM The license is not a part of SIMATIC PCS 7
ES/OS IPC847D
SIMIT ULTIMATE V8.1 The software and license are not a part of
SIMATIC PCS 7 IPC847D
"product versions" of the manual "SIMIT (V8.1) Operating Manual" (\6\). In the
application example, the modules "PLCSIM coupling" and "CMT import (CMT -
control module type)", Component Type Editor (CTE) as well as the libraries
FLOWNET and CONTEC are used. These do not form part of SIMIT V8.1
STANDARD.
Table 1–3
File/project Note
77362399_PROJECT_BottlingPlant_SIMIT_V81.zip SIMIT V8.1 example project
77362399_PROJECT_BottlingPlant_PCS7_V81.zip PCS 7 V8.1 example project
77362399_DOCU_Bottling_Plant_en.pdf This document
libraries.
Generating the scripts which can be used for operator training sessions,
for example.
Note The "BottlingPlant_MP" project includes two automation systems. For this
reason, steps 1 to 4 in table 2-3 and steps 1-8 in table 2-4 should be executed
twice (once per AS).
As two PLCSIM couplings are created in the application example, the couplings
should be assigned unique names and one time slice each. The couplings have
the following names in the application example:
Coupling to AS1 "1_SignalLevel_PLCSIM_AS1"
Coupling to AS1 "2_SignalLevel_PLCSIM_AS2"
Figure 2–1
You can assign the relevant time slice in the properties window of the coupling.
You can enter the number of the PLCSIM instance in the field "PLCSIM number".
You will find the number in the header of the PLCSIM window for each AS. The
PLCSIM number 1 is also assigned to the coupling for AS1 in the following image.
Figure 2–2
Siemens AG 2015 All rights reserved
Set the time slice 3 and the PLCSIM number 2 for AS2.
You are still unable to simulate the time response or the transient response of
processes. This requires you to describe the process in detail and simulate it in
SIMIT. The following chapters describe a possible process simulation for the
"Bottling Plant" project.
Figure 2–3
Siemens AG 2015 All rights reserved
Bottling_Dose
Bottling_MotorLean
Bottling_MotorRev
Bottling_MotorSimoCode
Bottling_MotorSinamics
Bottling_PID
Bottling_ValveLean
Conv
There are two options for creating templates. The first option is to adapt the
existing templates (base templates). The second option is to create a new one.
In order to adapt the base templates, they have to be copied. For example, they
could be copied into the folder project templates. After that it is possible to open
and edit them.
Procedure
The following section will provide you with some examples of how to create or
adapt templates.
AMON_Std:
First of all, the interfaces to the CMT must be defined before creating a template.
To do this, the following tasks must be performed in the SIMATIC Manager:
1. Open the CMT “AMON_Std” in the master data library of the “BottlingPlant”
project.
2. Open the technical connections of the CMT “View > Technical connections”.
3. Take note of the names of the assigned blocks and the names of the
associated signals and parameters which you need in the SIMIT template.
Figure 3–1
Figure 3–2
Table 3–1
Component Property Old value New value
Connector Name {$ChartName}/X {$ChartName}/PV
Phys2Raw Name Phys2Raw#1 {$ChartName}_Phys2Raw
Phys_Lower_ PV_LR_Value PV\Scale\Low
Limit
Phys_Upper_ PV_HR_Value PV\Scale\High
Limit
Signed2Unsigned Name Signed2Unsigned {$ChartName}_Signed2Unsig
#1 ned
Input Signal COUPLING COUPLING PV\PV_In
PV_SymbolName
10. Insert text boxes to improve clarity according to the following figure.
Figure 3–3
Siemens AG 2015 All rights reserved
Bottling_2WayValve:
Before creating the template, the names of the assigned blocks and the associated
signals and parameters which you want to address in the SIMIT template need to
be compiled (see steps 1 to 4 AMON_Std). The following table compiles these:
Table 3–2
Block Signal / parameter
CtrlV0 PV_Out
CtrlV1 PV_Out
CtrlV2 PV_Out
FbkP0 PV_In
FbkV0 PV_In
FbkV1 PV_In
FbkV2 PV_In
The template can be created with this information. The following figure shows
the arrangement and the interconnection of the necessary components.
Figure 3–4
Siemens AG 2015 All rights reserved
Table 3–3
Component Property Value
Output Signal COUPLING Ctrl0\PV_Out
Output Signal COUPLING Ctrl1\PV_Out
Output Signal COUPLING Ctrl2\PV_Out
MUL Name {$ChartName}_MUL_V0
X1 V\MonTiV0Dynamic
MUL Name {$ChartName}_MUL_V1
X1 V\MonTiV1Dynamic
MUL Name {$ChartName}_MUL_V2
X1 V\MonTiV2Dynamic
DriveV1 Name {$ChartName}_V0
DriveV1 Name {$ChartName}_V1
DriveV1 Name {$ChartName}_V2
Note It is a huge advantage if you give every component which you place on a chart
a unique name. By using {$ChartName} this can be easy and convenient when
using templates. When generating charts, {$ChartName) is replaced by the plan
name. If you place additional components on charts, give each of them a unique
name. This makes it easier to interconnect the components beyond the limits of
the chart at a later date.
Requirements
To use the function "CMT Import" for automatic model creation, a corresponding
XML file is required, exported from the PCS 7 project. The PCS 7 project must also
be created with the help of CMTs (control module types).
Preparation
Create the following subfolders in the folder "Chart".
1_SignalLevel
2_DeviceLevel
3_ProcessLevel
Procedure
The application example “SIMIT Getting Started” in chapters 3.3.1 “Export of XML
files from PCS 7” and chapter 3.3.3 “CMT Import” describe in detail how to export
the required XML files and carry out the CMT import.
The CMT import for the application example given here is described step by step
in the following section.
1. Right-click the “DeviceLevel" folder.
2. Select “Automatic model generation > CMT Import” in the context menu.
3. In the “Coupling” box, select the coupling “1_SignalLevel_PLCSIM_AS1”.
4. Untick the box “Plant3” in the preview.
Figure 3–5
Siemens AG 2015 All rights reserved
Note Only the charts for the fill level measuring points are created. The charts for
the conveyor line drives are created with the aid of the function “Generation of
device level”.
Figure 3–6
Siemens AG 2015 All rights reserved
Result
The device level is created in its entirety for the plant sections “Plant1” and “Plant2”
For the plant section “Plant3”, only the fill level measuring points “LI311” and
“LI312” were created.
11. Close the template “Bottling_MotorRev” and switch to the template “Conv.”
12. Insert the copied components into the template “Conv”.
13. Adapt the available components as described in the table below:
Table 3-4
Component Property Old value New value
Text Text {$ChartName}_MotorRev {$NAME}_MotorRev
Output Signal COUPLING Fwd\PV_Out COUPLING DO_{$NAME}_Fwd
Output Signal COUPLING REv\PV_Out COUPLING DO_{$NAME}_Rev
OR Name OR#1 OR_{$NAME}
MUL Name MUL#1 MUL_{$Name}
Input X1 U\MonTiDynamic 3
Input X2 1.0 0.5
DriveP1 Name DriveP1#1 {$NAME}_U
Connector Name Connector#1 {$NAME}/Run
Connector Name Connector#2 {$NAME}/Dir
Connector Name Connector#3 {$NAME}/Y
NOTc Name NOTc#1 NOTc_{$NAME}
AND Name AND#1 AND_Fwd_{$NAME}
AND Name AND#2 AND_Rev_{$NAME}
Pushbutton Name Pushbutton#1 Pushbutton_{$NAME}_Startlocal
Pushbutton Name Pushbutton#2 Pushbutton_{$NAME}_Stoplocal
Switch Name Switch#1 Switch_{$NAME}_Maint
Switch Name Switch#2 Switch_{$NAME}_Trip
14. Insert the components which are additionally required into the template,
as shown in the following figure. These are essential for the sensors of
the components in the conveyor system.
Figure 3–7
Siemens AG 2015 All rights reserved
15. Adjust the properties of the components as summarized in the table below.
Table 3–5
Component Property Value
BConnector Name BConnector_{$NAME}-
SensorA1
Input {$NAME} SensorA1
BConnector Name BConnector_{$NAME}-
SensorA2
Input {$NAME} SensorA2
In the application example given here, there is a separate chart for the simulation
of the conveyor system. The following will describe how to create this chart.
Chart Properties
1. Create the folder “Conveyor” in the folder “3_ProcessLevel”.
2. Create a new chart “Conveyor_sim” in this folder.
3. Adapt the size and scale in line with the following figure.
Note The dimensions of the components from the CONTEC library play a decisive role
Siemens AG 2015 All rights reserved
in the simulation as the lengths of the conveyor lines and the sensor positions
are derived from these. You can find more information in chapter 7.3.2.5 “Scale”
in the manual “SIMIT (V8.1)” (\6\).
Figure 3–8
Conveyor System
The conveyor system is created using components from the CONTEC library.
The following section will describe how to create the simulation of the conveyor
system.
1. Place the components “Conveyor-S4”, “ConveyorCurve45-R60” and
“SpurConveyor-2” on the chart “Conveyor_sim”, as shown in the following
figure.
Figure 3–9
ConvCurvCola Conv5
Conv4
Conv1 Conv2
Conv3
ConvSpur
Conv6
ConvCurvOLimo Conv7
Table 3–6
Siemens AG 2015 All rights reserved
SensorPositionA1 4000
SensorPositionA2 4900
SensorPositionA3 10
TEMPLATE Conv
HIERARCHY Conveyor
Conv7 Name Conv7
Width 5000
RemoveA2 Conv7-SensorA2 OUT
NbrOfSensorsA 2
SensorPositionA1 4000
SensorPositionA2 4800
TEMPLATE Conv
HIERARCHY Conveyor
The following section will describe the procedure for the function “Generating the
Device Level”.
Requirement
The requirement for using the function “Generating the Device Level” is that you
have created the relevant template (if you are not using the base templates) and
you have created the model of the conveyor system with the components from the
CONTEC library.
Procedure
1. Right-click “Plant3” in the “DeviceLevel" folder.
2. Select “Automatic model generation > Device Level Generation” in the context
menu.
3. Set the coupling “2_SignalLevel_PLCSIM_AS2” in the “Coupling” box.
Figure 3–10
Siemens AG 2015 All rights reserved
4. Click "Import".
5. Click “OK” in the window “Import complete”.
Note If you have several charts of the same type which need to be adapted after
generating the device level, it is sensible to have a separate template for these
charts.
ConvSpur
1. Open the chart ConvSpur.
2. Insert two components from each of the types “Output” and “BConnector”.
3. Interconnect these as shown in the following figure.
Figure 3–11
Table 3–7
Component Property Value
Output Signal 2_SignalLevel_PLCSIM_AS2
DO_ConvSpure_S_AB
Output Signal 2_SignalLevel_PLCSIM_AS2
DO_ConvSpure_S_AD
BConnector Name ConvSpur-Switch1
Siemens AG 2015 All rights reserved
ConvCurvCola
1. Open the chart “ConvCurvCola”.
2. Insert the component “MUL”.
3. Interconnect these as shown in the following figure.
Figure 3–12
Table 3–8
Component Property Value
MUL Name MUL_Speed_ConvCurvCola
X2 -1.0
Result
The device level is created in its entirety for the plant section “Plant3”.
Figure 3–13
Siemens AG 2015 All rights reserved
The following section will describe the procedure for creating the required macros.
Macro “LiterSTom3s”
The macro “LiterSTom3s” converts the volume flow from liters per second to m³ per
second. The procedure for creating this is described below step-by-step.
1. Switch to the Task-Card “Macros” in the Tools window.
2. Create a new macro.
3. Rename this macro “LiterSTom3s".
4. Open the macro.
5. Open the properties of the macro.
6. Assign the property “Code” the value “LiterSTom3s”.
7. Insert the component “DIV” from the standard library into the macro.
8. Assign it a suitable name (e.g. DIV_convert_Liter_s_to_m3_s).
9. Assign the input X2 the value 1000,0.
10. Connect the input “X1” of the “DIV” component to the sidebar for inputs.
11. Rename the input “L_s”.
12. Connect the input “Y” of the “DIV” component to the sidebar for outputs.
Figure 4–1
Macro “m3sToLiterS”
The macro “m3sToLiterS” converts the volume flow from m³ per second to liters
per second. The procedure for creating the macro is the same as the procedure
for creating the macro “LiterSTom3s”.
The following figure shows the components and their connection to the macro.
Figure 4–2
Siemens AG 2015 All rights reserved
Adjust the properties of the macro and components as summarized in the table
below.
Table 4–1
Component Property Value
Macro Code m3sToLiterS
MUL Name MUL_convert_m3_s_to_Liter_s
X1 Connection to m3_s
X2 1000
Y Connection to L_s
Macro “m3ToLiter”
The macro “m3ToLiter” converts the volume from m³ to liters. The procedure for
creating the macro is the same as the procedure for creating the macro
“LiterSTom3s”.
The following figure shows the components and their connection to the macro.
Figure 4–3
Adjust the properties of the macro and components as summarized in the table
below.
Table 4–2
Component Property Value
Macro Code m3ToLiter
MUL Name MUL_convert_m3_to_Liter
X1 Connection to m3
X2 1000
Y Connection to L
Siemens AG 2015 All rights reserved
Macro “PumpPress”
The macro “PumpPress” simulates the characteristic of a pump. The procedure
for creating the macro is the same as the procedure for creating the macro
“LiterSTom3s”.
The following figure shows the components and their connection to the macro.
Figure 4–4
Adjust the properties of the macro and components as summarized in the table
below.
Table 4–3
Component Property Value
Macro Code PumpPress
AFormula Name AFormula_PumpPress
X1 Connection to
Pump_percent
X2 Connection to
Pressure_Gain
X3 Connection to Flow_X
Y Connection to Flow_X
Formula X1/100*X2*X3
Macro “ValveCurve”
The macro “ValveCurve“ simulates the equal percentage characteristic of a valve.
The procedure for creating the macro is the same as the procedure for creating the
macro “LiterSTom3s”.
Siemens AG 2015 All rights reserved
The following figure shows the components and their connection to the macro.
Figure 4–5
Adjust the properties of the macro and components as summarized in the table
below.
Table 4–4
Component Property Value
Macro Code ValveCurve
AFormula Name AFormula_ ValveCurve
X1 Connection to
Y_Valve_percent
X2 Connection to exp
Y Connection to Y_m3_s
Formula X3*pow(X1/100,X2)
DIV DIV_ValveCurve Connection to
Scaling_L_Min
X2 60000,0
Besides the actual models, components are also essential for the simulation of the
physical correlations as they can be used to set specific states. Separate charts
Siemens AG 2015 All rights reserved
The purpose of the chart is to simulate the physical model of the raw material tank
“RMT1”.
In the application example given here, the capacity of the raw material tank is
simulated according to the following formula:
= +
Procedure
The following section will describe the creation procedure.
1. Create a new folder in the folder “3_ProcessLevel”.
2. Rename it “Plant1”.
3. Create a new chart in the folder “Plant1”.
4. Rename it “RMT1”.
5. Insert the relevant components into the chart (see the figure below).
Figure 4–6
8. Insert the components shown in the following figure into the chart.
9. Interconnect the components as shown in the following figure.
Figure 4–7
10. Adjust the properties of the components as summarized in the table below.
Table 4–5
Component Property Value
BConnector Name BConnector_Fill_RMTs
Output Signal 1_SignalLevel_PLCSIM_AS1
DO_RMT1_Filling
OR Name OR_Fill_RMT1
Table 4–9 Fill RMT1 finished?, For Dosing Control, Flow into Reactor1
Component Property Value
m3ToLiter Name m3ToLiter_FD111/PV
Connector Name FD111_PV
Connector Name RMT1_to_Reactor_1
Compare Name Compare_Fill_RMT1_finished
X2 450.0
Comparison >
The purpose of the chart is to simulate the physical model of the raw material tank
“RMT2”.
In the application example given here, the capacity of the raw material tank is
simulated according to the following formula:
= +
Siemens AG 2015 All rights reserved
The chart “RMT2” is created using components from the FLOWNET library.
The FLOWNET library contains components for creating the simulation of piping
networks. You can find a detailed description of piping networks and components
in the FLOWNET library in chapter 7 “The FLOWNET Library” in the manual “SIMIT
V8.1” (\6\).
Procedure
The following section will describe the creation procedure.
1. Create a new chart in the folder “Plant1”.
2. Rename it “RMT2”.
3. Insert the relevant components into the chart (see the figure below).
Figure 4–8
Siemens AG 2015 All rights reserved
Figure 4–9
Siemens AG 2015 All rights reserved
Table 4–10
Component Property Value
Output Signal 1_SignalLevel_PLCSIM_AS1
DO_RMT2_Filling
2x Connector Name NK123_V0/Hi
2x Connector Name NK123_V1/Hi
XOR Name XOR_RMT2_Left
AND Name AND_RMT2_Right
Selection Name Selection_RMT2_Left
X1 100.0
Selection Name Selection_RMT2_Right
X1 100.0
Connector Name RMT2_Left
Connector Name RMT2_Right
LevelInit 0.0
Measurements Name Measurements_LI121
Connector Name LI121/PV
X2 450.0
Comparison >
Measurements Name Measurements_FD121
Connector Name FD121_PV
The purpose of the chart is to simulate the physical model of the raw material tank
“RMT3”.
In the application example given here, the capacity of the raw material tank is
simulated according to the following formula:
= +
Procedure
The following section will describe the creation procedure.
1. Create a new chart in the folder “Plant1”.
2. Rename it “RMT3”.
3. Open the chart “RMT1”.
4. Select all of the components and copy them.
5. Close the chart “RMT1”
6. Insert the copied components into the chart “RMT3”.
Figure 4–10
Siemens AG 2015 All rights reserved
Figure 4–11
13. Adjust the properties of the components as summarized in the table below.
Table 4–15
Component Property Value
Output Signal 1_SignalLevel_PLCSIM_AS1
DO_RMT3_Filling
OR Name OR_Fill_RMT3
14. Save and close the chart “Connections”.
15. Open the chart “RMT3”.
16. Adjust the properties of the components as summarized in the table below.
4.3.1 Preparation
The reactor component “StirredTankReactor” must be created with the CTE tool
first of all, to be able create the chart for the “Reactor1” process model in SIMIT.
You can find the model equations for the component “StirredTankReactor” in
the application example “Simulation of a PCS 7 stirred tank reactor with SIMIT
simulation framework” chapter 2.4 “Simulation of a process”. In the application
example given here, these have been adapted and simplified.
You can find information regarding the creation of your own components and
the syntax in the CTE tool in the "SIMIT - Component Type Editor" manual.
You can open the component “StirredTankReactor” with the CTE tool, look at
the source code and, if required, adapt it.
Siemens AG 2015 All rights reserved
The purpose of the chart is to simulate the physical model of the reactor
“Reactor1”.
Procedure
1. Create the folder “Plant2” in the folder “3_ProcessLevel”.
2. Create a new chart in the folder “Plant2”.
3. Rename it “Reactor1”.
4. Insert the relevant components into the chart (see the figure below).
Figure 4–12
Siemens AG 2015 All rights reserved
Figure 4–13
Table 4–19
Component Property Value
BConnector Name Bconnector_RESET_Reactors
SR_FF Name SR_FF_RESET_Reactors
Table 4–20
Component Property Value
Connector Name FV211/Y
Connector Name NK211/Y
Connector Name NK212/Y
Connector Name Reactor1_Empty
MinMax Name MinMax_FlowOut_Reactor1
Parameter MIN
ValveCurve Name ValveCurve_Reactor1
Exp 1.0
Scaling_L_Min 50
PumpPress Name PumpPress_Reactor1
Connector Name TV211/Y
Connector Name NK213/Y
MinMax Name MinMax_Temperature_Reactor1
Parameter MIN
PTn Name PTn_Disturb_Temp_Reactor1
T 20.0
ADD Name ADD_Heating_Reactor1
Siemens AG 2015 All rights reserved
X2 20.0
StirredTankReactor Name StirredTankReactor_Reactor1
SET Connection to
Bconnector_RESET_Reactors
OUT
Volume 1.2
Height 5.0
ULimit Connection to
SR_FF_RESET_Reactors R
Connector Name LI211/Y
Connector Name NK214_vent/Y
MUL Name MUL_Temp_Reactor1
X2 -1.0
PTn Name PTn_Vent_Reactor1
T 10.0
Selection Name Selection_Reactor1_Empty
X0 100
The purpose of the chart is to simulate the physical model of the reactor
“Reactor2”.
Procedure
Siemens AG 2015 All rights reserved
Figure 4–14
Siemens AG 2015 All rights reserved
Figure 4–15
Table 4-–
Component Property Value
Selection Name Selection_RESET_Reactor2
X1 100
Connector Name RESET_REAC2
Connector Name TV221/Y
Siemens AG 2015 All rights reserved
Table 4–21
Component Property Value
PnodeLiquid Name PnodeLiquid_Inlet_RMT3_to_Reac2
Pressure 40.0
PnodeLiquid Name PnodeLiquid_for_Heating_Liquid
Pressure 50.0
Temperature 200.0
PnodeLiquid Name PnodeLiquid_for_Heating_Liquid
Pressure 50
Valve Name Valve_RMT3_to_Reactor_2
CVs 30.0
ShowFlow True
ShowFlowDirection True
ShuwFlow True
Connector Name NP221_Simo/Y
Valve Name Valve_FV221
CVs 0.5
ShowFlow True
ShowFlowDirection True
Connector Name FV221/Y
PipeMeasure Name PipeMeasure_FD221
Valve Name Valve_NK222
CVs 3.0
ShowFlow True
ShowFlowDirection True
PnodeLiquid Name PnodeLiquid_to_Plant3
Measurements Name Measurements_FD221
Connector Name FD221_PV
NOTc Name NOTc_LI312
IN Connection to Conv2-SensorA2
OUT
INT Name LI132
UL 10.5
Connector Name LI312/PV
Figure 5–1
In the application example given here, the goods conveyed constitute beverage
crates. Depending on the color of the beverage crate, the relevant drink is filled into
bottles. The component “BoxProperty” assists in assigning or reading the color of
the beverage crate. The component is not part of the CONTEC library and was
created using the CTE tool. The application example given here does not describe
the creation process.
Besides the component “BoxProperty”, the application example given here
contains two other components which are not part of a SIMIT library.
“CompareBox”
“CompareMix”
Component “BoxProperty”
The component “BoxProperty” invokes system functions which enable access to
the simulation of the goods conveyed. When the conveyed goods are created by
the “Conveyor” component in the CONTEC library, the conveyed goods are
assigned a unique ID. This can be read, for example, using the output
“SensorIdA1”. The component “BoxProperty” has read or write access to the
conveyed goods.
Siemens AG 2015 All rights reserved
Note You can find information regarding the system functions of the CONTEC library
in chapter “7.3.4.3 System functions” in the manual “SIMIT (V8.1)”.
The “BoxProperty” component has the input “Id” which enables the sensor of the
“conveyor” component to read the Id. Furthermore, the component has the inputs
“READ” and “WRITE”. If the input “WRITE” is active, then the information present
at the other inputs of “BoxProperty” is written to the memory and the properties of
the conveyed goods. This includes the values for the inputs “R”, “G”, and “B”. With
these values, the color of the conveyed goods in the simulation is defined.
Note You can find information regarding the properties of the conveyed goods (e.g.
color of conveyed goods) in chapter 7.3.3.4 “Component types for the simulation
of conveyed goods” in the handbook “SIMIT (V8.1)”.
“CompareBox” Component
The component “CompareBox” imports a number at input X. The outputs are
then written using the number. The outputs relate to the color inputs of the item
conveyed. Furthermore, the Id of each color is written to the output “Id”.
“CompareMix” Component
The “CompareMix” component imports the color-Id and reveals at the output
whether it is cola, orange-lemonade or a mix of both.
The purpose of the “Calc” chart is to model the color of the item conveyed.
It contains the components described in chapter 5.1.2. Besides modeling the color
of the item conveyed, the conveyor system’s sensors also analyze the Ids entered.
The following section will describe the procedure for creating the chart.
Procedure
1. Create a new folder in the folder “ProcessLevel”.
2. Rename it “Conveyor”.
3. Move the chart “Conveyor_sim”, which you have already created (see chapter
3.2.2.) into the folder “Conveyor”.
Siemens AG 2015 All rights reserved
Figure 5–2
Siemens AG 2015 All rights reserved
11. Adjust the properties of the components as summarized in the table below.
Table 5–1 Define box color and create box object on conveyor
Component Property Value
Pushbutton Name Pushbutton_CreateBoxColor
Output Signal 2_SignalLevel_PLCSIM_AS2
DO_ConvSpure_S_AD
OR Name OR_CreateBoxColor
Counter Name Counter_CreateBoxColor
UL 3.0
CompareBox Name CompareBox_CreateBoxColor
BoxProperty Name BoxProperty
Id Connection to Conv1
SensorIdA1
WRITE Connection to Conv1
SensorA1
Pushbutton Name Pushbutton_CreateBoxColor
Output Signal 2_SignalLevel_PLCSIM_AS2
DO_PickUp
OR Name OR_CreateBoxObject
OUT Connection to Conv1
CreateObject
OR Name OR_OLimo_or_Mix
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor1_Cola
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor1_OLimo
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor1_Mix
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor2_Cola
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor2_OLimo
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor2_Mix
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor3_Cola
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor3_OLimo
Input Signal 2_SignalLevel_PLCSIM_AS2
DI_Sensor3_Mix
Note The description given here does not cover the generation of the geometry model.
You can find further information regarding the 3D viewer control and the data
format requirement in chapter 7.1.7.4 “The 3D Viewer Control” in the SIMIT
manual (V8.1) (/6/).
Procedure
Siemens AG 2015 All rights reserved
Table 6-1
Component Property Value
3D-Viewer Name CrownCapMaschine
X 160
Y 15
Width 520
Height 695
3D model MASCHINE.wrl
Procedure
1. Create a new chart in the “Misc” folder of the “Conveyor” folder.
2. Rename it “AnimationControl”.
3. Open the chart.
4. Insert the relevant components into the chart (see the figure below).
5. Interconnect the components as shown in the following figure.
Figure 6–1
Siemens AG 2015 All rights reserved
Table 6–2
Component Property Value
Delay Name Delay_sonsor_z_axis_TY_move_back
RS_FF Name RS_FF_sonsor_z_axis_TY
OR Name OR_start_animation
IN1 Connection to Conv5 SensorA2
IN2 Connection to Conv3 SensorA3
IN3 Connection to Conv7 SensorA2
DriveV1 Name DriveV1_sonsor_z_axis_TY
MUL Name MUL_sonsor_z_axis_TY
X2 -5.0
Table 6–3
Component Property Value
CrownCapMaschine Sensor_X-axis#TX Connection to
MUL_sonsor_x_axis_TX Y
Sensor_Y-axis#TX Connection to
MUL_sonsor_y_axis_TX Y
Sensor_Z-axis#TX Connection to
MUL_sonsor_z_axis_TY Y
Door_sensor_left#TX Connection to
MUL_door_sensor_left_TX
Y
Door_sensor_right#TX Connection to
MUL_door_sensor_right_TX
Y
Note You can find information regarding graphic elements and controls in the SIMIT
manual (V8.1) (/6/) and in the application example “SIMIT Getting Started” (/3/),
in chapter 5 “Creating the graphical interface”.
Siemens AG 2015 All rights reserved
7.1 Scripts
SIMIT gives you the opportunity to influence the simulation by using the Automatic
Control Interface with automated scripts. This allows you to create situations
such as the overheating of a reactor. Furthermore, scripts can be used to create
snapshots. This allows you to create a plant status with a script and then save it
as a snapshot. Furthermore, you can create log files with measurement values
for the period of time that a script is running. This allows you to determine, for
example, the operator reaction time required to prevent, for example, the
overheating of a reactor.
Creating Scripts
Scripts are created in the folder “Scripting” in the project window. These can
be created before the simulation starts or during the simulation. Changes can be
made to the scripts throughout the simulation. To create a script, open the folder
“Scripting” and execute the function “New script”. You can enter the commands in
Siemens AG 2015 All rights reserved
the editor window and if the simulation is running, you can start the script using
the “Start script” button.
Note For detailed information about creating and starting scripts and commands,
please refer to chapter 6 "the Automatic Control Interface (ACI)" of the "SIMIT
(V8.1)” operating manual.
“LeanPIDTest” Script
A simple control test for temperature regulation of “Reactor1” can be carried out
using the “LeanPIDTest” script. After the script has started, a log file is created.
The start date and start time are recorded in the log file. A query appears to check
whether the target value of 10°C is set on the regulator. If the response is “yes”,
a plot of the actuating value is created for the valve TV211. After a period of
20,000 cycles, a disturbance of 10°C is added to the temperature value TC211
for another 20,000 cycles. At the end, the disturbance is removed and a snapshot
“Lean-OTS” is created.
Script “Reactor1OverHeating”
The overheating of “Reactor1” is simulated using “Reactor1OverHeating”. After the
script has started, a log file is created. The start date and start time are recorded
in the log file. Then a disturbance variable is added to the reactor temperature.
The disturbance variable is only removed when the operator opens the valve
“NK214_vent” (in the WinCC Runtime). At the end of the script, the operator’s
reaction time is recorded in the protocol file.
Script “Reactor2OverHeating”
The script “Reactor2OverHeating“ corresponds to the script
“Reactor1OverHeating”. Only “Reactor2” is heated and reacts to valve
“NK224_vent” being opened.
7.2 Snapshots
The snapshot “Lean-OTS” is included in the application example given here.
This was created automatically by the script “LeanPIDTest”. It can be created
Siemens AG 2015 All rights reserved
manually using the function “Snapshots”. You can select this in the menu
“Simulation > Snapshots” by clicking the button “Snapshots” in the toolbar or in
the folder “Snapshots” in the project window.
You can retain the plant status in a snapshot and reload it as often as you like.
8 Commissioning
The commissioning procedure for the SIMIT and PCS 7 project is described in
detail in the application example “Simulation of a PCS 7 stirred tank reactor with
SIMIT simulation framework” (\4\).
Start the SFC “SFC_Master” in the WinCC figure “Plant1” after you have started
the simulation and the WinCC Runtime (see the following figure).
Figure 8–1
Siemens AG 2015 All rights reserved
9 Related literature
Table 9–1
Topic Title
\1\ Siemens Industry http://support.industry.siemens.com
Online Support
\2\ Download page of https://support.industry.siemens.com/cs/ww/de/view/77362399
this entry
\3\ SIMIT Getting https://support.industry.siemens.com/cs/ww/en/view/77362399
Started
\4\ Simulation of a https://support.industry.siemens.com/cs/en/en/view/93148023
PCS 7 stirred tank
reactor with SIMIT
simulation
framework
\5\ Process control https://support.industry.siemens.com/cs/ww/en/view/109474
system SIMATIC
PCS 7 PCS 7
read-me V8.1 incl.
SP1 (online)
\6\ Operating Manual https://support.industry.siemens.com/cs/de/en/view/93842565
“SIMIT (V8.1)”
Siemens AG 2015 All rights reserved
10 History
Table 10–1
Version Date Modification
V1.0 10/2015 First edition