Sie sind auf Seite 1von 10

Contents Page

Training aims ...................................................................................................................................... 2


WinCC Option "User Archive" ............................................................................................................. 3
User archives ..................................................................................................................................... 4
User archives editor Structure (fields) .............................................................................................. 5
User Archive editor Archive data ....................................................................................................... 6
User Archive runtime WinCC User Archive Control .......................................................................... 7
User Archive runtime Data exchange with S7 controlled by the operator ....................................... 8
User Archive runtime Data exchange with S7 controlled by the S7 program ........................... 9
User Archive Views ....................................................................................................................... 10

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 User Archive
The participant will:

Get to know the advantages of User Archive.


Get to know the table view.
Get to know the access options.
Get to know the communications options.
Get to know the possible applications.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 User Archive
General The User Archive package is available as a WinCC optional package.
It consists of
- User documentation
- Internal functions
- Key disk for enabling the software.
The User Archive software is already on the WinCC CD.

Applications User archives can be used for a wide variety of applications (see figure above).

Basics WinCC User Archive is a database system that users can configure themselves for
their own purposes.
WinCC User Archives provides two type of database tables:

Archive Archives are database tables in which users can create their own data fields.
Archives are used for the storage of data and provide database access to this
data.

Views Views take data from the archives and are used to put data together for example
to obtain an overview of product groups.
The data of a view can also be edited in runtime; the modified data is then entered
in the original archive.
Access to user archives with:
Table window
Internal functions
API functions (described in the ODK package)
ODBC / SQL
Communication with the controller via tags
Communication with the controller via raw data

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 User Archive
Definitions In the example above User Archive is used to display a recipe. The components of
a recipe consist of recipe elements reflecting the individual components of the
recipe. With a table, this corresponds to column titles.
A single recipe with its different recipe values is put together in a data record. A
data record corresponds to a row in a table, a recipe value corresponds to a cell in
the table.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 User Archive
Archives In the figure above, two user archives have been created. In the properties of a
user archive, the following settings can be made:
- Name
- Number of data records: unlimited or with max. number
- Communication type: none, data manager tags or raw data tags
- Restriction of read and write rights is optional
- "Last Access" field and "Last User" field can be added as options

Fields For the selected user archive, the fields of this archive are shown on the right.
The most important properties of a field are:
- Name
- Type (character string, number (integer), number (float), number (double) or
date/time)
- With a character string, the length can be defined.
- With numbers an optional minimum value and a maximum value can be added.
- The following option can also be enabled:
Value required = field cannot be empty
Unique value = WinCC monitors the uniqueness of entries
With index = database is given indexes

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 User Archive
Archive data The previously defined fields can now be filled with content. The number of data
records depends on the configuration of the archive (unlimited or with max.
number).

If "unlimited" was configured, and upper limit is set by WinCC. These system limits
are described in WinCC help in Performance data -> User archives.

Maximum of 300,000 entries:


- 10 fields with 30,000 data records
- 500 fields with 600 data records

The archive data is stored in the runtime database. This means that both during
the configuration (see above) and during WinCC runtime data can be entered,
deleted or changed by the relevant control.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 User Archive
Runtime In runtime, the archive data can be accessed using the User Archive control. This
is only possible if the component "User Archive" was enabled in the startup list.

Delete, copy,...
Deleting always involves one or more rows (data records).
Read/write tags
Data exchange with the controller is explained on the following pages.
Import or export archive
All displayed data records (filter) are exported to the UA directory within the
WinCC project. The name of the CSV file can be changed in a dialog.
When importing, a CSV file is also read in from the UA directory.
Export With this button, you export all or selected runtime data to a CSV file. If the option
"Display dialog" is active, a dialog opens in which you can view the settings for
exporting and can start the export. With the suitable authorization, you are also
allowed to select the file and the directory for the export. If no dialog is displayed,
the export of the data to the preset file starts immediately.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 User Archive
Data exchange Data exchange with the controller can either be started by the operator or by the
controller. The first option is considered initially.
Step 1 The operator selects a data record.
Step 2 With the "Write Tags" button, the current data record is written to the controller.
Each value is written to the tag stored in the properties of the field.
Step 3 The selected data record has been written to the corresponding tags. The
controller can now continue working with these values.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 User Archive
Data exchange Data exchange can also be controlled by the controller program. To do this, the
control tags "ID" and "Job" are used.
ID The identifier (corresponds to the record number) of the user archive
Job Three jobs are possible: Read, write and delete:
Simatic to archive =6
Archive to Simatic =7
Delete =8
After the job has been carried out, there is an error ID in this control tag:
No errorN =0
Error = -1

As an alternative the addressing can be via the control tags "Field" and "Value".
Field The archive field (column label e.g. Ingredients).
Value The archive field value (e.g. 'Flour')
For the example above, the following values would need to be written to the
control tags:
ID = 0 Field = product name Value = KolaMix
and afterwards Job = 7

Additional combinations of the control tags "ID" and "Job":


ID Job = "6" Job = "7" Job = "8"
-1 Append data record (DR) - Delete DR with the
lowest ID
-6 Read DR with the lowest ID Write DR with the lowest ID Delete DR with the
lowest ID
-9 Read DR with the highest ID Write DR with the highest ID Delete DR with the
highest ID

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 User Archive
Views In the User Archive editor, it is also possible to configure views.
A view groups data from various user archives. For example, you can create links
via the fields of various user archives with SQL to display relationships in runtime
in a single view. The linked user archives must have at least one common data
field.
In the example above there are two user archives. Both have a field "Product
number" (the ID column is not suitable since this column is managed by the
system and cannot be freely assigned). In the view
"~Tanks_Softdrink.Productnumber = ~Recipes_Softdrink.Productnumber is
configured as the relation. This has the effect that only the combinations are
displayed in which the product number is the same in both archives.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 User Archive

Das könnte Ihnen auch gefallen