SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration...

90
Configuration Instruction SIMATIC PCS 7 – SIMATIC IT – Integration SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 PPA KPIs without Production Modeler

Transcript of SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration...

Page 1: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Configuration Instruction

SIMATIC PCS 7 – SIMATIC IT – Integration SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007

PPA KPIs without Production Modeler

Page 2: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Warranty, liability and support

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 2/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

NOTE The application examples are not binding and do not claim to be com-plete regarding the circuits shown, equipping and any eventuality. The application examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible in ensuring that the de-scribed products are correctly used. These application examples do not relieve you of the responsibility in safely and professionally using, installing, operating and servicing equipment. When using these application examples, you recognize that Siemens cannot be made 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 - then the contents of the other documents have priority.

Warranty, liability and support We do not accept any liability for the information contained in this docu-ment.

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 condi-tion which goes to the root of the contract (“wesentliche Vertragspflichten”). However, claims arising from a breach of a condition which goes to the root of the contract shall be limited to the foreseeable damage which is intrinsic to the contract, unless caused by intent or gross negligence or based on mandatory liability for injury of life, body or health The above provisions does not imply a change in the burden of proof to your detriment.

Copyright© 2008 Siemens A&D. It is not permissible to transfer or copy these application examples or excerpts of them without first having prior authorization from Siemens A&D in writing. For questions about this document please use the following e-mail address:

mailto:[email protected]

Page 3: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Table of Contents

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 3/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Table of Contents

Table of Contents ......................................................................................................... 3

1 Introduction..................................................................................................... 5 1.1 In general.......................................................................................................... 5 1.2 Test environment .............................................................................................. 5 1.3 Equipment for the Windows active directory domain........................................ 6 1.4 Installed software.............................................................................................. 7

Operating systems ....................................................................................... 7 SIMATIC software ........................................................................................ 7

2 PPA – Plant Performance Analyzer............................................................... 8 2.1 Configuration database..................................................................................... 8 2.2 Storage system................................................................................................. 9 2.2.1 Structure ........................................................................................................... 9 2.2.2 Features............................................................................................................ 9 2.2.3 Licensing........................................................................................................... 9 2.3 PPAEngine ..................................................................................................... 10 2.3.1 Administrative Tool ......................................................................................... 10 2.3.2 Features.......................................................................................................... 10 2.3.3 Accessing the tool........................................................................................... 10 2.4 Configuration Editor ........................................................................................ 11 2.4.1 Features.......................................................................................................... 11 2.4.2 PPAScheduler ................................................................................................ 11 2.4.3 PPACOM ........................................................................................................ 12 2.5 Installation notes............................................................................................. 12 2.6 Structure ......................................................................................................... 12

3 Overview how to integrate SIMATIC IT PPA with SIMATIC IT PM ............ 13 3.1 Prerequisite..................................................................................................... 13 3.2 Overview of production keys........................................................................... 13 3.3 Overview of Key Performance Indicators (KPIs) ............................................ 14

4 Overview how to integrate SIMATIC IT PPA with SIMATIC BATCH ......... 15 4.1 Electronic Batch data Recording (EBR).......................................................... 15 4.2 Batch Analysis tools........................................................................................ 15 4.3 Batch Reporting .............................................................................................. 16 4.4 Prerequisite..................................................................................................... 16 4.5 Configuration PPA for Batch Data .................................................................. 17 4.5.1 Creating a project ........................................................................................... 18 4.5.2 Creating a Class ............................................................................................. 35 4.6 Tag Collect and IEPAR in SIMATIC PCS 7 .................................................... 43 4.6.1 Using the TAG_COLL and IEPAR in SIMATIC PCS 7 ................................... 43 4.6.2 Tag Collection imported in SIMATIC IT PPA .................................................. 47

Page 4: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Table of Contents

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 4/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

5 Manage PPA KPI without PM and without SIMATIC BATCH integration. 51 5.1 Create PK, Plant Model, Equipment property and PPA Tag .......................... 51 5.2 Create the PPA VB Script to activate/deactivate the KPIs.............................. 55 5.3 How to activate/ deactivate the KPIs created by user .................................... 56 5.4 PPA Class using script as data source........................................................... 62 5.5 Testing KPI created manually......................................................................... 67 5.5.1 PPA Online Monitoring ................................................................................... 69 5.5.2 Using SIMATIC IT Historian ODS to activate/ deactivate the script................ 70 5.5.3 How to compare two different custom KPIs?.................................................. 82

6 References .................................................................................................... 88

7 Abbreviations................................................................................................ 89

Page 5: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Introduction

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 5/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

1 Introduction

1.1 In general

The information to the theme “How to set up a running domain with SIMATIC software” can be found in the knowledge management document “SIMATIC software in a domain”.

Here just in an overview the environment which is used to give the informa-tion to the topic “KPI in PPA without Production Modeler”.

1.2 Test environment

The following scheme shows the Windows active directory domain computers:

Figure 1-1 Scheme of the Windows active directory domain computers

A private IP address band is used with fixed IP addresses.

Page 6: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Introduction

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 6/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

1.3 Equipment for the Windows active directory domain

• 2 Windows active directory domain controllers (DNS, WINS)

• 2 SIMATIC PCS 7 OS-Server (redundant)

• 2 SIMATIC BATCH-Server (redundant)

• 1 SIMATIC PCS 7 Engineering System (ES)

• 2 SIMATIC PCS 7 OS Multiclient + SIMATIC BATCH Client

• 1 SIMATIC IT Production Modeler

• 1 SIMATIC IT Historian + PPA DB

• 1 SIMATIC IT Report Manager/ CAB engineering

• 1 SIMATIC IT components software + SITMesDB

• 1 SIMATIC AS CPU 417 with a CP 443-1

Page 7: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Introduction

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 7/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

1.4 Installed software

Operating systems The used operating systems for the domain computers can be found in the following table. Table 1-1

Station Installation

Windows 2003 MUI (Multilanguage User Interface) with SP2 Internet Explorer V6.0 SP2 (6.0.3790.3959)

Server

Image software Windows XP SP2 Client Image software Windows 2003 MUI (Multilanguage User Interface) with SP2 Domain Controller Internet Explorer V6.0 SP2 (6.0.3790.3959)

SIMATIC software SIMATIC software and its required software packages (e.g. message queu-ing, SQL Server 2005 with SPx...) are installed as needed. The installed software for SIMATIC PCS 7 and SIMATIC IT is the released “Integration Pack 2007” on top of the released SIMATIC Versions. Table 1-2

Product Version

V7.0 SP1

Microsoft SQL 2005 SP1 HF

SIMATIC PCS 7

PCS 7 / SIMATIC IT Integration Pack 2007 Part1 Updates SIMATIC PCS 7 V6.3 SP1 Microsoft SQL 2005 SP2

SIMATIC IT

PCS 7 / SIMATIC IT Integration Pack 2007 Part2 Updates SIMATIC IT

A detailed list of the installed SIMATIC software can be found in the at-tachment A of the document “SIMATIC software in a domain”.

Page 8: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

PPA – Plant Performance Analyzer

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 8/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

2 PPA – Plant Performance Analyzer

SIMATIC IT Plant Performance Analyzer is a long-term archiving package, suitable for storing, validating and aggregating process data into a standard RDBMS (SQL Server). It is part of the SIMATIC IT Historian solution.

SIMATIC IT Plant Performance Analyzer is made up of the following com-ponents:

2.1 Configuration database

The configuration database consists of:

• the views to access the Online and Offline database set.

• all configuration tables.

The configuration tables, updated by means of the configuration tool, con-tain information regarding data acquisition, processing and management, for example:

• Tag definition, description, initial status and destination archive.

• Definition of the events that trigger the acquisitions. These may be:

– SIMATIC IT Event Manager events.

– Cyclic triggers whose frequency and synchronization of the start time are specified.

– On-data-change triggering conditions.

• Definition of source points: source server, as well as the path and mode for acquiring a point (or points, for snapshots and calculated data).

• Definition of validation functions and calculations.

• Definition of classes and groups.

• Definition of Snapshots.

You can define the name of the configuration database.

All configurations are tracked and consequently you can correlate data in the storage system with the configuration that generated the data.

The configuration program is the only program with access to create and modify these tables. However, a read-only access to the configuration in-formation is available via the PPACOM interface.

Page 9: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

PPA – Plant Performance Analyzer

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 9/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

2.2 Storage system

In SIMATIC IT Plant Performance Analyzer, the configuration database and the archives, although physically distinct, are dealt with as a single entity. Together, they are referred to as a "database set".

2.2.1 Structure

A database set, managed as a single database at a project configuration level, is made up of the following physical Microsoft SQL relational data-bases:

• The configuration database

• The online database set

• The offline database set (optional)

2.2.2 Features

The various PPA database sets can be configured to reside on:

• the same SQL Server.

• different instances of the same SQL Server.

• distinct SQL Servers.

2.2.3 Licensing

Every instance of SIMATIC IT PPA must run on a PC with its own license, and can only be connected to one database at a time. Similarly, each in-stance of Configuration Editor can only connect to one database at a time.

However, the user can use a single SIMATIC IT PPA license to configure various databases, test them and then export them to other plants (where they can, in turn, be associated to a completely different PPA instance). Conventions used for naming databases: Table 2-1

Database type Name

Configuration DBNAME (Defined by the user) Online DBNAME_ONLINE_1, DBNAME_ONLINE_2, etc.

(Automatically assigned by the system) Offline DBNAME_STARTDATE_ENDDATE

(Automatically assigned by the system)

Page 10: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

PPA – Plant Performance Analyzer

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 10/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

2.3 PPAEngine

PPAEngine is an out-of-process COM server that:

• reads the configuration from the SIMATIC IT PPA configuration data-base and links to various data sources to retrieve raw data: SIMATIC IT RTDS and PDA via SIMATIC IT internal APIs, generic relational data-base via ODBC and SIMATIC IT PPA via ITFSQLLIB.

• processes data by performing validations and calculations on arrays of tag samples.

• stores the data into the online databases using a dedicated archiving server (PPAARCSRV), which is also responsible for the cyclic shift of the online databases.

2.3.1 Administrative Tool

SIMATIC IT Plant Performance Analyzer Administrative Tool is a high-level configuration client that enables the management of SIMATIC IT PPA pro-jects, including the creation of SIMATIC IT PPA databases.

2.3.2 Features

Administrative Tool allows the user to work with:

• Projects

• Databases

• Configuration Life Cycle

2.3.3 Accessing the tool

To run the Administrative Tool, select “Component > Plant Perform-ance Analyzer (PPA) > Plant Performance Analyzer Con-figuration” from SIMATIC IT Management Console. Only one instance of the tool is allowed throughout the plant.

NOTE The Administrative Tool contains a list of all configured databases, there-by allowing the user to simply select the database to work on. Note that these databases are available to all the other modules as well (e.g. Con-figuration Editor, etc..).

Page 11: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

PPA – Plant Performance Analyzer

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 11/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

2.4 Configuration Editor

The Configuration Editor is the client that enables the configuration of each SIMATIC IT PPA project by defining all the tags and snapshots and allows processing data through PPAEngine.

2.4.1 Features

Configuration Editor allows the user to work with:

• Classes

• Tags

• Resources

• Folders

• Snapshots

• Source Points

• VB script functions

• Script libraries

• Production keys

• Messages

• Equipment

• Properties

Accessing the tool

• In Administrative Tool, right-click the project that you want to edit: this calls up a shortcut menu.

• Select either of the following commands

– New Configuration to create a new configuration.

– Open Configuration to open an existing configuration.

• The Configuration Editor environment is displayed.

2.4.2 PPAScheduler

Is a COM server that makes it possible for SIMATIC IT Production Modeler, as well as other COM-enabled applications, to schedule KPIs and set key values.

Page 12: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

PPA – Plant Performance Analyzer

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 12/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

2.4.3 PPACOM

PPACOM (the COM server used by SIMATIC IT PPA) exposes a set of COM interfaces and methods for browsing the SIMATIC IT PPA item con-figuration and accessing stored data.

2.5 Installation notes

PPAEngine and Configuration Editor must run on a computer with SIMATIC IT Services installed. However, they do not necessarily need to run on the same computer.

PPACOM does not require SIMATIC IT Services (in any case, it normally runs on the same computer hosting the engine).

The SQL Server can reside on any computer.

2.6 Structure

SIMATIC IT Plant Performance Analyzer consists in two environments:

• Administrative Tool

• Configuration Editor

Page 13: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC IT PM

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 13/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

3 Overview how to integrate SIMATIC IT PPA with SIMATIC IT PM

3.1 Prerequisite

The installation of the SIMATIC IT Business Process Modeler component within the SIMATIC IT network is a prerequisite for integrating Plant Per-formance Analyzer with Production Modeler.

SIMATIC IT Production Modeler allows you to organize an enterprise’s as-sets into plant areas according to a hierarchical model fully compliant with the S95 standard. This standard also establishes that one or more proper-ties can be associated with each object of this model.

Because of its tight integration with SIMATIC IT Production Modeler, SIMATIC IT Plant Performance Analyzer can acquire and store plant data while mapping it to Production Modeler’s equipment hierarchy model and to its KPIs.

3.2 Overview of production keys

Definition A Production Key is a particular tag (stored in a dedicated database table) whose alphanumeric value identifies a specific time span/ event corre-sponding to a specific production run.

Features Production keys allow the user to associate SIMATIC IT Plant Performance Analyzer tags with a specific manufacturing context.

For example, you may want to associate one or more tags with a specific Production Operation triggered by SIMATIC IT Production Modeler, or with a specific production batch started by a batch management system.

CPO_ID correlation key SIMATIC IT Production Modeler is provided with a pre-defined correlation key, which is called CPO_ID:

CPO_ID contains the unique ID of the Production Operations executed by SIMATIC IT PM, and is used to correlate all data related to the KPIs (Key Performance Indicators) with the proper Production Operation.

All records containing KPI data stored by SIMATIC IT PPA and the values of this key are correlated via two different relationships:

• Explicit: The "key" used to retrieve data is the PO ID. The correspond-ing SIMATIC IT PPA tag must be configured so that its destination ar-chive is of indexed type.

Page 14: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC IT PM

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 14/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Implicit: The "key" used to retrieve data is the "time stamp". You can extract the corresponding time span (and, consequently, all data stored within it) starting from the PO ID (i.e. from a specific value of the corre-sponding key). The corresponding SIMATIC IT PPA tag must be con-figured so that its destination archive is NOT of indexed type (e.g. tags stored cyclically, with fast acquisition/aggregation cycles).

SIMATIC IT PPA stores the values of this key at run-time, this relating them to the Equipment where the Production Operation was allocated. Conse-quently, data (single value or time series) is stored and associated with the pertinent Production Operation ID.

Other production keys are defined in Configuration Editor.

Defining Key Values Using the COM interface exposed by SIMATIC IT Plant Performance Ana-lyzer, you can set the key value to a significant value (e.g. a Production Operation ID).

PPAEngine will then associate the value of the tag with that of the key at run-time and store both values in an indexed archive.

3.3 Overview of Key Performance Indicators (KPIs)

Key Performance Indicators (KPIs) are values, which can be aggregated in various ways depending on the level of the person who defines and calcu-lates them.

KPIs can refer to different plant areas and can be contextualized and added to the productive process by integrating SIMATIC IT PM and SIMATIC IT PPA.

NOTE Our focus in this document is managing the KPI without SIMATIC IT PM integration using only the SIMATIC IT PPA and its interfaces.

Page 15: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 15/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

4 Overview how to integrate SIMATIC IT PPA with SIMATIC BATCH

The integration with SIMATIC BATCH provides the following functions:

• Electronic Batch data Recording

• Batch Analysis tools

• Batch Reporting

4.1 Electronic Batch data Recording (EBR)

Electronic Batch data Recording consists of logging:

• batches and their recipe header information.

• the batch stepping sequence.

• batch-related messages.

• batch-related measures.

All events related to the batch stepping sequence are traced in SIMATIC IT Plant Performance Analyzer.

These events are related to the following elements:

• Batch/Control Recipe

• Recipe Unit Operation

• Recipe Operation

• Recipe Phase

All relevant information necessary for Batch analysis and Batch reporting is stored for each element. This information includes:

• Batch/Recipe header information

• Recipe Procedural Elements parameters

All stored data allows you to rebuild/display the complete batch stepping sequence (recipe element executed - with start and end time - plus addi-tional information).

4.2 Batch Analysis tools

Batch Analysis tools consist of:

Page 16: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 16/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Message viewer, which allows you to display, sort and filter messages stored by SIMATIC IT Plant Performance Analyzer.

• Production viewer, which allows you to display batches traced by SIMATIC IT PPA, along with their characteristics and status (tabular view).

4.3 Batch Reporting

SIMATIC IT Report Manager provides batch-related standard reports, which are based on data collected by SIMATIC IT Plant Performance Ana-lyzer. Available standard report types are:

• Electronic Batch data Report (EBR)

• Batch Comparison Report

• Batch Material Consumption Report

• Batch Overview Report

Electronic Batch data Report (EBR) This report contains all information related to the batch, (e.g. Batch charac-teristics, Recipe header information, Stepping sequence (with parameters, collected measures, messages and Bill of Materials)).

Batch Comparison report Compares the actual values of all parameters (on RP, RUP, ROP and RPH levels) for the selected batches. This is only practical if the selected batches are based on the same recipe.

Batch Material Consumption report The aggregated amount of consumed input materials is given (per material definition) for the selected Order categories. Since this is a drill-down re-port, it is possible to zoom in on the (aggregated) amount per order and even further to the amount per batch.

Batch Overview report Displays header information regarding batches that comply with a certain criterion. As an example, the batches with an excessive value for a certain phase parameter are given.

4.4 Prerequisite

On the Historian Server machine must be installed:

• Full Services

Page 17: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 17/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• SIMATIC IT BPM

• Historian Server (including PPA, PDA, LTA and HDD)

• Install additionally the Open PCS7 + PCS7_COMMUNICATION_IF_V7.0+SP1 software from CD2 of the in-tegration pack 2007

• SIMATIC IT Compliance Service (optional)

NOTE Using the SIMATIC manager, configure the SIMATIC IT Historian ma-chine as a SPOSA station inside the SIMATIC PCS 7 project/ multiproject (see appendix B in the document „Data exchange between SIMATIC PCS 7 / SIMATIC BATCH and SIMATIC IT Historian“ for a detailed de-scription).

On the Database Server must be installed:

• MS SQL Server 2005 SP2 for SIMATIC IT

• SIMATIC IT PPA SQL Extension DLL

• SIMATIC IT BPM Scripts

On the Report Manager machine (optional) must be installed:

• SIMATIC IT Report Manager inclusive Business Object

4.5 Configuration PPA for Batch Data

The following operations must be performed in order to permit integration with SIMATIC BATCH.

In SIMATIC IT PPA:

• Creating a project

• Creating a class

Page 18: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 18/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

4.5.1 Creating a project

• Start the PPA Server on the Historian Server machine from the man-agement console “Component > Plant Performance Analyzer (PPA) > Plant Performance Analyzer Server”. Alternative you can use the autostart function of the Management Console.

Figure 4-1 Run Plant Performance Analyzer Server

• You can check if the PPA Server is running using the tab Management Control Task List to check.

Figure 4-2 Check PPA Server is running

• Start the Plant Performance Analyzer Configuration on the Historian Server machine from the management console “Component > Plant Performance Analyzer (PPA) > Plant Performance Ana-lyzer Configuration”

Page 19: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 19/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 4-3 Run Plant Performance Analyzer Configuration

• The PPA Administration tool window will open and you can create a new project following these steps:

• In Administrative Tool, select the “Project > Add” command: The Project Configuration Wizard is started. Click “Next”.

Figure 4-4 Add Project wizard

Page 20: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 20/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Select the SQL Server Instance and click “Next”.

Figure 4-5 SQL Server instance

Page 21: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 21/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Enter the SQL Server Login parameters and click “Next”.

Figure 4-6 SQL Server Login

Page 22: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 22/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– In the PPA Database Set Configuration dialog box select the “Add a new database set” radio button, and click “Next”.

Figure 4-7 Select new Database set

Page 23: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 23/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Choose a name for the new PPA Database Set (here Color) and click “Next”.

Figure 4-8 Create new Database set

Page 24: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 24/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Choose the Configuration Database location and click “Next”.

Figure 4-9 PPA Database set location

Page 25: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 25/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 4-10 PPA Database set location

Page 26: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 26/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Set the Number of Online Databases, and click “Next”.

Figure 4-11 Number of Online Databases

Page 27: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 27/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Define the Online Database Set location / Transaction Log location and click “Next”.

Figure 4-12 Select PPA Online Database set location / Transaction Log location

Page 28: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 28/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Enter the Online Database Set parameters "Initial Transaction Log Size" and click “Next”.

Figure 4-13 PPA Online Database set parameters / Initial Transaction Log size

Page 29: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 29/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Define the PPA Server (here SITHIST) and click “Next”.

Figure 4-14 Define PPA Server

Page 30: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 30/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– In the Project Type Definition dialog box, select the "SIMATIC BATCH Integration" check box to connect the engine to SIMATIC BATCH. Optional select the “Include batch-related tags” check box, to enable the automatic creation of tags.

Figure 4-15 Define Project Type

Page 31: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 31/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Define Electronic Signature Assignment (optional) and click “Next”.

Figure 4-16 Define ESIG (optional)

Page 32: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 32/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Define the Offline Database Set location parameters and click “Next”.

Figure 4-17 PPA Offline Database set parameters

– If you select the same Online and Offline Database Location the system shows you an error.

Figure 4-18 Error Online and Offline location

Page 33: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 33/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Select in this case a different Offline Database location and click “Next”.

Figure 4-19 Offline Database Set location

Page 34: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 34/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Set the Number of Offline Databases and click “Next”.

Figure 4-20 Number of Offline Databases

– Click “Next”.

Page 35: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 35/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Click “Finish”.

Figure 4-21 Add Project Wizard Finish

4.5.2 Creating a Class

Overview of classes A class is a template used for predefining shared data source and acquisi-tion settings for multiple tags and snapshots. Creating a tag or snapshot starting from a class will result in the tag or snapshot automatically inherit-ing shared parameters. In addition, any subsequent changes to parameters defined at a class level will be inherited by all tags and snapshots in that class.

NOTE Classes are a pre-requirement for tags and snapshots, i.e. when creating a tag or snapshot, you must first assign it to a class. If no existing class has suitable parameters, you must create a new one. No tag or snapshot can be created without first defining its class.

Page 36: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 36/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Creating a Class for Batch Data A Batch class is used to import batch tags, i.e. the imported tags inherit its features.

A default Batch class (whose parameters can be modified) is provided and cannot be deleted. However, a new Batch class can be created and set as the default one.

Figure 4-22 Default SIMATIC_BATCH Class

To create a new Batch class follow these steps:

• In Configuration Editor, click the “Classes” button on the Edit-ing/Development Bar.

Figure 4-23 Classes environment

Page 37: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 37/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Select the “File > New > Class” command which starts the New Class Configuration Wizard. Click “Next”.

Figure 4-24 New class configuration

Figure 4-25 New class configuration wizard

Page 38: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 38/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• In the Class definition dialog box, type the name of the new class in the Class Name edit box, select “SIMATIC_BATCH” in the Data Source drop down list. Then select the "Default Class" check box to set the class as default while importing from Business Process Modeler.

Figure 4-26 Class definition

Figure 4-27 Class definition

• Click “Next”.

Page 39: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 39/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Define the Acquisition Event and click “Next”.

Figure 4-28 Acquisition Event definition

Page 40: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 40/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Define the Acquisition Buffer and click “Next”.

Figure 4-29 Acquisition Buffer definition

Page 41: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 41/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Set the Initial Status and click “Next”.

Figure 4-30 Initial Status definition

Page 42: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 42/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Set the Destination Folder and click “Next”.

Figure 4-31 Destination Folder Definition

• Click “Finish”.

Figure 4-32 NewClass_Batch created

Page 43: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 43/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

4.6 Tag Collect and IEPAR in SIMATIC PCS 7

Our goal is to archive one or more tags during the runtime of a specific phase. To do this we can use the Tag Collect block and the IEPAR blocks.

The Tag Collect block (TAG_COLL) serves as a collector block for the IEPARs (Equipment Parameter Module) used in transition conditions in the BATCH recipe editor and that are not available as parameters in the phase.

Process tags can also be included as parameters that are used in the batch measured value acquisition. The parameters of TAG_COLL are purely ac-tual values and the SP_VAL inputs are therefore not written. Only ACT_VAL and QACT_VAL are significant.

The IEPAR is used to set the desired values and to collect the actual val-ues. The signal applied to the inputs SP_VAL or ACT_VAL is transferred to the outputs Q_SP_VAL or QACT_VAL respectively. SP_VAL is set typically by the batch control or the IEPH faceplate, ACT_VAL by the user program.

4.6.1 Using the TAG_COLL and IEPAR in SIMATIC PCS 7

In the Test plant we collect the Reactor temperature during the heating and cooling phase.

Figure 4-33 TAG_COLL and IEPAR_RE example

• Open the RC01_Temp chart and insert the TAG_COLL and the IEPAR_REAL blocks.

• Open the TAG_COLL properties, change block name and insert the mnemonic name “Temp_RC” in the F_TYPE field.

• Connect the EPE_CONN TAG_COLL output to the EPE_CONN IEPAR_REAL input.

Page 44: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 44/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Connect the ACT_VAL of IEPAR_REAL input to the tag desired.

• Right click on the QACT_VAL output of the IEPAR_REAL and select the Object Properties. Select the “Archiving” mode in the Archive box.

Figure 4-34 IEPAR_REAL configuration

• Compile and download to the AS

Page 45: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 45/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Open the SIMATIC BATCH configuration on the Multi Project level and verify the “Archive measured variable” is checked

Figure 4-35 SIMATIC BATCH Multi Project level

Page 46: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 46/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Open the SIMATIC BATCH configuration on the PCell level and “link” the measured variable to the WINCC TAG LOGING

Figure 4-36 SIMATIC BATCH Pcell level – Measured variable empty

Figure 4-37 SIMATIC BATCH Pcell level – Measured variable “linked”

• Compile, generate and propagate the batch

Page 47: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 47/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

4.6.2 Tag Collection imported in SIMATIC IT PPA

If the “SIMATIC BATCH Integration” and “Include batch-related tags” op-tions were selected (see the chapter 4) when you open the PPA configura-tion and select the “Import from BPM” command the system import all WINCC Tag Logging tags linked to the TAG_COLLs defined in the SIMATIC PCS 7 project as KPIs tag.

Figure 4-38 PPA Project Type Definition

Page 48: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 48/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 4-39 PPA TAG_COLL

Page 49: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 49/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 4-40 Batch-related tags imported properties

Page 50: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Overview how to integrate SIMATIC IT PPA with

SIMATIC BATCH

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 50/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

After configuring the formula/recipe and starting the batch, we can use the SIMATIC IT HDD to show the KPIs values archived into the PPA database. This can be seen in the following picture.

Figure 4-41 Using SIMATIC IT HDD to view KPI

For more information about SIMATIC BATCH and SIMATIC IT Historian in-tegration please read the knowledge documentation “Data exchange be-tween SIMATIC PCS7 / BATCH and SIMATIC IT Historian“.

Page 51: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 51/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

5 Manage PPA KPI without PM and without SIMATIC BATCH integration

We can create manually the KPIs without the Production Modeler and SIMATIC BATCH integration and then activate/ deactivate these KPIs using the PPAScheduler functions. To do this we must perform these steps:

1. Create the Production Key (PK).

2. Create the Plant Model.

3. Create the Equipment and its Property.

4. Create the PPA tag .

5. Create Scripts to create the production key and activate/ deactivate the key.

6. Create PPA Class using the Script created as Data Source.

5.1 Create PK, Plant Model, Equipment property and PPA Tag

Follow these steps to create the Plant Model, Equipment property and PPA Tag:

• In the SIMATIC IT Management Console run the PPA Server.

Figure 5-1 Run PPA Server

• When the PPA Administrative tool is running right click to the project and create new configuration from the Scratch.

Figure 5-2 Create new configuration

Page 52: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 52/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• In the PPA Configuration editor click on the “Production Keys ta-ble” and create the “PKTest” Production Key.

Figure 5-3 Create new Production Key

• In the PPA Configuration editor click on the “Class table” and create the Class based on the “RTDS” data source and triggered “On Data Change”. In this class create also the “Tag1” tag with following proper-ties:

Figure 5-4 Class1 details

Figure 5-5 Tag1 Initial Status – External Activation

Page 53: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 53/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-6 Tag1 Source Point Definition – RTDS floating point

Figure 5-7 Tag1 Storage Settings – Indexed Archive

Page 54: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 54/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-8 Class1 and Tag1 overview

• In the PPA Configuration editor click on the “Equipment table” and create the following Plant Model.

Figure 5-9 Plant Model

• Right click on the “Test_Equip_01” to create new Property.

Figure 5-10 Create Property

• Create the property associated to:

– equipment “Test_Equip_01”

– Tag1

– Set as KPI checked

Page 55: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 55/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-11 Test_Equip_01 Property

• Click on the “Tag1” created in the “Class1” to select its Property Defini-tion in the KPI and Target Definition table.

Figure 5-12 Tag1 Select Property – Choose the “Test_Prop_01”

5.2 Create the PPA VB Script to activate/deactivate the KPIs

The COM interface of SIMATIC IT Plant Performance Analyzer is supplied by means of four out-of-process COM components named respectively PPACOM, PPAScheduler, PPAOBCOM and OBCOM.

Page 56: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 56/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

The PPACOM component retrieves data from SIMATIC IT PPA, which can then be used by an application developed by a third party (for example, in Visual Basic).

The PPAScheduler component schedules and activates properties and tags/snapshots, which are configured in SIMATIC IT PPA.

The PPAOBCOM component exposes the functions relative to the custom objects of SIMATIC IT PPA.

The OBCOM component exposes the functions necessary to set and get the values of the custom objects properties created by PPAOBCOM Inter-faces.

5.3 How to activate/ deactivate the KPIs created by user

To manage the KPI created by the user we must follow these steps:

• Create Production Key (PK) object in the PPA Database.

• Sets a specific value for a key and stores the time at which it starts its validity.

• Activate the key.

• Deactivate the key.

• Resets a value previously set for a key on a specific piece of equipment and stores the validity end time of the key.

• Unregister the client from PPAScheduler.

In the following paragraphs we create three user functions:

1. F_SetKey function to set a specific value for a key and store the time at which it starts its validity.

2. F_ScheduleVarByKeyID to activate the key.

3. F_ResetKet to deactivate the key and Reset a value previously set for a key on a specific piece of equipment and store the validity end time of the key.

Create PK object in the PPA Database To create a PK object in the PPA Database please follow these steps:

• In the PPA Configuration Editor click on the Script Library table and create a new library called “KPI_Lib”; right click on the “KPI_Lib” to add new Global Object called “MySch”.

Page 57: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 57/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-13 New Global Object – MySch

• In the PPA Configuration Editor click on the Script Library table and then edit the VBInit source inside the PPA\VBSystem.

• Comment any code in this source using the “ ‘ “ symbol.

• At the end of the VBInit source add these codes:

Dim retval, PK_ID

Set MySch = CreateObject("PPAScheduler.PPASchedulerVBS.1")

retval = MySch.PPAInit("PKTest", PK_ID)

“Dim” allows us to declare some variant type internal variable.

“CreateObject” allows us to create an instance of the object called “PPAScheduler.PPASchedulerVBS.1” and then we can use its functions.

“PPAInit” is a PPAScheduler function and it allows us to register the client for PPASchedulerVBS and create PK object in the PPA Database, it cre-ates also the PK-ID associated to the PK object. This ID is unique.

In this way when the PPA server is started and this configuration has been approved the system runs this script and creates the “PKTest” (in our ex-ample the PK name is hard coded in the script) in the PPA Database.

Unregister the client from PPAScheduler To unregister the client from PPAScheduler please follows these steps:

• Edit the VBEnd source inside the PPA\VBSystem.

• Comment any code in this source using the “ ‘ “ symbol.

• At the end of the VBEnd source add these codes:

Dim retval

retval = MySch.PPAEnd

Page 58: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 58/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Set MySch = Nothing

“PPAEnd” is a PPAScheduler function and allows us to unregister the client from PPAScheduler and performs an implicit reset for every key that has been opened.

“Set MySch = Nothing” destroys the PPAScheduler instance.

In this way when the PPA server will stop the system resets every key and destroys the PPAScheduler instance.

Set a specific value for a key To set a specific value for a key and store the time at which it starts its va-lidity please follows these steps:

• Click on the “KPI_Lib library” and create a new function called “fSetKey” and insert in this function three new parameters:

Table 5-1

Name Type Description

iKeyID RTDS Point Key ID TriggerTime Trigger Time Trigger Time bTriggerTag RTDS Point Trigger Tag

Figure 5-14 fSetKey function and its parameters

• Right click on the “F_SetKey” select Edit Source and insert this code:

Dim retval

If bTriggerTag.Value = 1 Then

retval = MySch.SetKey("Key_"& cstr(iKeyID.Value), _

"Test_Plant\Test_Area_01\Test_Equip_01", _

"Test Key_"& cstr(iKeyID.Value) & " " & _

"in the Test_Plant\Test_Area_01", _

TriggerTime)

Page 59: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 59/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

End If

To avoid that the fSetKey starts automatically when the PPA Server is started we check the bTriggerTag.Value.

The SetKey is a PPAScheduler function and allows us to set a specific value for a key and stores the time at which it starts its validity. The SetKey function has these parameters:

.SetKey (KeyValue, EquipmentName, KeyAttribute, Time) where:

1. KeyValue is run-time key value.

2. EquipmentName is name and full path, starting from the equipment root, of the equipment that the key value refers to. If multiple levels are present, each level is separated by a backslash (\), e.g. Cars\AssemblyLine.

3. KeyAttribute is optional description string associated to the key.

4. Time is validity start time of the data stored in KeyValue, expressed as UTC (seconds from 1/1/1970).

Activate the Key In our test we would like to activate the Cyclic KPI and to do this please fol-low these steps:

• Copy the fSetKey function to the new function called fScheduleVar-ByKeyID.

• Also in this function we have three parameters as in the fSetKey func-tion parameters:

Table 5-2

Name Type Description

iKeyID RTDS Point Key ID TriggerTime Trigger Time Trigger Time bTriggerTag RTDS Point Trigger Tag

• Right click on the “F_ScheduleVarByKeyID” select Edit Source delete all code in this function and insert new:

Dim retval, TimeUTC

If bTriggerTag.Value = 1 Then

retval = MySch.ScheduleProperty("Key_"&cstr(iKeyID.Value), _

"Test_Plant\Test_Area_01\Test_Equip_01", _

TriggerTime, _

Page 60: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 60/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

"Test_Prop_01", _

"\", 1)

End If

Also there to avoid that the fScheduleVarByKeyID starts automatically when the PPA Server is started we check the bTriggerTag.Value.

The ScheduleProperty is a PPAScheduler function and allows us to acti-vate / deactivate a Cyclic or On Event Over Time property or triggers a property On Event. The ScheduleProperty function has these parameters:

ScheduleProperty (KeyValue, KeyEquipment, Time, Property, Equipment, Action) where:

1. KeyValue is run-time key value previously set by the SetKey method.

2. KeyEquipment is name and full path, starting from the equipment root, of the equipment on which the production key was set. If multiple levels are present, each level is separated by a backslash (\), e.g. Cars\AssemblyLine.

3. Time is property scheduling (i.e. activation/deactivation or trigger) time expressed as UTC (seconds from 1/1/1970).

4. Property is name of the property to be scheduled (activated/deactivated or triggered). In association with the equipment it is a member of, it uniquely identifies a SIMATIC IT PPA tag.

5. Equipment is name of the equipment, which Property is a member of. It needs not to coincide with KeyEquipment, but it must be a child of it. The path is relative to KeyEquipment, therefore if they coincide, Equip-ment only consists in the separator (\), otherwise Equipment is ex-pressed as the name and relative path of Equipment, starting with the separator.

6. Action defines the scheduling type. Depending on the type of property, it can assume the following values:

– 1 = Activation: for Cyclic properties, it indicates tag activation; for properties On Event Over Time, it indicates the start of the acquisi-tion interval. Not allowed for properties On Event

– 2 = Deactivation: for Cyclic properties, it indicates tag deactivation; for properties On Event Over Time, it indicates the end of the acqui-sition interval. Not allowed for properties On Event.

– 3 = One shot: applies to On Event properties and means that the trigger occurs at a specific moment rather than over a time range, or that the time range is defined at a configuration level.

Deactivate the Key In our test we would like to deactivate the Cyclic KPI and to do this please follow these steps:

Page 61: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 61/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

• Copy the fSetKey function to the new function called fResetKey

• Also in this function we have three parameters as the fSetKey function parameters:

Table 5-3

Name Type Description

iKeyID RTDS Point Key ID TriggerTime Trigger Time Trigger Time bTriggerTag RTDS Point Trigger Tag

• Right click on the “F_ResetKey” select Edit Source delete all code in this function and insert new:

Dim retval, TimeUTC

If bTriggerTag.Value = 1 Then

retval = MySch.ScheduleProperty("Key_"&cstr(iKeyID.Value), _

"Test_Plant\Test_Area_01\Test_Equip_01", _

TriggerTime, _

"Test_Prop_01", _

"\", 2)

End If

Also here to avoid that the F_ResetKey is started automatically when the PPA Server is started we check the bTriggerTag.Value.

Please read the previous paragraph to have a description about Sched-uleProperty parameters.

Resets a value previously set for a key In the fResetKey function insert this code before the End If instruction at the end of the function:

retval = MySch.ResetKey("Key_"& cstr(iKeyID.Value), _

"Test_Plant\Test_Area_01\Test_Equip_01", _

"Test Key_"& cstr(iKeyID.Value) & " " & _

"in the Test_Plant\Test_Area_01", _

TriggerTime)

Page 62: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 62/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

The ResetKey is a PPAScheduler function and allows us to reset a value previously set for a key on a specific piece of equipment and stores the va-lidity end time of the key. The ResetKey function has these parameters:

ResetKey (KeyValue, EquipmentName, KeyAttribute, Time) where:

1. KeyValue is run-time key value previously set by the SetKey method.

2. EquipmentName is name and full path, starting from the equipment root, of the equipment containing the property that the key value refers to. If multiple levels are present, each level is separated by a backslash (\), e.g. Cars\AssemblyLine.

3. KeyAttribute is optional description string associated to the key.

4. Time is validity start time of the data stored in KeyValue, expressed as UTC (seconds from 1/1/1970).

5.4 PPA Class using script as data source

After creating our functions fSetKey, fScheduleVarByKeyID and fResetKey now we must create a new class based on the script to trigger our function. To do this please follows these steps:

• In the Class table create a new class with these configurations:

Figure 5-15 Script_Class Data Source

Page 63: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 63/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-16 Script_Class Trigger Condition On Data Change

Leave the “Default Data” and” Folder” to the default values.

• In the Script_Class create also three tags, these tags are needed to ac-tivate the enclosed script:

– Tag_SetKey This tag is created and associated to the fSetKey function and we need to define some parameters for this function.

Figure 5-17 Custom Function associated to the Tag

Page 64: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 64/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-18 Set Parameters

– Click on the parameter name the Set Value button will be able, now we can choose RTDS integer variable connected to our Tag. When the popup Set Parameter will appear select the check box “Set as Trigger” for the iKeyID tag.

Page 65: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 65/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-19 Choose RTDS point

– Select RTDS Boolean point associated to our “bTriggerTag”. In this case do not check the Set as Trigger. Let other “Tag_SetKey” set-ting parameter skipped default.

– Tag_Schedule This tag is created and associated to the fScheduleVarByKeyID and also there we must set some parameters for this function. Note that the bTriggerTag is connected at the same RTDS boolean point used for the fSetKey, in this way when the RTDS boolean trigger tag is true all the functions connected will be enabled at the same time.

Page 66: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 66/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-20 Custom Function associated to the Tag

Figure 5-21 Set Parameters

– Tag_ResetKey This tag is created and associated to the fResetKey and also there we must set some parameters for this function. Note that the bTrig-gerTag is connected to the same RTDS boolean point used for the fSetKey and fScheduleVarByKeyID, in this way when the RTDS boolean trigger tag is true all the functions connected will be en-abled at the same time.

Figure 5-22 Custom Function associated to the Tag

Page 67: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 67/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-23 Set Parameters

In summary we have created these RTDS tags to manage our scripts: Table 5-4

RTDS Tag Type PPA Tag Script

Test_PB0 Boolean Trigger_Test_PB0 fSetKey / fScheduleVarByKeyID / fResetKey

Test_PI1 Integer SetKey_Test_PI1 fSetKey Test_PI2 Integer Schedule_Test_PI2 fScheduleVarByKeyID Test_PI3 Integer ResetKey_Test_PI3 fResetKey

5.5 Testing KPI created manually

After approving the new configuration and activating the new configuration we can open the PPA online monitoring environment to test our script.

The following Windows Task Manager List shows the different processes listed before/after running PPA server.

Page 68: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 68/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-24 Windows Task Manager list before PPA server running

Figure 5-25 Windows Task Manager list after PPA server running

Page 69: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 69/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

5.5.1 PPA Online Monitoring

When the PPA Online Monitoring opens, click on the Equipment table, ex-pand the Test_Plant\Test_Area_1 and click on the “Test_Equip_01” the system shows us the Test_Prop_01 property details.

Figure 5-26 PPA Online Monitoring – Test_Equip_01

Figure 5-27 PPA Online Monitoring – Test_Prop_01 details

In the Test_Prop_01 details we have:

• Name – Property Name

• Status can have one of the following status:

– Enable Running – The engine is archiving the item according to the desired configuration.

– Disabled Online – The engine is not managing the item and no event related to the item is being checked for.

– Idle Enabled – The item is currently not being archived because the trigger event is inactive.

– Configuration Error – PPAEngine is ignoring the item due to a con-figuration error detected at run-time by the engine.

– Runtime Error – This error can occur only on items associated to a SCRIPT data source, either if the function generates a VBScript run-time error or if it times out. Unlike with configuration errors, in case of a run-time error PPAEngine will retry to manage the item at the next trigger and, if the error does not occur any more, PPAEngine restarts archiving the item.

• Description – Property description

• KPI Type – For scheduling the KPI by Production Modeler.

• Type – Type of the associated item:

Page 70: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 70/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

– Tag

– Snapshot

• Item Name – Tag name associated to the Property

• KPI – Property as a KPI or not

5.5.2 Using SIMATIC IT Historian ODS to activate/ deactivate the script

In the 5.4 we associated some RTDS points to our script. Now in the SIMATIC IT Management Console we must start the Operation Debugging Support (ODS) to manage these tags.

Figure 5-28 Run ODS

When the ODS window is open, create a new monitor and add the tags as-sociated to the script before.

Figure 5-29 Create new ODS monitor

We can add RTDS tags in the new ODS monitor clicking on the icon

Page 71: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 71/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-30 Add tags in the ODS monitor

The PPA Online Monitoring and the SIMATIC IT Historian ODS are dis-played in the following figure:

Figure 5-31 PPA Online Monitoring and ODS

To activate the script we need to set the Test_PB0 Trigger Tag to TRUE, then changing value for:

• Test_PI1 tag to activate the function fSetKey – the key registered in the PPA database will have the name KEY_[tag value]

• Test_PI3 to activate the function fResetKey

• Test_PI2 to activate the function fScheduleVarByKeyID

Page 72: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 72/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Changing the Test_PI1value to 104 and then open the SQL Enterprise Manager we can see the Key created in the PPA SQL table.

Figure 5-32 KEY created in the PPA SQL database

In this SQL table we have the information about our KEY:

• KeyValueID – unique Key Value ID associated to the our Key.

• KeyID – Key ID associated to the PKTest created using the PPASched-uler function PPAInit. We can check this information opening the SQL.

Figure 5-33 KeyID associated to the PKTest created using P

• KeyValue – Key name

• Description – Key description

• Time / Msec – Validity start time of the data stored in KeyValue, ex-pressed as UTC (seconds from 1/1/1970).

• EquipmentID – Unique ID associated to the equipment where the prop-erty is contained.

Changing the Test_PI2 value to 104 we activate the fScheduleVarByKeyID script function and start to archive tag value and associate these samples to our PKTest.

Page 73: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 73/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-34 Activate fScheduleVarByKeyID script function

Right click on the “Tag1” and select the Query Statistics we can check the number of samples archived. When these samples are enough to be visual-ized by a trend we can stop the archiving

Figure 5-35 Activate Query Statistics

Figure 5-36 Samples number in the Query Statistics window

Page 74: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 74/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Changing the Test_PI3 value to 104 we activate the fResetKey script func-tion and stop to archive tag value.

Figure 5-37 Activate ffResetKey script function

Opening the SQL Enterprise Manager we can see the KEY stopped to ar-chive the samples.

Figure 5-38 KEY_31 stopped by fResetKey function

To show the archived samples we must open the SIMATIC IT Historian HDD.

Figure 5-39 Run SIMATIC IT HDD

When the HDD window is open create a new Production Viewer.

Page 75: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 75/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-40 Production Viewer

When the new production viewer window is open, click on the configuration wizard to configure it.

Figure 5-41 Configure Production Viewer

Page 76: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 76/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-42 Click on "Next" button to continue

Page 77: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 77/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-43 Choose ONLINE archive and click on "Next" button to continue

Figure 5-44 In the Key drop down choose PKTest Production Key

Page 78: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 78/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-45 Choose appropriate time stamp to view the PK

Figure 5-46 Click on "Finish" button to finish the Configuration Wizard

Page 79: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 79/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-47 Production Key General viewer

In the General tab of this viewer we can have information about our KEY_31 KPI:

• Key Value (name)

• Key description

• Start time to archive samples

• End time to archive samples

• Equipment where the property is contained

Page 80: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 80/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-48 Production Key KPI viewer

In the KPI tab of this viewer we can have information about our KEY_31 KPI:

• Property name

• Value - are there samples archived for this KPI or not

• Equipment path where Equipment property is contained

• Item name

Right click on the “Test_Prop_01” property name and click on “Add To New > Standard Trend” we can show these value in the HDD trend format.

Figure 5-49 Adding KPI value in the HDD Standard Trend

Page 81: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 81/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Figure 5-50 KPI values

The Start to Archiving corresponds to the time when the fSetKey function started. The Sample Archived corresponds to the time when the fSched-uleVarByKeyID started and the Stop to Archiving corresponds to the time when the fResetKey function started.

Page 82: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 82/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

5.5.3 How to compare two different custom KPIs?

There is no system function which allows you to compare two different cus-tom KPIs archived in the PPA DB. The PPA exposes some COM methods and using the Microsoft VB we can retrieve all information and data from our KPI. In the following steps one example how to extract the KPIs value using VB is shown.

Example to retrieve the custom KPIs value using VB There are five steps you must perform if you need to manage the custom KPIs archived in the PPA DB:

1. Retrieve the PPA project configuration as PPA DB, PPA Server and SQL Server.

2. Open the connection to the PPA Project.

3. Get the KPIs list.

4. Select the KPI and then get the KEY list associated to this KPI.

5. Retrieve the values archived selecting the KEY in KEY list.

Create one function to retrieve the PPA project configuration like this:

Private Sub GetPPAProjList_Click()

Dim strdelc As Variant

GetPPAProjList.Enabled = False

Set GetProjList = New PPAProjectBrowsing

strdelc = GetProjList.GetProjectList(projects)

If strdelc = PPA_SUCCESS Then

PPADB.Clear

For i = 1 To projects.Count

PPADB.AddItem (projects.Item(i).SQLDatabase)

Next

PPADB.Text = projects.Item(1).SQLDatabase

PPASrv.Text = projects.Item(1).PPAServer

SQLSrv.Text = projects.Item(1).SQLServer

PPADB.Enabled = True

OpenConnect.Enabled = True

Else

MsgBox "An error occurred in GetProjectList " & strdelc & ".", vbCritical

Page 83: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 83/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

End If

GetPPAProjList.Enabled = True

End Sub

After that we must connect to the PPA server using the information coming from the previous function:

Private Sub OpenConnect_Click()

Dim RetVal

' connect to DB-the Connect is Public Function pro-vide to create some PPA object and

' open the connection to the SQL instance. Return PPA_RETURN_VALUE

RetVal = TestPPA.Connect(SQLSrv.Text, PPADB.Text, PPASrv.Text)

If (RetVal <> PPA_SUCCESS) Then

MsgBox "An error occurred in PPABrowsing connecting to " & strSQL & ".", vbCritical

Else

MsgBox "PPABrowsing connected to " & SQLSrv.Text

PPAPKList.Enabled = True

GetPKList.Enabled = True

OpenConnect.Enabled = False

PPADB.Enabled = False

End If

End Sub

Page 84: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 84/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

The property Connect in the previous function is the custom property like this:

Public Function Connect(ByVal strSQL As String, ByVal strPPA_Db As String, ByVal strPPA) As PPA_RETURN_VALUE

Dim RetVal As PPA_RETURN_VALUE

Set MySch = CreateObject("PPAScheduler.Schedule.1", strPPA)

Set MyAccVBS = CreateObject("PPACOM.PPAAccessVBS.1", strPPA)

Set MyBrwVBS = CreateOb-ject("PPACOM.PPABrowsingVBS.1", strPPA)

Set GetServ = CreateOb-ject("PPAScheduler.PPAItemManagement.1", strPPA)

Set PKAccessCli = CreateOb-ject("PPAOBCOMCLI.PPAProductionKeyAccess.1", strPPA) ' PPAOBCOMCli.PPAProductionKeyAccess.1

Connect = MyBrwVBS.OpenConnection(strSQL, strPPA_Db)

End Function

Create one function to retrieve all KEY associated to the KPI selected. We use one data grid to fill the result.

Private Sub GetKeyList_Click()

Dim RunSQLErr As String

Dim strSQL As String

strSQL = "select distinct t1.keyvalue, t1.keyvalueid, t2.equipmentname, t4.PropertyName "

strSQL = strSQL & "From ((dbo.view_read_keyvalue t1 join dbo.Equipment t2 on t1.keyid = 4 and "

strSQL = strSQL & "(t2.equipmentid = t1.equipmentid)) join dbo.equipment_property t3 on "

strSQL = strSQL & "(t3.equipmentid = t1.equipmentid) and (t3.version_id = (select distinct t6.Version_Id from "

strSQL = strSQL & "(dbo.version_history t7 Join (dbo.ProductionKey t5 Join dbo.Productionkey_version t6 on "

strSQL = strSQL & "t5.keyname = 'PKTest') on t7.is_current = 1 and t6.Version_Id = t7.Version_Id))) Join "

strSQL = strSQL & "dbo.Property t4 on (t3.PropertyID = t4.PropertyID)) Order by t1.keyvalue ASC"

Page 85: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 85/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

RetVal = RunSQL(strSQL, RunSQLErr)

Set DataGrid2.DataSource = Nothing

Set DataGrid2.DataSource = recTemp

DataGrid2.ReBind

TotalRecKeyVal.Text = "Total Records: " & rec-Temp.RecordCount

Set recTemp = Nothing

End Sub

Selecting one of the KEY present in the KEY list we can retrieve the values associated to this KEY.

Private Sub DataGrid2_SelChange(Cancel As Integer)

Dim RunSQLErr As String

Dim strSQL As String

If ((DataGrid2.Row > -1) And (DataGrid2.SelStartCol = -1)) Then

DataGrid2.Col = 1

KeyValueID = DataGrid2.Text

strSQL = "select distinct Point, Name, PointID from PPA_Test.dbo.Point t1 "

strSQL = strSQL & "where t1.PointID in (select t2.PointID from PPA_Test.dbo.Tag t2 "

strSQL = strSQL & "where t2.TagID in (select dis-tinct v1.TagID from View_Read_IndexedFloatArchive v1 "

strSQL = strSQL & "where v1.KeyValueId = '" & Key-ValueID & "')) order by Point"

RetVal = RunSQL(strSQL, RunSQLErr)

Set DataGrid3.DataSource = Nothing

Set DataGrid3.DataSource = recTemp

DataGrid3.ReBind

GetValArch.Enabled = True

GetTagList.Enabled = True

Else

End If

End Sub

Page 86: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 86/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Also in this function we use one data grid to fill the result. The RunSQL in the previous function is the custom function like this:

' This function allow us to run the SQL query, but this query must start with SELECT statement.

' The return is recTemp global variable declaired in General/Declarations

Public Function RunSQL(ByVal strSQL As String, ByRef strError As String, Optional ByRef varValues As Vari-ant, _

Optional ByVal msgBoxAdv As Boolean) As Long

Dim dbConnection As ADODB.Connection ' data-base connection object

Dim strTemp() As String

RunSQL = -1

strTemp = Split(strSQL, " ")

' What kind of SQL Statement ?

Select Case Trim(Ucase(Replace(strTemp(0), """", "")))

Case "SELECT"

Set dbConnection = New ADODB.Connection

' The connection string in this case is hard-coded but we can also read it from the txt file

dbConnection.ConnectionString = "Pro-vider=SQLOLEDB.1;Password=”password”;Persist Security Info=True;User ID=sa;Initial Catalog=PPA_Test;Data Source=SITCOMP\SQL05;"

dbConnection.Open

Set recTemp = New ADODB.Recordset

recTemp.Open strSQL, dbConnection, adOpen-Static, adLockReadOnly, adCmdText

Case Else

strError = "Unknown/Wrong SQL Statement (only SELECT statement SQL Query supported): " & strSQL

End Select

Set dbConnection = Nothing

End Function

Page 87: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Manage PPA KPI without PM and without SIMATIC

BATCH integration

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 87/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Now we have the KPI values and we can use Microsoft Excel to compare or manage these data.

Figure 5-51 KPI values from Microsoft VB

Page 88: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

References

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 88/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

6 References

• From SIEMENS software installation path:

– ..\ICUBESYS\SIT\BIN\PPACOMENG.CHM

• From SIEMENS sources:

– SIMATIC IT online help

• From the SIEMENS Service & Support Portal:

– “SIMATIC software in a domain”

– “Data exchange between SIMATIC PCS7 / BATCH and SIMATIC IT Historian“

Page 89: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Abbreviations

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 89/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

7 Abbreviations

Abbreviations used in this manual:

Table 7-1

Abbreviation Complete name

AD Active Directory API Application Programming Interface AT Audit Trail BPM Business Process Modeler BCC Batch Control Center CAB Client Application Builder CH_DI Channel Digital Input CH_DO Channel Digital Output CIL Cross Industry Library COM Component Object Model CP Communication Processor CPU Central Processor Unit CS Compliance Service DB Data Base DCF Distributed Configuration File DCOM Distributed Component Object Model DHCP Dynamic Host Configuration Protocol DCS Distribution Control System DIS Data Integration Service DNS Domain Name Service EBR Electronic Batch Reporting ES Engineering System ESIG Electronic SIGnature FAQ Frequent Asked Question GMP Good Manufacturing Practice HDD Historical Data Display HF Hot Fix HMI Human Machine Interface IP Internet Protocol ISA Industry Standard Architecture KPI Key Performance Indicator LTA Long Term Archiving MM Material Manager

Page 90: SIMATIC PCS 7 – SIMATIC IT – Integration - Siemens AG · SIMATIC PCS 7 / SIMATIC IT Integration Pack 2007 ... 1.3 Equipment for the Windows active directory domain ... 4.1 Electronic

Abbreviations

PPA KPIs without Production Modeler 26639558

V 2.0 22.07.08 90/90

Cop

yrig

ht ©

Sie

men

s A

G 2

008

All

right

s re

serv

ed

Abbreviation Complete name

MR Master Recipe MUI Multilanguage User Interface ODBC Open Data Base Connectivity OPC Ole for Process Communication OS Operator Station OSM Optical Switch Module OU Organizational Unit PLC Programmable Logical unit PPA Plant Performance Analyzer PDA Plant Data Archive PDefM Production Definition Manager PK Production Key PM Production Modeler PRS Production Suite RTDS Real Time Data Server SFC Sequence Function Chart SIT SIMATIC IT SQL Structured Query Language SP Service Pack UPS Uninterruptible Power Supplies UTC Universal Time Coordinated VB Visual Basic WINS Windows Internet Naming Service