application – operations diary · applications & tools answers for industry. cover sheet...

34
Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

Upload: others

Post on 02-Sep-2019

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

Applications & Tools

Answers for industry.

Cover sheet

Application – Operations Diary

WinCC Flexible 2008 SP1

Application Description June 2010

Page 2: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

Industry Automation and Drives Technologies Service & Support Portal

This document is an article from the Internet service portal of Siemens AG, Industry Automation and Drive Technologies. The following link takes you directly to the download page for this document.

http://support.automation.siemens.com/WW/view/en/42637128

If you have any questions regarding this Application Description, please send an e-mail to:

[email protected]

Page 3: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

Operations Diary V1.0, Entry-ID: 42637128 3

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

s

SIMATIC Operations Diary

Acquisition of power data over various periods of time

Automation Task

1

Automation Solution

2 Functional Mechanisms of this Application

3

Operation of the Application

4

Further Notes, Tips and Trick, etc.

5

Literature

6

History

7

Page 4: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

Warranty and Liability

4 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

Warranty and Liability Note The application examples are not binding and do not claim to be complete

regarding configuration, equipment 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 for ensuring that the described products are used correctly. These application examples do not relieve you of the responsibility to use sound practices in application, installation, operation and maintenance. When using these Application Examples, you recognize that we 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 this application example and other Siemens publications – e.g. catalogs – the contents of the other documents have priority.

We accept no liability for information contained in this document.

Any claims against us – based on whatever legal reason – resulting from the use of the examples, information, programs, engineering and performance data etc., described in this Application Example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract (“wesentliche Vertragspflichten”). However, claims for damages arising from a breach of a duty under this 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 do not imply a change in the burden of proof to your detriment.

It is not permissible to transfer or copy these Application Examples or excerpts thereof without express authorization from Siemens Industry Sector.

Page 5: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

Table of Contents

Operations Diary V1.0, Entry-ID: 42637128 5

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

Table of Contents Warranty and Liability ................................................................................................. 4 1 Automation Task................................................................................................ 6 2 Automation Solution ......................................................................................... 8

2.1 Overview of the overall solution ........................................................... 8 2.2 Description of the core functionality ..................................................... 9 2.2.1 SIMATIC S7-300 controller .................................................................. 9 2.2.2 WinCC flexible ES / operator panel...................................................... 9 2.2.3 Overview and description of the user interface.................................. 10 2.2.4 Sequence of the core functionality operations ................................... 13 2.3 Hardware and software components used......................................... 14

3 Functional Mechanisms of this Application ................................................. 15 3.1 Functionality, SPS program blocks .................................................... 17 3.1.1 Program details of function block FB100 ........................................... 17 3.1.2 Program details of function block FB102 ........................................... 18 3.1.3 Program details of function block FB210 ........................................... 19 3.1.4 Program details of the data blocks..................................................... 21 3.2 Functionality, HMI program ................................................................ 22 3.2.1 Program details of the "01_Hour" view .............................................. 22 3.2.2 Program details of the "02_Day" view................................................ 23 3.2.3 Program details of the "03_Week" view............................................. 24 3.2.4 Program details of the "04_Month" view ............................................ 25 3.2.5 Program details of the "05_Year_Overview"...................................... 26 3.2.6 Program details of the scripts............................................................. 27 3.2.7 Recipes .............................................................................................. 28 3.2.8 Scheduler ........................................................................................... 28

4 Operation of the Application .......................................................................... 29 5 Further Notes, Tips and Tricks, etc. .............................................................. 33 6 Literature .......................................................................................................... 34

6.1 Literature ............................................................................................ 34 6.2 Internet links ....................................................................................... 34

7 History............................................................................................................... 34

Page 6: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

1 Automation Task

2.1 Overview of the overall solution

6 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

1 Automation Task

Introduction

The tracing of energy consumption over various periods of time is an important issue in many areas of the manufacturing and processing industry.

At what times did energy consumption increase?

Furthermore, the daily variations are also important for the energy generation through solar, wind and water power plants.

How much energy has been produced at what times?

This application is suitable for both use cases. The input and output of electrical power can be evaluated and displayed over different periods of time.

Overview of the automation task

The function principle of this application is demonstrated by the example of a wind power plant. The figure below provides an overview of the automation task.

Figure 1-1

Page 7: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

1 Automation Task

2.1 Overview of the overall solution

Operations Diary V1.0, Entry-ID: 42637128 7

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

Description of the automation task

The power generated by a wind turbine is recorded over various periods of time and can then be displayed graphically on an operator panel.

Graphical analysis is available for the following time periods:

Hourly overview. The amount of power generated is displayed in "minute intervals" over the course of one hour.

Daily overview. The amount of power generated is displayed in "one-hour intervals" over the course of 24 hours.

Weekly overview. The amount of power generated is displayed in "one-day intervals" over the course of one week.

Monthly overview. The amount of power generated is displayed in "one-day intervals" over the course of one month.

Yearly overview The desired year and month can be selected in a dialog box. The progress is then displayed in "one-day intervals".

The acquired data can also be stored on a storage medium in the form of a "CSV file".

Page 8: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Automation Solution

2.1 Overview of the overall solution

8 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

2 Automation Solution

2.1 Overview of the overall solution

Scheme

The figure below shows a schematic illustration of the main components of this solution.

Figure 2-1

SIMATIC S7 300 controller

SIMATIC HMI panel

Exclusion

This application does not include a description of

STEP 7

WinCC flexible

Basic knowledge of these topics is assumed.

Furthermore, this application does not stipulate the type of measuring device to be used for power data acquisition.

One example of a suitable measuring device is the SENTRON PAC3200.

Measuring device to acquire the generated power,

e.g. SENTRON PAC3200

Page 9: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Automation Solution

2.2 Description of the core functionality

Operations Diary V1.0, Entry-ID: 42637128 9

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

2.2 Description of the core functionality

2.2.1 SIMATIC S7-300 controller

The attached project includes the configuration for a SIMATIC S7-300 controller.

The generated power is continuously registered by means of a function block. In this application, however, the value for the generated power is provided by a simulation program and transmitted to the function block as "DINT value". When using this application in practice, you must transmit "your" actual values to this function block.

The function block uses the data received to calculate the power generated per minute and transfers these values to the relevant variables. The function block calculates a total of 60 "minute values" – one value for every minute – and transmits them to the operator panel.

Note For the acquisition and output of the generated power to the PLC you may use the multifunction meter PAC3200, for example.

2.2.2 WinCC flexible ES / operator panel

The project attached to this document includes a WinCC flexible project that is integrated in STEP 7.

The "minute values" determined in STEP 7 are read-in via the operator panel. Further calculation for the defined time periods is effected with the help of scripts.

Defined time periods:

hourly overview

daily overview

weekly overview

monthly overview

yearly overview

For each of these time periods, a separate "view" is available. The acquired data is displayed on the HMI panel in the form of bar chart diagrams.

Furthermore, the values are stored as recipes and as a "CSV file" at hourly intervals.

This stored data can be read out and displayed on a separate page.

Page 10: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Automation Solution

2.2 Description of the core functionality

10 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

2.2.3 Overview and description of the user interface

The following chapter includes a brief description of the configured screen views.

Table 2-1

No. Description Display

1. "01_Hour" view: "Current hour overview in KW" This screen display shows the power generated over the current hour. The values are displayed in a bar chart with "one-minute intervals".

2. "010_Hour_Details" view: "Details to current hour overview in KW" This screen display shows further details of the power generated over the current hour. The values for each minute are listed separately.

3. "02_Day" view: "Current day overview in KWh“ This screen display shows the power generated over a period of 24 hours for the current day of the week. The detailed values are indicated above of the bar chart. Beneath the bar chart, the current day result is shown.

Page 11: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Automation Solution

2.2 Description of the core functionality

Operations Diary V1.0, Entry-ID: 42637128 11

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

No. Description Display

4. "03_Week" view: "Current week overview in kWh" This screen display shows the power generated over a period of 7 days for the current week. The values are displayed in a bar chart with "one-day intervals". The detailed values are indicated above of the bar chart. Beneath the bar chart, the current weekly result is shown.

5. "04_Month" view: "Current month overview in KWh" This display shows the power generated over a period of 31 days for the current month. The values are displayed in a bar chart with "one-day intervals". The detailed values are indicated above of the bar chart. Beneath the bar chart, the current month result is shown.

6. "05_Year_Overview" view: "Annual survey in kWh" This screen display can be used to retrieve the power values for a period of several years. You can also select the single months of each year. The values are displayed in a bar chart with "one-day intervals".

Page 12: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Automation Solution

2.2 Description of the core functionality

12 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

No. Description Display

7. "050_Year_Details" view: "Details to the annual survey overview in KWh“ This screen display shows the power details over the period of one month. For the "05_Year_Overview" display, a specific year and month has been selected beforehand. The values are listed separately for each day. The monthly result is shown at the bottom.

8. "06_Recipe_Display": "Recipe view" In this screen display you can retrieve all power data acquired and stored over a period of several years. In the recipe view, single values can be added or edited manually.

9. "07_General_Settings" view: "Settings" The buttons available in this screen display can be used to make the relevant settings. The limit value specifications refer to the "10_Hour_Details" view. The default settings are a max. value of "300" and a min. value of "1".

10. Menu bar The individual views can be opened by clicking the buttons of this menu bar.

Page 13: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Automation Solution

2.2 Description of the core functionality

Operations Diary V1.0, Entry-ID: 42637128 13

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

2.2.4 Sequence of the core functionality operations

Description:

The PLC continuously retrieves the generated power values.

The PLC system time is analyzed to determine when a new minute starts.

After each minute, the power generated per minute is calculated.

The calculated values are transferred to the HMI panel as parameters.

The HMI panel analyzes the calculated values and assigns them to the relevant screen views.

The calculated values are assigned to the relevant screen views on the operator panel

The script for power analysis is called on the operator panel

The power generated per minute is calculated and the value is then transferred to the operator panel

Analysis of the PLC system time

The generated power data is continuously transferred to the PLC

(in this use case the values are simulated)

Minute elapsed?

No

Page 14: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

2 Automation Solution

2.3 Hardware and software components used

14 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

2.3 Hardware and software components used

This application has been generated using the following components:

Hardware components

Table 2-2

Component Qty MLFB/Order number Notes

CPU 315-2 DP 1 6S7 315-2AG10-0AB0 As an alternative, any other 300/400 controller or a WinAC MP may be used.

MP 277 10“ Touch 1 6AV6 643-0CD01-1AX0 As an alternative, any operator panel supporting scripts and recipes may be used.

Memory card / USB stick

1 See FAQ entry http://support.automation.siemens.com/WW/view/en/21847868

For storage of the recipe data.

Standard software components

Table 2-3

Component Qty MLFB/Order number Notes

SIMATIC S7 V5.4 SP5 1 6ES7810-4CC08-0YA5 Or a later version

WinCC flexible 2008 Standard

1 6AV6612-0AA51-3CA5 As an alternative, WinCC flexible 2008 Advanced may be used (6AV6613-0AA51-3CA5)

WinCC flexible 2008 SP1

1 See Customer Support pages http://support.automation.siemens.com/

SP1 is available for download.

Example files and projects

The list below includes all files and projects used in this example.

Table 2-4

Component Notes

42637128_Operations_Diary_V10.zip This zip-file contains the STEP 7 project incl. the HMI configuration.

42637128_Operations_Diary_v10_d.pdf This document.

Page 15: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

2.3 Hardware and software components used

Operations Diary V1.0, Entry-ID: 42637128 15

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3 Functional Mechanisms of this Application

STEP 7 – program overview

Figure 3-1

OB1: This block calls the individual program blocks.

OB86 Rack failure OB (see details in the STEP 7 online help)

OB100: Startup OB for restart (see details in the STEP 7 online help). After restart, the calculated values are reset to evaluate the "power generated per minute" in FB210.

OB122: I/O access error OB (see details in the STEP 7 online help)

FB100; This block is used to simulate the "power generated".

FB102: This block is used to analyze the CPU system clock. At the start of each new minute, a "bit" for further analysis is set. The block is set with an I/O parameter which is assigned to the FB in OB1.

FB210: This block is used to calculate the power generated per minute. 60 values are calculated for a period of one hour. The block is set with I/O parameters which are assigned to the FB in OB1.

DB2: This data block includes the power values calculated for the specific minute. The values are then transmitted to the HMI panel.

DB20: This DB is used for clock synchronization between the operator panel and the PLC via the "date/time PLC" area pointer.

DB100, DB102, DB210: Instance DBs for the associated FBs.

SFC1: The SFC1 is used to read out the CPU clock time.

For a detailed description of the individual blocks please refer to chapter 3.1

Page 16: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

2.3 Hardware and software components used

16 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

WinCC flexible – program overview

Figure 3-2

Screen views:

The individual views display the calculated power values. (See overview and description of the user interface in chapter 2.2.2)

Scripts:

The scripts are used to perform the following functions:

Analysis of power values

Update of text fields

Import of recipes

General calculations

For a detailed description, please refer to chapter 3.2

Page 17: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.1 Functionality, SPS program blocks

Operations Diary V1.0, Entry-ID: 42637128 17

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.1 Functionality, SPS program blocks

3.1.1 Program details of function block FB100

Figure 3-3

FB100 is solely used to simulate the "generated power" for testing the functions of the application.

In your plant constellation, the generated power must be transferred to the "DB22.DBD0" as a "DINT value". (The value may be provided with the PAC3200 multimeter, for example).

Function principle of simulation: The CPU hardware includes a configured MB10 clock memory. The block "ADD_DI" continuously adds up the values which are then transferred to the "DB22.DBD0".

When the counter value reaches a number of 64,000, the value will be reset to zero, so as to avoid limit violations.

Page 18: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.1 Functionality, SPS program blocks

18 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.1.2 Program details of function block FB102

Figure 3-4

FB102 is used to generate a trigger signal which is set at the start of a new minute.

In the further course of program execution (FB210), this signal (minute change) is used to trigger the "power per minute" measurement.

Evaluation of the CPU clock time is performed with the SFC 1 "READ_CLK". The "5th byte" (second) of the system clock time is analyzed.

When the second's value is "0" (start of a new minute), a bit will be set. This "bit" is defined as "output parameter". If the second's value is greater than "0", the "bit" will be reset.

You only need to call FB102 in OB1 and to apply a variable to the "output" of the FB. (Trigger variable for the signal indicating a "minute change").

In the example configuration, these steps are already implemented.

Page 19: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.1 Functionality, SPS program blocks

Operations Diary V1.0, Entry-ID: 42637128 19

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.1.3 Program details of function block FB210

Figure 3-5

FB210 calculates the power produced per minute over a period of one hour.

Function principle: The power produced is continuously acquired.

When calculation is started or at the beginning of a new minute, the current value of the power produced will be intermediately stored (value 0 1). After one minute, the new power generated will be intermediately stored (value 02). The difference of these two values (value 02 – value 01) will then be transferred as the result for the specific minute.

Over a period of one hour, a variable is configured for each minute and the values will be transmitted to the operator panel.

In the operator panel, the calculated values are further processed in scripts.

After one hour, the calculated values will be reset via the operator panel.

Page 20: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.1 Functionality, SPS program blocks

20 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

You only have to call FB210 in OB1 and apply the relevant variables to the "I/O parameter" of the FB.

In the example configuration, these steps are already implemented.

Parameter details

Table 3-1

No. Parameter Description

1. Start_Measuring This parameter is used to start power measurement. Power measurement will start only if the signal "1" is applied at this input. In this example, the input is set to "1" when the operator panel is started.

2. Minute_Changed This parameter is used to transfer the "trigger signal" generated by FB102. (The trigger signal indicates a "minute change"):

3. Generated_Power This parameter is used to transfer the value of the generated or received power to the block. In this application, the value is simulated with FB100.

4. All_Minute_Value_Reset This parameter is used to reset the current "minute values". In this application, the values will be reset after a new startup of the PLC or after restart of the operator panel.

5. Minute_0 ... Minute_59 These parameters are used to output the calculated power values per minute. The values are read in by the operator panel at "continuous cyclic intervals". In this example, a variable has been stored for each minute beforehand.

Page 21: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.1 Functionality, SPS program blocks

Operations Diary V1.0, Entry-ID: 42637128 21

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.1.4 Program details of the data blocks

DB2

DB2 is used to store the calculated "power values per minute" over a period of one hour. The PLC uses this DB for data exchange with the operator panel.

DB20

DB20 is used for the area pointer in the HMI panel for automatic clock synchronization between the operator panel and the PLC system time.

DB22

DB22 is used for the "global" data exchange between operator panel and PLC. It is used to read out the generated power, for example, and to transfer the calculated power per minute to the operator panel.

DB100, DB102, DB200

Instance data blocks for FB100, FB102 and FB200

SFC1

The SFC 1 "READ_CLK" (read system clock) is used to read out the clock time from the CPU, so as to receive the current date and time information.

Page 22: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.2 Functionality, HMI program

22 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.2 Functionality, HMI program

The following subchapters describe some views and the scripts used in this application.

3.2.1 Program details of the "01_Hour" view

Table 3-2

No. Description Display

1. A "bar chart" has been configured for each minute. The values are output directly to the bar chart display via the PLC.

2. Beneath the bar chart there are text and I/O fields. The current time information is transferred to the I/O fields via a script.

3. In the display properties, two scripts are called while the view is built up.

A0_Start_Project

A4_Set_Day_Week

Page 23: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.2 Functionality, HMI program

Operations Diary V1.0, Entry-ID: 42637128 23

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.2.2 Program details of the "02_Day" view

Table 3-3

No. Description Display

1. A "bar chart" has been configured for each hour. The required values are calculated by the script "A1_Calc_Minute" and then transferred to the bar chart display.

2. Above the bar chart there are text fields. Via the script "A2_Refresh_Textfield_Screen_02", the previously calculated values are symbolically output to these fields. (The values in these I/O fields cannot be displayed "vertically".)

3. In the display properties, two scripts are called while the view is built up.

A2_Refresh_Textfield_Screen_02

A8_Total_Result

Page 24: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.2 Functionality, HMI program

24 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.2.3 Program details of the "03_Week" view

Table 3-4

No. Description Display

1. A "bar chart" has been configured for each weekday. The required values are calculated by using the script "A1_Calc_Minute" and then transferred to the bar chart display.

2. Above the bar chart there are I/O fields. The previously calculated values are output symbolically.

3. In the display properties, two scripts are called while the view is built up.

A8_Total_Result

Page 25: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.2 Functionality, HMI program

Operations Diary V1.0, Entry-ID: 42637128 25

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.2.4 Program details of the "04_Month" view

Table 3-5

No. Description Display

1. A "bar chart" has been configured for each day. The required values are calculated by using the script "A1_Calc_Minute" and then transferred to the bar chart display.

2. Above the bar chart there are text fields. Via the script "A3_Refresh_Textfield_Screen_02", the previously calculated values are symbolically output in these fields. (The values in these I/O fields cannot be displayed "vertically".)

3. In the display properties, two scripts are called while the view is built up.

A3_Refresh_Textfield_Screen_04

A8_Total_Result

Page 26: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.2 Functionality, HMI program

26 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.2.5 Program details of the "05_Year_Overview"

Table 3-6

No. Description Display

1. A "bar chart" has been configured for each day. The required values are transferred from the "selected" recipe to the bar chart display.

2. Above the bar chart, there are two symbolic I/O fields. If the value of the I/O field changes, the script "A5_LoadDataRecord" will be called to load the relevant recipe data. The recipe data are output in the bar chart display.

Page 27: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.2 Functionality, HMI program

Operations Diary V1.0, Entry-ID: 42637128 27

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

3.2.6 Program details of the scripts

A0_Start_Project

This script is called only when the HMI panel is started.

It initiates the following functions:

start of measurement

Reset of the step sequence

A1_Calc_Minute

This script is called once per minute via the variable "Global_Data.Evaluation_MinuteChanged".

The script is used to calculate the following values:

hourly values

daily values

weekly values

monthly values

recipe values

A2_Refresh_Textfield_Screen_02

This script is called when the "02_Day" has been selected . It is used to update the text fields in the "02_Day" view.

A3_Refresh_Textfield_Screen_04

This script is called when the "04_Month" has been selected. It is used to update the text fields in the "04_Month" view.

A4_Set_Day_Week

This script is called once when starting the operator panel.

It is required for evaluation to determine the current day (1 – 31) and weekday (1 -7) when the operator panel starts.

A5_LoadDataRecord

This script is called via the symbolic I/O fields in the view "05_Year_Overview".

It is used to load the relevant recipe data record. The recipe and data record number is defined by the symbolic I/O field.

A6_Import_Recipe

This script is called by clicking the "Import data records" button in the "07_General_Settings" view.

Before previously exported recipe data records can be imported, the "Import data records" function must have been configured for each individual recipe file.

The complete recipe name must be entered in the "file name" parameter.

A status request may be used to ensure that all recipes will be imported one after another.

Page 28: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

3 Functional Mechanisms of this Application

3.2 Functionality, HMI program

28 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

A7_Day_and_Recipe_Value

This script is called via the script "A0_Start_Project".

After a "restart" of the panel it is used to assign any available daily values from the stored data record to the current month.

A8_Total_Result

This script is used for various screen views.

It adds the single values to calculate the sum total.

3.2.7 Recipes

The determined power values are stored by means of a recipe.

There is exactly one recipe for each year from 2009 to 2018. Each recipe includes 12 data records – one for each month (January to December).

With these recipes, all data saved within the period from 2009 to 2018 can be called separately. The data is stored on a memory card.

3.2.8 Scheduler

The scheduler performs the following functions:

At the end of runtime operation, the bit is reset to the start of measurement.

Once per hour, the recipe data are exported to a "CSV file". The recipe data is generated at the top of every hour by using the script "A1_Calc_Minute". To avoid overlaps, the export of recipes is performed with a delay of one minute.

Page 29: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

4 Operation of the Application

3.2 Functionality, HMI program

Operations Diary V1.0, Entry-ID: 42637128 29

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

4 Operation of the Application Testing of the application requires the use of an S7-300 controller and an MP277 touch panel. As an alternative, you may also test the program with PLCSIM and PC-Runtime.

Load the STEP 7 program to your PLC and the HMI program to your operator panel.

The operator panel must be equipped with a memory card for the storage of recipe data. If no memory card is available, a system message will appear when selecting the screen view "05_Year_Overview".

In order to become familiar with the function principle, this application uses simulated power values which are transmitted to the operator panel.

Communication is effected via PROFIBUS. As an alternative, you may also use communication via MPI or Ethernet.

Note The application configuration requires that the PLC and the operator panel remain in continuous operation. Neither the PLC nor the operator panel should be temporarily switched, so as to avoid data corruption

The application may only be used for example purposes. In view of the vast number of possible plant constellations, each application needs to be adjusted and configured according to the specific requirements.

Page 30: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

4 Operation of the Application

3.2 Functionality, HMI program

30 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

Table 4-1

No. Action Display

1. After startup of the operator panel, the screen view "Current hour overview in kW" appears and measurement will start automatically. The values are displayed as "green" bars. The total of each minute is calculated over a period of 60 minutes. Clicking the "Details >>" button takes you to the "Details to current hour overview in kW". This screen view shows the "hourly values" in a symbolic display. You can open this window directly by clicking the "Overview Hour" button.

2. The "Details to current hour overview in kW" shows the measured "hourly values" in a symbolic display. Click the "<< Back" button to return to the previous page "Current hour overview in kW".

3. Click the "Overview Day" button to open the page "Current day overview in kWh". This screen view shows the calculated total of the relevant hour over a period of 24 hours. At the top of every hour, the total amount of the previous hour is shown in the form of a (green) bar chart. The values above the bar chart are updated via a script and correspond to the values shown in the diagram. (Jumping too quickly between screen views may lead to a system message, if the value update has not been completed yet.)

Page 31: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

4 Operation of the Application

3.2 Functionality, HMI program

Operations Diary V1.0, Entry-ID: 42637128 31

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

No. Action Display

4. Click the "Overview Week" button to open the "Current week overview in kWh" page. This screen view shows the total calculated for the relevant day over a period of 7 days. At the top of every hour, the day's total is updated. The values above the bar chart correspond to the values shown in the diagram.

5. Click the "Overview Month" button to open the page "Current month overview in kWh". This screen view shows the total calculated for the relevant day over a period of 31 days. At the top of every hour, the total amount of the day's total is updated. The values above the bar chart are updated via a script and correspond to the values shown in the diagram. (Jumping too quickly between screen views may lead to a system message, if the value update has not been completed yet.)

6. Click the "Annual survey" button to open the page "Annual survey in kWh". Use the symbolic I/O lists to select the desired time periods.

Year

Month This screen view shows the total calculated for the selected period over a period of 31 days. Click the "Details >>" button to change over to the "Details to the annual survey overview in KWh“. There you find a list of the "daily values".

Page 32: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

4 Operation of the Application

3.2 Functionality, HMI program

32 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

No. Action Display

7. The "daily values" in the "Details to the annual survey overview in KWh" are displayed symbolically. With the "<< Back" you can return to the previous view "Annual survey in kWh".

8. Click the "Recipe view“ button to open the page "Recipe view". Select the recipe and the data records

Recipe = year

Data record = month to view and, if required, to edit the data stored.

9. Click the "General settings" button to open the "Settings" view. This screen view offers a number of buttons for the execution of various functions. The limit values refer to the settings in the "Details to current hour overview in kW" page.

10. Use the buttons highlighted in the right figure to browse between the individual screen views.

Page 33: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

5 Further Notes, Tips and Tricks, etc.

Operations Diary V1.0, Entry-ID: 42637128 33

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

5 Further Notes, Tips and Tricks, etc.

Scripts

You may adapt the scripts to your individual requirements.

The functions used in the scripts may also be realized in the PLC, for example.

Bar chart diagram

There are defined "limit values" for the bar chart labels. You may extend and adjust these bar chart labels according to your requirements.

Recipes

The number of recipes can be reduced or increased. Please note that the scripts need to be adapted accordingly.

Variables

Instead of the variables and addresses used in this application, you may also use "your" plant-specific variables and addresses. Please note that the scripts need to be adapted accordingly.

Most of the variables are not PLC-linked. This measure ensures that communication is reduced to the essential minimum.

The values displayed are calculated with the help of scripts and then transferred to the internal variables. Please note that the values of internal variables will not be stored when the operator panel is switched off.

The present values are stored once per hour. Disconnection of the operator panel will cause that the values of the commenced hour will be lost.

This means that, after restart of the operator panel, only the current values will be shown in the views "01_Hour", "02_Day" and "03_Week".

Page 34: Application – Operations Diary · Applications & Tools Answers for industry. Cover sheet Application – Operations Diary WinCC Flexible 2008 SP1 Application Description June 2010

6 Literature

34 Operations Diary

V1.0, Entry ID: 42637128

Co

pyr

igh

t

Sie

me

ns

AG

20

10

All

righ

ts r

ese

rve

d

6 Literature

6.1 Literature

The following list is by no means complete and only provides a selection of related references.

Table 6-1

Topic Title

/1/ STEP7 Automatisieren mit STEP7 in AWL und SCL [Automation with STEP7 in STL and SCL] Hans Berger Published by Publicis MCD Verlag ISBN 3-89578-113-4

/2/

6.2 Internet links

The following list is by no means complete and only provides a selection of useful information.

Table 6-2

Topic Title

\1\ Reference to this document

http://support.automation.siemens.com/WW/view/en/42637128

\2\ Siemens I IA/DT Customer Support

http://support.automation.siemens.com

\3\ PAC3200 How can WinCC flexible display values of SENTRON PAC3200 / PAC4200 via Ethernet ?

http://support.automation.siemens.com/WW/view/en/37450303

7 History

Table 7-1

Version Date Change

V1.0 30.04.2010 First issue