Function in Zenon
Function in Zenon
Functions
v.7.00
1
© 2012 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. The technical data contained herein has been
provided solely for informational purposes and is not legally binding. Subject to change, technical or
otherwise.
Contents
2. Functions .................................................................................................................................... 6
3
6.1.3 Function at limit inactive ............................................................................................................ 24
6.1.4 Function at limit active/inactive ................................................................................................. 24
6.1.5 Reload ......................................................................................................................................... 24
6.1.6 Exit program ............................................................................................................................... 24
6.1.7 Simulate right mouseclick .......................................................................................................... 25
6.1.8 Save remanent data ................................................................................................................... 25
6.2 Windows - Functions ................................................................................................................................. 27
6.2.1 Play audio file ............................................................................................................................. 27
6.2.2 File Operations ........................................................................................................................... 27
6.2.3 Start continuous tone ................................................................................................................. 30
6.2.4 Stop continuous tone ................................................................................................................. 30
6.2.5 Print screenshot ......................................................................................................................... 30
6.2.6 Window to the background ........................................................................................................ 33
6.2.7 To the foreground ...................................................................................................................... 33
6.2.8 Start program ............................................................................................................................. 34
4
Welcome to COPA-DATA help
GENERAL HELP
If you miss any information in this help chapter or have any suggestions for additions, please feel free to
contact us via e-mail: [email protected] (mailto:[email protected]).
PROJECT SUPPORT
If you have concrete questions relating to your project, please feel free to contact the support team via
e-mail: [email protected] (mailto:[email protected])
If you realize that you need additional licenses or modules, please feel free to contact the sales team via
e-mail: [email protected] (mailto:[email protected])
5
Functions
2. Functions
The user can influence zenon via user-defined project functions. All functions used in a project are based
on the existing system functions. These are pre-defined macros that are easy to use and parameterize
by the user.
License information
Part of the standard license of the Editor and Runtime.
6
Overview functions in zenon
Display unused functions Creates a project analysis for unused functions in the current project
and displays it as result list in an own window.
Open in new window... Opens a new window in order to view and edit the function. (Default:
at the bottom of the Editor.)
Editor profile Opens the drop-down list that includes pre-defined editor profiles.
7
Overview functions in zenon
8
Overview functions in zenon
Function Description
Alarms: ackn. flashing This function acknowledges the flashing of all elements of the
currently open screen of a selected frame.
Activating/deactivating an This function switches on/off the connection to the PLC for a selected
alarm/event group alarm/event group.
Active alarm message list This function activates the entire alarm message list.
Alarm Message List active/inactive This function activates/deactivates the entire alarm message list.
Alarm message list inactive This function deactivates the entire alarm message list.
Export AML This function exports filtered entries of the alarm message list to an
external format.
Save AML and CEL ring buffer This function saves current alarms and events to file ALARM.BIN and
CEL.BIN and values from the mathematics variables (counter) in file
SY_MA32.BIN.
Export CEL This function exports filtered entries of the Chronologic Event List
(CEL) to an external format.
Print alarm list or CEL This function prints selected entries of the alarm list (AML) or the
Chronological Event List (CEL).
Create IPA document This function creates an IPA report and writes it to an HTML file or
prints it out.
Switch online-printing on/off This function switches on/off online printing of the alarm message
list or the Chronological Event List (CEL).
Start online printing on a new page In activated online printing this function finishes a page and starts a
new one. The page number is reset to 1
Switch online printer This function switches the online printing to a selected printer.
Optionally, a dialog for the user can be opened before that.
9
Overview functions in zenon
3.2 Application
This group contains functions for the handling of project settings.
Function Description
Select printer (on page 23) This function opens a dialog in which the user can select printers for the
different print tasks.
Start EMS This function starts the optimization for a selected service area in the
EMS module.
Stop EMS This function stops the optimization for a selected service area in the
EMS module.
Print extended trend diagram With the help of this function you can print diagrams of the extended
trend or save them in a file (JPG or BMP) without opening the screen
Extended Trend.
Switch color palette Creates a function in order to switch between palettes in the Runtime.
Functions with active limit values This function activates the function administration. Automatically
(on page 23) executed functions (e.g. via time control, limit violation, etc.) are
executed.
Functions with active/inactive This function switches the function administration on or off.
limit values (on page 24) Automatically executed functions (e.g. via time control, limit violation,
etc.) are (not) executed.
Functions with inactive limit This function switches the function administration off. Automatically
values (on page 24) executed functions (e.g. via time control, limit violation, etc.) are not
executed.
Open Help This function opens a selected help page from a CHM file.
Reload (on page 24) This function reloads only changed or all Runtime files.
Determine open maintenances This function sends currently open maintenances from the IMM to
status variables.
PFS - execute user-defined event This function executes a PFS event previously created by a user.
Simulate right mouseclick (on This function interprets the next mouse click as a right click.
page 25)
Save remanent data (on page 25) Allows to the save the data of the configured modules.
10
Overview functions in zenon
The choices are: AML ring buffer, CEL ring buffer, system driver and
mathematics driver, internal driver, remanent images of all drivers,
locking of the command.
Stopping the Runtime (on page This function closes the zenon Runtime.
24)
S7 graph heuristics This function makes it possible to carry out the S7 Graph heuristics
without the screen S7 Graph being active.
Topology - LoadShedding Determines the supply state of the topological devices and depicts them
on variables.
3.3 Historian
This group contains functions for the optional module Historian.
Function Description
Archive: Stop This function stops a selected archive of the optional module Historian.
Archive: Start This function starts a selected archive of the optional module Historian.
Export archive This function exports filtered archive entries of the optional module
Historian to an external format.
Display open archive This function displays a list of running archives of the optional module
Historian.
11
Overview functions in zenon
Function Description
Change user This function opens a dialog, where a logged-in administrator can
create, edit or delete users.
Login with dialog This function opens the standard login dialog.
Login without password This function logs in a selected user without asking for his password.
Change password This function opens a dialog, where the currently logged in user can
change his password.
12
Overview functions in zenon
3.5 Screens
This group contains functions for the handling of Screens.
Function Description
ALC source colors Function for the configuration of the ALC source colors for the error
detection in electric grids.
Indexed screen This function opens a screen with a name containing a selected variable.
Screen: Return to last This function returns to the previously opened screen of the selected
frame.
Screen switch This function opens a selected screen. Optionally, a dialog for the user
can be opened before that.
Focus: Activate input to the This function executed the functionality of the element, which currently
element with the focus has the input focus.
Focus: set to frame This function sets the input focus to the currently open screen of a
selected frame. This allows to create projects with pure keyboard
operation.
Move focus This function sets the input focus to a certain element on the picture,
whose frame currently has the focus.
Focus: Delete from frame This function takes the input focus away from the currently open screen
of a selected frame. This allows to create projects with pure keyboard
operation.
Show menu This function opens or closes a selected main menu. Optionally, a dialog
for the user can be opened before that.
Monitor assign This function assigns a selected virtual monitor to a selected real
monitor. Optionally, a dialog for the user can be opened before that.
Runtime profiles Creates a function with which the profile administration can be opened,
a profile can be created or loaded in the Runtime
Close the frame This function closes the currently open screen of a selected frame.
Set point input for keyboard This function sets a predefined value or writes a predefined value in the
13
Overview functions in zenon
Displaying the overview window This function opens an overview window. With this you can simulate a
multi-monitor system on a one-monitor system.
Function Description
Acknowledge ground fault Function for acknowledging an earth fault message. Opens the dialog for
message selecting a variable.
End ground fault search Function for closing the search for earth fault.
Start ground fault search Function for starting the search for earth fault.
Acknowledge ground fault Function for acknowledging a short-circuit message. Opens the dialog for
message selecting a variable.
Function Description
Save current queue In the Runtime saves the current message queue.
Send Message: activate Activates Message Control in the Runtime for the activated
project.
Send Message: deactivate Deactivates Message Control in the Runtime for the activated
project.
14
Overview functions in zenon
3.8 Network
This group contains functions for the handling of a Network.
Function Description
Authorization in network This function fetches or releases the authorization in a network.
Redundancy switch This function exchanges the server and the standby server of the project.
Function Description
Print report This function prints a selected report of the optional module Report Generator.
Execute report This function executes a selected report of the optional module Report Generator.
Export report This function exports a selected report of the optional module Report Generator to
an external format.
15
Overview functions in zenon
3.10 Recipes
This group contains functions for the handling of Standard Recipes and recipes of the optional module Recipegroup
Manager.
Function Description
Recipegroup Manager This function writes, reads, copies, imports or exports a selected recipe of the
optional module Recipegroup Manager (RGM). Optionally, a dialog for the
user can be opened before that.
Standard Recipe This function writes, reads, copies, imports or exports a selected standard
recipe. Optionally, a dialog for the user can be opened before that.
Standard recipe single This function sends the values of a selected standard recipe to the PLC.
directly
Standard recipe single with This function opens a dialog, where the user can change and execute a
dialog standard recipe.
Standard recipe single with This function opens a dialog, where the user can select and execute and/or
online dialog edit a standard recipe.
3.11 Script
This group contains functions for the handling of Scripts.
Function Description
Script: Execute This function executes a selected script.
Script: Select online This function opens a dialog in which the user can select and execute a
script.
16
Overview functions in zenon
3.12 Variable
This group contains functions for the handling of Variables.
Function Description
Export data This function exports values of selected variables saved on the hard disk
(*.HDD) to an external format.
Read a dBase-file This function reads a selected dBase file and executes it as a recipe.
Print current values This function prints current values of selected variables.
Trend-Values off This function switches hard disk data storage off. HDD files are not written.
Trend-Values on This function switches hard disk data storage on. HDD files are written.
Trend-values on/off This function switches hard disk data storage on or off. HDD files are (not)
written.
Send value to hardware This function sends a new value for a selected variable to the PLC.
Driver Commands This function sends a selected command to a selected driver. Optionally, a
dialog for the user can be opened before that.
Write time to variable This function reads the system time of the operating system and writes it
to a string variable in the PLC. This way, the system time of the PLC can be
synchronized with the operating system.
Read time from variable This function reads the time from a string variable of the PLC and sets the
system time of the operating system accordingly. This way, the system time
of the PLC can be synchronized with the operating system.
17
Overview functions in zenon
3.13 VBA
This group contains functions for the handling of VBA (on page 6) macros.
Function Description
Open PCE editor This function opens the editor of the optional module Process Control
Engine (PCE).
Open VBA Editor. This function (on page 6)opens the VBA editor.
Show VBA macro dialog This function opens the VBA macro dialog.
3.14 VSTA
This group contains functions for the handling of VSTA.
Function Description
Open VSTA editor This function opens the VSTA editor.
Show VSTA macro dialog This function opens the VSTA macro dialog.
18
Function detail view toolbar and context menu
3.15 Windows
This group contains functions for the handling of operating system functionality.
Function Description
Play audio file (on page This function plays a selected audio file (*.wav) once.
27)
File operations (on page This function copies, deletes or moves selected files. Optionally, a dialog for the
27) user can be opened before that.
Start continuous tone This function plays a selected audio file (*.wav) continuously.
(on page 30)
Stop continuous tone This function stops the continuous playing of a audio file (*.wav).
(on page 30)
Window to the This function switches the zenon Runtime to the background.
background (on page 33)
Window to foreground This function switches the zenon Runtime to the foreground.
(on page 33)
Print screenshot (on This function prints either the current screen or the currently open screen of a
page 30) selected frame. Optionally the print-out can be routed to a fax.
Start program (on page This function starts an external program. Transfer parameters can be defined.
34) Optionally, a dialog for the user can be opened before that.
19
Function detail view toolbar and context menu
CONTEXT MENU
Paste Pastes the contents of the clipboard. If an entry with the same name
already exists, the content is pasted as "Copy of".
Function use... Creates a project analysis for selected functions in the current
project and displays it as result list in an own window.
Edit selected cell Opens the selected cell for editing. The binocular symbol in the
header shows which cell has been selected in a highlighted line.
Replace text in selected Opens the dialog for searching and replacing texts.
column
20
Engineering in the Editor
In the context menu of the entry 'Functions' in the Project Manager the following commands are
available:
Parameters Description
Function new ... A new function is created and can be defined in the properties
window.
Export XML all... Export all functions to an XML file See chapter Import/Export.
Import XML ... Import functions from an XML file. See chapter Import/Export.
Open in new window... Opens the detailview of the functions in a new window.
21
Engineering in the Editor
A function is created after you have selected it and confirmed with OK. The parameters of this new
function can now be defined in the properties window.
If you press the 'Help' button after the selection, you will be forwarded directly to the corresponding
function in the online help.
Similar to the properties window also here an individually definable favourite view is available. The
section 'Favourites' is always at the top of the list. As a default it contains the functions 'Screen switch'
and 'Send value to hardware'. Any function can be added to or removed from the favourites with the
context menu or by Drag&Drop.
If a function is selected, you will find a dialog help in the lower part of the dialog. You will find more
information on the single functions in the chapter Overview functions (on page 7).
22
System functions
This is possible for screens (Screen Start-end Function, Buttons), limits, time control, scheduler, scripts,
menus, projects (automatic function execution, archive).
6. System functions
This function is used to change the printer selection during online operation. This function needs no
parameters.
The settings of the printers are done as described in the chapter Configuration/Standard/Printer.
23
System functions
[FUNKTIONEN]
6.1.5 Reload
This function loads changed Runtime files, without having to restart the Runtime.
Info
If the names of the server or standby server are changed in the Editor, these cannot be
loaded subsequently. They are only updated by restarting Runtime.
24
System functions
Attention
The VBA Event project inactive is carried out by script AUTO_END_xxx. Therefore zenon
function Execute VBA macro is no longer executed in scripts as VBA is not running at this
time. VBA macros which should be carried out in "AUTO_END" must be called via Project.Inactive.
25
System functions
Module Description
AML ring buffer Active: AML ring buffer is saved.
System driver and Active: Data of the system driver and of the mathematics driver
mathematics driver are saved.
of the command
If errors occur during the saving process, they are written to the error protocol.
Info
If the Runtime runs in simulation mode (project simulation active), function Save
remanent datadoes not save values from the following drivers:
internal driver
mathematics driver
system driver
26
System functions
Give the file operation and the file parameters as the transfer parameters. This function is configured via
an input dialog.
27
System functions
Parameters Description
Copy copies files from one name and path to a new name and path. Transfer parameters are
considered.
Move Moves files from one name and path to a new name and path and deletes them in
source path. Transfer parameters are considered.
If the given source cannot be found (file or path is not present or incorrect), the function will not be
executed. By default, no error message is generated. You can also force an error message via the
options; we do not recommend this, as this might block the runtime or the processing of other
functions.
28
System functions
Parameters Description
Source/Target Enter the path to source and target. You can also use wild cards (*) for
source and target. (Wildcards are only allowed as prefix or suffix; e.g. *xxx
or xxx*.)
There are three ways of defining a path:
absolute (You can also use the button '...' next to the text field).
relative according to the data directory. (Link: more about the data
directory).
For example:
absolute:
Source 'C:\temp\datenbank.mdb' to target 'D:\backup\' -> The
file 'database.mdb'is copied to the directory 'D:\backup\'. In order for
the copying to work, the target directory must already exist and it must
be followed by a backslash.
relative:
relative according to the data directory: '*.aml' to target 'D:\backup\'
copies all files of the alarm list to the folder 'D:\backup\'.
Rename files:
Single files can be renamed. Example: 'C:\temp\datenbank.mdb' to
target 'D:\backup\backupdb.mdb' copies the file
'datenbank.mdb' to the directory 'D:\backup\' and renames it to
'backupdb.mdb'.
Consider sub folder Looks for files also in the sub folder of the source path and creates that
tree structure in the target directory.
Overwrite existing If the source file already exists in the destination directory, it will be
files overwritten by the new file.
Display error If copying or moving file is not possible, an error message will be issued as
messages system message We do not recommend to activate this option, as it may
block the runtime or the processing of other functions.
Show dialog at Before the function is executed in online operation, a dialog box is
Runtime loaded, which allows to adjust parameters (file operation, source, target
etc.). The modified settings remain during the runtime of the online
operation. In this dialog box, the option dialog box before execution is
29
System functions
missing.
Execute only if File operation is executed only when time criterion was defined (days,
file(s) hours).
older than The file must be older than the entered time. '1 day' always means 24
hours after execution time.
newer than The file must be younger than the entered time. '1 day' always means 24
hours after execution time.
Hint: 'not older than' must be bigger than 'not younger than'.
30
System functions
Give the frame and the additional options as the transfer parameters. This function is configured via the
following dialog.
31
System functions
Property Description
Selected print area Display of the selected area.
Total screen area Prints screenshot of the whole screen. For multi-monitor systems the
contents of the standard monitor is printed.
Frames list Only available if the Total screen area property is inactive.
Monitor Only available if a frame has been selected and the Total screen
area property is inactive.
all objects
Current monitor
Designated virtual monitor
: If you have selected a frame which covers more than one screen
, you must select current monitor in order to print the whole
frame.
Print options
Fax The hardcopy is rerouted to the fax. For this you must select a fax
device as printer for screenshots in the Printer settings.
32
System functions
[DEFAUL
T]
...
Entry Meaning
[DEFAULT]
33
System functions
Info
At moving the Runtime to the foreground the Runtime window is defined as the topmost
window. At this the alarm status line is covered. In order to get the alarm status line back
to the foreground, you can:
activate the system keys (deactivate project settting Lock system keys) and get back
the alarm status line via Alt+Tab to the foreground
Give the program file (*.EXE) as the transfer parameter. This function is configured via an input dialog.
Parameters Description
Name name of file which will be executed; search and select via button is possible
Open this dialog changes program and parameter during online operation when function is
on runtime called
34
System functions
For the start of a program it has to be in a search path (system environment under Windows NT). User-
defined programs (Visual Basic) should be stored in the installation path of zenon.
When the alarm list is active and an alarm in the list has been selected, the call of the variables' name
can be transferred as a parameter (for external database information systems). The parameter is
transferred as a key word.
Parameters Description
@alarm.name Name of the variable
If no alarm list is open, or several or no alarms are selected, no transfer parameters are generated. If
several alarm lists are open (global or selective list), the entry of the first found list is used.
When the Chronologic Event list is active and an entry in the list has been selected, the call of the
variables' name can be transferred as a parameter (for external database information systems). The
parameter is transferred as a key word.
35
Execution sequence during Runtime
Parameters Description
@cel.name Name of the variable
If no Chronologic Event List is open, or several or no entries are selected, no transfer parameters are
generated. If several Chronologic Event Lists are open (global or selective list), the entry of the first
found list is used.
This function is used to to consider the effects of the started program on the system as a whole
(required resources, multitasking, program stability, etc.).
Priority 3: Low
If for a function with priority 1 a dialog is displayed before the function is carried out, the priority is set
to 2.
36
Execution sequence during Runtime
Within one project all functions of one script are in the same queue. In one script all functions of the
same priority level are executed. These functions are executed one after the other.
Example
Via a script a screen arrangement with screens of different projects is activated via
function Screen Switch. This arrangement depends on the sequence of execution
(screens above other screens).
37
Execution sequence during Runtime
Alarms: delete 1
Alarms: Acknowledge 1
Export alarms 2
Export CEL 2
Select printer 3
38
Execution sequence during Runtime
Open Help 3
Reload 1
Exit program 3
Language switch 2
Archive: Stop 1
Index Archive 1
Archive: Start 1
Export archives 1
Change user 3
Logout 2
Change password 2
Indexed screen 1
Screen : close 2
39
Execution sequence during Runtime
Screen switch 1
Move focus 1
Show menu 1
Monitor assign 1
Runtime profiles 1
Overview Window 1
Gruppen/Klassen/Bereiche/Anla 1
gen unterdrücken
Send a Message 1
40
Execution sequence during Runtime
Authorization in network 1
Redundancy switch 1
Print report 2
Export report 2
Execute report 2
Recipegroup Manager 2
Standard Recipe 2
Script: Execute 1
Export data 3
Read a dBase-file 2
Unit conversion 2
Trend-Values on 1
Trend-Values off 1
Trend-values on/off 1
Driver Commands 2
41
Execution sequence during Runtime
File operations 3
Window to foreground 2
Print screenshot 2
Start program 2
42