Historian
Historian
Historian
v.8.20
© 2020 Ing. Punzenberger COPA-DATA GmbH
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
2 Historian ....................................................................................................................................................... 6
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.
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.
6 | 185
General information
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.
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
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.
Export function Archive export saves archives with time filters in the following standard
file formats:
ASCII
dBase
SQL
XML
11 | 185
Types of archiving
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
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.
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.
5 Archiving concept
The following is applicable for archiving in general:
13 | 185
Archiving concept
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
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
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.
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.
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.
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.
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
PROJECT TREE
Editor profile Opens the drop-down list with predefined editor profiles.
DETAIL VIEW
18 | 185
Engineering in the Editor
Symbol Description
Edit archive Opens the dialog for editing the selected archive.
Jump back to starting element Jumps back to the initial position in the zenon Editor.
19 | 185
Engineering in the Editor
Edit archive Opens the dialog for editing the selected 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.
Edit archive Opens the dialog for editing the selected archive.
20 | 185
Engineering in the Editor
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
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.
22 | 185
Engineering in the Editor
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.
23 | 185
Engineering in the Editor
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.
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
Option Description
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.
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
27 | 185
Engineering in the Editor
Option Description
the Runtime.
Delete variables:
Highlight the variable and select Delete variable in
the context menu.
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
28 | 185
Engineering in the Editor
LOTS
Option Description
Index lots Active: The lot values of this archive are automatically
indexed. This allows quicker access to the lot values.
EQUIPMENT MODELING
Option Description
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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 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!
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 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.
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.
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
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
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.
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
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.
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
Cancel Discards all changes in all tabs and closes the dialog.
CYCLICALLY
Option Description
34 | 185
Engineering in the Editor
Option Description
Cycle time Define the cycle time (days, hours, minutes and
seconds) in which values are to be written to the
archive.
EVENT-TRIGGERED
Option Description
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
Record on change Active: Variables are only written to the archive when
their values change spontaneously.
Save process image during start Active: On creating a new archive file the current
values of the variables are written into the archive.
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 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.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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
SAVING FORMAT
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)
CSV (*.txt) Active: When the archive is closed, the data is immediately
evacuated to a CSV file (*.txt)
38 | 185
Engineering in the Editor
Option Description
and line graphics are no longer possible.
XML (*.xml) Active: At ending the archive, the data are immediately
evacuated as a *.XML file.
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).
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.
Example:
storage duration: 5 hours (= 300 minutes)
Cycle: 15 minutes
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
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.
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.
41 | 185
Engineering in the Editor
Option Description
Default: inactive
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.
For details, read the Further information (on page 164) section in
the MS Azure service bus (on page 173) chapter.
42 | 185
Engineering in the Editor
Option Description
CSV (*.txt) Active: Archives are evacuated in CSV format into a text file.
Data Storage Active: Archives are saved for the Service Grid and passed
on to the Service Node.
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 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.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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
44 | 185
Engineering in the Editor
Parameter Description
TT Day
hh Hours in UTC.
mm Minute
ss Second
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
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
Time stamp of calculation Active: The time stamp of the calculation is used as a
time stamp.
ALTERNATE ARCHIVE
Option Description
46 | 185
Engineering in the Editor
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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.
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)
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)
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
49 | 185
Engineering in the Editor
SOME EXAMPLES:
ASZ: Scan and save cycle
50 | 185
Engineering in the Editor
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.
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
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.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
53 | 185
Engineering in the Editor
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
IDENTIFICATION
Option Description
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.
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 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
Cancel Discards all changes in all tabs and closes the dialog.
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.
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
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
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
60 | 185
Engineering in the Editor
61 | 185
Engineering in the Editor
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.
Option Description
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.
CLOSE DIALOG
OK Applies settings and closes the dialog.
The template saves the settings of all aggregated archives to
the selected archive.
CREATING A 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
To do this, edit the elements in the left window with the list of templates.
65 | 185
Engineering in the Editor
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.
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
67 | 185
Engineering in the Editor
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.
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.
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.
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.
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.
ENGINEERING
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.
70 | 185
Engineering in the Editor
CONTROL ELEMENTS
Control element Description
Insert template Opens the dialog for selecting a template for the screen type.
WINDOW
71 | 185
Engineering in the Editor
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.
Number INVALID Display of the number of variables with the status INVALID.
LIST FUNCTIONS
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
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.
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.
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
73 | 185
Functions
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
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.
Option Description
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.
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.
CLOSE DIALOG
OK Applies settings and closes the dialog.
76 | 185
Functions
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.
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.
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
Delete selection Only available if the dialog is called up in the Runtime using the
Selection (on page 146) button.
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.
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.
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
Cancel Discards all changes in all tabs and closes the dialog.
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)
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.
80 | 185
Functions
FILTER
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.
Note: Time is saved in UTC. For details see chapter Handling of date
and time in chapter Runtime.
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.
81 | 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
82 | 185
Functions
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
83 | 185
Functions
Parameter Beschreibung
84 | 185
Functions
Parameter Beschreibung
Stunde, Minute und Sekunde.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
85 | 185
Functions
Parameter Description
Default Active: The time filter is prescribed in the Editor. Only the
start time can still be stipulated in the Runtime.
86 | 185
Functions
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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
Parameter Description
88 | 185
Functions
Parameter Description
89 | 185
Functions
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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
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
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.
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.
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.
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.
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.
Use next completed time Active: The last selected and fully-completed time period in
period the time period option is used.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
94 | 185
Functions
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.
95 | 185
Functions
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
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.
98 | 185
Functions
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
Apply lot filter directly Active: The filter configured here is applied in
Runtime directly.
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.
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.
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.
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.
Use time filter from "Time" tab Active: Pre-filtering is carried out with the settings
of the Time tab.
ARCHIVES
Configuration of filtering for archives. This filter is applied as a prefilter for the lot selection dialog.
103 | 185
Functions
Static
From variable
Option Description
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
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.
AR EA No data is displayed.
NAMES
105 | 185
Functions
Option Description
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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
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
Apply shift filter directly Applying the shift filter in the Runtime:
Active: The filter configured here is applied in the Runtime
directly.
The shift list and Update button are not shown in the Runtime.
The settings chosen in the Editor are applicable for the reading
of the shifts in the Runtime.
EQUIPMENT MODELING
109 | 185
Functions
Option Description
Default: active
NAME
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.
Default: active
OPTIONS
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:
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
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
Attention
113 | 185
Functions
Option Description
Available archives Display of all configured base archives and aggregation archives.
Selection by clicking on the entry.
114 | 185
Functions
Attention
115 | 185
Functions
Option Description
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.
116 | 185
Functions
Option Description
Available archives Display of all configured lot archives. Selection by clicking on the
entry.
Cancel Discards all changes in all tabs and closes the dialog.
117 | 185
Functions
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.
Attention
The file name of the export file must not contain any special characters.
Prohibited are: \ / : * ? " < > |
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
119 | 185
Functions
Tabs Description
Columns to be exported
Options
Export file
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
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
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.
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
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
Cancel Discards all changes in all tabs and closes the dialog.
122 | 185
Functions
Option Description
123 | 185
Functions
EXPORT FORMAT
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.
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.
Time (Z) ZEI Active: Time column is exported. Contains the time
stamp of the variables.
SQL
Columns for export are defined and fixed, and can no longer be selected. The following are exported:
Column Description
125 | 185
Functions
Column Description
OPTIONS
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.
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.
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
EXPORT TO 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: \ / : * ? " < > |
Generate file name Active: File names are automatically created from a short
automatically identifier and a day key.
Generate name from lot Active: the lot name is taken for the creation of the export file
name name.
You can change the folder in the Editor in the following menu:
File-> General configuration-> Standard tab -> Exported
archives folder.
128 | 185
Functions
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.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
129 | 185
Functions
7.6.3 Time
The time filter is configured in this tab.
FILTER
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.
Note: Time is saved in UTC. For details see chapter Handling of date
and time in chapter Runtime.
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.
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
CLOSE DIALOG
Option Description
132 | 185
Functions
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
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
134 | 185
Functions
Option Description
Apply lot filter directly Active: The filter configured here is applied in
the Runtime directly.
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.
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.
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.
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.
137 | 185
Functions
Option Description
Use time filter from "Time" tab Active: Pre-filtering is carried out with the settings
of the Time tab.
ARCHIVES
Configuration of filtering for archives. This filter is applied as a prefilter for the lot selection dialog.
138 | 185
Functions
Option Description
out.
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
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.
AR EA No data is displayed.
NAMES
140 | 185
Operation in the Runtime
Option Description
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
The lot filter is configured along the lines of filtering when screen switching (on page 98).
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.
142 | 185
Operation in the Runtime
Number of INVALID Display of the number of variables with the status INVALID.
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.
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.
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.
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
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.
144 | 185
Operation in the Runtime
Attention
Never close Runtime whilst archives are running. This also applies to ongoing
processes that use archives (Batch Control, for example).
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
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.
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.
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.
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.
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
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.
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
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
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.
149 | 185
Operation in the Runtime
Parameter Description
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.
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
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.
151 | 185
Operation in the Runtime
You get the data of the selected day from 06:00 am to 2:00 pm.
EXAMPLE
Result in SQL:
10:00:00.000
Result in ARX:
10:00:00.000
10:00:01:000
152 | 185
Operation in the Runtime
Option Description
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.
Standard Sets all entries for column width to default. The selected font is not
changed.
You make changes to the font in the project.ini by means of the ARCHEDITFONT= entry.
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.
154 | 185
Operation in the Runtime
Option Description
155 | 185
Operation in the Runtime
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
Option Description
If there are unsaved values in the archive, these are displayed by the headers being colored red.
157 | 185
Operation in the Runtime
3. Check the printer set for lists and formats in the File -> General configuration -> Default
-> Printer -> For notepad menu.
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
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
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
Furthermore, data can also be evaluated with the COPA-DATA product zenon Analyzer.
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
BASICS
All archive functions build on the basic archive(FILTERINDEX,PARAMETER,RICHTUNG) function.
r read only There is only read access to the archive. Changed values
cannot be saved.
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
number [1]
Direction
Options Meaning
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.
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
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.
163 | 185
Additional information
no logarithmic representation
Scanning with a cursor
10 Additional information
This section contains background information on archives and archiving.
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
14 Year
04 Month
03 Day
07 Hour (UTC)
12 Minute
00 Second
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).
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.
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
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).
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
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.
168 | 185
Additional information
GUID varchar[36] Records the project GUID of the variables. Must not be
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.
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
170 | 185
Additional information
GUID VARCHAR[36] Records the project GUID of the variables. Must not be
ZERO.
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
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.
172 | 185
Additional information
Note:
PROJECTNAME: Project name of the project
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
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
The columns are either added to the database directly or via the dialog in zenon Editor.
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
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.
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.
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).
175 | 185
Additional information
BYTE
WORD
DWORD
FLOAT
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.
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.
176 | 185
Additional information
Parameters Description
Index [4] Number of the most recent value. Should correspond to the value in Index
[1].
Index [etc.]
2 Month 1 - 12
3 Day 1 - 31
4 Hour 0 - 23
5 Minute 0 - 59
6 Second 0 - 59
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)
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
178 | 185
Additional information
10.3.4.2 TYP 4
Index Description
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 .
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
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
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.
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.
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
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