Project Simulation
Project Simulation
Project simulation
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
3 General .......................................................................................................................................................... 5
3.1 Switching to simulation mode .....................................................................................................................5
3.2 Switching in hardware mode........................................................................................................................6
3.3 Create simulation image ................................................................................................................................6
3.4 Replay ....................................................................................................................................................................7
3.5 Activate/deactivate project simulation function ................................................................................ 11
3.5.1 Create an Activate/deactivate project simulation function .................................................................. 12
3.5.2 Settings ..................................................................................................................................................................... 13
3.5.3 Replay ........................................................................................................................................................................ 19
5 Scripts.......................................................................................................................................................... 23
11 Limitations ................................................................................................................................................. 27
Welcome to COPA-DATA help
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 [email protected].
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 [email protected].
2 Project simulation
With the help of the project simulation, you have the possibility of switching between simulation
mode and hardware mode. You can simulate processes for test purposes in simulation mode. In this
mode, switching actions are executed, recipes are sent, set values are defined etc. without these
operations actually being sent to the process (such as to a PLC for example).
In addition, project configuration is carried out in the Runtime in the project simulation for the
Command Sequencer and Process Recorder modules. Productive processes are therefore not affected.
You can execute the simulation on a client in the zenon network. The client is separated from the
network by the simulation.
4 | 27
General
SIMULATION OPERATION
The following is applicable in simulation mode:
All drivers are started in driver simulation programmed mode.
Note: Each driver needs a simulation project.
No data is saved externally:
SQL evacuation is not executed.
Entries for the IPA database are not created.
Existing IPA entries cannot be deleted, edited or commented on.
PFS shift data is not written to the database.
The saving is obtained in hardware mode after the Runtime is started.
Information
Project simulation is not available for clients at the terminal server.
3 General
You can only switch to the project simulation if all projects in Runtime are either single user or client
projects. The simulation mode "separates" the computer or the Runtime from the network.
Furthermore all drivers are started in mode Driver simulation programmed. After this, no more drivers
are connected to a process.
After switching to simulation mode, Runtime is restarted and acts as though all projects were
configured as a single user project.
5 | 27
General
6. zenProcess waits until Runtime has ended and then starts in simulation mode.
7. Runtime recognizes the command line parameter and starts all projects as single user
projects.
8. The directory for Runtime data is now the simulation directory. The directory of Runtime data
for hardware mode is not changed.
9. The projects are started. The drivers start in driver simulation programmed mode and are
loaded with the variable image from the simulation directory. Local variables obtain their
value from the local image. The variable image is applied on the programmed simulation. If,
in the programmed driver simulation, the variable is changed immediately in the first cycle of
a program, in the zenon Runtime, the variable does not have the original value as in the
Runtime with hardware connection, but the value that was changed in the simulation.
10. The image for the internal drivers is loaded.
11. For each project, an entry in the respective chronological event list is created, which notes
the switch to simulation mode.
12. The system driver variable obtains the value for the simulation mode.
These points are executed for all projects in Runtime unless you have explicitly stated otherwise.
6 | 27
General
2. Data that is not required is deleted in the simulation image, according to the mode selected
(Exception: Initialize with existing simulation image):
a) Initialize with process image and Runtime data (without archive data): The local
simulation project is completely deleted.
b) Initialize with process image and Runtime data (with archive data): All archive files
(*.ARX und *.ARS) are deleted in the local simulation directory.
3. Depending on the settings you have made for the Switch on/off simulation function, the
corresponding project data, Runtime data and variable data is obtained from all projects. For
AML, CEL and HDD, the current status is saved locally for a single user project and on the
server for a server project (Exception: Initialize with existing simulation image).
4. The project files that can be changed in Runtime (for example, data for PFS, users etc.) will be
copied to the corresponding file in the project directory (exception: Initialize with
existing simulation image).
5. It waits until all data points have received a value. The progress bar displays the names of the
data points. The display is limited to 60 characters and displays the attendant value. The
waiting time is not limited.
Hint: If, in the Activate/deactivate project simulation (on page 11) function, the option Wait
for all variables is deactivated, only the time that is configured in the Maximum waiting
time property is waited. With a maximum waiting time of 0, the progress bar is not
displayed.
6. A variable image of all drivers is created and the internal drivers save their data. These
images are copied in the computer directory. If you create the image in the simulation, it also
contains the image of the driver simulation programmed.
7. New transfer of files changed as in point 3 to point 6.
8. The variable image is compared to the local simulation directory.
9. The variable image for local variables is saved.
Exception: When creating a simulation image.
These points are executed for all projects in Runtime unless you have explicitly stated otherwise.
3.4 Replay
In the Playback tab, you configure parameters for the playback mode of the Process Recorder
module. If this dialog is shown in Runtime, only the time requirements can be amended.
7 | 27
General
They only make sense if a switch from live mode direct to playback is to be made.
Parameter Description
Start Process Recorder in replay mode Checkbox to select the Runtime behavior after the
function has been executed.
Active:
Runtime starts in playback mode.
Inactive:
Runtime is started in simulation mode.
Default: inactive
FILTER
In this area you can configure the start time of playback in Runtime.
8 | 27
General
Parameter Description
Time filter absolute Start and end of the playback area are given
manually.
Default: active
Time filter relative Start of playback range, relative to the start time.
The start time is configured in the Start time area.
Default: inactive
START TIME
The options are then only available if relative time filter is activated as a filter. Otherwise the options
are grayed out. Selection of the start time from an option field.
Parameter Description
From variable The start time of playback for the Process Recorder
9 | 27
General
Parameter Description
module is then taken from the value of the
configured variable.
Take over from calling screen The playback start time in Runtime in the Process
Recorder module is taken from the calling screen.
Note:
The Activate/deactivate project
simulation function can be successfully
called up from a zenon Alarm Message List
or Chronological Event List screen.
For calling up, only one entry (alarm or
event) from the list can be selected.
The incoming time can be used as a start
time for playback in the Process Recorder
module.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
10 | 27
General
In addition, the zenon Runtime for the Process recorder module can also be started in playback
mode.
Information
If a project in Runtime is, currently in the process of reloading or is to be
reloaded or a dialog is opened in VBA for example, the Switch on/off
simulation function is not executed immediately. The function is carried out
immediately as soon as there is no further reason for delay.
If the mode is not Activate process connection and the checkbox "Wait for all
variables" has not been activated, the parameter text is supplemented with
11 | 27
General
DIAGNOSIS VIEWER
If there are still variable(s) without value(s) after the timeout, a LOG entry for each connection is
created for the Diagnosis Viewer. "simulation image has variables with missing values!" is written in
the general text, followed by a list of all variables without a valid value.
ENGINEERING
12 | 27
General
3.5.2 Settings
You configure the start behavior of the project simulation in the Settings tab.
The two modes (simulation or hardware) can be started under different prerequisites.
13 | 27
General
OPTIONS
Parameter Description
Name of simulation image Name of the file in which the simulation image is saved.
(computer name if empty) Enter the desired name for the simulation image.
Wait for all variables Checkbox to select whether a (valid) value must be present for
all variables before switching to Runtime.
Active:
Runtime is only switched to simulation mode if all
variables have a valid value. Switching can be delayed
as a result.
Inactive:
Runtime switches to simulation mode immediately. A
switch also takes place if not all variables have a value
or have an invalid value.
This option is not recommended!
Default: active
Maximum waiting time Maximum waiting time in seconds that is waited before
switching to valid values of the variables.
14 | 27
General
Parameter Description
Runtime in the title of the status dialog. The status display
shows the progress of time. Missing variables are always
shown. If the time has expired, the simulation is switched to
despite missing variables.
Default: 30 seconds
Input range: 0 - 3600
Show error message in the Checkbox to issue an error message in the event of a function
Runtime being executed incorrectly:
active: A corresponding error message is shown in
the Runtime if a function is executed incorrectly.
Inactive: No error message in the Runtime if a
function is executed incorrectly.
Default: inactive
Show dialog in the Runtime Checkbox to select whether this dialog is shown in Runtime:
active: This dialog is called up during operation in the
Runtime on the current computer. In the network,
this dialog is called up on the computer that executes
the function. As a result, changes to existing
parameter settings of an zenon Editor configuration
are possible during execution in zenon Runtime.
Inactive: This dialog is not shown in the Runtime during
operation. The function or the command is
immediately executed with the project configuration
created in the Editor.
Default: inactive
15 | 27
General
Information
Due to the possibility to create a simulation image (create with the help of a
simulation image), you can always start a simulation from precisely the right
place and under the same conditions. Not only are the variable values saved in
the image, the respective status of the driver simulation programmed is also
saved. Because the image from the server (if available) is transferred, you also
have the possibility of working on several clients with the same image. The
image is copied from the server when Runtime is started. Only the changes are
transferred in the process.
Information
All existing data in the image is deleted. Only the current variable values are
obtained for initialization.
Here, an image of all local variables and all files from the computer folder (Exception: archive
data) is created and the project data modified in Runtime is saved. After this, Runtime is restarted in
simulation mode.
Note:
All existing data in the image is deleted.
Only the current variable values are obtained for initialization.
16 | 27
General
3.5.2.4 Archive files - Initialize with process image and Runtime file
In doing so, an image of all local variables and all files from the computer directory is created and the
project data that can be modified in Runtime is saved. Any archive data that is present locally in the
image is not deleted.
Note:
All existing data in the image is deleted.
Only the current variable values are obtained for initialization.
All historical alarms and CEL files are copied over.
This procedure can take some time depending on the extent of the files involved.
The old archives remain.
Archiving starts filling the missing archives when Runtime is first started if you have
configured it to do so. This procedure can take some time depending on the size of the files
involved.
Note: You undertake the project configuration of this archive filling in the Create alternate
archives property.
3.5.2.5 Process Recorder data - initialize with process image and Runtime
files
Starts the project simulation and switches to playback mode of the Process Recorder module.
With the additional option From export folder you can determine from where the process recorder
will load its playback data.
active:
When shifting to playback mode, the recorded data is loaded directly from the configured
export path and not requested from the server.
If this is not possible an attempt will be made to receive the data from the server. This is the
same behavior like when the checkbox is deactivated.
inactive:
When shifting to playback mode, the recorded data is taken over by the server.
If the evacuation is active on the server, the evacuated data is read from the server and
forwarded to the client.
17 | 27
General
Information
You can find further information in the Process Recorder manual in the
Activate/deactivate project simulation chapter.
When ending simulation mode, the simulation image is saved so that the last status of the simulation
mode can be restored if required. If there is a server connection, the simulation image is transfered to
the server and saved there.
Attention
If there is a transfer from several clients for the same simulation image at the
same time, it is not guaranteed that the saved simulation image will work.
In addition, project configuration is carried out in the Runtime in the project simulation for the
Command Sequencer and Process Recorder modules. Productive processes are therefore not affected.
You can execute the simulation on a client in the zenon network. The client is separated from the
network by the simulation.
SIMULATION OPERATION
The following is applicable in simulation mode:
All drivers are started in driver simulation programmed mode.
Note: Each driver needs a simulation project.
No data is saved externally:
18 | 27
General
Information
Project simulation is not available for clients at the terminal server.
In addition, the simulation image is transferred to the server and is therefore also available to other
clients.
The simulation image is transferred to the server in hardware mode if present and saved there under
the given name.
Information
Here you can create an image of the current statuses and save these. You can
then continue at this point with exactly the same requirements.
3.5.3 Replay
In the Playback tab, you configure parameters for the playback mode of the Process Recorder
module. If this dialog is shown in Runtime, only the time requirements can be amended.
19 | 27
General
They only make sense if a switch from live mode direct to playback is to be made.
Parameter Description
Start Process Recorder in replay mode Checkbox to select the Runtime behavior after the
function has been executed.
Active:
Runtime starts in playback mode.
Inactive:
Runtime is started in simulation mode.
Default: inactive
FILTER
In this area you can configure the start time of playback in Runtime.
20 | 27
General
Parameter Description
Time filter absolute Start and end of the playback area are given
manually.
Default: active
Time filter relative Start of playback range, relative to the start time.
The start time is configured in the Start time area.
Default: inactive
START TIME
The options are then only available if relative time filter is activated as a filter. Otherwise the options
are grayed out. Selection of the start time from an option field.
Parameter Description
From variable The start time of playback for the Process Recorder
21 | 27
General
Parameter Description
module is then taken from the value of the
configured variable.
Take over from calling screen The playback start time in Runtime in the Process
Recorder module is taken from the calling screen.
Note:
The Activate/deactivate project
simulation function can be successfully
called up from a zenon Alarm Message List
or Chronological Event List screen.
For calling up, only one entry (alarm or
event) from the list can be selected.
The incoming time can be used as a start
time for playback in the Process Recorder
module.
CLOSE DIALOG
Option Description
Cancel Discards all changes in all tabs and closes the dialog.
22 | 27
System driver variable - Runtime status (simulation)
5 Scripts
The following scripts are available for simulation mode; they are executed automatically:
Script Description
AUTOSTART_SIMUL If Runtime is started in simulation mode, the script with the name
AUTOSTART_SIMUL is executed automatically if it is available.
Note: Also applies for playback mode of the Process Recorder module.
AUTOEND_SIMUL If Runtime is ended in simulation mode, the script with the name
AUTOEND_SIMUL is executed automatically if it is available.
Note: Also applies for playback mode of the Process Recorder module.
23 | 27
Online language translation
8 Simulation image
to ensure that these are recreated, the values of the driver variables must be saved in the following
files:
24 | 27
Files in the simulation image
Drv'Treiber-ID'.sim In these files, all values of all data points are saved in the respective
driver. The files are necessary to recreate all current values in the
simulation after Runtime is restarted. If the files were created during
simulation mode, an image of the programmable simulation is also
contained.
Drv'Treiber-ID'.sim In this file, the values of the local variables are saved for the respective
drivers. If Runtime starts with process coupling and these files were
found, the local variables obtain the values from the files. The files are
deleted after this. This also happens if Runtime is started manually.
Drv'Treiber-ID'.lssim saves an image of the local variables that is incorporated into the
simulation image.
The following files are copied to the process image's system directory from the project's system
directory:
project.mdb
rezepturen.cmp
rezepturenrt.cmp
fpm.cmp
password.cmp
passwordrt.cmp
All files up to those with the ending *.lsim are taken from the computer directory. For the simulation
without image mode, the files *.sim, internvar.bin, sy_ma32.bin and uservar.bin are transferred. For
25 | 27
Runtime Command Line parameters
the simulation without archive mode, all files up to those with the ending *.arx and *.ars are
transferred.
ZENPROCESS
The zenProcess.exe application is used to restart zenon Runtime when switching between the two
modes - simulation mode and hardware mode.
SYNTAX
PARAMETER
Parameter Description
Procedure:
The parameter only has an effect after restarting once Runtime has
ended. Runtime itself is not ended by this parameter; to do this, a
function must be called up in Runtime. There is a wait until all processes
26 | 27
Limitations
Parameter Description
have been ended normally. The number and the names of a maximum
of 5 ongoing processes, the end of which is being waited for, are
displayed this long. Runtime is restarted after this.
Example: RESTART="d:\zversionen\720_inst\zenrt32.exe"
Example:
RTPAR="SIMUL=TEST.SIM"
CANCEL You cancel the switching process with this parameter. Runtime is ended
but not restarted.
EXAMPLE
11 Limitations
The following restrictions are known:
Module Batch Control is not supported in the simulation.
27 | 27