Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User...

15
Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Tecnomatix Plant Simulation Virtual Commissioning Connecting Tecnomatix Plant Simulation with SIMATIC Georg Piepenbrock Plant Simulation Commissioning © Siemens AG 2015. Unrestricted. Siemens PLM Software Page 2 Project Description Write a PLC program for a conveying system. There is one segment, where only one product at a time can be processed. If another product arrives, while a product is already processed, the conveyor should be stopped until the processing of the product is finished. For this we have three sensor, one at the end of the first conveyor, one at the beginning and one at the end of the processing conveyor. There is also a button for switching the conveying way, upper way or lower way.

Transcript of Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User...

Page 1: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.

Tecnomatix Plant SimulationVirtual CommissioningConnecting Tecnomatix Plant Simulation with SIMATICGeorg Piepenbrock

Plant Simulation Commissioning

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 2

Project Description

Write a PLC program for a conveying system. There is one segment, where only one productat a time can be processed. If another product arrives, while a product is already processed,the conveyor should be stopped until the processing of the product is finished.For this we have three sensor, one at the end of the first conveyor, one at the beginning andone at the end of the processing conveyor.There is also a button for switching the conveying way, upper way or lower way.

Page 2: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 3

Siemens VC Solutions

Scope Use Case ToolFactory Logistics Plant Simulation

Zone Kinematic devices, Robots Process Simulate

Electrical Drive Control SIMIT

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 4

Selecting the appropriate tool

Use Case Tool

Electrical simulation of the drive control

SIMITValidation of frequency convertors

Electrical wiring diagram

Safety procedures in robotic zone

Process SimulateTool change procedures

Robot station cycle time estimation

Simulation of conveyor system control

Plant SimulationControl of electro-overhead monorail system

Page 3: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 5

Project Steps

1. Define the logic of the PLC program depending on the sensors of the conveyor

2. Implement the logic and transfer the program to the PLC

3. Build the Plant Simulation model

4. Define the OPC interface

5. Run Plant Simulation model controlled by the PLC

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 6

Defining the Logic of the PLC Program

We have three sensors at the conveyor:1. Part is here, at the end of the first conveyor (PartHere)2. Process running at the beginning of processing conveyor (orange conveyor)3. Process end at the end of the processing conveyor

Part here Processrunning

Processend

Page 4: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 7

Defining the Logic of the PLC Program \2

The first conveyor is running when the processing conveyor is ready (READY) for grabbing aproduct OR if a product is processed (READY) and (&) no other product is here (PartHere).

READY is just the inverted signal of PROCESSRUNNING

ConvRunning = READY || READY & PartHereREADY = ProcessRunning

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 8

TIA Portal – PLC Engineering

Start TIA by double clicking the icon

Select an existing project or create a new project

Openproject

Create newproject

Page 5: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 9

TIA Development \3

In project view you willsee the defineddevices, or you candefine new devices foryour project

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 10

TIA Development \4

Use the Devices& Networks menu to configure your systemIn our example we have a HMI-devive, one PLC and a PC system running the OPC server. Alldevices are connected using TCP/IP and network cable. Each device has ist own IP adress.

Page 6: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 11

TIA Development \5

Open the PLC device, here the PLC tags and edit the default table.In this table you define a name, datatype and the address for all tags you want to use later inyour PLC program. This makes your PLC program more readable than using only the input,output and memory addresses.

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 12

TIA Development \6

In the PLC device, we open the program blocks and we add a main block. You always needone main block.On the right hand side you now can enter your PLC program. You can use several differentlanguages for defining your program. Here we see:ConvRunning = READY || READY & PartHere

Page 7: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 13

TIA Development \7

In the same way we also add all necessaryprogram sequences in the main block

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 14

TIA Development \8

Finally we open the HMI device, open the screens and create a new screen.In this screen we use predefined icons like the green button and we also use GIF-Files whichare created using screenshots of the simulation model.

Page 8: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 15

TIA Development \9

Select the button and open the propertiesof the button.In the properties, you can assign a tag tothe button and you have to define thevalue for on.So when pressing the button it will turn on,setting S1 to true (1). By next time thebutton will be pressed it will turn off,setting S1 to false (0)

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 16

TIA Development \10

When program development will be finished, you cantranslate and download your program to the devices. Thiswill be done by pressing the download button.

You will see a window showing allprograms being compiled and loaded.Do not forget to set the continuecheckbox.

Page 9: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 17

TIA Development \11

When compiling finisheswithout any problems, theprograms will be downloadedautomatically and you canstart the programs.Set the checkbox „Start all“and press „Finish“ to start thePLC program.

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 18

TIA Development \12

You can define watch tables where you will see the values of the tags.Open the watch table

Activate the watch table

Page 10: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 19

Plant Simulation Model

In Plant Simulation we create the simulation model.F_in has a sensor near the end of the conveyor, calling method „setPartHere“Conveyor „Process“ has two sensors, one at the beginning, the second near the end of theconveyor. The first sensor activates „P_Start“, the second sensor activates „P_End“.

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 20

Sensor Method setPartHere

The sensor is activated two times: first when a product breaks the sensor(light barrier), second when the product frees the sensor (light barrier).The item „PartHere“ will be set true or false depending on the light barrier

Page 11: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 21

Method P_Start and P_End

These two methods aremanipulating the item„ProcessRunning“.When a product is arriving,„ProcessRunning“ will be settrue.When the product is leaving theprocessing area, item„ProcessRunning“ will be set tofalse again.

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 22

OPC Interface

In the OPC interface we have to define theOPC server we want to use.

If you do not know the right name of theserver, just press the button to the right ofthe input field to see all available OPCserver.Select the OPC server.

Page 12: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 23

OPC Interface \2

Click button „Items“ to open the tabledefining the items of your project.In the first level you have to defineitem groups. For every group you candefine the interval for updating thevalues of the items in the group bythe server. You can also define theinterval for updating the OPC serverwith the changes you have done withthe items.So you can define different groupswith different update intervalls.

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 24

OPC Interface \3

Double click on the group to open the item table.In this table you define the name of the item, thedata type the alias of the item and a callbackmethod.

The name of the item isthe name used in theOPC server (we will seehow to obtain this name)And the address of theitem.The alias of the item is the id you will use in your methods or as variable name.As soon as the OPC server modifies an item value and there is a callback method,this method will be called and you can react on the new item value.

Page 13: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 25

OPC Interface \4

In the PLC program wedefined item„ConvRunning“ as Exit0.5

In the list of items ofthe OPC interface wedefined Flag„F_in_Running“ also asexit 0.5 (A=Ausgangthe German exit

The callback method F_in_RunningCBjust sets the speed of the conveyor to 0or 1 depending on the value of the item.

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 26

Switch

Pressing the button on theHMI changes the value of S1which is assigned to exitSwitch (see Network2). Switchis exit 0.0 (=A0.0)Any changes on this exit willactivate the callback methodswitch_A0CB which justdefines the value of variableswitch.

Page 14: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 27

Switch

You can also press button switch in the PlantSimulation model to manipulate the switch inthe PLC program.

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 28

How to find the OPC connection

Start program OPC Scout. You will see a tree view with all available local servers. Select theOPC.SimaticNET server. We will see the S7 PLC and below the S7 PLC we will find theconnection S7_Connection_1.On the right hand side you will see some status variables, ther you can see how to use theconnection string.

Page 15: Tecnomatix Plant Simulation Virtual Commissioning · Tecnomatix Plant Simulation Worldwide User Conference 2015 Siemens Industry Software © Siemens AG 2015. Unrestricted. Page 3

Tecnomatix Plant Simulation Worldwide User Conference 2015

Siemens Industry Software

© Siemens AG 2015. Unrestricted.Siemens PLM SoftwarePage 29

END

Have a lot of fun using the virtual commissioning interfaces!

If there are any questions, contactDr. Georg Piepenbrock, [email protected] Groß, [email protected]