You are on page 1of 34

Cover sheet

Application – Operations Diary


WinCC Flexible 2008 SP1

Application Description  June 2010

Applications & Tools


Answers for industry.
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:
online-support.automation@siemens.com
Copyright  Siemens AG 2010 All rights reserved

Operations Diary
2 V1.0, Entry ID: 42637128
s Automation Task 1

Automation Solution 2
Functional Mechanisms
of this Application 3
Operation of the
Application 4
SIMATIC
Operations Diary Further Notes, Tips and
Trick, etc. 5
Acquisition of power data over various periods of time
Literature 6

History 7
Copyright  Siemens AG 2010 All rights reserved

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

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
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
4 V1.0, Entry ID: 42637128
Table of Contents

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
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
V1.0, Entry-ID: 42637128 5
1 Automation Task
2.1 Overview of the overall solution

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
Copyright  Siemens AG 2010 All rights reserved

Operations Diary
6 V1.0, Entry ID: 42637128
1 Automation Task
2.1 Overview of the overall solution

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".
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
V1.0, Entry-ID: 42637128 7
2 Automation Solution
2.1 Overview of the overall solution

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
Measuring device to acquire
the generated power,
e.g. SENTRON PAC3200
Copyright  Siemens AG 2010 All rights reserved

 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.

Operations Diary
8 V1.0, Entry ID: 42637128
2 Automation Solution
2.2 Description of the core functionality

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.
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
V1.0, Entry-ID: 42637128 9
2 Automation Solution
2.2 Description of the core functionality

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".
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
10 V1.0, Entry ID: 42637128
2 Automation Solution
2.2 Description of the core functionality

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.
Copyright  Siemens AG 2010 All rights reserved

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".

Operations Diary
V1.0, Entry-ID: 42637128 11
2 Automation Solution
2.2 Description of the core functionality

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
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
12 V1.0, Entry ID: 42637128
2 Automation Solution
2.2 Description of the core functionality

2.2.4 Sequence of the core functionality operations

The generated power data is continuously transferred to


the PLC
(in this use case the values are simulated)

Analysis of the PLC system time

No

Minute elapsed?
Copyright  Siemens AG 2010 All rights reserved

The power generated per minute is calculated and the


value is then transferred to the operator panel

The script for power analysis is called


on the operator panel

The calculated values are assigned to the relevant screen


views on the operator panel

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.

Operations Diary
V1.0, Entry-ID: 42637128 13
2 Automation Solution
2.3 Hardware and software components used

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 / 1 See FAQ entry For storage of the
USB stick http://support.automation.sie recipe data.
mens.com/WW/view/en/2184
7868
Copyright  Siemens AG 2010 All rights reserved

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 1 6AV6612-0AA51-3CA5 As an alternative,
Standard WinCC flexible 2008
Advanced may be
used
(6AV6613-0AA51-
3CA5)
WinCC flexible 2008 1 See Customer Support pages SP1 is available for
SP1 http://support.automation.sie download.
mens.com/

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.

Operations Diary
14 V1.0, Entry ID: 42637128
3 Functional Mechanisms of this Application
2.3 Hardware and software components used

3 Functional Mechanisms of this Application


STEP 7 – program overview
Figure 3-1
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
V1.0, Entry-ID: 42637128 15
3 Functional Mechanisms of this Application
2.3 Hardware and software components used

WinCC flexible – program overview


Figure 3-2
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
16 V1.0, Entry ID: 42637128
3 Functional Mechanisms of this Application
3.1 Functionality, SPS program blocks

3.1 Functionality, SPS program blocks


3.1.1 Program details of function block FB100

Figure 3-3
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
V1.0, Entry-ID: 42637128 17
3 Functional Mechanisms of this Application
3.1 Functionality, SPS program blocks

3.1.2 Program details of function block FB102

Figure 3-4
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
18 V1.0, Entry ID: 42637128
3 Functional Mechanisms of this Application
3.1 Functionality, SPS program blocks

3.1.3 Program details of function block FB210

Figure 3-5
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
V1.0, Entry-ID: 42637128 19
3 Functional Mechanisms of this Application
3.1 Functionality, SPS program blocks

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
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
20 V1.0, Entry ID: 42637128
3 Functional Mechanisms of this Application
3.1 Functionality, SPS program blocks

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
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
V1.0, Entry-ID: 42637128 21
3 Functional Mechanisms of this Application
3.2 Functionality, HMI program

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.
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
22 V1.0, Entry ID: 42637128
3 Functional Mechanisms of this Application
3.2 Functionality, HMI program

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.
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
V1.0, Entry-ID: 42637128 23
3 Functional Mechanisms of this Application
3.2 Functionality, HMI program

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.
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
24 V1.0, Entry ID: 42637128
3 Functional Mechanisms of this Application
3.2 Functionality, HMI program

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.
Copyright  Siemens AG 2010 All rights reserved

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

Operations Diary
V1.0, Entry-ID: 42637128 25
3 Functional Mechanisms of this Application
3.2 Functionality, HMI program

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.
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
26 V1.0, Entry ID: 42637128
3 Functional Mechanisms of this Application
3.2 Functionality, HMI program

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
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
V1.0, Entry-ID: 42637128 27
3 Functional Mechanisms of this Application
3.2 Functionality, HMI program

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
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
28 V1.0, Entry ID: 42637128
4 Operation of the Application
3.2 Functionality, HMI program

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
Copyright  Siemens AG 2010 All rights reserved

and configured according to the specific requirements.

Operations Diary
V1.0, Entry-ID: 42637128 29
4 Operation of the Application
3.2 Functionality, HMI program

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".
Copyright  Siemens AG 2010 All rights reserved

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.)

Operations Diary
30 V1.0, Entry ID: 42637128
4 Operation of the Application
3.2 Functionality, HMI program

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
Copyright  Siemens AG 2010 All rights reserved

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".

Operations Diary
V1.0, Entry-ID: 42637128 31
4 Operation of the Application
3.2 Functionality, HMI program

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.
Copyright  Siemens AG 2010 All rights reserved

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.

Operations Diary
32 V1.0, Entry ID: 42637128
5 Further Notes, Tips and Tricks, etc.

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
Copyright  Siemens AG 2010 All rights reserved

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".

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

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.
Copyright  Siemens AG 2010 All rights reserved

Table 6-2
Topic Title
\1\ Reference to this http://support.automation.siemens.com/WW/view/en/42637128
document
\2\ Siemens I IA/DT http://support.automation.siemens.com
Customer Support
\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

Operations Diary
34 V1.0, Entry ID: 42637128

You might also like