Exporter Users Guide
Exporter Users Guide
MI CR O S CADA PR O SYS 60 0
Exporter
User Guide
Table of Contents
1 Revision History ............................................................................................................................................... 3
2 Introduction ..................................................................................................................................................... 4
2.1 Applicable versions ............................................................................................................................................ 4
2.2 Short Description ............................................................................................................................................... 4
3 Installation ........................................................................................................................................................ 5
1 Revision History
2 Introduction
Exporter provides automated export of historical data from Measurement Reports module, event his-
tory database and Trends module.
The configuration is done by means of ‘export objects’. The export objects have properties for when
to export data, what to export, where to put the data and the outlook of the exported file(s). The user
can add, remove and edit export objects as required. The objects can also be temporary set out of
use to stop the automatic export but keep the configuration and use for user activated export.
3 Installation
After installing the SA-LIB addon package, there is an icon placed in Tool Manager, Application Ob-
jects tab:
When opening Exporter the first time, it will automatically create required command procedures.
It is also possible to add a menu item in the Monitor Pro (+). Add as a Visual SCIL Tool using tool id
EXPORTER.
You can also add an authorization level to the menu item. An authorization level of at least 1 (opera-
tor) is required to make changes to the configuration.
4 User Interface
4.1 At A Glance
The main toolbar is at the top of the page benath the title.
3. Trends Export
o Selecting the highest level in the tree will list all objects in the table:
1. Object Name
2. In Use / Not in Use. Setting object not in use means that it is not automatically executed so no files
are created automatically. User can still manually export data from Export Now… (11).
4. Revert to last saved settings for selected object. Any unsaved changes are lost.
6. Rename object.
8. Delete object.
0 – read-only – user can see the objects but cannot perform any actions.
1 – control – user can set objects In Use/Out of Use and use Export Now.
By default, the user gets the level set by Authorization Group GENERAL. To customize authorization,
add authorization group EXPORTER_TOOL in User Management and assign roles.
The following is a ‘quick howto guide’ on the most common operations that Operators can typically
perform. These instructions are valid for all types (Measurement Reports, Events and Trends).
1. Select highest level Export Objects in tree. Now you can select one or several objects from the
list. If you select several objects, hold Ctrl key on the keyboard and click on the objects.
2. Select the object in the tree. This way you will gain full access to the configuration tab pages.
Setting an object in use will enable the automatic export according to the object’s settings.
Icon in tree:
Icon in tree:
2. This will open a window where start and end time can be selected. The destination file name and
folder can also be selected. Note that file name can only be set when one object is selected, other-
wise it is disabled.
By default, the From Date & Time is the last execution time of the object. The default To Date &
Time is current time.
The default file name is taken from the object’s file formatting, see the File Type & Destination tab
page.
NOTE! The max time range is one year. If a larger range is selected, it will automatically ‘cut’ the
file off at 1 year backwards from the end time.
3. To start exporting, click Export. This will take a while. The more data to be exported, the longer it
takes. Selecting large time ranges for very big configurations may take minutes!
5. To view the file(s) immediately, click View File(s) Now…. This will open the file in default program
for the file type.
6. If the file was not created, check Notification Window for error messages.
Merge all display pages into one file: By default one file per page is created when exporting. Use this
option to merge all columns in all pages into one file. This option is disabled for file type XLS, as each
page is written to a different worksheet.
Include time column: Default is to include the time column. If the time column should not be included
in the file, uncheck this box.
Time column in From - To format: If this box is checked the From – To times are shown in time col-
umn. This is only valid for periodical reports, not for reports with sampled values.
Include summary values: If checked, the summary values defined in the report display will be in-
cluded in the exported file.
Pre-configured Event Filter Name: Select an event display pre-defined filter. There are also two filters
included with Exporter:
The selection dialog will show all filters with application and user visibility, plus the above mentioned
filters included with Exporter.
Custom Event Filter: Enter a SCIL condition (same as writing SCIL conditions in Event display). You
can also select a pre-configured filter to start from.
Columns: Select the columns to include in the exported file. By default, it will include columns from
Event Display configuration. In the selection window you can add/remove attributes and change the
order.
7 Trends Export
Select either a trend pre-configuration or manually select objects from Trend Basket.
Custom Columns: Select trend objects from the Trend Basket. Each object will occupy one column in
exported file. The objects can also be arranged in selection dialog.
Column Title Formatting: Enter the formatting for the columns. See the Help for available dynamic
items.
Include time column: Default is to include the time column. If the time column should not be included
in the file, uncheck this box.
Include summary values: Select summary values to show at the bottom (same as for measurement
reports). The summary values are calculated for the exported period.
Summary Description
Min The minimum value for exported period. Only good data is included, not
uncertain or faulty values.
Mean The average value for exported period. Only good data is included, not un-
certain or faulty values.
Max The maximum value for exported period. Only good data is included, not
uncertain or faulty values.
Stddev The standard deviation for exported period. At least 50% of good data
must be available to calculate Standard Deviation.
Trend The trend of exported data. A positive value indicates a rising (ascending)
trend, a negative value indicates a falling (descending) trend. At least 50%
of good data must be available to calculate trend.
Good data Shows how much good data was found in exported period in percent.
1. Object Name
Setting object not in use means that it is not automatically executed so no files are created auto-
matically. User can still manually export data from Export Now… (11).
Several objects can be set In Use/Out of Use by selecting them in the table (see here for details on
selecting objects).
Only available when there are unsaved changes and only one object is selected.
Only available when there are unsaved changes and only one object is selected.
Enter a name for the object, use only a..z, 0..9 and underscore (_) characters.
The max length is 32 characters. Give the object a meaningful name since the name can be used in
the file name and file header. Each export object name must be unique, and the names are not case
sensitive (converted to upper case characters).
6. Rename object.
8. Delete object.
8.2 Contents
8.2.1 Header Formatting
The header is the first row in the exported file. You can enter any characters. To make a column sepa-
rator, enter a vertical bar ‘|’. You can also use a set of identifiers to enter ‘dynamic’ data, such as dis-
play names, page names, page titles etc. To get a full list of available identifiers, click the ‘?’ button.
It is recommended to include column titles when using file type HTML and XLS, since the default tem-
plates are expecting column titles.
Using the quality tags in CSV/TXT/XLS files must be considered if the exported file is used for further
analysis. For XLS, the cell will automatically be converted from a numeric value to a textual value. for
CSV/TXT, the tag must be extracted from the value.
Tag Description
Faulty or Uncertain Include a tag for faulty, obsolete or uncertain values (OS=1 or OS=2)
Good data % on summaries ONLY for Trends. Indicates a percentage of good data for the sum-
mary values. An example is shown below. The values in brackets
shows the percentage of good data was found for given time pe-
riod.
Execution Period determines how often and at what time the object should be executed. Depending
on the value in the pop-down, there will be settings for month, day, day of week, hours and minutes.
As the values are changing, the ‘Next execution takes place at’ will show the next execution time ac-
cording to current settings. Do not confuse this time with ‘Next scheduled execution’ in the toolbar,
which is the time based on the saved values.
To select the last day of every month, set the Day spinner to 32. The Quarterly execution period has
no alternative, the times are always Jan 1st, April 1st, July 1st and Oct 1st at midnight.
Do not set the execution time to the next minute of current time. For example, if the clock is 14:23, do
not set the execution time to 14:24, leave at least one minute time because the objects are checked
for execution every minute (at 10 seconds).
Data range determines the start of the time period for which data should be exported. The end time
is always the execution time.
For Measurement Reports, do not try to fetch sampled values (hourly reports) for longer periods than
the History length setting for Measurement Reports. The default History length value is 15 days.
Start from last execution time: Selecting this option sets the start of period to last execution time.
This insures that no data is lost between the export periods.
Set a time range: Selecting this option it is possible to set the time range using the spinner and pop-
down objects. The actual time range is shown in the From and To fields below.
Reset: Resetting the time range helps when re-configuring an object and the last execution and time
range needs to be reset.
- CSV: Saves file with extension CSV so it can be automatically opened in spreadsheet pro-
grams.
- HTML: Saves the file in html format so it can be opened in web browsers
- XLS: Saves the file in an MS Excel file format (xls, xlsx, xlsm, xlsb)
8.4.3 Templates
HTML template: Visible when file type is HTML. Select a pre-defined template for the HTML report.
XLS/XLSX template: Visible when file type is XLS. Select a pre-defined template for MS Excel spread-
sheet. Several MS Excel workbook formats are supported. The actual file format is selected by the
template.
9 HTML Reports
9.1 Templates
For Measurement Reports and Trends, there are two different templates available, Tem-
plate_dark.html and Template_light.html.
For Events & Alarms, also two templates available: Template_dark_event.html and Tem-
plate_light_event.html.
Open the Template*.html file in an editor (e.g. Notepad++) and change the logo file name as shown
below.
The style can be edited in <style> section for table.header-table and table.header-table th.
4. Column headers are written into the data-table header (first row of table). The table row class is
“column-header”.
5. The report values will be written table class “data-table” and tr class “data”.
Note that the templates have two rows of data for testing. You can add more rows of data if nec-
essary in your template, they will all be removed when creating a real report.
The style for data values can be edited in table.data-table tr and table.data-table td.
6. The two empty rows between data values and the summary values at the bottom are left un-
touched when the report is created. The style is in tr.empty-rows td because the rows are still
part of the data-table.
7. The summary rows are at the very end of data-table. The style is in tr.summary-rows.
9. There must be a table of class “header-table” with one row containing the header (th).
10. Inside the <body> section any other html elements can be inserted.
12. The <style> section may be edited as required, such as colors and other properties of the ele-
ments. New styles may also be added.
10 XLS Reports
10.1 Templates
There are four different templates, all with a a different MS Excel format:
To use the last three ones (the newer formats), you must install “Microsoft Access Database Engine
2016 Redistributable” package, download from https://www.microsoft.com/en-us/download/de-
tails.aspx?id=54920. According to the System Requirements, it does NOT support Windows Server
2016, but was tested successfully also on this OS. The maximum number of columns on each sheet Is
255.
The template that you select will determine the file format.
The templates contain 10 worksheets, all identical. One sheet corresponds to one page in the report
page configuration. If you have a display with more than 10 pages, you must copy/paste more pages
in the template.
10.2 Macros
There are some VBA macros in the templates that formats the data in the workbook. The exception is
the xlsx format which does not store macros.
Module1.FormatSheets()
This macro is executed from Workbook_Open(). It formats the data (text to numeric) and creates a
table out of the data. It also hides first row and first column of every sheet.
Module1.CreateSheets()
This deletes all sheets except the first one, then makes given number of copies of the first sheet. This
can be used to create exact copies of first sheet after making modifications to it.
You can create your own templates with e.g. logo images. Here are some rules to follow.
1. The file name must start with Template and the file extension must be one of the supported file
formats.
2. The number of sheets must be at least as many pages you have in the report page configuration.
3. The sheet names must be exactly ‘Page1’, ‘Page2’, ‘Page3’ etc., depending on how many sheets
you have.
4. The first row of each sheet, must have the text ‘Col0’, ‘Col1’, ‘Col2’ etc. up to ‘Col255’.
a. <xls-header>
This indicates the row where the export header is placed. The header starts from column
B.
b. <xls-titles>
The column titles will be placed on this row, and the data rows will follow on the follow-
ing lines. The summaries will be placed after the data, separated by one empty row.
6. This is required only if you are using macro Module1.FormatSheets()! In cell A2, the style
names for header, data and summary cells shall be entered, separated by comma.
Styles can be created and modfied in Excel. The nmae that is used in cell A2 can be also be seen
from the Style toolbar:
Below is the table style used in default templates shown. Typically the names are as shown in
tool tip but without the spaces.
If you are unsure about the name of a style, you can record a macro where you format some
cells with the style in question. Thew style name will be found in the macro.
This is an example of a simple template witohut any macros. This template is planned for up to 30
columns of data, and up to 97 rows of data (e.g. a daily report with 15 minute values).
See screenshot below. Row one and column one are shown here but hidden in the saved template.
The first row and column are filled out as explained previously. The data including the column titles
are formatted as a table (until column 30). A logo and a ‘main header’ has been inserted.
11 Technical Details
▪ SAGR_TRENDS_EXPORT_CYCLE:C
• executed every minute. Checks export objects from sdb file and executes
objects for trends
▪
▪ SAGR_TRENDS_EXPORT:C
• metheds specific to trends
o Time Channels:
▪ SAGR_REPORTS_EXPORT_CYCLE:T
• executes SAGR_REPORTS_EXPORT_CYCLE:C every min on 10 seconds
▪ SAGR_EAB_EXPORT_CYCLE:T
• executes SAGR_EAB_EXPORT_CYCLE:C every min on 10 seconds
▪ SAGR_TRENDS_EXPORT_CYCLE:T
• executes SAGR_REPORTS_ TRENDS _CYCLE:C every min on 10 seconds
-------------------------------------------------
Report Export Object Attributes
-------------------------------------------------
AP append data to an existing file (incremental export)
CS column separator
DN display names
EP1 execution period. Depends on EP2
DAILY: (-,-,hours,mins)
(BI)WEEKLY: (-,dow,hours,mins)
MONTHLY: (-,day,hours,mins)
QUARTERLY: (month,day,hours,mins)
ANNUALLY: (month,day,hours,mins)
EP2 exec period, DAILY, WEEKLY,BI-WEEKLY,MONTHLY,QUARTERLY,ANNUALLY
FD file directory
FN file name(s). If MP is false, there will be one file per page, if MP is true all columns will be appended
into one file formatting options: See Exporter tool help
Examples:
<dn>_<edate>_<etime>\<pt>_<pn> creates a new folder 'display name'_export
time/date' and creates a document named 'page title_page number'
-------------------------------------------------
Events&Alarms Export Object Attributes
-------------------------------------------------
AP append data to an existing file (incremental export)
CO Column attributes
CS column separator
CT column titles
EF event filter name
EP1 execution period. Depends on EP2
DAILY: (-,-,hours,mins)
(BI)WEEKLY: (-,dow,hours,mins)
MONTHLY: (-,day,hours,mins)
QUARTERLY: (month,day,hours,mins)
ANNUALLY: (month,day,hours,mins)
EP2 exec period, DAILY, WEEKLY,BI-WEEKLY,MONTHLY,QUARTERLY,ANNUALLY
FC filter condition
FD file directory
FN file name(s). If MP is false, there will be one file per page, if MP is true all columns will be appended
into one file formatting options: See Exporter tool help
Examples:
<dn>_<edate>_<etime>\<pt>_<pn> creates a new folder 'display name'_export
time/date' and creates a document named 'page title_page number'
TP set from-to times in time column. If false the time column will only display 'begin time -'. This is
only applicable to periodic reports, not sampled.
TE template file name, used for html and xls reports
-------------------------------------------------
Trend Export Object Attributes
-------------------------------------------------
AP append data to an existing file (incremental export)
CF Column title formatting
CO Column objects
CS column separator
CT column titles
EP1 execution period. Depends on EP2
DAILY: (-,-,hours,mins)
(BI)WEEKLY: (-,dow,hours,mins)
MONTHLY: (-,day,hours,mins)
QUARTERLY: (month,day,hours,mins)
ANNUALLY: (month,day,hours,mins)
EP2 exec period, DAILY, WEEKLY,BI-WEEKLY,MONTHLY,QUARTERLY,ANNUALLY
FC filter condition
FD file directory
FN file name(s). If MP is false, there will be one file per page, if MP is true all columns will be appended
into one file formatting options: See Exporter tool help
Examples:
<dn>_<edate>_<etime>\<pt>_<pn> creates a new folder 'display name'_export
time/date' and creates a document named 'page title_page number'
QT Quality tag
SC1 x of SC2 - the export time range. If SC2="LAST" this is not applicable. Otherwise this is number of
hours, days etc.
SC2 LAST,HOUR,DAY,WEEK,MONTH,YEAR
If LAST the start time is last execution time (This guarantees no overlapping or missed data en-
tries)
SP start of export period. Set by system depending on your SC1 and SC2 settings.
ST Summaries
TP set from-to times in time column. If false the time column will only display 'begin time -'. This is
only applicable to periodic reports, not sampled.
TE template file name, used for html and xls reports