0% found this document useful (0 votes)
10 views185 pages

Historian

Uploaded by

TRƯƠNG GIA Huy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views185 pages

Historian

Uploaded by

TRƯƠNG GIA Huy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 185

zenon manual

Historian
v.8.20
© 2020 Ing. Punzenberger COPA-DATA GmbH

All rights reserved.

Distribution and/or reproduction of this document or parts thereof in any form are permitted solely
with the written permission of the company COPA-DATA. Technical data is only used for product
description and are not guaranteed properties in the legal sense. Subject to change, technical or
otherwise.
Contents

1 Welcome to COPA-DATA help ............................................................................................................... 6

2 Historian ....................................................................................................................................................... 6

3 General information .................................................................................................................................. 7


3.1 Historian licensed version..............................................................................................................................8
3.2 Historian Starter Edition .................................................................................................................................9

4 Types of archiving ...................................................................................................................................... 9


4.1 At start and end of Runtime ...................................................................................................................... 12
4.2 Starting and stopping archives via functions ...................................................................................... 12
4.3 RDA - Real time Data Acquisition ............................................................................................................ 12

5 Archiving concept .....................................................................................................................................13


5.1 Best Practice ..................................................................................................................................................... 16

6 Engineering in the Editor ........................................................................................................................ 17


6.1 Detail view ........................................................................................................................................................ 17
6.2 Toolbar and context menus ....................................................................................................................... 18
6.3 Creating a new archive ................................................................................................................................ 21
6.3.1 Assistant .................................................................................................................................................................... 22
6.4 Edit archive ....................................................................................................................................................... 26
6.4.1 Properties ................................................................................................................................................................. 27
6.4.2 Runtime ..................................................................................................................................................................... 30
6.4.3 Recording type ....................................................................................................................................................... 34
6.4.4 Save ............................................................................................................................................................................ 37
6.4.5 Options...................................................................................................................................................................... 45
6.4.6 Example ..................................................................................................................................................................... 48
6.5 Aggregated archives..................................................................................................................................... 50
6.5.1 Variable selection and aggregation method ............................................................................................. 53
6.5.2 Editing aggregation archives ............................................................................................................................ 55
6.5.3 Templates for aggregated archives ............................................................................................................... 57
6.6 Add and remove variables.......................................................................................................................... 65
6.7 Lot archiving .................................................................................................................................................... 68
6.8 Creating a screen of the type Archive Revision.................................................................................. 69
7 Functions .................................................................................................................................................... 74
7.1 Screen switch - archive revision ............................................................................................................... 74
7.1.1 Archive filter ............................................................................................................................................................ 77
7.1.2 Time ............................................................................................................................................................................ 79
7.1.3 Lots ............................................................................................................................................................................. 98
7.1.4 Shift.......................................................................................................................................................................... 106
7.2 Archive: Start..................................................................................................................................................113
7.3 Archive: Stop..................................................................................................................................................115
7.4 Index archive..................................................................................................................................................116
7.5 Show active archives ...................................................................................................................................117
7.6 Export archives ..............................................................................................................................................118
7.6.1 Archive .................................................................................................................................................................... 122
7.6.2 Export settings .................................................................................................................................................... 123
7.6.3 Time ......................................................................................................................................................................... 130
7.6.4 Lots .......................................................................................................................................................................... 133

8 Operation in the Runtime ..................................................................................................................... 141


8.1 Notes on stopping archives .....................................................................................................................145
8.2 Selection ..........................................................................................................................................................146
8.3 Lot filter and time filter ..............................................................................................................................148
8.4 Define font and column width ................................................................................................................153
8.5 Editing values ................................................................................................................................................154
8.6 Inserting values .............................................................................................................................................155
8.7 Store values in archive ...............................................................................................................................157
8.8 Print archive ...................................................................................................................................................157
8.9 Cycles in Runtime ........................................................................................................................................159

9 Use of archive data in zenon ............................................................................................................... 160


9.1 Report Generator .........................................................................................................................................160
9.1.1 Archive and logging functions ...................................................................................................................... 161
9.2 Report Viewer................................................................................................................................................163
9.3 Extended Trend.............................................................................................................................................163

10 Additional information ......................................................................................................................... 164


10.1 Format of archive files................................................................................................................................164
10.1.1 String variables.................................................................................................................................................... 165
10.2 Evacuate to an SQL database ..................................................................................................................167
10.2.1 Configuration ....................................................................................................................................................... 171
10.2.2 SQL script .............................................................................................................................................................. 172
10.2.3 Oracle database .................................................................................................................................................. 173
10.2.4 MS Azure service bus ....................................................................................................................................... 173
10.2.5 Conversion ............................................................................................................................................................ 174
10.2.6 Troubleshooting ................................................................................................................................................. 174
10.3 RDA ...................................................................................................................................................................175
10.3.1 PLC data format .................................................................................................................................................. 175
10.3.2 Description header ............................................................................................................................................ 176
10.3.3 Time stamp format ............................................................................................................................................ 177
10.3.4 Types ....................................................................................................................................................................... 178
10.3.5 Note: ........................................................................................................................................................................ 179
10.4 Archiving in the zenon network .............................................................................................................181
10.4.1 Behavior in the network .................................................................................................................................. 181
10.4.2 Multi-Project Administration ......................................................................................................................... 182
Welcome to COPA-DATA help

1 Welcome to COPA-DATA help

ZENON VIDEO TUTORIALS


You can find practical examples for project configuration with zenon in our YouTube channel
(https://www.copadata.com/tutorial_menu). The tutorials are grouped according to topics and give an
initial insight into working with different zenon modules. All tutorials are available in English.

GENERAL HELP
If you cannot find any information you require in this help chapter or can think of anything that you
would like added, please send an email to documentation@copadata.com.

PROJECT SUPPORT
You can receive support for any real project you may have from our customer service team, which
you can contact via email at support@copadata.com.

LICENSES AND MODULES


If you find that you need other modules or licenses, our staff will be happy to help you. Email
sales@copadata.com.

2 Historian
In zenon, the Historian takes on the saving of process data as well as the export of the archived data.
The data is thus available for subsequent processing and evaluation - even outside of zenon.

The module Historian is available in zenon in two versions:


 HistorianStarter Edition (on page 9):
function-limited base version
 Historian licensed version (on page 8)

6 | 185
General information

You will find the Historian in the Project Manager.

In zenon, you can evaluate archive data and further process it with:
 Archive revision screen
 Extended Trend
 Report Generator
 Report Viewer
 zenon Analyzer

3 General information
Archiving is carried out with different methods (on page 9) and with different types of recording.

To use archiving:
 Create archives and aggregated archives in the Editor (on page 17).
 Call up archives in the Runtime (on page 141) by means of an archive revision screen.
 Save the archive data in different formats.
 Evaluate archive data with other modules such as Extended Trend, Report Generator, Report
Viewer and zenon Analyzer.

Attention
Archives for the future are not supported.
Manual value entries must never be in the future! If these values concern
running archives, this can lead to problems with archive handling in Runtime.

TIME
The following is applicable for the time stamping of the archive:

7 | 185
General information

 Archiving:
Archives use UTC time when saved. The local time that is shown on the computer consists of:
UTC + time zone + standard time/daylight saving time. The zenon Runtime automatically
considers the local time for archive requests.

DETAILED INFORMATION
You can find detailed information on formats (on page 164), time and RDA (on page 175) types in the
Further information (on page 164) section.

3.1 Historian licensed version


The Historian Starter Edition on the PC can be upgraded to the full Historian version at any time,
without compatibility problems (license extension).
 If the Historian is licensed, all Historian functionality is available.
 Historian Starter Edition is available in combination with Extended Trend Starter Edition for
Windows CE 6.0 Runtime (data export in CE only available in CSV format).

INCLUDED WITH THE LICENSED VERSION


The licensed version of the Historian has:
 Data logging: cyclic, event-triggered, on change
 Cascaded data aggregation (aggregated archives)
 Lot recording
 RDA archiving
 SQL evacuation
 User-defined start/stop of recording
 Function execution when starting and closing the archive
 Automatic data evacuation
 Automatic creation of substitute archives
 Data export via a function (to XML for example)
 Manual revision of archive data

SQL EVACUATION
The licensed version of the Historian can be enhanced by SQL evacuation. To do this, zenon SQL
Server must be licensed

8 | 185
Types of archiving

3.2 Historian Starter Edition


The standard license of the TAG-based zenon version on the PC includes the limited version of
Historian as a Starter Edition.

LIMITATIONS
The Starter Edition is based on the standard Historian but has the following restrictions:
 no RDA
 no record on change or event triggered scanning - only cyclical recording type
 No evacuation of data
 no Aggregated archive
 no lot archiving
 No manual revision of archive data
 Export under CE only possible in ASCII format (this is also possible in XML and DBF format on a
PC)
 Archive data can only be saved in the ARX format

Attention
 If, in the Editor, only the die Historian Starter Edition is licensed,
functionalities beyond its restrictions cannot be configured.
 If, in the Runtime with a standalone or server, only the Historian Starter
Edition is licensed instead of the complete Historian, archives that exceed its
limits are not started. An entry in the Diagnosis Server is created.
Likewise no saving of the report or archive revision can be carried out.
Example: An archive with event triggered scanning is created. It is not
started in Runtime. No data is recorded for the archive.
Note: This is not applicable for client computers. A separate Historian
license is necessary for this.

Note: For I/O licensed version, the Starter Edition is not available.

4 Types of archiving
The archiving is based on the principle of cascading archives. In doing so, the desired variables are
recorded in a base archive and transferred to an aggregation archive (on page 50) by means of an
aggregation function. This process can be continued as often as desired. Archives can be created in
different ways. There are up to three methods of recording available for each type of creation.

9 | 185
Types of archiving

CREATION
An archive can be created in different ways:
 At start and end of Runtime:
The archive is always active if Runtime is running.
 User defined:
The time period in which the archive can be written to is defined using the Archive: Start
and Archive: Stopfunctions.
 RDA (Real T (on page 74)ime Data Acquisition):
Reads archived values in the controller and saves them to a zenon archive.

RECORDING TYPES
Data can be recorded in archives using different methods:
 Cyclic:
The values of the assigned variables are written to the archive in a defined interval. The value
for milliseconds is automatically set to 0 in the time stamp.
 Event-triggered:
The archive is assigned a trigger variable. When the value of the trigger value is set to 1, the
values of the variables are always written to the archive that was assigned in the variable
selection (on page 27).
 On-change:
The values of the assigned variables are written to the archive each time there is a value
change.
Note: In order to keep the amounts of data recored low, the configuration of a Hysteresis,
especially a Negative for archive and Positive for archive, is recommended for this type of
recording. For details, read the Hysteresis chapter in the Variables manual.

The available type of archive recording depends on the method used to create the archive.

Attention
In an archive of the type On change variables are also saved on each status
change.

For example: If a driver is stopped all its variables receive the status OFF.
Therefore stopping and starting a driver causes two entries.
1. OFF
2. SPONT or GI (if reconnection is successful)

This also happens when the variable value does not change.

10 | 185
Types of archiving

AGGREGATION
The summarizing function is initiated at the ending of the save cycle. The following aggregation
functions are available:
 Sum
 Average
 Minimum
 Maximum

Several aggregation archives can also be used at the same time in a project.

Attention
Strings cannot be compressed.

STORAGE
In order to keep a complete save cycle, the archive data can be saved or exported by means of a
function.
Storage Description

Database Each archive contains files in which the configured number of archive
cycles is buffered. If the configured number of files is exceeded, files
can either be discarded or exported.

File export After closing of an archive cycle it is immediately exported to a file.

Export function Archive export saves archives with time filters in the following standard
file formats:
 ASCII
 dBase
 SQL
 XML

In doing so, the following applies:


 Files can be saved locally on the computer or on approved
drives in a network.
 The file names are issued independently from the system.
 The name contains the year, month, day, hour minute and
second of the export:
YYMMDDhhmmss.XML

11 | 185
Types of archiving

4.1 At start and end of Runtime


With this form of archiving, the archive is started when Runtime is started and stopped when Runtime
is closed. The recording of data can be as follows:
 cyclic
 event-triggered
 on change

4.2 Starting and stopping archives via functions


Archiving in zenon can also be controlled manually with the help of the Start archive (on page 113)
and Close archive (on page 115) functions.

As long as an archive is active, values can be written to the archive. With recording via functions, the
recording can be as follows:
 cyclic
 event-triggered
 on change

4.3 RDA - Real time Data Acquisition


The RDA functionality is used in order to read values which were archived in the control and to save
them in a zenon archive. The recording can be as follows:
 On change

A typical application for this is controllers that do not permanently communicate with zenon or that
are to archive many values in a short period of time.

Example
For a PLC with communication in the event of a value change, values should be
archived in a time period <100 ms. In this case, the values are collected from the
controller and read as a block using RDA.

(Note: The smallest possible sampling rate in zenon is 100 ms.)

RDA can also be used for the postmortem analysis in the event of PLC errors, if the PLC supports this.

12 | 185
Archiving concept

Note: RDA archives can be evacuated. Evacuation is carried out immediately after the archive is
closed.

CONFIGURATION
To configure RDA:
1. Define the variables in the PLC.
 A separate, continuous, linear area has to be created in the PLC for each RDA variable.
 The data type for the variables must not be less than that in which the PLC is organized.
 The first variable of the area designated for the RDA in the PLC serves as a trigger for
instigating the transfer process.
This means: If this variable is set to the value 1 (or >0) by the PLC, the subsequent values
(as defined in the header (on page 176)) are loaded and archived in zenon. Afterwards,
the driver automatically resets the variable to the value 0.
2. Define the variable in zenon.
The values are displayed in the archive in the format of the data type of the RDA variable.
Example: If the values are displayed as a floating-point number (REAL) in the archive, the
RDA variable must have the data type REAL.
Attention: The variable property Recording type for Harddisk data storage must be set
to Postsorted values (RDA).
3. Create the archive in zenon and select the RDA variables.
The archive must be set as the on change recording type.

Note: You can find detailed information on RDA archiving in the RDA (on page 175) chapter in the
Further information (on page 164) section.

Information
You can find out whether your driver supports RDA in the documentation for
the respective driver.

Drivers with symbolic communication do not generally support RDA. However


there is a workaround for some of these drivers. You can find information on this
for the respective driver and in the Notes (on page 179) chapter.

5 Archiving concept
The following is applicable for archiving in general:

13 | 185
Archiving concept

 In principle, up to 1296 different archives can be configured for each project.


 Up to 65535 variables per archive can be created.
Attention: Take the aggregation archives into account too.
 The number of closed and stored archives is only limited by the disk space available.

Even before the archive has been created, it is necessary to define which data is to be archived and in
which granularity.

Recommendations:
 Keep archives easily manageable and do not store large amounts of data, because:
 Unnecessary archives create a high requirement for disk space and can place an
unnecessary load on your computer in certain circumstances.
 Archives that are too large need extra resources and time when displayed in the
Runtime.
 Attempt to recognize how the data belongs together and have this influence the
composition of your archive.

BASIC QUESTIONS
A concept should be created before the archiving is configured. The following decision is important:
 What data should be stored in an archive
 at what intervals
 via which driver/protocol
 for what purpose
 What data should be stored in an archive
 in which zenon modules or external applications

ORIGIN OF THE DATA


The origin of the data is one of the most important points when creating an archive. In doing so, it is
mostly a matter of:
 What type of data is it?
 How is data transferred to zenon?

Further important information for configuration:


 Driver:
What drivers establish the connection to the PLC?
Data can only be written to an archive as fast as the driver can provide it.

14 | 185
Archiving concept

 Granularity
In what level of detail does the data need to be recorded?
For example: For a water meter, it is usually sufficient to archive one value daily. In contrast,
for a press in car manufacturing, possible value changes in the range of a few milliseconds
need to be recorded.
 Storage period:
How long should data be available in zenon?
The more data is archived within a certain time, the more memory requirements are
increased.
 Granularity for long-term archiving:
For large amounts of data, it is important to plan how long this is to be present in a certain
resolution. For example, is it necessary to also use the data in that level of detail years after it
has been collected? Or are average values or sums over longer periods of time sufficient? In
the latter case, aggregation archives (on page 50) are created in zenon.

USE OF DATA
It is not just the origin of the data that plays an important role when archiving; subsequent use in
zenon should also be considered.

Archive data is mostly used in trends and reports. In order to keep the storage requirement and
loading times as low as possible, it is necessary to keep the data as efficiently as possible.

Note: Always encapsulate data according to its use. This means: The save cycle of the archives must
be well selected. The time period of the data in a capsule should correspond to that time period of
the data used in zenon.

For example: Data from the last ten minutes is to be examined in a trend. If only one capsule per
archive is saved each day, the complete archive of a day must be read in order to display data for 10
minutes. The majority of the data is thus loaded for nothing. Vice versa, if the capsules are saved in
intervals of one minute, 10 capsules must be opened for consideration.

In the concept of data usage, the content of the information per capsule and the number of required
files must be balanced out. Frequently-used methods:
 Conceiving archives for different purposes.
For example, archives for long-term data storage and archives for use in trends, which is only
saved for a short period of time.
 Also compiling data that is used jointly into an archive.
For example data for use in a trend in an archive for display in the trend. This avoids several
capsules having to be loaded for different curves in a trend, which may include data that is of
no significance to the trend.

15 | 185
Archiving concept

RESOLUTION OF PRINT AND MONITOR RESOLUTION

With the use of data in Extended Trend in particular, the resolution of the screen or printing plays a
decisive role. This is because the resolution limits the number of values per curve that can be
meaningfully displayed. If the trend curve is displayed in an element with a width of 1,000 pixels, no
more than 1,000 values per curve can be displayed.

5.1 Best Practice


The configuration of archives must primarily take in to account which data, from which time period, is
needed for which purpose. In doing so, it is important to optimize the size and number of the
archives. Archives that are too large could lead to computers being put under too high a load and
high consumption of memory or prevent the execution of Runtime. The recording types and cycle
times that are supported depend on the PLC and driver.

You can find information on effective configurations in this chapter.

CONFIGURATION FOR THE "ON CHANGE" RECORDING TYPE


The on change recording type saves each change. This can add up to 36,000 values per second with
up to 10 values. If longer time periods need to be displayed, extensive archives need to be read in the
Runtime. All values are of all variables are always read in, even if only one variable is displayed. The
maximum number of values to be read in the memory for Extended Trend, archive revision, AML, CEL
and tables can be amended. The size is limited to 1 GB as standard. The size can be amended in
zenon6.ini and the SPEICHER= entry.

Recommendations:
 Find out which variables cause the most entries.
 Configure the hysteresis for values that change quickly (such as fluctuating ones). The
number of entries is thus reduced.
 Amend the value for SPEICHER= to your system.
 Test how the archive files grow in size on a test system before implementing the system
productively.

CONFIGURATION FOR DISPLAY IN A TREND


The data that can be displayed in a trend is also limited by the physical restrictions of the screen or
the print-out. If a trend diagram covers more than 1440 pixels, for example, a maximum of 1440
values can also only be displayed in theory. If 5 pixels are available for a value, this corresponds to the
value every five minutes within 24 hours.

Recommendations:
 Evaluate what data and time periods are needed in the Runtime.

16 | 185
Engineering in the Editor

 Pack the variables that are displayed together into an archive instead of dividing the archives
according to variables.
 Use aggregated archives.
 Amend the save cycles of archives and aggregation archives to the time periods to be
displayed.
The less redundant data that needs to be read in and transferred to the network, the less
effort there is for Runtime.
 Use zoom for longer periods of time to display data from aggregation archives instead of
showing all data from a base archive.
 Index the Runtime files (Index Runtime files project property).
 Index the lot variables (configuration of the archives).
 With large amounts of data, deactivate the automatic updating of the display in the trend.

CONFIGURATION FOR REPORTING


Recommendations:
Only use the on value change recording type if absolutely necessary.

The recording of each change can lead to a very large amount of data.
 Use archives with cyclic recording.
 Amend the recording time periods and save cycles to the periods to be displayed.

6 Engineering in the Editor


Archives are created and administered in the Historian module in the Editor.

6.1 Detail view


Archives are shown in a table in the detail view. The columns of this table are fixed and cannot be
configured individually. The column width can be amended with the mouse. Incremental searching is
possible in the columns.

TABLE COLUMNS
The following is displayed for each archive:
 Archives
 Start, stop

17 | 185
Engineering in the Editor

 Start
 Recording type
 Evacuate
 Lot variable
 Number
 estimated size

SEARCH IN THE TABLE


To search in the table:
1. Click on the desired column heading.
2. A symbol (binoculars) shows that a search is being carried out in this column.
3. Type in the search term.
4. The first appropriate entry is highlighted.

6.2 Toolbar and context menus

PROJECT TREE

CONTEXT MENU HISTORIAN


Menu item Action

New archive Opens the wizard for creating a new archive.

Export all as XML Exports all archives as an XML file.

Import XML Imports XML files.

Editor profile Opens the drop-down list with predefined editor profiles.

Help Opens online help.

DETAIL VIEW

TOOLBAR HISTORIAN AND ARCHIVES

18 | 185
Engineering in the Editor

Symbol Description

New archive Opens the wizard for creating an archive.

New aggregated archive Opens the wizard to create an aggregated archive.

Edit archive Opens the dialog for editing the selected archive.

Add variable Opens the dialog for selecting variables.

Remove variable Deletes a variable from the list without confirmation.

Jump back to starting element Jumps back to the initial position in the zenon Editor.

Note: Only available in the context menu if a jump to the


current position has been made from another position with the
Linked elements context menu entry.

Delete Deletes the selected archive.

Export selected as XML... Exports selected archives as an XML file.

Import XML Imports XML files.

Rename Makes it possible to change the name of the archive.

Help Opens online help.

CONTEXT MENU HISTORIAN


Menu item Action

New archive Opens the wizard for creating a new archive.

Save Saves the configuration for new and amended archives.

Note: This entry is only available in the Historian node of the


detailed view. This entry is not available in the node of the
workspace.

Export all as XML Exports all archives as an XML file.

Import XML Imports XML files.

Help Opens online help.

19 | 185
Engineering in the Editor

CONTEXT MENU ARCHIVE


Menu item Action

Edit archive Opens the dialog for editing the selected archive.

Add variable Opens the dialog for selecting variables.

New aggregated archive Opens the wizard to create an aggregated archive.

Create template Opens the dialog (on page 62) to create a template for
aggregated archives.

Import template Opens the dialog (on page 58) to import a template for
aggregated archives.

Delete Deletes the selected archive

Export selected as XML... Exports selected archives as an XML file.

Import XML Imports XML files.

Rename Makes it possible to change the name of the archive.

Help Opens online help.

AGGREGATED ARCHIVE CONTEXT MENU


Menu item Action

Edit archive Opens the dialog for editing the selected archive.

Add variable Opens the dialog for selecting variables.

New aggregated archive Opens the wizard to create an aggregated archive.

Delete Deletes the selected archive

Export selected as XML... Exports selected archives as an XML file.

Import XML Imports XML files.

Rename Makes it possible to change the name of the archive.

Help Opens online help.

CONTEXT MENU VARIABLE LIST


Menu item Action

Add variable Opens the dialog for selecting variables.

20 | 185
Engineering in the Editor

Menu item Action

Help Opens online help.

CONTEXT MENU VARIABLE


Menu item Action

Remove variable Deletes variable from the list.

Attention: Deletion is carried out without a request for


confirmation.

Help Opens online help.

6.3 Creating a new archive


You can create archives manually or with the help of an assistant. In order for the assistant to be able
to be started, the Use assistant option in the Tools/settings menu of the Editor must be activated.

To create a new archive with the assistant:


1. Ensure that the Use assistant option has been activated.
2. Navigate to the Historian node.
3. Select New archive in the context menu or in the toolbar.
4. The assistant is started. Follow the steps in the Assistant (on page 22).

To create a new archive individually:


1. Navigate to the Historian node.
2. Select New archive in the context menu or in the toolbar.
3. The dialog New archive is opened.
If the assistant is started, close this using the Cancel button.
4. Configure the archive according to the Edit archive (on page 26) dialog.

21 | 185
Engineering in the Editor

6.3.1 Assistant
The assistant supports you in the basic configuration of an archive. The assistant supports you when
creating archives and aggregated archives. It allows the entry of the name and short name of the
archive, and also enables you to select variables and templates and amend the settings for the
recording type of variable values.

Option Description

Next Moves to the next page of the assistant.

Back Leads you to the previous page of the assistant.

Cancel All entered settings are lost.

The new archive dialog is opened immediately afterwards.


Configurations made in the assistant are applied in the respective tabs of
the dialog.

Finish Only available at the end of the wizard.

Ends the assistant. The new archive is entered in the archive tree (detail
view of the project manager).

If you want to configure the archive without the help of the wizard, click on Cancel.

If the assistant is not displayed, then:


1. Open the menu Tools in the Editor.
2. Select Settings.
3. Activate, in the Settings tab, the Use wizard option.

22 | 185
Engineering in the Editor

CONFIGURATION WITH THE WIZARD


1. Click on the Next button once the wizard has been started. Configuration starts by giving a
name and a short description.
2. Enter a short description (2 characters are obligatory) and a name.

 Short name: 2 characters. Can only contain alphanumerical characters: all letters from A
to Z and figures from 0 to 9, but no country-specific characters or special characters.
Note: The short name cannot be changed later on.
 Name: Entry of a valid name for the archive.
The following characters are not permitted: / \ : * ? < > ! | " ' # % @
The name can be changed later on.
3. Click on Next.
4. The variable selection is configured.

a) Click on the Variable selection button.

23 | 185
Engineering in the Editor

b) The dialog to select variables that are to be archived is opened.


c) Select the desired variables.
5. Click on Next.
The template to be used for the desired aggregation structure is selected.

Clicking on the Template Selection button opens the dialog to select a template (on page
57).
 Templates can only be imported for base archives with cyclic scanning. These archives
cannot have any aggregated archives yet.
 The dialog is only opened if at least one template is present.
Attention: No check to see if the template contains a valid aggregation structure is carried
out.
Further sequence of the assistant:
 Selecting a template The assistant is thus completed. Click on the Finish button.
 No template selected: Click on Next to configure the recording type individually.

24 | 185
Engineering in the Editor

6. Configure the type of recording if you have not selected a template in the previous step.

Selection of recording type from drop-down list.


7. Click on Next.
Configure new aggregation archives if you want to.

a) Click on New to create a new aggregation archive or on Edit to change the name of an
existing archive.
b) Assign the aggregation archive the desired aggregation types. These always apply for all
aggregation archives shown in this dialog.
c) To delete an aggregation archive, click on Remove.
8. Close the assistant by clicking on Finish.

25 | 185
Engineering in the Editor

POSSIBLE RECORDING TYPES

Option Description

Cyclic recording Set the Cycle time.

Record on change Configure:


 Possible saving of the process image
 The initialization value if required

Event-triggered recording Configure:


 An event variable by clicking on the ... button
 the timestamp
 The initialization value if required

For details see recording type (on page 34) chapter.

Information
With a new archive, the dialog for the recording type is displayed. Not with an
aggregated archive, because an aggregation archive always carries out
recording in the event of a change.

6.4 Edit archive


To edit archives:
1. Highlight the desired archive.

26 | 185
Engineering in the Editor

2. Select Edit archive in the context menu or in the toolbar, or press the Enter key
The dialog to configure an archive is opened.

Note: This dialog is also opened if a new archive is created and the wizard is deactivated.

6.4.1 Properties
In this tab, you define the identification and select variables, lots and equipment models.

Note: You can find help for configuring the properties of aggregated archives in the Aggregated
archives (on page 50) chapter.

VARIABLE SELECTION
Option Description

Variable selection Display and configuration of the variables that should be


taken into account in this archive.
 Add variables:
Select Add variable in the context menu. You can
add variables to the archive from all projects
which are in the same workspace. Ensure that
variables from other projects are also available in

27 | 185
Engineering in the Editor

Option Description
the Runtime.
 Delete variables:
Highlight the variable and select Delete variable in
the context menu.

Note: Seamless redundancy is only supported for


variables that come from the same project as the archive.

Attention: Only add variables if the archive has not yet been used.
If, in an archive filter, the start date of the archive is before the date of adding, the variable is not
taken into account.

IDENTIFICATION
Option Description

Label Name and identification of the archive.

Identification Two-digit unique identification of the archive. This


identification is integrated into the name of the ARX file
when saving the archive data and during automatic
name issuing when exporting. The assignment of the files
is thus assured

Attention: The identification can only be issued when


creating a new archive. It cannot be changed afterwards.
Note: Only alphanumeric characters (A-Z and 0-9) are
permitted for the identification. Possible problems during
export or evacuation of the archive are thus avoided.

Name Freely-definable name of the archive.

Note: The following characters are not permitted: / \ : *


?<>!|"'#%@

Description Text field to enter additional information. This


information is shown in the project manager under the
Archive Server node item in the Description column of
the archive overview. The property can be used for XML
import/export and API access.

28 | 185
Engineering in the Editor

LOTS
Option Description

Lots Configuration of lots. See also the Lot archiving (on


page 68) chapter.

Lot variable Selection of lot variables. These must be string-type


variables. The value of the variable is used as lot name.
Click on the ... button to open the dialog for selecting the
variable.

Note: The value of the variable is used as lot name.


While the archive is open, the value of the variable and
therefore the lot name can change. Kindly note this at
filtering. The value of the variable when ending the
archive is used as final lot name.

Index lots Active: The lot values of this archive are automatically
indexed. This allows quicker access to the lot values.

Lots can also be indexed in the Runtime with the Index


archive function.

EQUIPMENT MODELING
Option Description

Equipment Modeling Configuration of equipment models.

Equipment Groups Selection of an equipment group for the archive. Click on


the button ... in order to open the dialog for selecting an
equipment group.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

29 | 185
Engineering in the Editor

Information
Archives can contain variables from sub projects. Variables from sub projects
can be identified by the variable name. This contains the project name.

With the lot variable option (lot archiving (on page 68)) and the content linked
to the event variable, variables from subordinate projects can also be used.

6.4.2 Runtime
In this tab, you define when and how archives are started and stopped and which functions are also
executed in addition to archive start or archive end.

START AND STOP


Option Description

Start and stop Selection of how archives are started and stopped in the
Runtime.

At start and end of Runtime The archive is automatically started and stopped with the
Runtime. The settings of the Start of the archiving

30 | 185
Engineering in the Editor

Option Description
option have an effect here.
The following is applicable:
 Save cycle < 1 day:
Only the time of the configured Start of archiving
is used as a starting point for the save cycle for the
determination of the start time. The date is not
taken into account in the process. In doing so, it is
of no significance whether the time is in the past or
in the future in relation to the Runtime start time.
 Save cycle >= 1 day:
Both time and date from the Start of archiving
option are taken into account.
Attention: If the date or time are in the future,
there can be no encapsulation!

Attention: If you activate this setting, the archive must


not be stopped or started using functions (on page 74).
This can cause unwanted behavior in Runtime.

User-defined (e.g. via functions) The archive is started and stopped as defined by the user.
For example, by using the Start an archive (on page 113)
and Stop an archive (on page 115) functions

These functions can be triggered:


 manually by the user
 by events
 by time control

These archives register all variables for the first time when
Runtime starts. This can result in the driver writing variable
values that have not been recorded in the archives yet.
 Advantage: The archive starts faster.
 Disadvantage: In the case of a project with many
variables, all of these must be registered
immediately. This can lead to increased data
exchange and thus delay the start of Runtime.

Attention: These functions do not correspond to those


of the settings for Execute function on.

RDA block archive The archive is administered via RDA (on page 12).

31 | 185
Engineering in the Editor

Option Description

In doing so, values which have been stored in the PLC are
read and saved in a zenon archive. This is triggered by a
trigger variable.

Note: RDA block archives do not support: Status


variables as well as variables configured as Request only
from standby server .

EXECUTE FUNCTION ON

Selection of functions that are to be executed when the archive is started and ended.

Attention: These functions are executed on starting and ending. However they do not trigger
starting or ending. Functions to close and start an archive are configured separately in the project and
linked to a button or event.
Option Description

Archive start Selection of a function that is to be carried out when the


archive is started.

Archive end Selection of a function that is to be carried out when an


archive is ended.

Note: Cannot be used for RDA archives. With RDA archives, the archive status variable does not
change its value when it is opened. This means that these functions are not executed for RDA
archives.

ARCHIVE STATUS
Option Description

Status variable Variable to represent the status of the archive:


 true or 1:
Archive is running
 false or 0:
Archive is not running

Click on button ... in order to open the dialog for


selecting variables. The linked variable must be of the
data type BOOL.

The following is applicable for the value of the status


variable:

32 | 185
Engineering in the Editor

Option Description
 For archives that are started with Runtime, the
initial value is true (at the start too).
 Archives that are started using a function have the
initial value false and change this status to true
after being started successfully.
 With redundancy switching, the status is retained
on the Standby Server, i.e. running archives are set
to true and stopped ones are set to false.
 With cyclical archiving, the variable gets the value
false for a brief period during a cycle change.

Tip: link an internal variable driver as the status variable.

Note: Cannot be used for RDA archives. With RDA archives, the archive status variable does not
change its value when it is opened.

START OF ARCHIVING
Option Description

Start of archiving Stipulation of the start time.

Date/time Definition of the start time for the scan and save cycle.

The set time defines the first save time of the files that are
to be archived. It is used as the basis of calculations for
the set save cycles.

Note also the effects on the settings for Start and stop
when starting and stopping the Runtime.

Example: You define an archive that is to be saved


weekly. This save cycle starts at the set start time. If this is
set to a Tuesday, your weekly archive runs from Tuesday
to Tuesday.

Recommendations:
 Leave the start time on the 1. 1. at 00:00. This
ensures that monthly archives and yearly archives
always start on the first day of each month/year.
 The start of the scan and save cycle should contain
a rounded time and date in the past, so that data
recording is started automatically with the next

33 | 185
Engineering in the Editor

Option Description
time Runtime is started.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

6.4.3 Recording type


In this tab, you define how data is recorded to the archives.

RECORDING TYPE TAB

CYCLICALLY
Option Description

Cyclic Settings for cyclic recording.

34 | 185
Engineering in the Editor

Option Description

The cycle is freely selectable. However it is closely


related to the save cycle (on page 37).

Hint: The save cycle should be a multiple of the scan


cycle. Otherwise there could be overlaps between
scanning and saving the archives. This leads to
imprecisions in the aggregated archives.

Note: The value for milliseconds is automatically set


to 0 in the time stamp.

Cyclic recording Active: Archive data is recorded cyclically. After that


define the cycle time.

Cycle time Define the cycle time (days, hours, minutes and
seconds) in which values are to be written to the
archive.

Monthly Reading in of the values is done at every month


change

Offset Define how long the archive is to wait after it has


requested the values from the driver. The offset is
primarily needed for slower drivers. This setting is
important if an archive is closed directly after reading
the last value.
It does not have any influence on the time stamp of
the values.

Note: The offset must always be smaller than the


cycle time.

EVENT-TRIGGERED
Option Description

Event-triggered Settings for the event-triggered recording.

Event-triggered recording Active: Archive data is recorded on an event-triggered


basis.

Trigger variable Selection of the variables that are to trigger the


reading of the values. The reading is triggered by the
rising edge of this trigger variable from 0 to 1. Select
by clicking on the ... button.

35 | 185
Engineering in the Editor

Option Description

Time stamp is taken from Definition of how the time stamp is set. It can be
accepted from:
 Trigger variable
 Archive variable

ON CHANGE
Option Description

On value change Settings for recording on change.

Hint: This method should not be applied for


heavily-fluctuating values, because this could lead to
an exceptionally high amount of entries.

Record on change Active: Variables are only written to the archive when
their values change spontaneously.

Recommendation: Stipulate a measurement range


for a Hysteresis in order to avoid values that change
rapidly (such as fluctuating ones). These can quickly
create large amounts of data. For details, see the
Hysteresis chapter in the Variables manual.

Save process image during start Active: On creating a new archive file the current
values of the variables are written into the archive.

Note: Must be activated if a Gantt curve is also to


display the current status in Extended Trend.

Save process image during exit Active: On closing an archive file the current values of
the variables are written into the archive.

Note on process image: When creating an image for an event-triggered archive, a joint
command is sent for all variables.

IGNORE INITIALIZING VALUE


Option Description

Ignore initializing value for Only available for the recording type event
recording type when controlled and with value changes:
event-triggered/On change
If a variable is read for the first time, an initialization
value can be entered. An initialization value is read, for

36 | 185
Engineering in the Editor

Option Description
example, when Runtime is starts or if a Standby Server
upgrades to the Server.

This option determines whether the initialization value


is considered in the archive:
 Active: The initialization value is not taken into
account in the archive.
 Inactive: The initialization value is taken into
account.
Note: When starting and switching servers, this
triggers a new initialization value. The new
initialization value that is created as a result is
taken into account and entered into the archive
accordingly.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

6.4.4 Save
In this tab, you define how archives are saved.

Attention
The current Alpha archive is deleted when changing the save type or the cycle.
An Alpha archive is the archive file that is being written by zenon.

37 | 185
Engineering in the Editor

SAVE OPTIONS IN THE DIALOG

SAVING FORMAT

Selection of how archives are saved.


Option Description

Internal database (*.arx)  Active: Data is available for subsequent editing and
evaluation in a ring buffer (FIFO). The data is stored in the
Runtime folder. [Project Path]\[Computer Name]\[Project
Name].
They are moved to the export folder hen moved (FIFO).

dBase (*.dbf)  Active: When the archive is closed, the data is immediately
evacuated to a dBase file (*.dbf)

Attention: For evacuated archives, archive revision, log creation


and line graphics are no longer possible.

CSV (*.txt)  Active: When the archive is closed, the data is immediately
evacuated to a CSV file (*.txt)

Attention: For evacuated archives, archive revision, log creation

38 | 185
Engineering in the Editor

Option Description
and line graphics are no longer possible.

Save as unicode  Active: The TXT file is saved as Unicode.

XML (*.xml)  Active: At ending the archive, the data are immediately
evacuated as a *.XML file.

Attention: For evacuated archives, archive revision, log creation


and line graphics are no longer possible.

Note: In the Historian Starter Edition, only saving to the internal database (ARX) is possible.

SAVING CYCLE

Defines the interval in which archives are created. This cycle has a reciprocal effect on the recording
type (on page 34) in the Runtime. For details, see Cycles in Runtime (on page 159).

Option Description

Cycle time  Active: The length of the archives is defined in days, hours,
minutes and seconds.

This option has an effect on the file size and the number of archive
files, and determines the cycle for aggregated archives (on page
50).

define the values for:


 Days
 Hours
 Minutes
 Seconds

Note: These values also have an effect on user-defined archives.


These are used to calculate the number of archives to be archived.

Recommendation: Values greater that 30 seconds.

Turn of month  Active: The archive is saved each time the month changes
(monthly archive).

Turn of year  Active: The archive is saved each time the year changes
(annual archive).

Note: This setting already defines the cycle for aggregated archives.

39 | 185
Engineering in the Editor

Attention
User-defined starting and ending of archives:

Information in the Cycle option does not have an effect on the starting and
stopping of archives, because this is carried out via functions. However this value
does have an influence on how many archive files are stored. The various actual
sizes of the archive files are not taken into account here.

The number of archive files to be stored is calculated as follows:


storage duration/Cycle time.
Evacuation is started after this. This ensures that evacuation is carried out with
user-defined archiving after a certain number. The number of files to be stored
is limited to 65535. The configuration of save cycle and duration of storage
takes this into account automatically.

Example:
 storage duration: 5 hours (= 300 minutes)
 Cycle: 15 minutes

Result: 300/15 = 20 archive files to be stored.

EXPORTED COLUMNS IN CSV/DBASE EVACUATION

With the two evacuation options dBase and CSV, certain parameters of archived variables can also
be evacuated.

Exported columns: Enter the desired parameters into the text field in the desired
order:
 V: Variable name
 I: Variable identification
 W: Value
 S: Status
 D: Date
 Z: Time

Default: DZVWS

EVACUATION

Configuration of the evacuation of archives. Archives are deleted locally after evacuation.

40 | 185
Engineering in the Editor

Option Description

Storage duration Define the duration of storage for the archive before it is
evacuated.

Granularity
 Hours
 Days
 Months
 Years

A maximum of 65535 archive files can be stored.

Attention: The duration of storage is directly dependent on the


save cycle. If the save cycle is changed, the values for the duration
of storage are amended to the maximum.

Examples:
 Cycle time: 1 second
maximum storage time 18 hours.
 Cycle time 1 minute
maximum storage time 1092 hours or 45 days or 1 month.

Attention: No archive is saved if the value 0 is entered. The only


existing archive is the current one.

Evacuation after storage Setting the evacuation method.


time
Note: The type of evacuation method also has an effect on the
display in the Extended Trend.

For further information in relation to this, see the Display


differences of the evacuation methods chapter in the Extended
Trend manual.

Do not evacuate  Active: Archives are deleted after the duration of storage
has expired.

Internal database (*.arx)  Active: Archives are evacuated in the *.arx internal database
format.

If the number of archive files to be stored is reached, the oldest


are moved to the folder for evacuated archives. zenon can
continue to access the files in order to display the values saved
therein, in reports for example.

41 | 185
Engineering in the Editor

Option Description

Export compressed Compressions selection


 Active: When evacuated, the payload contained in the
archive file is compressed. The compression takes place for
numerical data (ARX file) and for string data (ARS file).
 Inactive: Payload is evacuated uncompressed.

Default: inactive

Attention: Compressed archives cause increased demands on


memory requirements and CPU utilization when evacuating and
reading.

SQL database  Active: Archives are evacuated to an SQL database. E.g.:


Microsoft SQL Server, Oracle and other database systems
that have an ODBC interface.
Selection of database: Click on the ... button to open the
dialog to select and configure a database.

In contrast to dBase, ASCII or XML archives evacuated into an SQL


database are automatically reloaded when necessary (e.g. for
Extended Trend).
Attention: Archives evacuated to SQL can be read in zenon but
it is no longer possible to write to them.

Note: Databases can also be evacuated in the MS Azure service


bus.

You can find details on evacuation to SQL databases in the


Evacuating archives to an SQL database (on page 167) in the
Further information (on page 164) section.

Create table Clicking on this button opens the dialog to create or update tables
in the SQL database.

Using MS Azure Service  Active: Writing to the SQL table is not carried out directly via
Bus for writing the OLEDB connection and SQL INSERT statement, but via
the MS Azure service bus.

The connection name for the MS Azure service bus must be


entered in the field under the option.

For details, read the Further information (on page 164) section in
the MS Azure service bus (on page 173) chapter.

XML (*.xml)  Active: Archives are evacuated in XML format.

42 | 185
Engineering in the Editor

Option Description

CSV (*.txt)  Active: Archives are evacuated in CSV format into a text file.

Export as unicode  Active: The evacuated TXT file is saved as Unicode.

dBase (*.dbf)  Active: Archives are evacuated in DBF format.

Data Storage  Active: Archives are saved for the Service Grid and passed
on to the Service Node.

Only available if:


 Service Grid Gateway is licensed

 Project properties Execute Service Grid Gateway is


activated

If a requirement is no longer met after configuration, the


configuration switches to Do not evacuate the next time the
dialog is opened.

Notes:
 If Runtime files are created for zenon 8.10 or earlier, then
this option is changed to Do not evacuate.
 Variables in the archive must have access authorization for
Service Grid. Data from variables with no access
authorization are lost during evacuation.

The path for the save location of the evacuation files is configured using the General/File storage
project property. SQL evacuation (on page 167) is not included in this. The path is set in the
Evacuated archives option (see also Project-related folder chapter). In addition, the path to read
back archives can also be defined using the Read-back folder for archives option. These paths can
also refer to the same save location. Exported archive data files can thus also be read back again
without manual copying. Different paths make sense if, for example, read-back is from a DVD and the
exported data is only burnt onto new DVDs at defined times.

Note: RDA archives can be evacuated. Evacuation is carried out immediately after the archive is
closed.

VARIABLE FOR EVACUATION STATUS


Option Description

Variable for evacuation Variable for the representation of the status of the evacuation of
status an archive:
 true or 1:

43 | 185
Engineering in the Editor

Option Description
there is a problem with evacuation.
 false or 0:
Evacuation works without errors.

Click on button ... in order to open the dialog for selecting


variables. The linked variable must be of the data type BOOL.

If the evacuation of an archive is unsuccessful, for example because


the SQL server cannot be reached or the data carrier is not ready
to write, the value of the variable for the evacuation status changes
to true briefly. This change can be evaluated using a reaction
matrix.

Tip: link an internal variable driver as the status variable.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

EXPORT PARAMETERS
The column separator character for ASCII export and the decimal points for TXT, DBF, XML and SQL
can be amended in the project.ini file:

Section: [ARCHIV]

Entries:
 TRENNZEICHEN=
 ARCHDIGITS=

FILE NAMES
The file names of the archives to be exported are issued as follows:
Parameter Description

XXYYMMTThhmmss.xxx File name

XX Archiv Short name

44 | 185
Engineering in the Editor

Parameter Description

JJ Year (e.g. 14 for 2014)

MM Year (e.g. 03 for 2005)

TT Day

hh Hours in UTC.

mm Minute

ss Second

xxx File format

6.4.5 Options
In this tab, you define criteria for creating aggregation archives. You can set exclusive and inclusive
filters to different status bits to do this.

45 | 185
Engineering in the Editor

CALCULATIONS FOR AGGREGATED ARCHIVES


Option Description

Consider values in calculation for Active: Activated status bits are taken into account for
aggregated archives for the the calculation of values of aggregation archives.
following status only
The additional statuses are
 shown in the archive editor
 Shown in the report and can also be set there

For the definition of the status, see the Status


processing chapter:

Each status bit can have one of 5 possible states:


 empty: is not evaluated
 green 0: Is taken into account if the value is 0.
 green 1: Is taken into account if the value is 1.
 red 0: Is not taken into account if the value is 0.
 red 1: Is not taken into account if the value is 1.

Note: If the checkbox is activated, at least one status


bit must be activated.

SET TIME STAMP IN AGGREGATED ARCHIVES


Option Description

Time stamp of minimum/ Active: The time stamp of the minimum/maximum


maximum value value found is used as a time stamp.

Time stamp of calculation Active: The time stamp of the calculation is used as a
time stamp.

ALTERNATE ARCHIVE
Option Description

Create alternate archives Behavior if Runtime is not active:


 Active: Missing archive files are created the next
time Runtime starts.
Note: To do this, cyclic recording must be
selected.
 Inactive: Only the current cycle is filled up.

46 | 185
Engineering in the Editor

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

CREATING A STATUS FILTER


By clicking the checkbox next to each displayed status, you can decide for each value of the archive if
it is to be used for the aggregated archive.

Example
In the aggregated archive, only values for which bit NORM is set and bit
INVALID is not set are taken into account.

For this you set a green 1 for bit NORM and a red 1 for bit INVALID. The check
boxes of all other bits remain gray.

You can explicitly include or exclude set or un-set bits.

47 | 185
Engineering in the Editor

Information
Not all status bits set during archiving are also visualized. Non-visualized bits
are:
 T_EXTERN (status bit 21)
 T_INTERN (status bit 22)
 INFO (status bit 26)
 RES28 (status bits 28)
 RES31 (status bits 31)
 WR_ACK (status bit 40)
 WR_SUC (status bit 41)
 COT0 (status bit 32) to COT5 (status bit 37)
 T_STD (status bit 30)

Non-visualized status bits are:


 not saved as a TXT file or written as an XML
 Not printed when printing out
 Not shown in the Recipegroup Manager

You can find an overview of all status bits in the Status bits chapter

6.4.6 Example
The start and end time of an archive file, as well as the time points for the entry of variable values into
the archive file are calculated from the options of the following tabs:
 Runtime:
Start of archiving
 Recording type:
Cyclic recording
 Save:
Saving cycle

The calculation of the time point for the entry of variable values into the archive file is restarted for
each archive file.

48 | 185
Engineering in the Editor

Attention
Note the difference between:
 The scanning and save cycle (SSC) and
 Cycle time (CT)

These must not be confused.

EXAMPLE
 Identification: XX
 Start of archiving: 01.01.2013, 00:00:00
 Cyclic scanning: 13 seconds (00:00:13)
 Saving cycle: 1 minute (00:01:00)

Result:
Date Time Archive file

12/7/2013 03:08:13 xx80131207020900.arx

12/7/2013 3:08:26 AM xx80131207020900.arx

12/7/2013 3:08:39 AM xx80131207020900.arx

12/7/2013 3:08:52 AM xx80131207020900.arx

12/7/2013 3:09:13 AM xx80131207021000.arx

12/7/2013 3:09:26 AM xx80131207021000.arx

12/7/2013 3:09:39 AM xx80131207021000.arx

12/7/2013 3:09:52 AM xx80131207021000.arx

 Each archive file contains data for a minute each.


 Data recording for each archive file starts at hh:mm:13.

DETERMINATION OF THE DTV


The determination of the time of the first value (DTV) is achieved by rounding the scan and save cycle
to the cycle time. In doing so, please note:
 The rounding of the scan and save cycle to the first cycle time is carried out in accordance
with the following model:
 Hours with hours

49 | 185
Engineering in the Editor

 Minutes with minutes


 Seconds with seconds
This means: If the time (H:M:S) of the recording and save cycle to be rounded is less than
that of the cycle time, the latter is always 0.
 If the cycle time is a day, the recording and save cycle is always taken as 0:0:0 o'clock
Recording starts at 00:00.
 For monthly cycle time, recording always takes place on the first day of the month at
00:00:00.

SOME EXAMPLES:
 ASZ: Scan and save cycle

 ASZr: Scan and save cycle rounded:

 AZ: Cycle time

 EZW: Time first value

ASZ AZ -> EZW; ASZr + AZ = EZW

XX:XX:XX 1T 00:00:00 00:00:00; 00:00:00 + 00:00:00 00:00.00

12:01:00 AM 0d 23:59:00 11:59:00 PM; 00:00:00 + 11:59:00 PM 11:59:00 PM

12:30:00 AM 0d 12:30:00 1:00:00 AM; 12:30:00 AM + 12:30:00 1:00:00 AM


AM AM

12:30:00 AM 0d 12:29:00 12:58:00 AM; 12:29:00 AM + 12:29:00 12:58:00 AM


AM AM

12:30:00 AM 0d 12:05:00 12:35:00 AM; 12:30:00 AM + 12:05:00 12:35:00 AM


AM AM

12:29:00 AM 0d 12:05:00 12:30:00 AM; 12:25:00 AM + 12:05:00 12:30:00 AM


AM AM

12:00:00 AM 2T 12:00:00 12:30:00 AM; 00:00:00 + 2d00:00:00 3. 12:00:00 AM


AM

6.5 Aggregated archives


Aggregated archives always relate to a base archive, the data of which it shows in compressed form.
Within zenon, aggregated archives act like any other archive. You can do the following with
aggregated archives:

50 | 185
Engineering in the Editor

 Editing in the Runtime using an archive revision screen


 Include them in reports and trends
 evacuate

The following calculation methods are available for the compression of data:
 Sum
 Average
 Minimum
 Maximum

The use of aggregation archives is recommended for large amounts of data most of all. For a
comparison of time periods such as complete weeks, months or years, average values or sums are
often sufficient. The raw data can thus be prepared in a clear manner and the amount of data can be
reduced.

CREATING AN AGGREGATION ARCHIVE


To create an aggregation archive:
1. In the detail view, select the archive that is to be aggregated.
2. Select New aggregated archive in the toolbar or in the context menu
3. The assistant is started provided it is activated in the settings.
(In order for the assistant to be able to be started, the Use assistant option in the
Tools/Settings menu of the Editor must be activated.)

4. Please define a name!

51 | 185
Engineering in the Editor

5. Select the Variable and the method (on page 53) of aggregation.

Click on the Variable selection button to open the dialog (on page 53) to select a variable
and the aggregation method.
Aggregated archives are also recorded on change. The scan cycle of the aggregation archive
is set via the save cycle of the respective base archive. The values selected for the
aggregated archive are always calculated if a base archive is closed and saved. zenon
recognizes the closing of the basic archive as a value change and triggers the calculations for
the aggregated archive.

52 | 185
Engineering in the Editor

6.5.1 Variable selection and aggregation method


In the variables selection dialog, the variables to be aggregated and the aggregation method are
selected.

AVAILABLE ARCHIVES
Option Description

Available archives Select, from the variable list, the variables that should be taken into
account in the aggregated archive. Multiple selection with Control
key or Shift key.

Sum Active: Values of the selected variables are added depending on the
save cycle.

Average Active: Average value of the selected variables is generated.

Minimum Active: The minimum per selected variable is determined.

Maximum Active: The maximum per selected variable is determined.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

53 | 185
Engineering in the Editor

AMEND TIME STAMP FOR AVERAGE VALUE


The time stamp in an aggregated archive corresponds to the time when the ARX file was closed.
This leads to the following situation:
 The values of a day, X, are saved to an archive. The start time is thus 00:00, the save time is
24:00.
 The aggregation archive for this day, X, has an average value and received the times stamp
00:00:00 on day X + 1. (the minimum and maximum can have the same or the original time
stamp; in our case we assume the original)
 If filtering for the day X, 00:00:00, up to day X + 1, 00:00:00 is carried out in the aggregated
archive, you get the values for minimum and maximum with the original time stamp for the
day X.
 You get the average value for the day X-1 (time stamp day X, 00:00:00). The value for the
day X, which is in the file with the time stamp day X + 1, 00:00:00, is expected.
 The minimum and maximum thus have a time stamp within the selected time period; the
average value has a time stamp outside this time period.

SOLUTION

In order to receive a matching time stamp, set the time stamp for the average value back by one
second. To do this, enter, in the file called project.ini, in the [ARCHIV] section, the value 1 for
ZEIT_AUTOMATISCH=.

The time for the aggregation archive is thus automatically set to one second before saving. Day X+1,
00:00:00, becomes day X, 23:59:00.

54 | 185
Engineering in the Editor

6.5.2 Editing aggregation archives


The editing of aggregation archives differs from the editing of base archives in terms of the properties
most of all. For aggregation archives, variables are assigned to the calculation methods.

IDENTIFICATION
Option Description

Identification Name and identification of the archive.

Identification Two-digit unique identification of the archive. Is used for the


automatic name issuing with export functions.

Attention: The identification can be issued when creating a new


base archive. It cannot be subsequently changed.

Archive name Freely-definable name of the archive.

Note: The following characters are not permitted: / \ : * ? < > ! | "
'#%@

VARIABLE SELECTION
Option Description

Variable selection Select the calculation method in the archive and add variables to it
or remove variables that are to be taken into account in the

55 | 185
Engineering in the Editor

Option Description
aggregation archive. Multiple selection with Control key or Shift
key.
 Sum: Values of the attendant variables are added
depending on the save cycle.
 Average: Average value of the values of the attendant
variables is generated.
 Minimum: The minimum per attendant variable is
determined.
 Maximum: The maximum per attendant variable is
determined.

Adding or deleting variables:


 Add variables:
Select Add variable in the context menu. You can add
variables from the base archive.
 Delete variables:
Highlight the variable and select Delete variable in the
context menu.

LOTS
Option Description

Lots Configuration of lots. (See also chapter Lot selection (on page 68)
.)

Lot variable Selection of lot variables. These must be string-type variables. The
value of the variable is used as lot name. Click on the ... button to
open the dialog for selecting the variable.

Note: The value of the variable is used as lot name. While the
archive is open, the value of the variable and therefore the lot
name can change. Kindly note this at filtering. The value of the
variable when ending the archive is used as final lot name.

Index lots Active: The lot values of this archive are automatically indexed. This
allows quicker access to the lot values.

56 | 185
Engineering in the Editor

EQUIPMENT MODELING
Option Description

Equipment modeling Configuration of equipment models.

Equipment Groups Selection of an equipment group for the archive. Click on the
button ... in order to open the dialog for selecting an equipment
group.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

Note: Further tabs are configured in same way as editing the archive (on page 26).

LIMITATIONS
 Aggregated archives are automatically set to record on change by zenon. The recording type
cannot be changed.
 The save cycle results from the length of the attendant base archive. The values of the
variables are always written to the aggregated archive whenever the basis archive is ended.
 All entries of the base archive are used by default for calculation (i.e. also INVALID entries
and manual values).
Exception: In the base archive, the Only accept values in the aggregated archive
calculation if the following status filter is true property in the options is activated and
configured.

6.5.3 Templates for aggregated archives


Templates for aggregated archives make it possible to import existing aggregated archives into base
archives. Structures that have already been configured can be easily reused this way.

There are pre-configured templates (on page 59) available that are supplied with zenon. In addition,
individual configurations (on page 62) can be saved as templates.

Templates can only be imported for base archives with cyclic scanning. These archives cannot have
any aggregated archives yet.

57 | 185
Engineering in the Editor

TEMPLATE PATHS
The templates are stored in two paths:
 Pre-defined templates:
In the subfolder of the installation folder: \Templates\Archives\<Language>\<Filename>.xml
 User-defined Templates:
%programdata%\COPA-DATA\zenon8.20plates\Templates\Archives\<Language>\<Filename
>.xml
Note: Depending on the type of registration, this path can also be in the program folder.
zenon automatically takes this into account.

FILE FORMAT
Templates are stored in XML format. The template contains metadata with:
 Description of the template
 Name of the template
 The main settings of the archive for each archive of the hierarchy

6.5.3.1 Importing templates


To import templates for aggregated archives:
1. Highlight the desired base archive.
2. Select the Import template command in the context menu.
3. The dialog for selecting a template is opened.
4. Select the desired template.
5. Click on the Accept button.
6. The aggregated archive is imported.

Information
Templates can only be imported for base archives with cyclic scanning. These
archives cannot have any aggregated archives yet.

58 | 185
Engineering in the Editor

Option Description

Templates window Display of the templates present.

Selected templates window Display of the selected aggregated archive.

Apply Imports the aggregated archive into the base


archive and closes the dialog.

Cancel Discards all changes and closes the dialog.

Help Opens online help.

6.5.3.2 Supplied templates


The following pre-configured templates are supplied with zenon:
 Counters: Counting aggregated archive, which aggregates from one day over a week, a
month and a year up to two years and stores the data for up to 10 years.
 Standard: Standard aggregated archive, which aggregates from 30 minutes over an hour, a
day and a month to one year and stores the data for up to 16 years.
 Energy: Aggregated archive for energy, which aggregates from 15 minutes over an hour, a
day and a month to one year and stores the data for up to one year.

Supplied templates are write-protected and cannot be changed. They are shown in the dialog with
blue symbols. Self-created templates have red symbols.

59 | 185
Engineering in the Editor

AGGREGATED ARCHIVE COUNTER

Archive level Current aggregation Aggregated archive Storage


level aggregation level

1: CO-P_COU_30MIN 30 minutes 1 hour 14 days

2: C2-P_COU_1HOUR 1 hour 1 day 6 months

3: C3-P_COU_1DAY 1 day When the month 3 years


changes

4: C4-P_COU_1MONTH 1 month When the year 10 years


changes

60 | 185
Engineering in the Editor

AGGREGATED ARCHIVE STANDARD

Archive level Current Aggregated archive Storage


aggregated archive aggregation

1: DO-P_STD_1DAY 1 day 7 days 1 year

2: D2-P_STD_1WEEK 1 week When the month 3 years


changes

3: D3-P_STD_1MONTH 1 month When the year changes 10 years

4: D4-P_STD_1YEAR 1 year 2 years 16 years

61 | 185
Engineering in the Editor

AGGREGATED ARCHIVE ENERGY

Archive level Current aggregated Aggregated archive Storage


archive aggregation

1: EO-P_ENE_15MIN 15 minutes 1 hour 14 days

2: E1-P_ENE_1HOUR 1 hour 1 day 6 months

3: E2-P_ENE_1DAY 1 day 30 days 1 year

6.5.3.3 Creating and editing templates


Templates can be created individually. Templates can only be created for base archives (first level)
and only for archives with cyclic scanning. The menu item is deactivated for all other archives, or not
present for aggregated archives.

To create a separate template:


1. Highlight the desired basic archive in the detail view
2. Select Create Template in the context menu
The dialog for the configuration of templates is opened
3. Select the desired folder or create a new one.
4. Assign a meaningful name for the template.
5. Apply the new template by clicking on OK.

62 | 185
Engineering in the Editor

When creating a template, the complete hierarchy of the selected aggregated archive is used.

Note: Supplied templates and their folder structure cannot be edited or deleted.

CREATING AND EDITING TEMPLATES

Option Description

List of templates Contains a folder structure with all pre-defined templates.


Templates can be selected and the name and description can be
edited.

Pre-defined elements cannot be edited.

Name Name of the template.

Hint: Select a meaningful name in order to quickly be able to find


the correct template when importing.

Description Detailed description of the template.

New folder Creates a new folder in the highlighted folder.

Keyboard operation: Ins. key.

Rename Opens the highlighted element for editing.


Keyboard operation: F2 Key

Pre-defined elements cannot be renamed.

63 | 185
Engineering in the Editor

Option Description

Delete Deletes the selected element. If templates are only to be deleted and
no new ones are to be created, the dialog must be closed by clicking
on Cancel.
Keyboard operation: Del key.

Note: Pre-defined elements cannot be deleted.

CLOSE DIALOG
OK Applies settings and closes the dialog.
The template saves the settings of all aggregated archives to
the selected archive.

Cancel Discards all changes and closes the dialog.

Help Opens online help.

CREATE, EDIT AND DELETE ELEMENTS

CREATING A FOLDER

To create a new folder:


1. Highlight the existing folder
2. Click on the New folder button
oder
Press the Insert key
or
Select New folder in the context menu of the superordinate folder

EDIT ELEMENT

To edit an element:
1. highlight the element
2. Change the name or description
or
Select the corresponding command in the context menu of the element.

DELETE ELEMENT

To delete an element:

64 | 185
Engineering in the Editor

1. highlight the element


2. Click on the Delete button
or
Press the Del key
or
Select the Delete element in the context menu of the element
3. Close the dialog by clicking on Cancel

CHANGING THE STRUCTURE

To change the structure:


1. Highlight the desired element (folder or template)
2. Drag it with the mouse to the folder where it is to be a subfolder

EDIT FOLDER AND TEMPLATES WITHOUT ACCEPTING THE ARCHIVE SETTINGS


You can also edit folders and templates without accepting the archive settings on closing

To do this, edit the elements in the left window with the list of templates.

6.6 Add and remove variables


Variables and their aggregation types are displayed in the detail view of the archive.

Variables can be added or removed here:


 Add:
To add variables, select the Add variable command in the context menu or in the toolbar by
means of Drag&Drop.
 Remove:
Select the desired variables and press the Del key or select the Remove variable command in
the context menu or the toolbar.
Attention: Variables are removed from the variable list without a request for confirmation.

65 | 185
Engineering in the Editor

ADDING A VARIABLE TO A BASE ARCHIVE

To add a variable to a base archive:


1. Select Add variable in the context menu, the toolbar of the base archive or the variable list.
2. The selection dialog is opened.

Add the desired variables.


3. Close the dialog.
4. If there are aggregation archives, then the dialog to add the new variables for aggregation
archives is opened.

Select whether the variables are to be added to all existing aggregation archives, and with
which aggregation types:
 Apply to all aggregation archives: The newly-added variables are taken into account in all
existing aggregation archives. When activating, the desired aggregation archives (sum,
average value, minimum, maximum) must be selected.

ADDING A VARIABLE TO AN AGGREGATION ARCHIVE

To add a variable to an aggregation archive:

66 | 185
Engineering in the Editor

1. Select Add functions in the context menu or in the tool bar of a configured archive.
2. The selection dialog is opened, depending on the type of archive:
a) No subordinate aggregated archive present

Add the desired variables.


b) Subordinate aggregated archive present:

Select the desired variables and aggregation archives.


If these variables are to be applied in all subordinate aggregation archives, then activate
the In Apply to all aggregation archives option.
3. Close the dialog.

67 | 185
Engineering in the Editor

INSERT VARIABLES INTO THE AGGREGATION ARCHIVE BY MEANS OF DRAG&DROP

Additional variables can also be inserted into an aggregation archive directly by means of
Drag&Drop. There are two methods available to you for doing this:
 Individual variable:
Select an individual variable from the variable list of the base archive and drag this with the
left mouse button held down to the desired data compression type of an attendant
aggregation archive.
 All variables:
Drag the complete base archive to a data compression type. In doing so, all variables
contained therein are allocated.

6.7 Lot archiving


Lot archiving allows for the easy allocation of lot designations to an archive. Lot labeling allows you to
filter archive data, such as in Extended Trend or the Report Generator, as you wish when processing it
further.

Note: The lot name must not contain any pipe characters (|).
A lot archive is used most of all if no cyclical processes are to be recorded. For example in a
drinks-filling plant, where different products are manufactured in different qualities. In doing so, the
freely-definable lot names can be used very easily to make a link between the archive and the lot. The
lot name can then also be used for filtering in Runtime.

Because lot archives are not based on defined time periods or a number of value entries, it makes
sense to index these. It is thus possible to access the data more quickly at a later time.

The main differences between a lot archive and an archive:


 defined start and stop time of the archive (Generally: not cyclic)
 defined lot name

Information
The value of the lot variable is written in the index file and in the header of the
ARX file at the start of the lot. These entries are adjusted with every change of
the variable. When the lot is closed, the value of the lot variable at this moment
is finally written in the index file and in the header.

Thus the lot name is final when the lot is closed.

68 | 185
Engineering in the Editor

INDEX
For quicker access to the lot values in the lot filter, an index can be created for each archive. The
index is stored in the file [short name].ARI An entry is made in the index file each time a lot archive is
saved. This entry contains: archive name, lot description, start time and end time. With the evacuation
of the archive the index also is updated.

Archives can be deleted or moved using file file operations. In this case, the index file must be
reindexed. To do this, use the Index archive function.

AUTOMATIC INDEXING

Activate, when configuring the base archive or the aggregation archive (on page 55), the Index lots
option in the Properties tab. The index is only created from archive files in the Runtime folder. If
archive files are read from the read-back folder, this reading is carried out file by file.

The new creation of a lot index is carried out with the Index archive function. Use this function if data
is to be saved to a Runtime folder manually, or to be read manually from it. The index files is not
evacuated with it and also not read when the data is obtained from the read-back folder. Indexing
again only accesses the archive files in the Runtime folder. If archive files are read back from the
read-back folder, these are not moved back to the Runtime folder again. The data is loaded to the
RAM. New indexing thus accesses data in the Runtime folder, but not data in the read-back folder.

FUNCTION INDEX ARCHIVE

Generating the index file can be a time-consuming procedure depending on the amount of the
archive files. In order not to block the Runtime, this is done in the background. If the new indexing is
not finished but lot values are needed, this request has to wait until the procedure is finished. With the
Execute synchronously option, there is a wait until the new indexing is finished before the function is
executed.
Note: You can find this option in the configuration dialog of the function.

6.8 Creating a screen of the type Archive Revision

CREATING A SCREEN OF THE TYPE ARCHIVE REVISION


The archive revision screen is for displaying, configuring and editing archives in Runtime.

ENGINEERING

Two procedures are available to create a screen:


 The use of the screen creation dialog
 The creation of a screen using the properties

69 | 185
Engineering in the Editor

Steps to create the screen using the properties if the screen creation dialog has been deactivated in
the menu bar under Tools, Settings and Use assistant:
1. Create a new screen.
To do this, select the New screen command in the tool bar or in the context menu of the
Screens node.

2. Change the properties of the screen:


a) Name the screen in the Name property.
b) Select archive revision in the Screen type property.
c) Select the desired frame in the Frame property.
3. Configure the content of the screen:
a) Select the Elements (screen type) menu item from the menu bar.
b) Select Insert template in the drop-down list.
The dialog to select pre-defined layouts is opened. Certain control elements are inserted
into the screen at predefined positions.
c) Remove elements that are not required from the screen.
d) If necessary, select additional elements in the Elements drop-down list. Place these at the
desired position in the screen.
4. Create a screen switch function.

70 | 185
Engineering in the Editor

ARCHIVE REVISION SCREEN

CONTROL ELEMENTS
Control element Description

Insert template Opens the dialog for selecting a template for the screen type.

Templates are shipped together with zenon and can also be


created by the user.

Templates add pre-defined control elements to pre-defined


position in the screen. Elements that are not necessary can also
be removed individually once they have been created. Additional
elements are selected from the drop-down list and placed in the
zenon screen. Elements can be moved on the screen and
arranged individually.

WINDOW

Control elements for windows.


Control element Description

Archive data window Display of the main window in the Runtime.

71 | 185
Engineering in the Editor

Control element Description

Set filter Shortened display of the currently selected filter conditions in a


compact filter line.
(List)

Set filter Display of the set filter.


(Display) Note: Element of the type Dynamic text. Functionality is
assigned using the Screen type specific action property.

Set filter (detail list) Detailed display of the currently selected filter conditions in a text
window. Details can be found in the Runtime manual in the Filter
section.

Archive status Display of the archive status.

Note: Element of the type Dynamic text. Functionality is


assigned using the Screen type specific action property.

Short name Display of the short description of the displayed archive.

Note: Element of the type Dynamic text. Functionality is


assigned using the Screen type specific action property.

Total number Display of the number of the displayed values.

Note: Element of the type Dynamic text. Functionality is


assigned using the Screen type specific action property.

Number INVALID Display of the number of variables with the status INVALID.

Note: Element of the type Dynamic text. Functionality is


assigned using the Screen type specific action property.

LIST FUNCTIONS

Buttons for controlling the list functions in the Runtime.


Control element Description

Open archive Opens the dialog to select an archive.

Close archive Closes the archive that is currently open.

Save archive Saves changes in the archive and updates aggregated archives
on request.

Edit entry Opens the dialog (on page 154) to edit the selected archive
entry.

72 | 185
Engineering in the Editor

Control element Description

Insert entry Opens the dialog (on page 155) to insert archive entries into the
archive files.

If there are no archive files for this time range, no entries can be
inserted. A corresponding error message is shown if an attempt
to insert an entry is made.

Delete entry Deletes selected archive entries after confirmation query.

Selection Clicking on the button opens the dialog to configure the filter.

Column configuration Opens the dialog (on page 153) to configure column width and
font.

Print Prints list to configured printer.

COMPATIBLE ELEMENTS

Control elements that are replaced or removed by newer versions and continue to be available for
compatibility reasons. These elements are not taken into account with automatic insertion of
templates.
Control element Description

Set filter (display) Static Win32 control element. Was replaced by a dynamic text
field. For the description, see current element.

Archive status Static Win32 control element. Was replaced by a dynamic text
field. For the description, see current element.

Short name Static Win32 control element. Was replaced by a dynamic text
field. For the description, see current element.

Total number Static Win32 control element. Was replaced by a dynamic text
field. For the description, see current element.

Number INVALID Static Win32 control element. Was replaced by a dynamic text
field. For the description, see current element.

FILTER PROFILES

Buttons for filter settings in the Runtime.


Control element Description

Profile selection Select profile from list.

73 | 185
Functions

Control element Description

Save Saves current setting as a profile.

Note: The name can be a maximum of 31 characters long and


must only contain valid characters.
Prohibited are: ! \ / : * ? < > | ""

Delete Deletes selected profile.

Import Imports filter profiles from export file.

Export Exports filter profiles in the file.

7 Functions
In zenon, there are several functions available to control archiving.
 Screen switch - archive revision (on page 74): Configuration of screen switching including
filtering
 Archive: Start (on page 113): Start archive manually
 Archive: Stop (on page 115): Stop archive manually
 Show active archives (on page 117): Show active archives in the Runtime
 Index Archive (on page 116): Start/renew Indexing for archive
 Export archives (on page 118): Export archive

7.1 Screen switch - archive revision


To open an archive revision screen in the Runtime and to set the parameters:
1. Create a screen of type Archive Revision (on page 69).
2. Create a screen switch function to the screen.
3. Define the desired filter properties

Setting the parameters of the content to be displayed in the Runtime is carried out using the filter
conditions of the screen switching. You can access the same screen repeatedly with different functions
and have differently-filtered lists shown.

74 | 185
Functions

In the Runtime you can modify the filter properties. Exception: In the Editor fixed time filter (on page
95) was defined.

CONFIGURE SCREEN SWITCHING


To create a screen switch to a screen of type Archive Revision :
1. In the context menu of node function select command New function.
2. Click on screen switch.
The dialog for the screen selection will be opened.
3. select the screen of type Archive Revision
the dialog for archive selection is displayed.
4. Highlight the archive that is to be displayed in the Runtime for screen switching.
5. Use the Format option to configure how the data is to be sorted for the display.
6. Configure the desired filter for variables, status bits, time, lots and shifts.
To do this, click on the Filter button.
7. Close the filter dialog and archive dialog by clicking on OK for each.

ARCHIVE SELECTION DIALOG

Option Description

Filter name Name of the configured filter.

This name is attached to the parameters of the screen switching


function and serves to distinguish between different screen switching
functions with different filter configurations.

Archives List of available archives.

Attention: An archive must be selected. Dialog is displayed in the

75 | 185
Functions

Option Description
Runtime If a lot archive (on page 98) is to be displayed, this must
correspond to the configured archive for the selection in the Runtime.

Format display format and sorting of displayed archive entries:


 Time: Filter for date and time
 Variable: according to variable name
 Unsorted: no sorting

Use archives Active: Archives from the read-back folder are also used.
from read-back
Inactive: Only current archives are used.
folder
When loading archive data from the readback folder, the archive data
from the Runtime path and from all subfolders of the readback folder is
also read.

Attention: Before you can access evacuated archives using the Use
archives from read-back folder option, they must first be copied to
the read-back folder. At the evacuation archives are saved in folder
Evacuated archives. This folder does not comply with the read-back
folder. You define the folders in the Standard settings dialog on the
Folder tab. You can find the dialog under File -> General
configuration -> Standard.

Hint: The folder for evacuated archives and archives from


read-back folder can also be set as the same one, in order to avoid
manual copying. Different paths make sense if, for example, read-back
is from a DVD and the exported data is only burnt onto new DVDs at
defined times.

CLOSE DIALOG
OK Applies settings and closes the dialog.

Cancel Discards all changes and closes the dialog.

Filter Opens the dialog to configure the filter criteria:


 Archive filter (on page 77): Variables (only available if an archive
has been selected) and status bits
 Time (on page 79): Time Filter

 Lots (on page 98): Lot filter

 Shift (on page 106): Shift filter

76 | 185
Functions

OK Applies settings and closes the dialog.

Help Opens online help.

7.1.1 Archive filter

77 | 185
Functions

Option Description

Status list Selection of the status bits that are to be filtered for. Selection
and deselection by clicking on the respective status bit.

Only available if the All entries option has been deactivated.

Variable list Variables that are to be displayed from the selected archive.
Select and deselect them by clicking in the checkbox in front of
the variables.

Only available if the All entries option has been deactivated.

Value (in base unit) Active: Filtering is carried out for archive values whose value is
between a minimum and a maximum or which contain a certain
character sequence as a string.

Input of:
 Minimum: Lower limit of the value
 Maximum: Upper limit of the value
 String mask: Character sequence that is be filtered for

Only available if the All entries option has been deactivated.

Delete selection Only available if the dialog is called up in the Runtime using the
Selection (on page 146) button.

In the Runtime, when the dialog is called up using the Selection


button, the entries in the list that correspond to the selected
variables and status bits are highlighted.
 Active: Removes all bold font in the list when the dialog is
closed.

Show this dialog in the Active: Before every call of the screen the filter dialog is opened.
Runtime The filter settings can be modified. This option is not available
with Windows CE.
Note: If, in the Lots tab, the Show lot selection dialog option
is also selected, then the lot selection dialog is called up in the
Runtime. This is no longer displayed after reloading.

Notes for time range filters:


Show this dialog in the Runtime active:
 The dialog with the filter settings is opened in Runtime
when switching screens.
The filter is no longer offered when reloading. This

78 | 185
Functions

Option Description
behavior can differ for individual screen types if the dialog
was displayed in screen switching and canceled.
 The last time period that has finished is always used.

Show this dialog in Runtime inactive:


The screen is opened with the set time filter.
 Use last finished time range active:
The last time period that has finished is always used
 Use last finished time period inactive:
The current time period is used.

All entries  Active: Settings apply for all statuses and variables. The
entries in status list, variable list and value cannot be
selected individually.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

7.1.2 Time
Configuration of the time filter.

Note: Time is saved in UTC. For details see chapter Handling of date and time in chapter Runtime.
Time filters can be pre-set in both the Editor and in the Runtime for:
 Absolute time period (on page 83)
 Relative time period (on page 85)
 From (on page 87)
 Time period (on page 90)

Time filtering can be carried out in two ways:


1. Define time period in the Editor (on page 95)
Fixed time areas are used. A time period is given in the editor. It is only possible to filter

79 | 185
Functions

according to this time period in Runtime. Other filters - such as filtering according to variable
name, alarm/event groups and alarm/event classes etc. can also no longer be amended in
the Runtime.
2. Time filter configurable in the Runtime (on page 97)
The time filter is defined in the Editor and can be changed in the Runtime as desired.

CONFIGURING THE TIME FILTER

80 | 185
Functions

FILTER

Selection of the filter.


Parameter Description

No time filter Active: No time filter is used.


Note: In the Runtime, all entries since 1. 1. 1990 are displayed. Use of
this filter setting is not supported by Extended Trend.

Absolute time Active: A fixed period of time is entered in the editor. When the
period function is executed, the defined absolute time period is exactly used.

In the settings section, the corresponding options can be shown and


configured there.

Note: Time is saved in UTC. For details see chapter Handling of date
and time in chapter Runtime.

Relative time period Active: A relative time period is entered.

In the settings section, the corresponding options can be shown and


configured there.

Attention: this filter is constantly updated.

Process Recorder: The time that is played back is used as the


current time in the Process Recorder module in playback mode. As a
result, reference is always made at the time of the recorded and
reproduced data, and not at the time when the data is played back on
the computer.

From Active: A time from which the filter is effective is stated. If the time is
not reached on the current day, filtering takes place from the
corresponding time the previous day.

Selection of the area mode from drop-down list:


 Starting from HH:MM:SS
 Starting from day at HH:MM:SS
 Starting from day, month - HH:MM:SS

In the settings section, the corresponding options can be shown and


configured there.

Attention: The start point of this filter is not updated automatically.


Only the existing times are used when shown.
The end time point is not defined with this filter, it is carried over.

81 | 185
Functions

Parameter Description

Process Recorder: The time that is played back is used as the


current time in the Process Recorder module in playback mode. As a
result, reference is always made at the time of the recorded and
reproduced data, and not at the time when the data is played back on
the computer.

Time period Active: A fixed time period is entered. Selection of the area mode from
drop-down list:
 One day
 One week
 Two weeks
 One month
 One Year
 15 minutes
 30 minutes
 60 minutes

In the settings section, the corresponding options can be shown and


configured there.

The following selection is also enabled on activation:


 Offer selection dialog
 Use current date/time

The Modify time period property can be activated.

The time period can be moved to the future.

The time period can be amended.

Example: Create a screen switch, for example to an AML screen. In


the screen switching filter dialog in the Time tab, set the filter to time
period and select One Month in the drop-down list. Select Use current
date/time under Settings. Activate the checkbox option Modify time
period. Enter the following setting under Move time period to the
future: HH = 0. Activate, under Change time period by, the checkbox
option Use the last completed time period.

Evaluation: today's date: 22.02.2018

Result of the time filter in the Runtime: 01.01.2018 - 31.01.2018

82 | 185
Functions

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

7.1.2.1 Absolute time period


You define a fixed time period with the absolute filter. When the function is executed, the defined
absolute time period is exactly used. To set the filter:
1. Select, in the Filter section, the Absolute time period option

83 | 185
Functions

2. Configure the desired time in the Settings section

Parameter Beschreibung

Einstellungen Konfiguration des Zeitfilters.

Aktuelles Datum/Uhrzeit Aktiv: Zeitfilter wird zur Runtime konfiguriert.


vorschlagen

Vorgabe Aktiv: Zeitfilter wird im Editor vorgegeben. Zur Runtime


kann nur noch der Startzeitpunkt festgelegt werden.

Von Startzeitpunkt des Filters. Auswahl von Tag, Monat, Jahr,

84 | 185
Functions

Parameter Beschreibung
Stunde, Minute und Sekunde.

Bis Endzeitzeitpunkt des Filters. Auswahl von Tag, Monat,


Jahr, Stunde, Minute und Sekunde.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

7.1.2.2 Relative period of time


A relative time period is entered.

Attention: This filter is updated constantly and continues to run.


Example: You set a relative time of 10 minutes and switch to a screen with this time filter at 12:00. You
are then shown the data from 11:50 to 12:00 when switching. If the screen stays open, the filter is
automatically updated. At 12:01, you see the data from 11:51 - 12:01 etc.

To set the filter:


1. Select, in the Filter section, the Relative period of time option

85 | 185
Functions

2. Configure the desired time in the Settings section

Parameter Description

Settings Configuration of the time filter.

Propose current date/time Active: Time filter is configured in the Runtime.

Default Active: The time filter is prescribed in the Editor. Only the
start time can still be stipulated in the Runtime.

Selection of the relative time period in days, hours,


minutes and seconds.

86 | 185
Functions

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

7.1.2.3 From
A time from which the filter is effective is defined. To set the filter:
1. Select, in the Filter section, the Off option
2. Select the desired filter from the drop-down list.
 Starting from HH:MM:SS
 Starting from day - HH:MM:SS
 Starting from day, month - at HH:MM:SS

87 | 185
Functions

3. Configure the desired time in the Settings section

Parameter Description

Settings Configuration of the time filter.

[Date/Time] Depending on the settings of the Off option, the time


from which the filter is effective is configured here:
 Starting from HH:MM:SS
 Starting from day at HH:MM:SS
 Starting from day, month - HH:MM:SS

88 | 185
Functions

Parameter Description

Attention! The start point of this filter is not updated


automatically. Only the existing times are used when
shown, even if the screen remains open and 23:00:00 is
reached.
The end time point is not defined with this filter, it is
carried over.
 Starting from HH:MM:SS A time from which the filter is effective is stated. If the
time is not reached on the current day, filtering takes
place from the corresponding time the previous day.

Example: You enter 11:00:00 PM. If it is then 23:30 when


executing the function, then it is filtered from 23:00:00 up
to the current point in time. If it is 22:30 however, then
filtering takes place from 23:00:00 on the previous day to
the current point in time.
 Starting from day at A day and time for the start of the filter are entered. If
HH:MM:SS the time given has not been reached in the current
month, the corresponding time from the previous month
is used.

Example: You enter day 5 - 11:00:00 PM. If it is the 10th


of the month at 23:30, then filtering takes place from the
5th of the month from 23:00:00 to the current time point.
If, however, it is the 4th of the month, then filtering is
carried out from 23:00 on the 5th of the previous month
to the current time point.
 Starting from day, month - A month, day and time for the start of the filter are
HH:MM:SS entered. If the time stated has not been reached in the
current year, the corresponding time from the previous
year is used.

Example: You enter Day 5, Month October -


11:00:00 PM. If it is October 10th at 23:30, then filtering
takes place from October 5th from 23:00:00 to the
current time point. If, however, it is only October 4th,
then filtering takes place from 23:00 on the 5th of the
previous year to the current time point.

89 | 185
Functions

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

7.1.2.4 Time period


A time period in which the filter is effective is defined.
To set the filter:
1. Select, in the Filter section, the Time period option.
2. Configure the desired time in the Settings section.

90 | 185
Functions

3. Note: The Offer selection dialog and Use current date/time entries are deactivated if, in the
Filter... dialog in the Display tab under Runtime, the Show this dialog in Runtime property has
been activated.

Option Description

Time period Selection of a time range from a drop-down list.

In Runtime this time range is filtered. The filter starts with


the fixed start time of its time period:
 15 minutes: 0, 15, 30, 45 minutes of the hour

91 | 185
Functions

Option Description
 30 minutes: 0, 30 minutes of the hour
 60 minutes: 0 minutes of the hour

Example 1:
 Time period: 60 minutes
 Current time: 8:50 AM
 Result: Display for 08:00 - 08:50

Example 2:
 Time period: 60 minutes
 Current time: 9:00 AM
 Result: Display for 08:00 - 9:00 AM

Example 3:
 Time period: 15 minutes
 Current time: 8:35 AM
 Result: Display for 8:30 AM - 8:35 AM

Example 4:
 Time period: 15 minutes
 Current time: 8:45 AM
 Result: Display for 8:30 AM - 8:45 AM

Dialog in the Runtime:

If this dialog is also offered in the Runtime, the start time of


the time range can be selected.

The following possibilities for selection are activated:


 Offer selection dialog
 Use current date/time

The Modify time period property can be activated.


 The time period can be moved to the future.
 The time period can be amended.

Settings Optional setting for the time range.

Offer selection dialog The selection dialog for the start time of the filter is offered

92 | 185
Functions

Option Description
in the Runtime.

Use current date/time The current date/time is set for the filter.

Modify time period Allows amendments to cycles, postponements and


extensions of time periods.

Active: Evaluation is carried out in accordance with the


following rules:
 First, the Use last finished time period option is
evaluated.
 After this, Change time period by is used.
 Move time period to the future by is then
applied.

Inactive: No changes to the time period are made.

Attention: As of version 7.10, filter actions on the basis of


this function lead to different results than in prior versions.

Move time period to the future Active: The time period defined in the filter is postponed to
by the future. The start and end time are moved by the set
time span.

Given in hours - minutes - seconds.

If a postponement that is the same or greater than the


selected time period is set, a note to check the
configuration is displayed.

Note: The default value for HH is 1. If, for example, an


evaluation of the last month is to be undertaken, this value
must be set to 0.

Change time period to Active: The time period defined in the filter is modified. The
end time is moved by the set time span. The start time
remains unchanged.

Given in hours - minutes - seconds.

The time range can be added or deducted. Selection by


means of radio buttons:
 Add time: The time stated in Change time period
by is added to the time defined in the Time range
option.

93 | 185
Functions

Option Description
 Deduct time: The time stated in Change time
period by is deducted from the time defined in the
Time range option.

If a change and a postponement that are the same or


greater than the selected time period is set, a note to
check the configuration is displayed next to the control
element for time configuration.

The following options are available:


 Use current time period
 Use last finished time period
 Use next completed time period

Default: Use current time period

Use current time period Active: The current time period is used for the filter process.

Use last finished time period Active: The last selected and fully-completed time period in
the Time period option is used.

Example: For the Time period option, One day was


selected. Filtering is thus carried out for "Yesterday",
because this is the last day that was completed in full.

Use next completed time Active: The last selected and fully-completed time period in
period the time period option is used.

Example: For the Time period option, One day was


selected. Filtering is thus carried out for "tomorrow",
because this is the next day that will be completed in full.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

94 | 185
Functions

7.1.2.5 Specify time period in the Editor


With this method, you enter a fixed time period into the Editor, which is applied when the function is
carried out in the Runtime. You can then only define the start time in the Runtime, but no further filter
settings.

For example: You set a 30 minute time filter. In Runtime, you can now only set when this 30 minute
time period is to start. However, you cannot change the filter to a day filter.

Attention
When using this type of filter, you can also no longer amend all other filters in
the Runtime that are available in the General tab. It is still possible to filter for
text, status and equipment.

To create the filter:


1. The screen must have the Filter button to start the filter in the Runtime
2. select the desired filter

95 | 185
Functions

3. Configure the selected time period

Tip for time period: Activate the Show this dialog in Runtime option in the filter dialog. This way
you can amend the start time before the function is carried out. Do not have the filter displayed in
Runtime when the function is turned on; this way the current time period is always used. If you have
activated the Use last closed time period option, the previous time period is shown.
For example: You have set a 30 minute filter. It is 10.45 when the function is activated. If the Use last
closed time period option is deactivated, the filter is set to the current time period 10:30:00 to
10:59:59. If the option is activated, the filter is set to the previous time period of 10:00:00 to 10:29:59.

96 | 185
Functions

7.1.2.6 Time filter can be configured in Runtime


With this method, the time filter can be amended in the Runtime before execution.

To create the filter:


1. select the desired filter:
 Absolute time period
 Relative time period
 Time period
2. Select, in the Settings section, the option Propose current date/time

97 | 185
Functions

3. The filter dialog is opened in the Runtime with the current date and time

7.1.3 Lots
You configure the limitation of the display to certain lots in this tab. The lot information is also applied
to the existing filter.

If the lot filter is activated, the following happens in the Runtime:


 A list of all configured lots that correspond to the configured time period is obtained in
advance from the archive

98 | 185
Functions

 The list of the archives is filtered for this.


Attention: The lot archive selected in the Runtime must correspond to the archive selected
in the screen switching.

Information
Some filters in zenon can be configured independently of one another and then
combined in the Runtime. This is only possible to a limited extent with the lot
filter.

The lot filter can offer a list of existing lots in the Runtime. It is Runtime data that
is not available in the Editor.

When configuring the screen switching in the Editor, the time filter tab can only
be used in conjunction with the lot filter as a prefilter for the lot selection dialog.
If a lot from this list is then selected in the Runtime, the time filter is overwritten
with the data from the selected lot, in order to achieve precise filtering for the
selected lot.

That means: If the lot selection dialog is used in the Runtime and a lot is
selected, the time filter displayed does not correspond to the one configured in
the Editor.

99 | 185
Functions

FILTER

Settings for the application of the lot filter. Selection of one of the following options:
 No lot filter
 Apply lot filter directly
 Display lot selection dialog
Note: If the lot filter is shown as a dialog, it can be prefiltered for archive identifications. It is
expressly recommended that you use this prefiltering for performance improvements.

100 | 185
Functions

Option Description

No lot filter  Active: The lot filter is deactivated and cannot be


configured. Filtering for lots is not carried out in
Runtime.

Apply lot filter directly  Active: The filter configured here is applied in
Runtime directly.

Note: There is no possibility to have all lots in a list


displayed and to select one manually. If a certain lot is
to be shown, the filter for the archives, name and time
must be configured accordingly. This requires the
existing data to be known very well. Alternatively, it is
recommended that the Show lot selection dialog
option is selected.

Display lot selection dialog Active: The dialog for lot selection is shown in Runtime
when:
 Clicking on Filter or
 screen switching, if the Show this dialog in
Runtime option has been activated (Not
available for each function/screen type)
Note: The dialog is not shown on reloading.
Options can be pre-selected in the Editor.

Overview of the implementation of configuration in Runtime:

101 | 185
Functions

TIME

Configuration of the time filter for lot selection. Selection of one of the following options:
 No filter
 Last lots
 Use time filter from "Time" tab
Option Description

No filter  Active: The time range set in the Time tab is not
taken into account. All completed and current
lots are displayed.

Last lots Attention: Only works in conjunction with the Apply


lot filter directly option.

The option allows the combination of both options


Display current lots and Display completed lots. At
least one of the two options must be activated. If both
options have been deactivated, this corresponds to the
No filter setting.
 Active: Input of the number of lots last concluded,
according to what they should be filtered for.
Input of the number in the number field or
configuration via arrow keys.

Example: 3 was entered as a value for the option. 2 lots


run and 10 have been ended. The following is shown:
the two that are current and one that has been
completed.

Note: The setting of the time filter is not used as a time


period for the current lots, but the last year. This filter
will not be executed as a prefilter and can therefore not
be used to improve performance.

Note on compatibility:
If the project is compiled for a version before 7.11, then:
If the current lots are selected or the combination of
current and completed lots, then only the completed
lots are shown in Runtime.

Display current lots  Active: The current lots are displayed.

Note: If the number of lots to be displayed is greater


than the number of current lots, lots that have been
completed are also shown until the set limit has been

102 | 185
Functions

Option Description
reached.
Example: 3 lots are to be displayed. 1 lot is running, 5
have been completed. The one current lot and two
completed lots are displayed.

Display completed lots  Active: The completed lots are displayed.

Note: If the number of lots to be displayed is greater


than the number of completed lots, lots that have been
completed are also shown until the set limit has been
reached.

Use time filter from "Time" tab  Active: Pre-filtering is carried out with the settings
of the Time tab.

The effective range of the filter can be amended within


this time range. Select from drop-down list:
 Start and end also outside filter limits: (Default)
Lots can start before the start time configured in
the Time filter and end after the configured end
time.
 Start and end only outside filter limits:
Lots must start and end within the time points
configured in the Time filter for the start and end.
 Start also before filter limit:
Lots can start before the start time configured in
the Time filter and end after the configured end
time.
 End also after the filter limit:
Lots can also end after the end time set in the
time filter, but must start at or after the
configured start time.
 Adjust start and end to filter limits:
Lots are cut to the time points configured in the
Time filter for the start and end.

ARCHIVES

Configuration of filtering for archives. This filter is applied as a prefilter for the lot selection dialog.

Selection of one of the following options:


 No filter

103 | 185
Functions

 Static
 From variable
Option Description

No filter  Active: Filtering for archive names is not carried


out.

Static  Active: Archives whose identification corresponds


to the character string entered in the input field
are filtered for.

Input of the archive identifications in the input field:


 Several identifications are separated by a comma
(,).
 * or empty: All archives, no filter.

From variable  Active: The value of the variables linked here is


applied as a filter for archive names in Runtime.

Click on button ... in order to open the dialog for


selecting a variable.

Available for AML and CEL modules if the Apply lot


filter directly option has been selected: Other modules
use their own configurations.

Notes for variables in the Runtime:


 The variable selection is only activated in the
Runtime if a valid variable has already been linked
in the Runtime. The ... button is always deactivated
in the Runtime. The option can be selected, but
no new variable can be linked.
 If the variable is not signed into the driver at the
time at which the lot filter is applied, the variable is
signed in and read. This can lead to delays with
slow driver connections/protocols.

Attention: If the selected variable is not found in


Runtime, there is no filtering for archive names. This also
applies if the value of the variable cannot be determined.
The filter then corresponds to the No filter setting.

Note for ETM: In the ETM, the archives are established by the curves configured in screen
switching. In Runtime, this is only possible in connecting with the Relative lot selection option. With
this, the variables must be selected in Runtime, which is in turn stipulated by the possible selection of

104 | 185
Functions

archives. The archive, once filtered, must be one of the archives that relate to the configured curves.
No data is displayed if this is not the case. This setting can also be used to limit the displayed curves.
However these remain shown in the curve list.

ETM example:
Configured Data source Archive prefiltering in Result in the screen
curves the lot filter

A AR AR Is shown in the curve list and drawn


in the trend.

B EA Is only shown in the curve list.

C EP Is only shown in the curve list.

Note archive revision: The archive for which the screen is opened is already selected in the screen
switching function. Because only 1 archive can be selected, further limitation makes no sense.

Example of archive revision:


Configured Archive prefiltering in Result in the screen
archive the lot filter

AR EA No data is displayed.

NAMES

Configuration of the filtering to names. Selection of one of the following options:


 No filter
 Static
 From variable
Option Description

No filter  Active: Filtering for lot names is not carried out.

Static  Active: Lot names that correspond to the character


string entered in the input field are filtered for.

Input of the lot name in the input field:


 Several entries are separated by a pipe character
(|).
 * or empty: All lots of all displayed archives, no
filter.

From variable  Active: The value of the variable linked here is


applied as a filter for lot names in Runtime.

105 | 185
Functions

Option Description

Click on the ... button to open the dialog for selecting a


variable.

Only available if the option Apply lot filter directly has


been selected.

Notes for variables in the Runtime:


 The variable selection is only activated in the
Runtime if a valid variable has already been linked
in the Runtime. The ... button is always deactivated
in the Runtime. The option can be selected, but
no new variable can be linked.
 If the variable is not signed into the driver at the
time at which the lot filter is applied, the variable is
signed in and read. This can lead to delays with
slow driver connections/protocols.

Attention: If the selected variable is not found in


Runtime, there is no filtering for lot names. This also
applies if the value of the variable cannot be determined.
The filter then corresponds to the No filter setting.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

7.1.4 Shift
You configure the limitation of the display to certain shifts in this tab. The shift information is also
applied to the existing filter.

Note:
 The shift filter requires a configured time filter. If the time filter is set to the No time filter
option, the shift filter is deactivated. A notice of the cause of the deactivation is shown.

106 | 185
Functions

 If the lot filter is activated, the shift filter is automatically deactivated. Both filters mutually
exclude one another. A notice of the cause of the deactivation is shown.

CONFIGURATION
To filter for shifts:
1. Configure the time filter.
 Absolute time filter: Shifts from the absolute defined time period are shown.
 Relative time filter: Shifts from the relative defined time range are shown.
The upper limit is set at 1440 minutes by default.
 From: Shifts from a certain time point are shown.
 Time period: Shifts within a certain time range are shown.
2. Configure the shift filter.
To do this, select one of the options:
 Apply shift filter directly:
The configured time filter is used to filter the shifts in the Runtime. In doing so, all shifts
that are at least partly in the time filter range are taken into account. Even if the time
filter is defined in the Runtime, the shift filter is applied after selecting the time period. If
there is no suitable shift, no data is shown in the CEL screen.
The set filter continues to have an effect on the CEL data. If a shift is only partially within
the set time range, only the CEL entries that are both in the time filter and the shift are
shown.
 Show shift selection:
The shift filter is configured and applied when called up in the Runtime when the screen
is called up. All shifts that are at least partly in the time filter range are offered in a list for
selection. After selecting one or more shifts, the time filter is overwritten and set to the
times of the selected shifts. It is thus ensured that the complete shift is always included in
the filter.
Note: If, in the General tab, the Show this dialog in Runtime option is activated at the
same time, the complete configuration dialog with all tabs is called up instead of the shift
selection. The user can then redefine all options.
3. Configure Name and Options if required.

With the Apply shift filter directly option, the shifts are permanently monitored by the filter and the
filter is amended if necessary.
The shifts for filtering the data are redetermined if:
 Shifts are reconfigured
 Shifts are newly-created in the filter time period
 The time period is reconfigured

107 | 185
Functions

The following are not taken into account in the filter:


 Deleted shifts
 Shifts that are removed from the time filter due to a change of the time period

SHIFT DIALOG

FILTER

Settings for the application of the shift filter. Selection of one of the following options:

108 | 185
Functions

 No shift filter
 Apply shift filter directly
 Display shift selection
Option Description

No shift filter Shift filter selection:


 Active: The shift filter is deactivated and cannot be
configured. Filtering for shifts is not carried out in the
Runtime.

Apply shift filter directly Applying the shift filter in the Runtime:
 Active: The filter configured here is applied in the Runtime
directly.

Equipment groups and shift names can be preselected.

The shift list and Update button are not shown in the Runtime.

Display shift selection Display of the shift selection in the Runtime:


 Active: The dialog for shift selection is shown in the
Runtime.

The settings chosen in the Editor are applicable for the reading
of the shifts in the Runtime.

The dialog is shown in the Runtime when:


 Clicking on the Filter button.
Or:
 Executing screen switching.
Note: The dialog is not shown on reloading.

Attention: At least 1 shift must be selected in the Runtime in


order to call up the page or to be able to configure the filter.
If, in the General tab, the Show this dialog in the Runtime
option is activated at the same time, the complete configuration
dialog is called up.

EQUIPMENT MODELING

Configuration of the equipment groups for filtering for shifts.


Option Description

Equipment groups Selection of equipment groups to which shifts must be linked.

109 | 185
Functions

Option Description

Clicking on the ... button opens the dialog to select equipment


groups.

If several equipment groups are selected, they are displayed in


the option separated by a semicolon (;).

Include shifts without Selection of whether linking to an equipment group is necessary.


linked equipment
 Active: Shifts that are not linked to an equipment group
are also taken into account.
 Inactive: Only shifts that are linked to at least one
equipment group are taken into account.

Default: active

NAME

Configuration of the shift names for which filtering is to take place.


Selection of one of the following options:
 No filter
 Name with wildcards
 Name from variable
Option Description

Type Selection of the filter type from a drop-down list when filtering
according to name:
 No filter:
Filtering for names is not carried out.
 Name with wildcards:
A name with placeholder can be entered into the input
field. All shifts whose name is applicable for the filter are
included.
 Name from variable:
The name of the shift is defined by a variable in the
Runtime. Click on the ... Button to open the dialog to
select a variable.

Default: No filter

Wildcards:
 *: Replaces desired characters in the desired quantity. Can

110 | 185
Functions

Option Description
be used as a search term at any desired place.
red* finds all texts that start with red.

 ?: Replaces precisely one character.


r?d finds red, rad, ...

Notes for variables in the Runtime:


 The variable selection is only activated in the Runtime if a
valid variable has already been linked in the Runtime. The
... button is always deactivated in the Runtime. The option
can be selected, but no new variable can be linked.
 If the variable is not signed into the driver at the time at
which the lot filter is applied, the variable is signed in and
read. This can lead to delays with slow driver
connections/protocols.

Attention: If the selected variable cannot be found in Runtime


or the value of the variables cannot be determined, the filter is
treated like the No filter setting.

Match case Setting for filtering for upper/lower case


 Active: Capitalization is taken into account for names.

Default: active

OPTIONS

Configuration of the options for filtering for shifts in the CEL.


Option Description

Only include shifts that are Configuration of which shifts are displayed.
fully in the filter range
 Active: Only shifts that are fully in the time filter set are
shown.
 Inactive: Shifts that start earlier and/or finish later are also
shown.

Default: inactive

Example:
 Time filter: Today 08:00 – 12:00.
 Existing shift: Today 8:30 AM – 5:00 PM.

Result for:

111 | 185
Functions

Option Description
 Option active: The shift is not taken into account because
it is not fully in the time filter.
 Inactive option: The shift is taken into account because it is
partly in the time filter.

Use shifts found Selection of shifts that are taken into account, from drop-down
list:
 All: All shifts found are taken into account.
 Earliest shift only:
Of the shifts found, only the earliest are taken into
account.
The earliest shift is the shift with the earliest start time. If
several shifts have the same start time, one of these shifts
is selected randomly.
 Only last shift:
Of the shifts found, only the latest shift is taken into
account.
The latest shift is the shift with the latest end time. If
several shifts have the same end time, one of these shifts
is selected randomly.

Default: All

Attention: The Only include shifts that are fully in the filter
range influences the evaluation of this option. If it is active, only
shifts that are fully in the time range can be found. If it is inactive,
shifts that start earlier or end later can be found.

Example:

Configuration and shifts:


 Only include shifts that are fully in the filter range
option: active.
 Use found shifts option: Latest shift only
 Time filter: Today 08:00 – 10:00 AM.
 Shift 1: Today 08:00 – 8:30 AM.
 Shift 2: Today 8:30 AM – 9:00 AM.
 Shift 3: Today 10:00 AM – 11:00 AM.

Result:

112 | 185
Functions

Option Description
 Shift 2 is used

Switch to "Show shift  Active: The filter acts as with the Show shift selection
selection" mode option. The time filter is set to absolute; start and end
correspond to the start time and end time of the shifts. If
no shift is found, the times are set to 0 for the time filter.

Default: inactive

Behavior in the Runtime:

If the shift management is set to Show shift selection in the


Runtime, the filter options also have an effect on the shifts shown
in the shift list. The shift list is filtered accordingly by clicking on
the Update button.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

FILTER BUTTON IN THE SCREEN IN RUNTIME


If the Filter button is pressed in the CEL screen, depending on the configuration, the complete filter
dialog including the shift selection list is shown. The filter settings can thus be amended and the shift
list can be updated in order to select another shift.

7.2 Archive: Start


This function starts an already-configured archive in the Runtime.

Attention

Attention: If the starting and stopping is defined using the Start/end of


Runtime (on page 30), the archive can no longer be started or stopped by
means of functions. These functions then have no effect.

To configure the function:


1. Select, in the Functions node, the New function button in the toolbar or the context menu.

113 | 185
Functions

2. The dialog for selecting a function is displayed.


3. Navigate to the node Historian.
4. Select the Archive: Start function.
5. The dialog for archive selection is opened:
6. Select the desired archive
7. Close the dialog by clicking on OK.
The archive name is shown as a parameter in the list of functions.
8. Link the function to a button.

In the Runtime, the function starts the selected archive if it is executed.

ARCHIVE SELECTION DIALOG

Option Description

Available archives Display of all configured base archives and aggregation archives.
Selection by clicking on the entry.

OK Applies settings and closes the dialog.

Cancel Discards all changes and closes the dialog.

Help Opens online help.

114 | 185
Functions

7.3 Archive: Stop


This function stops a selected archive in the Runtime.

Attention

Attention: If the starting and stopping is defined using the Start/end of


Runtime (on page 30), the archive can no longer be started or stopped by
means of functions. These functions then have no effect.

To configure the function:


1. Select, in the Functions node, New function in the toolbar or the context menu.
2. The dialog for selecting a function is displayed.
3. Navigate to the node Historian.
4. Select the Archive: Stop function.
5. The dialog for archive selection is opened:
6. Select the desired archive
7. Close the dialog by clicking on OK.
The archive name is shown as a parameter in the list of functions.
8. Link the function to a button.

in the Runtime, the function stops the selected archive if it is executed.

ARCHIVE SELECTION DIALOG

115 | 185
Functions

Option Description

Available archives Display of all configured base archives and aggregation


archives. Selection by clicking on the entry.

OK Applies settings and closes the dialog.

Cancel Discards all changes and closes the dialog.

Help Opens online help.

7.4 Index archive


For quicker access to the lot values in the lot filter, an index can be created for each archive. The
index is stored in the file [short name].ARI An entry is made in the index file each time a lot archive is
saved. This entry contains: archive name, lot description, start time and end time. With the evacuation
of the archive the index also is updated.

Archives can be deleted or moved using file file operations. In this case, the index file must be
reindexed. To do this, use the Index archive function.
Note: Indexing can also be automatic. To do this, activate the Index lots option in the Properties
(on page 27) tab when configuring the archive.

You can read details on indexing in the lot archives (on page 68) chapter.

Information
The Index archive function is always executed on the Primary Server.

To configure the function:


1. Select, in the Functions node in the toolbar or in the context menu, New function.
2. The dialog for selecting a function is displayed.
3. Navigate to the node Historian.
4. Select the Index archive function.
5. The dialog for archive selection is opened:
Only lot archives are displayed.
6. Select the desired archive
7. Close the dialog by clicking on OK.
The archive name is shown as a parameter in the list of functions.
8. Link the function to a button.

in the Runtime, the function indexes the selected archive if it is executed.

116 | 185
Functions

ARCHIVE SELECTION DIALOG

Option Description

Available archives Display of all configured lot archives. Selection by clicking on the
entry.

Execute Is only valid when executed in a script.


synchronously
Active: The next function only starts if this function has been
completed.

OK Applies settings and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

7.5 Show active archives


This function opens a window in the Runtime that displays all currently-opened archives. The window
is permanently displayed in the foreground.

117 | 185
Functions

To configure the function:


1. Select, in the Functions node in the toolbar or in the context menu, New function.
2. The dialog for selecting a function is displayed.
3. Navigate to the node Historian.
4. Select the Show open archives function.
5. Link the function to a button.

7.6 Export archives


This function exports the recored entries of an archive into a file in the Runtime. The language of the
identification and measuring unit can be switched on export. These are exported in the language in
which Runtime is running.

The following is applicable for the conversion of measuring units: Archive data is always exported in
the Measuring unit in which it was created. A conversion of measuring units is not taken into
account here.

The following must be configured for export:


 General information on formats, content and export destination
 the archive
 the time filter
 the lot filter

Attention
The file name of the export file must not contain any special characters.
Prohibited are: \ / : * ? " < > |

To engineer the archive export:


1. Select, in the Functions node in the toolbar or in the context menu, New function.
2. The dialog for selecting a function is displayed.
3. Go to the Historian node.
4. Select the Export archives function.
5. The filter dialog for the configuration of the export is opened.

118 | 185
Functions

Information
The number of decimal points when exporting archives in TXT, XML and DBF
form, as well as evacuation to an SQL Server, can be adjusted in the
project.iniwith the setting ARCHDIGITS= in the [ARCHIV] section.

Default: ARCHDIGITS=1

FILTER DIALOG

Tabs Description

General (on page Definition of:


123)
 Export format

119 | 185
Functions

Tabs Description
 Columns to be exported
 Options
 Export file

Archive (on page Selection of the archive to be exported


122)

Time (on page Stipulation of the corresponding time range.


130)

Lots (on page 133) Select desired lots

Information
When exporting an active lot archive, the following entries are set automatically:
 End time: the time of the export
 Lot name: the current value of the lot variables

Attention: These values do not need to correspond to the values of the lot
archive that has been ended.

TABLE STRUCTURE AND BEHAVIOR ON EXPORT

TABLE STRUCTURE

Statements:
 Table _DATA:
"CREATE TABLE [" + szDBTable "_DATA"] ([PRJ] varchar(128),[ARV] varchar(2),[VAR]
varchar(128),[CALCULATION] int,[TIMESTAMP_S] int,[TIMESTAMP_MS] int,[VALUE]
varchar(128),[STATUS] int)"
 Table _BATCH for lots:
"CREATE TABLE [" + szDBTable + "_BATCH] ([PRJ] varchar(128),[ARV] varchar(2),[BATCH]
varchar(128),[START_S] int,[END_S] int)"

BEHAVIOR ON EXPORT
1. No table name stated:

120 | 185
Functions

The _DATA table is created and the values are entered.


(the table called _BATCH is also created, although no filters are active and no values are
entered.)
2. Indicate table name XXX:
The tables XXX_DATA and XXX_BATCH are created and the values are entered depending on
configuration (lot activated/deactivated).

When exporting, either no name or the table name without _DATA is entered in zenon. If values are
to be inserted into a certain table (such as MYPROJECT_DATA, only MYPROJECT can be given as a
table name in zenon. If the name MYPROJECT_DATA is given, the table MYPROJECT_DATA_DATA is
created and filled.

If a pre-existing table is exported (no name or named ohne _DATA), the values are also entered into
the table. This happens regardless of whether the same values are already present in the table.

MEMORY CHECK AT READING BACK


When saved archives are read back the available memory is checked.
Save type Save checking

SQL If less than 10% of available memory in the system is free, the read back of
the data from the SQl server is canceled.

ARX files The space available is checked before archive data (*.arx) is read in. The read
in is canceled if:
 less than 10% of the available memory is free
 the size of the reserved memory (SPEICHER=) defined in project.ini
is exceeded

The cancelation is documented in the Diagnosis Viewer via an error


message.

Attention
If files are created in the Historian which exceed either the reserved memory in
the project.ini or the 10% rule, these files cannot be read in.

121 | 185
Functions

7.6.1 Archive
The archive to be exported is selected in this tab.

SELECTION OF AN ARCHIVE
Option Description

Selection of an archive Selection of an already-created archive from the archive tree.

The selected archive name is displayed as a parameter in the list


of functions.

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

122 | 185
Functions

Option Description

Help Opens online help.

7.6.2 Export settings


The following are defined in this tab:
 Export format
 Contents
 File options

123 | 185
Functions

EXPORT FORMAT

Selection of the format in which the export is to be made.


Format Description

dBase Active: Export in a Base IV - file (*.dbf).


Caution: DBF files must:
 conform with their name to the 8.3 DOS format (8
alphanumeric characters for name, 3 characters for
extension, no space)
 be stored near the root folder

Note: The column description for export does not depend on


the language in which Runtime was started.

CSV Active: Export to a CSV text file (*.txt).

Structure (-> stands for tabulator):


Name -> identification -> value -> unit ->
(state_HI_DWORD)(state_LO_DWORD) -> second

XML Active: Export to an XML file (*.xml).

SQL Active: Export to an SQL database

Attention: The following restrictions apply to SQL export:


 max. 500 variables
 only cyclic archives are supported. No data is exported
for event-driven or spontaneous archives.

When configuring to the zenon Editor, clicking on the OK


button validates the configuration of the option group Export
to SQL database. If the table is still not available on the SQL
Server, it will be created automatically.

Attention: if the table is not available during operation in


Runtime, no data is exported.

License Note: Editor and Runtime must be licensed for export


to an SQL database.

EXPORTED COLUMNS

Selection of the columns of the database that are to be exported. This selection only applies for
export to XML, dBase and CSV. Fixed columns are defined for SQL during export. If SQL is selected as
an export format, the column selection is deactivated.

124 | 185
Functions

Note: The short form is given in brackets in the option designation. The order for the export is fixed
and corresponds to the order of the selected options.
Column Column in Description
dBase export
file

Variable name(V) VAR Active: Variable name column is exported. Contains the
names of the variables.

Identification (I) TAG Active: Identification column is exported. Contains the


variable identification.

Value (W) WER Active: Value column is exported. Contains the


technical value of the variables.

Measuring unit UNT Active: Unit column is exported. Contains the attendant
(U) unit of a value.

State (S) STA Active: Status column is exported. Displays the status of
the variables.

Date (D) DAT Active: Date column is exported. Contains the date
stamp of the variables.

Note: This option is greyed out if the option Export


as pivot format option is activated. The date and time
are always included for this export option.

Time (Z) ZEI Active: Time column is exported. Contains the time
stamp of the variables.

Note: This option is greyed out if the option Export


as pivot format option is activated. The date and time
are always included for this export option.

SQL

Columns for export are defined and fixed, and can no longer be selected. The following are exported:
Column Description

PRJ Project name

ARV Archive identification

125 | 185
Functions

Column Description

VAR Variable name

CALCULATION Not zero for entries from aggregation archives.

TIMESTAMP_S Time stamp of the variables in Unix format.

TIMESTAMP_MS Milliseconds for the time stamp.

VALUE Value of the variables.

STATUS Status of the variables (decimal value).

OPTIONS

Additional options for export.


Option Description

Show this dialog in Runtime Active: This dialog is displayed in the Runtime when the screen is
called up.

Use archives from read-back Active: Archives to be exported are read from the readback
folder folder.

When loading archive data from the readback folder, the


archive data from the Runtime path and from all subfolders of
the readback folder is also read.

Export as unicode Active: The exported file is saved in Unicode (UTF-16).

Only available for export format CSV.

126 | 185
Functions

Option Description

Export as pivot format Active: The exported file is saved in pivot format.

The pivot export is only available for the export formats CSV
and SQL.

In pivot format, identical timestamps are grouped and displayed


in one single row for different variables and outputs.

Example:
11.21.2018;14:12:30.0;Sample_Analog;;453.0;;SPONT T_INTERN
T_STD Sample_String;;P;;SPONT T_INTERN T_STD Sample_Big
Analog;;29688261.0;;SPONT T_INTERN T_STD

EXPORT STATE

Allows linking to a zenon variable for process images of the export status. The variable provides
information about the export status.
 1 - Export started.
 2 - Export successfully completed.
 3 - Export finished with errors.

Supported data types: INT, DINT, SINT, UINT, WORD, REAL, BYTE, UDINT, USINT, ULINT, LINT,
DWORD, LREARL

Engineering in the Editor.


1. Click on the ... button to open the dialog Select variables.
2. Select the desired variable
3. Click on OK.
The selected variable will appear under Export status. The export status is saved in this
variable.

EXPORT TO FILE

Option to configure the export file.

127 | 185
Functions

Option Description

File name User-defined freely-available file name. The file is saved under
the same name for each export.
Note: The name may not contain any special characters.
Prohibited are: \ / : * ? " < > |

Only available if the Generate file name automatically option


has been deactivated.

Generate file name Active: File names are automatically created from a short
automatically identifier and a day key.

Format of day key: YYMMDDHHMMSS.yyy


 YY: Year (two-digits)
 MM: Month (two-digits)
 DD: Day (two-digits)
 HH: Hour (two-digits)
 MM: Minutes (two digits)
 SS: Seconds (two digits)
 yyy: file type (DBF, TXT, XML)

Generate name from lot Active: the lot name is taken for the creation of the export file
name name.

Only available if the Generate file name automatically option


has been activated.

Attention: The lot name must not contain any special


characters.

Postfix Free identification that is automatically appended to the file


names.

Maximum 29 ASCII characters.


Note: Only available if the Generate filename automatically
is active.

Set export folder Display of the defined export path.

You can change the folder in the Editor in the following menu:
File-> General configuration-> Standard tab -> Exported
archives folder.

128 | 185
Functions

EXPORT TO SQL DATABASE

OPTIONS FOR EXPORTING ARCHIVE DATA TO AN SQL DATABASE. THE SETTINGS FOR THIS
OPTION GROUP ARE VALIDATED BY CLICKING ON THE OK BUTTON.
Option Description

Database connection Database for export to SQL database. Only available if SQL is
configured as an export format.

License Note: Editor and Runtime must be licensed for export


to an SQL database.

Table SQL database report to which the export is written. Only


available if SQL is configured as an export format.

License Note: Editor and Runtime must be licensed for export


to an SQL database.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

129 | 185
Functions

7.6.3 Time
The time filter is configured in this tab.

FILTER

Selection of the filter.


Parameter Description

No time filter Active: No time filter is used.


Note: In the Runtime, all entries since 1. 1. 1990 are displayed. Use of
this filter setting is not supported by Extended Trend.

130 | 185
Functions

Parameter Description

Absolute time Active: A fixed period of time is entered in the editor. When the
period function is executed, the defined absolute time period is exactly used.

In the settings section, the corresponding options can be shown and


configured there.

Note: Time is saved in UTC. For details see chapter Handling of date
and time in chapter Runtime.

Relative time period Active: A relative time period is entered.

In the settings section, the corresponding options can be shown and


configured there.

Attention: this filter is constantly updated.

Process Recorder: The time that is played back is used as the


current time in the Process Recorder module in playback mode. As a
result, reference is always made at the time of the recorded and
reproduced data, and not at the time when the data is played back on
the computer.

From Active: A time from which the filter is effective is stated. If the time is
not reached on the current day, filtering takes place from the
corresponding time the previous day.

Selection of the area mode from drop-down list:


 Starting from HH:MM:SS
 Starting from day at HH:MM:SS
 Starting from day, month - HH:MM:SS

In the settings section, the corresponding options can be shown and


configured there.

Attention: The start point of this filter is not updated automatically.


Only the existing times are used when shown.
The end time point is not defined with this filter, it is carried over.

Process Recorder: The time that is played back is used as the


current time in the Process Recorder module in playback mode. As a
result, reference is always made at the time of the recorded and
reproduced data, and not at the time when the data is played back on
the computer.

131 | 185
Functions

Parameter Description

Time period Active: A fixed time period is entered. Selection of the area mode from
drop-down list:
 One day
 One week
 Two weeks
 One month
 One Year
 15 minutes
 30 minutes
 60 minutes

In the settings section, the corresponding options can be shown and


configured there.

The following selection is also enabled on activation:


 Offer selection dialog
 Use current date/time

The Modify time period property can be activated.

The time period can be moved to the future.

The time period can be amended.

Example: Create a screen switch, for example to an AML screen. In


the screen switching filter dialog in the Time tab, set the filter to time
period and select One Month in the drop-down list. Select Use current
date/time under Settings. Activate the checkbox option Modify time
period. Enter the following setting under Move time period to the
future: HH = 0. Activate, under Change time period by, the checkbox
option Use the last completed time period.

Evaluation: today's date: 22.02.2018

Result of the time filter in the Runtime: 01.01.2018 - 31.01.2018

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

132 | 185
Functions

Option Description

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

Configuration is along the lines of time filtering for screen switching (on page 79).

7.6.4 Lots
You configure the limitation of the display to certain lots in this tab. The lot information is also applied
to the existing filter.

Information
Some filters in zenon can be configured independently of one another and then
combined in the Runtime. This is only possible to a limited extent with the lot
filter.

The lot filter can offer a list of existing lots in the Runtime. It is Runtime data that
is not available in the Editor.

When configuring the screen switching in the Editor, the time filter tab can only
be used in conjunction with the lot filter as a prefilter for the lot selection dialog.
If a lot from this list is then selected in the Runtime, the time filter is overwritten
with the data from the selected lot, in order to achieve precise filtering for the
selected lot.

That means: If the lot selection dialog is used in the Runtime and a lot is
selected, the time filter displayed does not correspond to the one configured in
the Editor.

133 | 185
Functions

FILTER

Settings for the application of the lot filter. Selection of one of the following options:
 No lot filter
 Apply lot filter directly
 Display lot selection dialog
Note: If the lot filter is shown as a dialog, it can be prefiltered for archive identifications. It is
expressly recommended that you use this prefiltering for performance improvements.
Option Description

No lot filter  Active: The lot filter is deactivated and cannot be


configured. Filtering for lots is not carried out in
the Runtime.

134 | 185
Functions

Option Description

Apply lot filter directly  Active: The filter configured here is applied in
the Runtime directly.

Note: There is no possibility to have all lots in a list


displayed and to select one manually. If a certain lot is
to be shown, the filter for the archives, name and time
must be configured accordingly. This requires the
existing data to be known very well. Alternatively, it is
recommended that the Show lot selection dialog
option is selected.

Display lot selection dialog Active: The dialog for lot selection is shown in the
Runtime when:
 Clicking on Filter or
 screen switching, if the Show this dialog in
Runtime option has been activated (Not
available for each function/screen type)
Note: The dialog is not shown on reloading.
Options can be pre-selected in the Editor.

Replace in Runtime with screen Only available if the Show lot selection dialog option
has been selected.

Note: Only available in screen switching functions.


Definition of a screen that is to be called up in the
Runtime instead of the lot selection dialog. Only
time/lot/shift filter screens are offered.

Click the ... button and the dialog opens to select a


screen.

If the linked screen is not found in the Runtime, a


search is made for corresponding screens with specific
names.

Note: A lot filter screen can also be selected using the


Show this dialog in Runtime option. However this is
not used as a lot filter here, but as a time filter screen.
The lot filter options are not correctly applied at this
position.

Display lot selection dialog Attention: This option is only available for Extended
Trend. With faceplates, it is displayed for all screen

135 | 185
Functions

Option Description
types, but here it is also only available for ETM.

Configuration for ETM:

In order for the option to be available, the Show lot


selection dialog option must be activated and the
Windows CE project property must be deactivated in
the project properties.
 Active: Enables several lots to be compared
directly. Display always starts from the zero
point.

Note: If the option is activated, the Diagram and


X-axis buttons are not available in the Runtime. This
also applies for the right-click functionality.

Overview of the implementation of the configuration in the Runtime:

TIME

Configuration of the time filter for lot selection. Selection of one of the following options:
 No filter
 Last lots
 Use time filter from "Time" tab

136 | 185
Functions

Option Description

No filter  Active: The time range set in the Time tab is not
taken into account. All completed and current
lots are displayed.

Last lots Attention: Only works in conjunction with the Apply


lot filter directly option.

The option allows the combination of both options


Display current lots and Display completed lots. At
least one of the two options must be activated. If both
options have been deactivated, this corresponds to the
No filter setting.
 Active: Input of the number of lots last concluded,
according to what they should be filtered for.
Input of the number in the number field or
configuration via arrow keys.

Example: 3 was entered as a value for the option. 2 lots


run and 10 have been ended. The following is shown:
the two that are current and one that has been
completed.

Note: The setting of the time filter is not used as a time


period for the current lots, but the last year. This filter
will not be executed as a prefilter and can therefore not
be used to improve performance.

Note on compatibility:
If the project is compiled for a version before 7.11, then:
If the current lots are selected, or the combination of
current and completed lots, then only the completed
lots are shown in the Runtime.

Display current lots  Active: The current lots are displayed.

Note: If the number of lots to be displayed is greater


than the number of current lots, lots that have been
completed are also shown until the set limit has been
reached.
Example: 3 lots are to be displayed. 1 lot is running, 5
have been completed. The one current lot and two
completed lots are displayed.

Display completed lots  Active: The completed lots are displayed.

137 | 185
Functions

Option Description

Note: If the number of lots to be displayed is greater


than the number of completed lots, lots that have been
completed are also shown until the set limit has been
reached.

Use time filter from "Time" tab  Active: Pre-filtering is carried out with the settings
of the Time tab.

The effective range of the filter can be amended within


this time range. Select from drop-down list:
 Start and end also outside filter limits: (Default)
Lots can start before the start time configured in
the Time filter and end after the configured end
time.
 Start and end only outside filter limits:
Lots must start and end within the time points
configured in the Time filter for the start and end.
 Start also before filter limit:
Lots can start before the start time configured in
the Time filter and end after the configured end
time.
 End also after the filter limit:
Lots can also end after the end time set in the
time filter, but must start at or after the
configured start time.
 Adjust start and end to filter limits:
Lots are cut to the time points configured in the
Time filter for the start and end.

ARCHIVES

Configuration of filtering for archives. This filter is applied as a prefilter for the lot selection dialog.

Selection of one of the following options:


 No filter
 Static
 From variable
Option Description

No filter  Active: Filtering for archive names is not carried

138 | 185
Functions

Option Description
out.

Static  Active: Archives whose identification corresponds


to the character string entered in the input field
are filtered for.

Input of the archive identifications in the input field:


 Several identifications are separated by a comma
(,).
 * or empty: All archives, no filter.

From variable  Active: The value of the variables linked here is


applied as a filter for archive names in the
Runtime.

Click on button ... in order to open the dialog for


selecting a variable.

Available for AML and CEL modules if the Apply lot


filter directly option has been selected: Other modules
use their own configurations.

Notes for variables in the Runtime:


 The variable selection is only activated in the
Runtime if a valid variable has already been linked
in the Runtime. The ... button is always deactivated
in the Runtime. The option can be selected, but
no new variable can be linked.
 If the variable is not signed into the driver at the
time at which the lot filter is applied, the variable is
signed in and read. This can lead to delays with
slow driver connections/protocols.

Attention: If the selected variable is not found in


Runtime, there is no filtering for archive names. This also
applies if the value of the variable cannot be determined.
The filter then corresponds to the No filter setting.

Note for ETM: In the ETM, the archives are established by the curves configured in screen
switching. This is only possible in the Runtime with the relative lots option. With this, the variables
must be selected in the Runtime, which is in turn stipulated by the possible selection of archives. The
archive, once filtered, must be one of the archives that relate to the configured curves. No data is
displayed if this is not the case. This setting can also be used to limit the displayed curves. However
these remain shown in the curve list.

139 | 185
Functions

ETM example:
Configured Data source Archive prefiltering in Result in the screen
curves the lot filter

A AR AR Is shown in the curve list and drawn


in the trend.

B EA Is only shown in the curve list.

C EP Is only shown in the curve list.

Note archive revision: The archive for which the screen is opened is already selected in the screen
switching function. Because only 1 archive can be selected, further limitation makes no sense.

Example of archive revision:


Configured Archive prefiltering in Result in the screen
archive the lot filter

AR EA No data is displayed.

NAMES

Configuration of the filtering to names. Selection of one of the following options:


 No filter
 Static
 From variable
Option Description

No filter  Active: Filtering for lot names is not carried out.

Static  Active: Lot names that correspond to the character


string entered in the input field are filtered for.

Input of the lot name in the input field:


 Several entries are separated by a pipe character
(|).
Note: Lot name must not contain a | character!
 * or empty: All lots of all displayed archives, no
filter.

From variable  Active: The value of the variable linked here is


applied as a filter for lot names in the Runtime.

Click on the ... button to open the dialog for selecting a


variable.

140 | 185
Operation in the Runtime

Option Description

Only available if the option Apply lot filter directly has


been selected.

Notes for variables in the Runtime:


 The variable selection is only activated in the
Runtime if a valid variable has already been linked
in the Runtime. The ... button is always deactivated
in the Runtime. The option can be selected, but
no new variable can be linked.
 If the variable is not signed into the driver at the
time at which the lot filter is applied, the variable is
signed in and read. This can lead to delays with
slow driver connections/protocols.

Attention: If the selected variable is not found in


Runtime, there is no filtering for lot names. This also
applies if the value of the variable cannot be determined.
The filter then corresponds to the No filter setting.

CLOSE DIALOG
Option Description

OK Applies all changes in all tabs and closes the dialog.

Cancel Discards all changes in all tabs and closes the dialog.

Help Opens online help.

The lot filter is configured along the lines of filtering when screen switching (on page 98).

8 Operation in the Runtime


Archives can be displayed and edited in the Runtime with an archive revision (on page 74) screen.

Archives that are created in the Runtime are saved as *.arx files in the Runtime folder of the
computer:
%Public%\Documents\zenon_Projects\[workspace]\[project]\[computer_name]\[project]

The current archive file has the name of the identifier. If the archive is closed, this file is saved and
renamed, and another file with the name as the identifier as the name is created. For renaming, the

141 | 185
Operation in the Runtime

UTC time is used for the area. The files are accessed in the Runtime by means of filters. Operations
with the files in the file browser are not necessary.

Values from archives can be edited, deleted and supplemented in the Runtime, depending on the
setting.

Attention: If files are created in the Historian which exceed either the reserved memory in the
project.ini or the 10% rule, these files cannot be read in.For details, see the Export archives chapter
(on page 118).

Information
For a decimal value, a comma (,) or a period (.) can be used as a decimal
separator. In doing so, the decimal separator is automatically changed to a
period internally.

CREATING AN ARCHIVE REVISION SCREEN

Control element Description

Archive data window Display of the main window in the Runtime.

Set filter (list) Definition of the set filter.

Set filter (display) Display of the set filter.

Archive status Display of the archive status.

Short name Display of the short description of the displayed archive.

Total number Display of the number of the displayed values.

142 | 185
Operation in the Runtime

Control element Description

Number of INVALID Display of the number of variables with the status INVALID.

Open archive Opens the dialog to select an archive.

Close archive Closes the archive that is currently open.

Save archive Saves changes in the archive and updates aggregated archives
on request.

Edit entry Opens the dialog (on page 154) to edit the selected archive
entry.

Insert entry Opens the dialog (on page 155) to insert archive entries into the
archive files.

If there are no archive files for this time range, no entries can be
inserted. A corresponding error message is shown if an attempt
to insert an entry is made.

Delete entry Deletes selected archive entries after confirmation query.

Selection Clicking on the button opens the dialog to configure the filter.

Column configuration Opens the dialog (on page 153) to configure column width and
font.

Print Prints list to configured printer.

Profile selection Entry of a name for a new filter profile or selection of a filter
profile from a drop-down list.

Save Saves current filter as a profile with the name given in the filter
profile text field.

Delete Deletes the currently-selected filter profile.

Import Opens dialog to import a filter profile.

Export Opens dialog to export a filter profile.

FILTER PROFILES
Filter profiles are filter settings that the user can save and call up in Runtime in relation to a certain
screen.

To be able to use filter profiles, the following control elements must be configured:

143 | 185
Operation in the Runtime

Control element Description

Filter profiles Profile administration in the Runtime

Profile selection Selection of a saved profile from a drop-down list.

Save Clicking on the button in the Runtime saves the filter


settings as a profile.

Note: The name can be a maximum of 31 characters long


and must only contain valid characters.
Prohibited are: ! \ / : * ? < > | ""

Delete Clicking on button in Runtime deletes the selected profile.

You can thus do the following in the Runtime:


 save filters
 use saved filters
 delete filter profiles

Filter profiles can also be exported and imported with further control elements.

FUNCTIONS
In online operation the following functions for archive control and monitoring are available.
 Archive: Start (on page 113): Manual starting of an archive selected in the Editor.
 Archive: Stop (on page 115): Manual ending of the archive selected in the Editor.
 Index Archive (on page 116): Subsequent indexing of lot archives (on page 68).
 Show active archives (on page 117): Display of the archives that are currently running.
 Export archives (on page 118): Export of archives in various formats.

EDITING OF ARCHIVES SAVED IN SQL


Values can be changed with archives saved in SQL.
However it is not possible to:
 Change the time stamp
 Delete values
 Insert values

144 | 185
Operation in the Runtime

8.1 Notes on stopping archives


When starting an archive in the Runtime, a file xx.arx (xx = short identifier of the archive) is created.
As soon as the archive is stopped, it is closed and named according to the rules.

String variables (on page 165) can also be archived.

Attention
Never close Runtime whilst archives are running. This also applies to ongoing
processes that use archives (Batch Control, for example).

Reason: Ending with an archive running prevents correct closing.

NOTES
If runtime is ended or reloaded while the archive is running, or if an archive is stopped, this affects the
available data. This primarily affects archives that are started or stopped via a function.
Notes to:
 Runtime was ended with a running archive
 Values with a stopped archive
 Reloading and server switch

RUNTIME WAS ENDED WITH A RUNNING ARCHIVE

Problem: Runtime was ended whilst the archive was still running.
Consequences:
 The archive will not be closed.
 The file can thus not be renamed.
 The ARX file is still present.

This leads to the following behavior:


 The archive no longer continues to run when Runtime is restarted.
If the archive is configured as a cyclic archive, then it is filled in with default values for the
missing area in the current interval when Runtime is restarted. If no value was transferred, the
defined alternate value is used otherwise the last valid value is used. Existing entries are not
overwritten.
 Execution of the Archive: Stop function no longer stops the archive. The ARX file can thus
not be copied correctly.
 No archive export can be carried out as long as there is an ARX file.

145 | 185
Operation in the Runtime

Solution: Start the archive again and then stop it. The archive is then correctly closed and renamed.
There may be invalid values in the archive.
Hint for engineering: In the scripts AUTOEND or AUTOEND_SERVPROJ, close all manually-started
archives. These are thus automatically stopped and closed when Runtime is ended.

VALUES WITH A STOPPED ARCHIVE

If values are generated while an archive is stopped, then:


 With cyclic archives, alternate values are used to fill them
 With archives without defined sampling time points, the last value with the status I-Bit is
written to the archive

RELOADING AND SERVER SWITCH

If reloading is triggered in the Runtime that is running or there is a reclassification between Server 1
and Server 2, duplicate or moved values may occur.

8.2 Selection
Clicking on the selection button opens the dialog to select values that are to be displayed in bold.

All entries that correspond to the selected criteria are highlighted in the list. The bold print is removed
again by activating the Delete selection option.

146 | 185
Operation in the Runtime

FILTER DIALOG

Option Description

Status list Selection of the status bits that are to be filtered for. Selection
and deselection by clicking on the respective status bit.

Only available if the All entries option has been deactivated.

Variable list Variables that are to be displayed from the selected archive.
Select and deselect them by clicking in the checkbox in front of
the variables.

Only available if the All entries option has been deactivated.

Value (in base unit) Active: Filtering is carried out for archive values whose value is
between a minimum and a maximum or which contain a certain
character sequence as a string.

Input of:

147 | 185
Operation in the Runtime

Option Description
 Minimum: Lower limit of the value
 Maximum: Upper limit of the value
 String mask: Character sequence that is be filtered for

Only available if the All entries option has been deactivated.

Delete selection  Active: All bold print in the list is removed when the dialog
is closed.
Deactivates input possibility for status bits and variables.

All entries Active: Settings apply for all statuses and variables. The entries in
status list, variable list and value cannot be selected individually.

8.3 Lot filter and time filter


The filter settings configured in screen switching (on page 74) can be modified in the Runtime. For
that
1. Open the screen switching function in the Editor.
2. Click on Filter.
3. Activate the Offer this dialog in the Runtime option in the Archive filter tab.
4. If individual variables are also to be configured in the Runtime, then deactivate the All
entries option in th Editor.

in the Runtime, the time filter or lot filter is displayed when the screen is called up, depending on the
configuration:
 Lot filter activated: Lot filter is offered
 Lot filter deactivated: Time filter is offered

CONFIGURATION OF LOT FILTER


If you set option no time filter as time filter type, all Runtime entries since 1. 1. 2000 are displayed.

Attention
All configured lot archives are offered in the list of archives. The same archive as
in the screen switching must be selected here. Only then is data also displayed.

148 | 185
Operation in the Runtime

Parameter Description

Lot filter Selection of the recipe group that is to be imported. The filter consists of
the two lists:
 List of archives: List of archives

 List of lots: List of lots allocated to the selected archive.

List of archives Selection of the desired archive

node *:
 Collects all lots of the displayed archive.
 The key is the lot name.
 The start time is the start time of the earliest lot.
 The end time is the latest end time of all lots.

List of lots Display of the lots allocated to the selected archive.

Filtering through entry of text, date, time or rime range - depending on


type.

Sort by clicking on the header.

Lot name Displays the name of all available lots.

Filter: Entry of a character sequence. Only lots matching the respective


character string will be displayed.

149 | 185
Operation in the Runtime

Parameter Description

Start date Shows the start date of all available lots.

Filter: Entry of a start date or selection from a calendar.

Start time Only available if you entered a start date.

Display of the start time of all available lots.

Filter: Entry of a start time. * means 12:00:00 AM o' clock.

End date Shows the end date of all available lots.

Filter: Entry of an end date or selection from a calendar.

End time Only available if you entered an end date.

Display of the end time of all available lots.

Filter: Entry of an end time. * means 11:59:59 PM o' clock.

Duration This column displays the duration for each available lot.

Display only.

Information
Still open lots are also displayed if they match the set filter criteria.

Information
The value of the lot variable is written in the index file and in the header of the
ARX file at the start of the lot. These entries are adjusted with every change of
the variable. When the lot is closed, the value of the lot variable at this moment
is finally written in the index file and in the header.

Thus the lot name is final when the lot is closed.

SQL

Lot filtering to archive values evacuated into SQL is carried out by means of a time filter. This time
filter contains all values of the archive between the start time and end time of the lot. The lot start
time and lot end time are also included. Milliseconds are not taken into account with this time
filtering.

150 | 185
Operation in the Runtime

CONFIGURATION OF TIME RANGE


The filter dialog for the time setting can be offered in the Runtime as specialized for a time range. To
do this:
1. Open the screen switching function in the Editor.
2. Click on Filter.
3. Open the Time tab
4. Select the Time period option.

In the Runtime, instead of the complete dialog, only one dialog to configure the time range is offered.
For example, for the One day setting:

EXAMPLE

With this setting, individual time ranges, such as shifts, can quickly be called up and configured.

For example: Shift from 6:00 AM until 2:00 PM.


1. Select, as a time period: One day.
As a default a day lasts from 00:00 till 00:00.
2. Set the postponement of the time range to six hours.
Now the day lasts from 6:00 a.m. till 6:00 a.m. the next day.
3. Now set the time period to 16 hours.

151 | 185
Operation in the Runtime

4. Keep the option Deduct time.


This means that there will be back-calculation from 06:00 on the next day by 16 hours. Now
the day lasts from 6:00 a.m. until 2:00 p.m., which corresponds exactly to a morning shift.
5. Transfer the new Runtime files.
6. Restart the Runtime.
7. Select the desired day in the screen switching.

You get the data of the selected day from 06:00 am to 2:00 pm.

DIFFERENT ARX AND SQL TIME FILTERS


Time filters for ARX and SQL act differently by default:
 SQL: Excludes and only shows the values up to the last value.
 ARX: Includes and shows all values including the last one.

EXAMPLE

These values are contained in the archive:


 10:00:00.000
 10:00:01:000

The filter covers 10:00:00.000 to 10:00:01:000.

Result in SQL:
 10:00:00.000

Result in ARX:
 10:00:00.000
 10:00:01:000

152 | 185
Operation in the Runtime

8.4 Define font and column width


For the list with the archive data, the font type and column width can also be changed in the Runtime.
To do this, the Diagram window control element must be configured. In the Runtime, a click on the
button opens the dialog for the configuration of the column width and font:

Option Description

Column width Column width in characters.

To amend the column width, enter the desired value in the text field in
the text field next to the column.

Font Selection of font type from drop-down list. All the fonts configured in the
Editor are offered. The same font is also used for the expression.

The selected font is saved in the project.ini file until Runtime is restarted
by the Editor.

OK Applies settings and closes the dialog.

Cancel Discards all changes and closes the dialog.

Standard Sets all entries for column width to default. The selected font is not
changed.

SAVE FONT PERMANENTLY


If Runtime is started from the Editor, the project.ini file is overwritten and the set font is changed
again.

You make changes to the font in the project.ini by means of the ARCHEDITFONT= entry.

To apply entries in project.ini permanently, the following procedure is recommended:


1. Identify the project.
To do this, note the GUID of the project in the Editor. The first 4-6 digits are sufficient.

153 | 185
Operation in the Runtime

Hint: Highlight the project in the project manager and press Ctrl+Alt+E.
Explorer opens the folder ...\<GUID>\Project_SQL_directory\FILES\
You need this path in the next step.
Then close the workspace or end the Editor.
2. Go to project.ini: This is in the following folder:
...\<GUID>\Project_SQL_directory\FILES\zenon\system.
3. Edit the project.ini: Make the desired changes in project.ini. Save and close the file.
4. Transfer Runtime files: Open the Editor again or load the project. Create the amended
Runtime files and transfer the Runtime files.

8.5 Editing values


Variable values in archives can be edited in the Runtime. To edit values:
1. Highlight the entry in the list of archive data.
Note: Several entries can also be selected at the same time.
2. Click on the Open button or double click on the entry.
3. The dialog to edit the value is opened.
4. Enter the desired value and time stamp.
If several archive entries are changed at the same time, all entries will receive the value and
time stamp entered in the dialog.
5. Confirm the dialog by clicking on OK.
If one or more values have been changed, then following happens after clicking on OK:
 The status of the entry is set to manual value (MAN_VAL)
 The amended line is colored in blue
 The column title is colored red
 The Save button is activated
6. Save the updated list by clicking on the Save button.
Once the amended list has been saved, the color of the column title is reset again.

154 | 185
Operation in the Runtime

EDIT ARCHIVE DIALOG

Option Description

Value Entry of the new value

If several values have been selected, then:


 The default value is always set to 0
 The new value is applied to all highlighted entries

Time Entry of the new time stamp

If several values have been selected, then:


 The default value is always set to 0
 The new value is applied to all highlighted entries

OK Applies settings and closes the dialog.

Cancel Discards all changes and closes the dialog.

8.6 Inserting values


New values can also be inserted into an existing archive.

To insert new values:


1. Click on the Insert button.

155 | 185
Operation in the Runtime

2. The dialog to create new values is opened

3. Select a variable.
4. Enter value, number and time stamp.
5. Confirm the selection by clicking on OK.
The following happens by clicking on OK and the entry in the list:
 The status of the entry is set to manual value (MAN_VAL)
 The new line is colored blue
 The column title is colored red
 The Save button is activated
6. Save the updated list by clicking on the Save button.
Once the amended list has been saved, the color of the column title is reset again.

Note:
 If an entry is highlighted before the dialog has been opened, then:
 The time stamp and cycle cannot be changed
 If the new value is entered below the highlighted variable
 No new values can be inserted into archives saved in SQL.
 Once the amended list has been saved, the color of the column title is reset again.

156 | 185
Operation in the Runtime

INSERT NEW DIALOG VALUE

Option Description

Value Entry of the new value

Number Entry of the number of the desired values.

Cycle time Entry of cycle time in seconds.

Date Entry of the date.

Time Entry of the time point.

Variables Selection of the variables from a list.

OK Applies settings and closes the dialog.

Cancel Discards all changes and closes the dialog.

8.7 Store values in archive


New and amended values must be saved so that they can be transferred to the archive. To do this,
click on the Save button. The new and amended values are thus saved in the archive. If there are also
aggregated archives (on page 50) for the archive, these are automatically updated.

If there are unsaved values in the archive, these are displayed by the headers being colored red.

8.8 Print archive


Archives are printed as a list by default by clicking on the Print button. This list can also be given a
title line. To do this, there must be a format file with the name ARV_G.FRMM in zenon.

To format the print-out:

157 | 185
Operation in the Runtime

1. Create a formatting file:


 Name: ARV_G.FRM
2. Import the file in the Editor in the subnodes: Files\Texts and formats.
This corresponds to the save
location: %PUBLIC%\Documents\zenon_Projects\[Arbeitsbereich]\[Projekt]\RT\FILES\zenon\c
ustom\lists.

3. Check the printer set for lists and formats in the File -> General configuration -> Default
-> Printer -> For notepad menu.

CONFIGURATION OF THE FILE CALLED ARV_G.FRM


Create a text file with the name ARV_G.FRM.

This file contains the key words for the formating of the printout in the Runtime.

Attention: The key words are entered in German for all languages.
Keyword Meaning

@AMELDUNG Limit value text of the archive entry.

@ARCHIVNAME Name of the archive.

@DATZEIT Date/time stamp of the archive entry.

@EINHEIT Unit of the archive entry.

@HEADZEIT Date/time stamp of the archive.

@KANALNAME Variable name of the archive entry.

@SEITE Page number for the print-out.

@STATUS Status text of the archive entry

@TAGNR Variable identification of the entry.

@WERT Value of the archive entry.

The key words for the part of the cyclically-repeated archive entries in the list are included with the
%% character.

EXAMPLE

@HEADZEIT @ARCHIVNAME
Page: @SEITE -----------------

158 | 185
Operation in the Runtime

Date/Time Variable Name Value Unit Status Text Status


--------------------------------------------------------------------------------------------------------
--------
%%
@DATZEIT @KANALNAME @WERT @EINHEIT @AMELDUNG @STATUS
%%

8.9 Cycles in Runtime


The configuration of the recording type (on page 34) and saving (on page 37) in the Editor, as well as
the start time of the archives has an effect on the execution in the Runtime accordingly:

The start time set in the archive serves as the basis for the calculation of the save times. The save
cycles are added from this time point on. zenon thus knows, each time Runtime is started, when the
currently-running Alpha archive will be closed and a new file needs to be started.

Information
Archives that are currently open are labeled Alpha archives and therefore do not
have any date or time stamp.

If Runtime is stopped whilst data is being written to an archive, this file remains open. The next time it
is started, Runtime checks to see if the file should now be closed.
 Yes: The file is closed and a new file is started immediately.
 No: The new data is added to the existing file and the file is used again. Values that are
generated during the time that Runtime is down are entered by zenon with the
corresponding Archive filler value and receive the status INVALID.

Information
Always configure the scan cycle and save cycle in such a way that they are in
whole-number multiples of one another, in order to avoid overlapping and thus
imprecision in aggregated archives.

159 | 185
Use of archive data in zenon

9 Use of archive data in zenon


Data from archiving can be reused in zenon:
 Report Generator (on page 160)
 Report Viewer (on page 163)
 Extended Trend (on page 163)

Furthermore, data can also be evaluated with the COPA-DATA product zenon Analyzer.

9.1 Report Generator


The Report Generator works on a cell-orientated basis.

Example for a report:

Each of these cells can be assigned certain formats and functions. A report is configured as its own
screen Report Generator. The data is calculated, output and displayed using pre-defined report
functions. These can be entered into the respective cells using a dialog or manually. To be able to
display reports in Runtime, they must be configured in the Editor.

Attention
The desired printer must be selected before creating the report, because the
page formatting of a report depends on the printer that has been set.
Subsequent changing of the printer can necessitate reformatting of the existing
table.

160 | 185
Use of archive data in zenon

9.1.1 Archive and logging functions

BASICS
All archive functions build on the basic archive(FILTERINDEX,PARAMETER,RICHTUNG) function.

The expansions are distinguishable by additional letters in function names.


Code Meaning Comment

r read only There is only read access to the archive. Changed values
cannot be saved.

sp Columns Provides special formatting to define cells to be used.

m Mathematics Only has an effect on value and time.

ex extended provides special treatments.

w write Writing is possible.

FILTER INDEX

The filter index creates a distinction between archive filter numbers used in the report functions and
variables from the archives.

Example
=archive(5,"value","downwards")

FILTERINDEX = 5

The entry present in the filter under no. 5 is used for the report function.

PARAMETER
Options Possible value

value [1-n]

state [1-n]

time [1-n]

161 | 185
Use of archive data in zenon

Options Possible value

number [1]

Direction
Options Meaning

Right Value is entered to the right (row).

There must be sufficient cells left free for expected


entries from further report creation.

Attention: If an archivesp function is created with


only one column, the value is entered downwards (in
the column).

bottom Value is entered downwards (column).

There must be sufficient cells left free for expected


entries from further report creation.

Attention: If an archivesp function is created with


only one row, the value is entered to the right (in the
row).

All archive functions can be created with the function assistant.

On outputting the status information, the settings from the project.ini file in the [STATUS] section or
the settings from the internally defined allocation are used. If the status labeling was changed in
project.ini, the amended name is given. (Tip: makes it possible to keep the project compatible with old
status labels.)

In online operation, the query time is either defined in the function query or given in the Runtime
when a report file is opened.

CHANGE ARCHIVE ENTRIES


If permitted by user authorizations, archive values can also be changed in the Runtime. Changes are
either saved manually via the Save control element or automatically saved when saving a report file.
The status of an amended entry is automatically set to manual value.

Information
Changing string fields in the report: If a text consists only of numbers, spaces are
removed by default when it is saved. Spaces that are desired must be displayed
by ASCII character 255 (Alt+255).

162 | 185
Use of archive data in zenon

9.2 Report Viewer


The Report Viewer also allows archive data to be prepared for the user. However, in contrast to the
Report Generator, these cannot longer be modified. For this, the Report Viewer offers extensive
graphic possibilities for display, such as diagrams. In addition, two time ranges for incoming analyses
can be compared with one another.

To be able to create reports using the Report Viewer, software from third-party providers will also be
required. Microsoft Report Designer is therefore also installed when zenon is installed. This opens as
soon as you create a new report. There is a separate screen type for display in the Runtime.

You can find details on the configuration in the Report Viewer manual.

9.3 Extended Trend


Extended Trend, which requires a license, provides online values and archive values from variables as
curves. In contrast to the trend dynamic element, it is possible to zoom, browse, query and scale
online values and values from archives. As for the Report Generator and the Report Viewer, there
also exists a separate screen type for the Extended Trend. You can read details on the configuration
switch in the Extended Trend manual.

EXTENDED TREND STARTER EDITION


In the standard package of zenon, a reduced version of Extended Trend with limited functionality is
included with the Starter Edition.

The Starter Edition has the following limitations:


 no XY trend
 no second time axis
 number of curves limited to 8

163 | 185
Additional information

 no logarithmic representation
 Scanning with a cursor

10 Additional information
This section contains background information on archives and archiving.

10.1 Format of archive files


Archives have the following data structure:
 The archive file with the identification ARX contains the variable definitions and numerical
data.
 The ARS file contains the String data (on page 165).
 The archive header contains the archive definition and may or may not contain values of lot
variables.
 The memory that is reserved for the value of the lot variable is - in case the lot variable is a
string - dependent on the string length. For numeric variables, a fixed amount of 32
characters is reserved. Lot strings are stored in Unicode. If no lot variable (on page 68) is
defined, no memory is reserved.
 The data record in the ARX file has a length of 24 bytes and also offers the possibility to store
double values. The status information is 64 bit.
 Archives can be stored at an interval of 1 second. For cyclical archives, it is recommended
that save cycles greater than 30 seconds are adhered to.

CONVERSION OF PROJECTS BEFORE VERSION 6.20 SP0


From version 6.20 SP0, archive files are stored in ARX format, before that the ARV format was used. If
a project is converted, a check is made when Runtime is started to see whether there are archive files
in ARV format in the Runtime folder. After confirmation of the conversion, the files are converted into
ARX format. This conversion is done for all projects, before the projects start. The ARV files are
deleted during the conversion. For evacuation to SQL (on page 174), further columns must be added
to the table.

Recommendation: Back up the ARV files before conversion.

NAMING AN ARCHIVE
The name of an archive is formed of:

164 | 185
Additional information

 Short name
 Save time in UTC in the format YYMMTThhmmss
 File extension .arx

For example: XX140403071200.arx


XX Name of the archive

14 Year

04 Month

03 Day

07 Hour (UTC)

12 Minute

00 Second

UTC TIME AND LOCAL TIME


Archives use UTC time when saved. The local time that is set on the computer consists of: UTC + time
zone + standard time/daylight saving time. The zenon Runtime automatically considers the local time
for archive requests.

EXAMPLE: BERLIN IN THE SUMMER


 Local time: 14:00 o’clock
 UTC: 14:00 p.m. local time less 1 hour summer time less 1 hour time zone = 12:00 o' clock UTC
The value that occurs locally at 14:00 is saved with the time 12:00.

You request values between 13:00 and 15:00 local time in Berlin. The Runtime then requests from the
archive the values with a time stamp between 11:00 and 13:00 and displays them with the local time
(13:00 to 15:00).

10.1.1 String variables


String variables can be archived. They are stored in a file called [short description][time].ARS. This file
contains only the data of the strings and forms a logical unit with the ARX file. Information on whether
a sting archive has to exist or not is stored in the ARX file. If no strings are stored in the archive, no
ARS archive is created. If there are strings, the ARS file must be present.

165 | 185
Additional information

Attention
File operations must include both files. If a required ARS file is missing, the data
from the ARX file is also not loaded.

The string data is stored in Unicode with dynamic data length. This happens in order to save memory
and is independent of the defined string length. In the data record of the ARX file, the position of the
String record in the ARS file is stored.

Attention
If strings are edited in the ARS file, their position can change. This is updated for
the edited string in the ARX file. This only happens for the edited string, but not
for all others. If the ARS file is accessed via the API or tools, it cannot therefore
be guaranteed that the addressed strings are at the assumed position.

An alternate value for strings is available in the variable properties, so that the archive is always
supplied with values. The String archive filler value is used if zenon (e.g. for filling cyclic archives)
needs a value for a string variable and no value is available. If no value was transferred, the defined
alternate value is used otherwise the last valid value is used.

For the calculation of archive sizes, the editor calculates with maximal string length.

SIZE OF DATA FIELD


In general, the size of the data field is as large as the longest string variable in the archive. In doing
so, the following applies for:
 Archive evacuation
When creating the tables for archive evacuation with the zenon Editor, the column width is
adjusted to the longest string.
 Archive export
The column width is fixed at 128 characters. Characters that go beyond this are ignored.

Note on system driver variables: The string length is limited to 5 characters and cannot be
changed. The string contents of the system driver variables can however be longer than 5
characters. Insert an additional string variable with a length of, for example, 256 characters into the
archive in order to avoid data loss.

Attention
If the length of a string variable to be archived changes, this data field must be
adapted when moving it to SQL or exporting it to SQL.

Note: These changes must be made before the changes are accepted in
Runtime. Otherwise the longer Strings could be archived shortened.

166 | 185
Additional information

AMEND DATA FIELD FOR SQL


The amendment can either be carried out manually with a tool for database administration (e.g.
Management Studio for MS-SQL Server) or in the archive configuration.

To amend the data field in the zenon editor, carry out the following steps for each archive:
1. Select Edit archive in the context menu of the archive
2. Switch to the Save (on page 37) tab
3. Go to the Evacuation after storage time section:
4. Click on Create tables (on page 167).

10.2 Evacuate to an SQL database


The evacuation of archives to an SQL database allows the standardized storage of data for use in
other applications. Microsoft SQL Server, Oracle and other database systems that have an ODBC
interface are supported. At the same time, the data can also continue to be used in zenon trends and
reports. SQL databases also allow targeted optimization of data storage.

A distinction is made between two different stages of data storage when storing archive data in an
SQL database.
 Short-term data: Corresponds to the Keep archives setting in the Save dialog. These are
saved in ARX format on the local data carrier.
 Long-term data: After the period stated here the contents of this file is written to the SQL
database as a combined transaction and deleted on the local disc.

If data from this archive is required for trends or reports, the locally-saved short-term data is
automatically combined with the long-term data stored in the SQL database into a seamless dataflow
again.

This property can also be used to use external data in zenon. After the necessary database tables
have been created, these can be filled with data using external tools. The archive does not need to be
started for this. The data inserted into the table is thus available for display in a zenon trend or a
report.

Note: SQL archives can also be evacuated to a MS Azure service bus. To do this, the Use MS Azure
service bus for writing option must be activated for the archive configuration in the Save (on page
37) tab. You can read details in:
 MS Azure-Dienstbus (on page 173) chapter in this manual

 Manual MS Azure

167 | 185
Additional information

FORMATS OF THE TABLES


A table is generated for each archive in the database that contains the evacuated archive data.
Additionally a cross reference table for the whole project is generated containing the allocation
between the variable names and the unique numerical variable IDs.

Information
When creating the SQL tables for archive data, lots and variables, a primary key
is automatically created via the Editor.

Attention: For performance reasons, the primary key for archives is not
optimized for non-cross-project variable references. The project GUID of the
variables is thus not included. If archives with cross-project variable references
are to be evacuated in SQL, the primary key must be deleted manually or
supplemented with the project GUID.

FORMAT OF THE DATA TABLE

The data table consists of the following columns:


Column Type Meaning

VARIABLE int[4] numerical variable ID

CALCULATION int[4] Type of data reduction in aggregated archives.

Up to 4 values are possible: Sum, average value, minimum,


maximum.
When exporting the aggregated archive to a file (e.g. .csv),
the values 1 to 4 are written as strings:
 1=Sum
 2=Average value
 3=Minimum
 4=Maximum

At evacuation or export to SQL the values are written as


Integer in ASCII code:
 49=Sum
 50=Average value
 51=Minimum
 52=Maximum

TIMESTAMP_S int[4] Time stamp in Unix time format

168 | 185
Additional information

Column Type Meaning

TIMESTAMP_MS int[4] Milliseconds for the time stamp

VALUE float[8] Value

STATUS int[4] Status flag of the value (zenon state)

GUID varchar[36] Records the project GUID of the variables. Must not be
ZERO.

STRVALUE varchar the length depends on the longest string variable to be


archived. For numerical variables this field has the value
ZERO.

Primary key clustered: TIMESTAMP_S and TIMESTAMP_MS and VARIABLE and CALCULATION and
GUID.

The name of the database table comprises the project name and the short name of the archive
together. Both tables are connected with an underscore:
ProjectName_ShortName
If the project name is ARV_IN_DB and the short name of the archive is A1, the table name is:
ARV_IN_DB_A1.

169 | 185
Additional information

Attention
Because the GUID is included in the index, the value must be NOT NULL. From
zenon 7.20, an empty string is entered for the GUID instead of NULL for the
evacuation of variables of your own project.

If Runtime files for version 7.11 or earlier are compiled, this results in a
compatibility problem: Because NULL is written in the GUID column here, the
evacuation does not work.

Solution: The table in the SQL Server must be created manually without GUID
in the primary key or completely without a primary key.

For example, with the following syntax:


CREATE TABLE [$projectname$_$archivename$]
(
[VARIABLE] int,
[CALCULATION] int,
[TIMESTAMP_S] int,
[TIMESTAMP_MS] int,
[VALUE] float,
[STATUS] int,
[GUID] varchar(36),
[STRVALUE] varchar(?),
CONSTRAINT [PK_$projectname$_$archivename$] PRIMARY KEY CLUSTERED
(
[TIMESTAMP_S] ASC,
[TIMESTAMP_MS] ASC,
[VARIABLE] ASC,
[CALCULATION] ASC
)
)

FORMAT OF THE TABLE FOR THE LOT NAME

The table with the lot names for SQL evacuated archives:
 has the name [Project name]_[archive abbreviation]_BATCH
 consists of 3 columns
Column Type Meaning

BATCH VARCHAR (128) Lot name

170 | 185
Additional information

Column Type Meaning

START_S INT Unix time stamp of the lot beginning

END_S INT Unix time stamp of the lot end

Primary key clustered: START_S and END_S.

FORMAT OF THE CROSS REFERENCE TABLE


Column Type Meaning

VARIABLE INT[4] numerical variable ID

NAME VARCHAR[128] Name of the variable

GUID VARCHAR[36] Records the project GUID of the variables. Must not be
ZERO.

Primary key clustered: VARIABLE and GUID.

The name of the cross reference table is combined from the project name and the suffix VARIABLES.
The two parts are connected with an underscore character. So if the project name is ARV_IN_DB, the
table name will be ARV_IN_DB_VARIABLES.

10.2.1 Configuration
To store the data of an archive in a SQL database:
1. Select in tab Save property SQL database.
2. Click on the ... button.
3. The dialog to select a database is opened.
a) Configure the provider.
For example SQL Server Native Client.
b) Test the connection.
c) Close the dialog by clicking on OK.
Once you have confirmed the dialog, zenon creates the cross-reference table and data table
in the database. As soon as there is data to be evacuated, this is inserted into the data table.
If zenon loses the connection to the database during operation, the data remains saved
locally. The evacuation is continued as soon as the connection has been successfully
reestablished.
4. Click on the Create tables button if necessary.
Via button Create table the tables can be created newly or adapted automatically at any
time. If for example variables are added to or removed from an archive or the provider string

171 | 185
Additional information

is adapted manually. Every time you add or remove variables to or from archives which are
configured for SQL evacuation, the tables must be updated in SQL.

Attention
When using Native Client 10 and 11, the password is not automatically carried
over to the provider string. It must be entered manually

e.g.: ...;User ID=sqlExampleUser1;Password=secretPassword;...

Note: If you configure an archive for SQL evacuation and reconfigure the archive at a later time, you
must adapt the tables in SQL respectively.
For example: You have configured an archive for the evacuation to SQL; the tables in SQL have
already been configured. According to this, you link a variable for lot archiving. In this case, the tables
in SQL must be created again. Otherwise the evacuation to SQL cannot be carried out, because the
table for the lot information is not present.

Attention
Ensure that the provider configured in the connection is also available on the
Runtime computer in the Runtime.

Note: An SQL client is also installed with the zenon Editor. Because the zenon
Runtime does not need an SQL Server, no SQL client is automatically installed.
This can be downloaded from the Microsoft website and must be installed
individually.

Ensure you install the correct version when installing the provider. This must suit
the zenon version being used. This means: If a 32-bit zenon Runtime is used, the
provider must be a 32-bit version. This also applies if it is installed on a 64-bit
operating system and also if the database itself is a 64-bit application.

10.2.2 SQL script


Syntax for SQL script:
 Variable table:
CREATE TABLE "PROJECTNAME_VARIABLES" ("VARIABLE" int,"NAME" varchar(128),"GUID"
varchar(36),CONSTRAINT "PK_PROJECTNAME" PRIMARY KEY CLUSTERED ("VARIABLE"
ASC,"GUID" ASC))
 Data table:
CREATE TABLE "PROJECTNAME_ARCHIVENAMESHORT" ("VARIABLE" int,"CALCULATION"
int,"TIMESTAMP_S" int,"TIMESTAMP_MS" int,"VALUE" float,"STATUS" int,"GUID"
varchar(36),"STRVALUE" varchar(1),CONSTRAINT "PROJECTNAME_ARCHIVENAMESHORT"

172 | 185
Additional information

PRIMARY KEY CLUSTERED ("TIMESTAMP_S" ASC,"TIMESTAMP_MS" ASC,"VARIABLE"


ASC,"CALCULATION" ASC,"GUID" ASC))

Note:
 PROJECTNAME: Project name of the project

 ARCHIVENAMESHORT:unique short description of the archive


two characters, for example A1
 The variable table table is only present once.
 The data table must be created for each archive that is to be evacuated to SQL.

10.2.3 Oracle database


No Primary Key is created with Oracle databases. This can hinder the performance.
 Background: Oracle treats empty strings as NULL values.
With Oracle, columns that contain empty strings can never be part of a Primary Key.
 Solution: To speed up the performance during queries, a Primary Key that does not contain
any empty strings can be created manually.

10.2.4 MS Azure service bus


If the Use MS Azure Service Bus for writing option has been activated for the SQL evacuation of an
archive, all archive values in the Azure Service Bus Queue are added to the Azure service bus queue
with the name archivequeue. This must exist in the MS Azure-Namespace of the configured
connection. The MS Azure connection name is entered in the input field under the option.

CONFIGURATION
In MS Azure, there must be at least one instance of an AzureZenonArchiveWorker cloud service
running, which receives the archive values from the queue with the name archivequeue and inserts
these into the MS Azure SQL storage. The table format corresponds to the classical SQL evacuation of
an archive.

The cloud service must be displayed manually with the AzureArchiveCloudService.cspkg deployment
package via the MS Azure configuration user interface. You can find the package in the following
folder: %ProgramData%\COPA-DATA\zenon8.20\CloudServices.

Settings:
 Zenon.ArchiveServiceBus.ConnectionString: Corresponds to the MS Azure connection
name in archive configuration (on page 37).

173 | 185
Additional information

 Zenon.ArchiveSQLServer.ConnectionString: Denotes the name for the MS Azure SQL


storage destination.

PROCEDURE
The archive files are read via an OLEDB connection and SQL SELECT statement. The OLEDB
connection name therefore generally shows the same MS Azure SQL-Storage as in the output
connection name (Zenon.ArchiveSQLServer.ConnectionString) in AzureZenonArchiveWorker.

10.2.5 Conversion
If archives from zenon versions before 6.20 SP0 are used in a new version, the following columns
must be added manually:
 STRVALUE in data table

 GUID in cross-reference list

The columns are either added to the database directly or via the dialog in zenon Editor.

To add the columns in the Editor:


1. Open the Edit archive dialog for each archive concerned.
2. Open the Save tab.
3. Open the dialog with the SQL database option.
4. Close the dialog by clicking on OK.

After closing the dialog the according changes in the database are performed.

Attention
If these changes are not performed, no archive data will be evacuated to the
SQL database.

10.2.6 Troubleshooting

DUPLICATES
Duplicates cannot be evacuated to the SQL database due to the primary key!
Duplicates can occur with variables whose time stamp comes from a different device or by canceling
when Runtime is ended.

174 | 185
Additional information

EXTERNAL TIME STAMP

Duplicates can occur with variables whose time stamp comes from an external device.
For example: The controller sends special events shortly before a connection failure and repeats
sending once the connection has been established again. Two entries with the same value and time
stamp are then present.

Problem: The SQL export cancels during an attempt to evacuate data with duplicates.

Solution: Remove the duplicates before evacuation in the Archive revision screen.

CANCELING WHEN CLOSING THE RUNTIME

If an export to the SQL database is carried out when Runtime is ended, Runtime is only ended if the
export has been completed. If Runtime is ended prematurely in this time period by means of the
process desk or the task manager, the following status occurs:
 Part of the values are already in the SQL database
 However the archive file was not deleted

When Runtime is restarted, an attempt is made to evacuate the archive file that is still present to the
SQL database.
Procedure:
 Originals are evacuated.
 If there are duplicates, these are not evacuated due to the primary key. The export is
repeated on the next cycle. Duplicates are deleted in the process.

ODBC ERROR MESSAGE 80004005


The following error message is displayed for SQL evacuation:
Execute INSERT statement failed 1, hr=80004005

This indicates an ODBC-related error.

Solution:
Switch to an SQL server provider (on page 171).

10.3 RDA
More detailed information on the configuration and administration of the RDA archiving (on page 12).

10.3.1 PLC data format


Possible RDA data types are:

175 | 185
Additional information

 BYTE
 WORD
 DWORD
 FLOAT

They depend on the drivers used in zenon.

Note: You can find out whether your driver supports RDA in the driver documentation.

Attention
No values from the future can be read in. Values can be in the future if the
system times in the PLC and the computer are different. Ensure that the system
times are always synchronized.

10.3.2 Description header


Parameters Description

Index [0] RDA variable that has been added to the archive. Decides on the data type
(for example BYTE, WORD, DWORD, FLOAT).
 The size depends on the data type in zenon.
 The trigger flag is set to 1 by the PLC if values are to be obtained.
Once zenon has obtained the data, the flag is automatically reset to 0
by the driver.

Index [1] Number of values that to be saved.

32-bit Intel format. Set by the PLC.

Index [2] Cycle time in milliseconds; is used for TYPE 1 and 4 .

32-bit Intel format. Set by the PLC.

Index [3] RDA type:


 Type 1: Without time (is no longer used)
 Type 2: With time format 1 (is no longer used)
 Type 3: With time format 2
 Type 4: Without time

32-bit Intel format. Set by the PLC.

176 | 185
Additional information

Parameters Description

Index [4] Number of the most recent value. Should correspond to the value in Index
[1].

32-bit Intel format. Set by the PLC.

Index [5] Contains data. The content depends on the type.


 Type 3: Values
 Type 4: Time stamp.

Index [6] Contains data. The content depends on the type.


 Type 3: Timestamp
 Type 4: Values

Index [etc.]

10.3.3 Time stamp format


The time format is shown by an 8-byte long expression:
Byte Corresponds to Possible values

1 Year e.g. 99, 100, 114, etc.

Note: The time format starts


with the year 1900 in a two-digit
written form. 1900 = 00. Three
digits are used from the year
2000 2000 = 100.

2 Month 1 - 12

3 Day 1 - 31

4 Hour 0 - 23

5 Minute 0 - 59

6 Second 0 - 59

7 Hundredths of a second 0 - 100

8 reserved -

177 | 185
Additional information

10.3.4 Types
There are different types available for RDA archiving. The following are currently used:
 TYP 3 (on page 178)

 TYP 4 (on page 179)

Attention: Type 1 and type 2 can still be configured for compatibility reasons. However they are no
longer used or documented.
Type 1 was replaced by type 4; type 2 was replaced by type 3.

10.3.4.1 TYP 3
Index Description

Index [0] RDA variable.

Index [1] Number of values to be saved.

Index [2] Is ignored.

(cycle time in milliseconds.)

Index [3] RDA type.

Index [4] Number of the most recent value.

Index [5] First saved value.

Size: Depends on the zenon data type.

Index [6] Time stamp for the first value.


(for details, see time stamp format (on page 177)).

Index [7] Second saved value.

Size: Depends on the zenon data type.

Index [8] Time stamp for the second value.


(for details, see time stamp format (on page 177)).

Index [...] [n-th value]

178 | 185
Additional information

10.3.4.2 TYP 4
Index Description

Index [0] RDA variable.

Index [1] Number of values to be saved.

Index [2] Cycle time in milliseconds

Index [3] RDA type.

Index [4] Number of the most recent value.

Index [5] Time stamp.


For details, see time stamp format (on page 177). First saved value.

Size: Depends on the zenon data type.

Index [6] Saved values.


 Value 1
 Value 2
 Value 3
 Value 4
 etc.

10.3.5 Note:
Note the following for RDA archiving:
 The transfer of data takes time. With a trigger event, it is possible, depending on the number
of values, that there is a transfer time of several seconds.
 In redundancy operation, the longer transfer time may result in a server that is currently
reading an RDA file not being able to synchronize completely due to a fault. The Sever that is
to take over would read the RDA archive once again, because the trigger in this case has not
yet been set to 0.
 With TYPE 4, in contrast to TYPE 3, only the starting time is transferred.
 The zenon RDA mechanism needs a coherent block in the controller that can be addressed
with an offset. RDA is therefore generally not possible for drivers with symbolic addressing.
There is a workaround available for some symbolically-addressable drivers. You can find an
example afterwards under Example of a data type declaration in accordance with IEC 61131-3.
You can find details in the respective driver documentation.

179 | 185
Additional information

Note: RDA block archives do not support: Status variables as well as variables configured as Request
only from standby server .

EXAMPLE OF A DATA TYPE DECLARATION IN ACCORDANCE WITH IEC 61131-3

RDA-TYP 3:
TYPE RDA_DATA_3 : (* Structure for RDA type 3 payload *)
STRUCT
Value : DINT; (* value
TimeStamp : ARRAY[0..7] OF BYTE; (* Time stamp (year, month, day, hour, minute, second, 1/100th
second, reserve) *)
END_STRUCT
END_TYPE

TYPE RDA_3 : (* Structure for RDA type 3 *)


STRUCT
Trigger : DINT; (* trigger variable *)
Count : UDINT; (* Number of data sets *)
Cycle : UDINT; (* Cycle time in [ms] (only relevant for type 1 and 4 *)
RDA_Type : UDINT; (* RDA type, 1 - 4 *)
Oldest : UDINT; (* Index of the oldest value (placeholder for compatibility reasons, only relevant
for type 1) *)
Data : ARRAY[0..19] OF RDA_DATA_3; (* payload *)
END_STRUCT
END_TYPE

RDA-TYP 4:
TYPE RDA_4 : (* Structure for RDA type 4 *)
STRUCT
Trigger : DINT; (* trigger variable *)
Count : UDINT; (* Number of data sets *)
Cycle : UDINT; (* Cycle time in [ms] (only relevant for type 1 and 4 *)
RDA_Type : UDINT; (* RDA type, 1 - 4 *)
Oldest : UDINT; (* Index of the oldest value (placeholder for compatibility reasons, only relevant
for type 1) *)
TimeStamp : ARRAY[0..7] OF BYTE; (* Time stamp of the first value (year, month, day, hour, minute,
second, 1/100th second, reserve)) *)
Data : ARRAY[0..19] OF DINT; (* Payload *)
END_STRUCT

END_TYPE

180 | 185
Additional information

10.4 Archiving in the zenon network


Archiving is integrated into the zenon network.

The network functionality of zenon makes it possible to implement projects as distributed on different
computers and to create complex network constellations very efficiently. In doing so, project
constellations can also be though out in such a way that certain project content is only visible at a
certain location (a certain computer) for an activity. The zenon Editor supports users in creating and
configuring such constellations.

This network functionality can also be executed redundantly. This guarantees additional security for
data and against failure.

Information
You can find out further information in the Network manual.

10.4.1 Behavior in the network


Archiving is carried out on the Primary Server.

The Primary Server synchronizes the archive data with the Standby Server and responds to requests
from the Clients (such as calling up an Extended Trend). screen).

Information
If the Standby Server takes on the role of the Primary Server after the failure of
the previous Primary Server, the missing data in the AML, CEL and archives is
filled. The missing data comes from the internal buffer of the Standby Server.
This buffer is supplied with values by drivers.

REDUNDANCY SWITCHING

With redundancy switching, there may be a delay in switching by the zenon Historian module.

If variables from a different project are archived in an archive, the starting behavior of Runtime in the
zenon network changes. In this case, the archives are only started once all projects have been loaded.

As a result, it is ensured that all variables to be archived are detected before the archiving starts and
that the computer takes on the role of the Primary Server.

181 | 185
Additional information

Example
zenon Runtime is started on a computer that has been configured as Server 1
or Server 2 during project setup.
 Runtime starts in the role of the Standby Server.
 All projects are loaded.
 The archiving is compared.

These steps are carried out regardless of the current role or evaluation of the
computer.

Only once these steps have been completed is redundancy switching carried out
- if necessary.

10.4.2 Multi-Project Administration


Values of variables of different projects of the workspace can be recorded in an archive. The values
recorded in this way can be filtered, displayed in list form or trend form, and they can be printed or
exported just like data from normal archives.

EXAMPLE OF ARCHIVE
1. In the project IPRO open the node Historian.
2. Create a new archive named BA - BASIS.
3. Open the context menu of RECIPE1 and select Add variable.

182 | 185
Additional information

4. The dialog for selecting variables is opened

5. Here, you can select not just variables from the IPRO. To select variables from other projects:
a) In the left list area of the project, select a project from the tree view of the workspace.
The variables of the selected project are shown in the main area.
b) Select the desired variable with a mouse click.
6. Select variables from PRO1 and PRO2.

183 | 185
Additional information

7. The project name is written in front of the variable name in the archive variable list.

Attention

zenon does not check in the Editor to see if the network structure in Runtime
actually allows access to the selected project and its variables.

For example, in the Editor, in project PRO1, a variable from the integration
project can be selected. This connection only works in Runtime if the integration
project has also been started. This connection will not work on a computer on
which only project PRO1 has been started (start project).

After the selection of variables has been concluded, a warning dialog indicates that seamless
recording is guaranteed under all circumstances.

EXAMPLE
 The project PRO1 is executed redundantly; one computer is the Primary Server, a second
computer is the Standby Server.
 The same applies for the PRO2 project.

184 | 185
Additional information

 The integration project with the subordinate projects PRO1 and PRO2 is started on a third
computer. This is the client for all sub projects.

If variables of the projects PRO1 and PRO2 are now archived in the integration project, then the
computer receives the data in relation to the network from the respective Primary Server of PRO1 and
PRO2.
If, for example, the Primary Server of PRO1 fails, for the time period until the Standby Server of PRO1
has taken over the Server role, there would be alternative values in the archive for variables from
PRO1.
Note: The Standby buffer of seamless redundancy only saves variables of the project for which the
computer has been configured as one of the two servers.
Solution: In order to ensure recording without interruptions, the archiving must be local in a
redundantly-executed subproject.

Information
You can find further information on archives in the client-server model of the
zenon network in the Network manual, in the Client-Server Model, Multi-Project
Administration and Archives chapters.

185 | 185

You might also like