Zenon Straton
Zenon Straton
Zenon Straton
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.
1. Welcome to COPA-DATA help ...................................................................................................... 1
2. straton ............................................................................................................................................. 2
iii
5.3 Start the straton Runtime .......................................................................................................... 34
5.4 straton Runtime cycle ................................................................................................................ 38
5.5 Close the straton Runtime .......................................................................................................... 40
5.6 Remote systems ......................................................................................................................... 41
5.6.1 zenon Runtime and straton Runtime on one remote PC .............................................. 42
5.6.2 straton Runtime autarkic (PC) ...................................................................................... 42
5.7 straton Runtime with Real Time Kernel (RTK) .......................................................................... 43
5.7.1 Restrictions and requirements of the straton RTK ....................................................... 47
5.7.2 straton RTK configuration ............................................................................................ 49
5.7.3 Blue Screen Handling .................................................................................................... 56
5.7.4 Error codes when starting stratonRTK ......................................................................... 57
5.8 Redundancy straton and zenon ................................................................................................. 60
5.8.1 Requirements ................................................................................................................ 60
5.8.2 Configure redundancy .................................................................................................. 62
5.9 OEM spezifikation ...................................................................................................................... 65
5.10 straton I/O driver support ......................................................................................................... 68
5.11 straton I/O driver: Hot-Restart/Online Change ........................................................................ 70
iv
6.3.14 Button "Save" ............................................................................................................... 78
6.3.15 Button "Delete" ............................................................................................................. 78
6.3.16 Button "Start" ............................................................................................................... 78
6.3.17 straton Runtime (settings) ............................................................................................ 79
6.3.18 Language selection (languages) .................................................................................... 79
6.3.19 Show splash screen (setting) ........................................................................................ 79
v
If you miss any information in this help chapter or have any suggestions for additions, please feel free to
contact us via e-mail: documentation@copadata.com (mailto:documentation@copadata.com).
If you have concrete questions relating to your project, please feel free to contact the support team via
e-mail: support@copadata.com (mailto:support@copadata.com)
If you realize that you need additional licenses or modules, please feel free to contact the sales team via
e-mail: sales@copadata.com (mailto:sales@copadata.com)
1
straton is the programming environment in accordance with IEC 61131 included in zenon. It is available
as Editor (on page 3) and Runtime (Soft-PLC) (on page 25).
2
straton is an IEC 61131-3 programming environment for different target systems with straton Runtime
kernel. In the case of zenon, the straton Runtime kernel is designed as a soft PLC for PC and CE
platforms.
With straton development environment - the Workbench - PLCs can be engineered and programmed in
the five defined languages of IEC 61131-3.
New straton project Opens the assistant to create a new straton project.
Import external straton Opens the dialog to select a straton project folder.
project...
Editor profiles Opens the drop-down list that includes pre-defined editor profiles.
This manual provides a quick introduction in the use of straton in combination with the integrated
solution with zenon. This manual does not provide an instruction into computer languages, functions
and function blocks. For this use the extensive help included directly in the straton Workbench
(Main.chm::/K5HELP.chm::/K5HELP.htm) (IEC 61131-3 programming environment).
The straton Workbench provides an extensive help functionality. In order to access this help function,
open the entry Help in the menu of the straton Workbench or click here
(Main.chm::/K5HELP.chm::/K5HELP.htm). In order to access a help chapter about a certain topic (e.g.
function block), select it with a mouse click and then press F1.
3
The in zenon integrated straton Workbench has not TAG limitation independent of I/O or TAG
extension of the zenon Editor.
straton is an IEC 61131-3 programming environment for different target systems with straton Runtime
kernel. In case of zenon the straton Runtim kernel is designed as a soft PLC for PC and CE plarforms.
The straton Workbench is the tool for programming the straton PLC. The straton Workbench ios started
in the zenon Editor. All five IEC 61131-3 predefined languages are available.
LD Ladder Diagram
ST ST – Structured Text
IL Intstuction List
Part three of the IEC 61131 descubes the syntax and semantic of compuer languages for PLCs which
have been defined in part 1 of the IEC 61131.
The straton Runtime is the target system and executes the compiled code of the straton Workbench. The
straton soft PLC is available for the PC (Windows® XP, XPe, Vista, Server) and for Windows® CE
platforms. Beside the soft PLC there are also hard PLCs, which have implemented the straton Runtime
kernel as OEM software. The manufacturers of these hardware PLCs can be found on www.copalp.com
(http://www.copalp.com).
You can find more information about straton here: straton Runtime (Soft PLC) (on page 25)
4
New straton project Opens the dialog to create a new project (on page 6), create it in the list and
opens the straton Workbench with the new project.
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
5
Here the first steps in order to create a straton project in zenon are explained. In addition information is
given on how to configure and edit the project in zenon. If this is your first contact to straton in zenon,
go through this introduction step by step.
6
With this command the following window appears:
Here, you can give the straton project a freely definable name.
The Name
Select STRATON32 or IEC870 as driver. This selection defines the eventual Runtime communication
between straton and zenon. In addition the creation of the operating and monitoring (O and M) variables
is based on this: Based on the name when using the STRATON32-driver, based on the address when
using the IEC870-driver
Attention
If you have selected a driver once, you cannot change it afterwards.
7
advantages is that complex data types (structured data types and arrays) are supported.
IEC870 driver: This driver is mostly used in the infrastructure automation. You can operate it
serial (-101) or over Ethernet TCP/IP (-104). It generally uses on change data traffic. Complex
data types are not supported.
IEC850 driver: It is the successor of the IEC60870 standard and is completely object-orientated.
For information about the configuration take a look at the corresponding driver help:
Now a straton project is created with the name you chose. The straton Workbench is started
automatically.
8
Info
Keep in mind that a new straton project already has a few default values in the project
properties. Make sure that these values meet for requirements. Change the project settings
where appropriate. In order to do this open the project settings in the Workbench under
Project/Settings....
You adjust the properties of the straton projects in the zenon project in the properties window of the
zenon Editor. You will find a description of the single properties in the property help.
1 In this section documents are displayed and edited (programs, watch lists, ...).
5 The property tab and the Z arrangement are used for the engineering of the graphics documents.
9
6 The tab Libraries lists all available functions and function blocks
7 The tab Spy list displays the online values of selected variables during the debugging.
Each section (except section 1) can be shown and hidden with commands from the menu Views.
In the central area you will find the documents of the workspace. If several documents are opened at the
same time, you can switch between the different documents using the tab at the bottom. With button X
in the header the active document can be closed.
The variable editor and the document area in the center can be maximized at any time with the
corresponding button (blue symbol with white line) or a double-click on the header.
If serveral documents are open in the central area, one of these can be fixed in the top or left part. In
order to do this right click the corresponding tab an select Fix. With the same menu you can unfix the
document at any time and fix another one:
The intelligent integration of straton in zenon offers considerable advantages in engineering PLC and
SCADA projects. The O&M variables (operating and monitoring) from the PLC system are available in
zenon with just a few mouse clicks. When changing the variable (name, datatype, ...) these changes are
immediately passed on the other system.
10
Attention
External UDFBs from other straton projects are not part of the straton project and therefore
not available in zenon.
Global variables
Array variables
Structure variables
Attention
We recommend that when using UDFB instances as O&M variables to administrate only
one straton project in a zenon project.
If two or more straton projects are administrated in zenon, the as O&M marked UDFBs
appear as structure data types.
Attention
A soon as a straton variable is declared as an O&M variable, you must avoid editing
straton variables in the Workbench as text!
11
(Refer to the online help of the straton Workbench for the exact steps to create a variable in straton.)
4. Change the profile in the combo box from None to STRATON (*Operating and Monitoring
for zenon*).
5. Click on OK.
Now the O&M variable has been entered in the zenon variable list. The O&M variable is displayed with a
prefix in zenon. The prefix has the following structure:
You can set the profile and the flag directly in the variable list of straton. Thus you do not have to open
the context menu and the dialog.
12
Mark the line Properties of the corresponding variable. Press Ctrl+F12. Thus the profile straton is
displayed in this line. In addition you must activate the checkbox for embedding the symbol via double
click or Enter in column Symb..
Attention
The checkbox Embed symbol must be activated. Variables for which this checkbox is not
active are not able to communicate with zenon using the STARTON32 driver and will not
supply any values.
The additional attributes Identification and Description of a variable are also displayed in
zenon when you select the profile STRATON (*Operating and Monitoring for zenon*). In zenon the
contents of identification and description can be found in the variable properties Identification and
Resource label.
If arrays or structure variables are marked with the profile STRATON (*Operating and Monitoring for
zenon*), they are also displayed in the variable list in zenon. You must however activate the desired
elements of the variable.
UDFB instances which are marked with profile STRATON (*Operating and Monitoring for zenon*), they
are not automatically available in zenon. In case you want them to be available, you must activate this
functionality manually with the help of the following entry in file K5DBK.INI. In file K5DBK.INI scroll to
section [XS] and enter
ShareUDFBDatatype=1
.
If you deactivate this entry, existing UDFB data types in a project are still modified. However no new
UDFBs are created.
have a profile
13
have an alias name; this name is used in zenon instead of %IX0.0 (board type, board index, bit
number)
An alias is necessary if the straton profile is used and property Embed symbol was activated. In this
case the variable is also available in zenon (Editor and Runtime).
The data type of IO variables should not be changed in zenon: Changes are not adopted in the
straton Workbench.
Changes to the hardware IO declaration should always be carried out in straton. In zenon no new
variable for the straton32 driver can be created as hardware I/O variable for straton.
14
Attention
Take care that the naming convention is IEC 61131-3 compatible (no special characters,
...); otherwise the button Finish will not be available in the dialog. See also: Variable
names (on page 19)
Info
The variables declared in zenon are always entered in the Global area of the variable list in
straton.
One possibility to realize this functionality is the allocations (see Allocations). The variable from the PLC
(e.g. S7 ) is linked to a straton variable with an allocation. In this case only a unidirectional
communication is possible.
PLC variables (e.g. from a S7) can be exchanged between zenon and straton via a shared memory
connection bidirectionally (!), easier and quicker . In the properties of the PLC variable the flag
Externally visible has to be set to make the variable available in the straton Workbench.
15
As soon as this flag is set, the variable is displayed in the variable list of the straton Workbench.
16
Attention
Regard interactions with property Hysteresis:
If a Hysteresis was configured for the zenon variable, the value in straton does not match
the value in the PLC. It is also possible that it does not match the value in zenon:
If the value changes in the PLC and stays within the configured hysteresis, it is not communicated
to the zenon Runtime and therefore also not to straton.
If the value is changed by the user in zenon (e.g. via a function) and the value stays within the
configured hysteresis, the value remains the same in zenon and in straton but it changes in the
PLC.
If the value is changed in straton and stays within the hysteresis, the value in the PLC and in
stratonchanges. It remains however the same in zenon.
If in this situation the value changes in the PLC and stays within the hysteresis, three different
values exist.
one in the PLC, one in zenon and one in straton.
Such a variable is especially marked in straton, as it cannot be changed in straton. Changing the variable
here would lead to problems, as the source of the variable is the PLC programming environment in the
external PLC (e.g. S7).
Attention
Be careful with the variable name! The name of the variable from an external PLC has to
be IEC 61131-3 compatible. Also see Variable names (on page 19).
17
In straton a so-called I/O driver - shared memory driver - must be loaded in order to make the
communication for such variable possible in the Runtime.
In order to do this open the fieldbus configuration in the straton Workbench with File -> Open... ->
Fieldbus configuration.
The following dialog opens with the menu Insert -> Insert configuration...:
Here select the configuration straton to zenon-RT connection. So this configuration is inserted in
the tree of the fieldbus configuration:
Now it is guaranteed that the externally visible variables from zenon communicate with straton.
Info
Please be aware, that such a connection only works locally on a PC or a CE device. Here it
is not possible to communicate with a straton Runtime on another device.
With the help of the zenrt driver complex variables (arrays and structure variables )are resolved into a
flat structure. The values of variables with the same name in straton and zenon are exchanged via the
shared memory driver.
18
Info
The functions for checking the status of a variable and for setting Dirty are not supported
at the moment.
The status information (time stamp and status bits) are not supported for complex data
types.
If you marked an element of an array or a structure variable as externally visible, a simple variable with
the same name is created in the straton Workbench. If you marked the array or the structure variable
itself as externally visible, this complex variable is created in the workbench.
Info
If you mark an array or a structure variable as externally visible, the individual elements are
not created in the Workbench anymore.
You can create variables in the workbench, which contain characters '.' or '[]' in their
name. Therefore you can create variables which have the same name as variables which
derive from an array or a structure variable. In this case the communication with the zenrt
driver is not possible as no distinct allocation can be made.
For variables of other drivers (e.g. S7 TCO/IP driver), the engineer has to check that the variable name
fulfills the regulations of the IEC 61131-3 (communication takes place using shared memory).
19
xyz_ xyz__ Twice with Underscore
Now it it possible to use variables which are following the IEC 61131-3 regulations (free variable names).
Take care when using free variable names.
The following characters are not allowed to be part of a variable name: '(*', '*)', '//', '{' and '}'
Variable names are not allowed to start with '__' (two underscores)
If free variable names are used when using programming language ST or IL, they must be
between {}.
If free variable names are used with structure of array, they must be between {}.
Variables with free variable names with a basis data type can be used without {} in programming
languages FBD and LD. They must be declared as variables.
Variables with the same name once with {} and once without {} are regarded as two different
variables.
20
Arrays can be created in zenon and straton for both systems. The declaration as O&M variable takes
place as described in chapters Creating O and M variables in straton (on page 11) and Creating O and M
variables in zenon (on page 14).
Take care when creating arrays in straton that you must activate the single elements in zenon.
When creating arrays in zenon, set the array start to 0. Thus the arrays have the same indices in both
systems.
Info
When creating structure data types in zenon the IEC 61131-3 naming convention has to be
used otherwise the structure data type is not available in straton. Also see Variable names
(on page 19). Here the spelling is not checked by zenon!
Info
If you create structure data types in straton, they are always declared as linked in zenon.
Therefore it is better to create a structure data type in zenon because then you can decide
whether you want a linked or a embedded data type.
21
It is possible that more than one engineer is working on one zenon project. Thus for example one
engineer works on a straton project and another works on the zenon project.
In distributed engineering O&m variables (operating and monitoring) are handled separately by the
straton project.
You can create variables in straton as usual. If the variables should also be available in zenon, they have
to be equipped with the corresponding property (embedded symbol, profile straton (*Operating and
Monitoring for zenon*)). After that the variable in created in zenon. You can check it in for other
engineers (apply changes). You cannot edit a checked in variable in the straton Workbench. It is marked
accordingly in the straton variable list.
straton drivers are attended separately in distributed engineering by the straton project. That means if
you want to make changes, you have to check out the STRATON32 driver (enable changes).
In order to edit a multi-user straton project, it has to be checked out (enable changes). After the
engineering, the changes can be undone or accepted.
22
straton projects which were created with the stand-alone Workbench of COPA-DATA can be integrated
easily in a zenon project.
Select in the context menu of the detail view of the module straton (IEC 61131-3) menu
itemExternal straton Import project.... With this command you can indicate an existing
straton project (mark folder) and integrate it in the existing zenon project.
Another possibility is the XML import. In the context menu of the detail view of the module
<CA_PRODUCTNAME > (IEC 61131-3) you will find the command Import XML. Thus straton
projects which were first exported in XML can easily be imported in the zenon project.
23
In this area you can find the manual for the straton Workbench. It is only available as online help.
24
The straton Runtime interprets the compiled PLC Code of the straton Workbench. Runtime runs on
Windows 2000, XP and XP embedded PCs, VISTA and Windows CE platforms.
This chapter gives an overview of the use of the straton Runtime and the configuration tool straton
Runtime Manager.
Attention
Due to performance issues the straton Runtime Version 6.22 SP0 Build 2 needs the
straton driver for the same or earlier zenon versions. Earlier straton Runtime
versions still work with all straton drivers.
Usually the straton Runtime can only be found as a symbol in the system tray. A double-click on the
symbol with the green arrow or on menu item Show in the context menu opens the straton Runtime user
interface.
25
Depending on the current status, the user interface displays different states (running, step
mode,break point(s), stopped).
In addition to information about the status of the straton project running, the following actions can be
executed in the straton Runtime user interface:
Settings... (on page 27) button: Makes configuration possible via three tabs
General settings (on page 27)
Redundancy (on page 29)
Advanced users (on page 30)
Messages (on page 32) button: opens and closes the message window
With this slider the maximal allowed execution time related to the cycle time can be set. If with a set
cycle time of 10 ms the slider is set to 50% the PLC cycle may take a maximum of 5ms. If the PLC cycle
takes longer that 5 ms, the remaining calculation is done in the next cycle. So one cycle has to be
omitted from the PLC. This results in a cycle overflow.
26
The bar graph (PLC load) shows, how high the PLC load is in relation to the setting of the slider. From
this you can conclude how to set the slider for an optimal tuning.
PLC load high (Slider between 50 and 100%): Set slider towards 100% or increase cycle time.
5.1.2 Settings
The settings make it possible to configure the straton Runtime with the help of three tabs:
General settings
Redundancy
Advanced users
General
In the tab General the different parameter of the straton Runtime can be changed:
Communication
Port (Main): IP port of the straton Runtime for the cyclic data transfer (e.g. straton
Workbench).
Port (Binding): IP port of the straton Runtime for the on change data transfer (e.g.
CA_PRODUCTNAME Workbench or binding).
Run-up
No start. Open this box: When the straton Runtime is started, first this box is opened.
Cold start: Initialized run-up. Also retain variables are started initialized.
Cold start (loading of RETAIN Initialized run-up with current values of the retain variables.
variables):
Warm start: Restart with all variable values from the last stop.
27
Default: 0
Storage path RETAIN data Here the file with the retain variables is stored. The default setting depends
on whether the straton Runtime is started.
Real-time priority Sets the straton Runtime process to the windows priority Realtime. If the
flag is not set, it means priority Normal.
Start in step mode Starts the straton Runtime and immediately stops it in debug mode.
Write messages to Error messages which were generated by the straton Runtime are saved in
STRATONRTLOG.TXT this file. Writing log files can influence the PLC cycle!
Info
If the straton Runtime has been started with the zenon Runtime or with the straton
Runtime Manager, changes done in this user interface are not effective after a restart of
the straton Runtime. Please make the changes as usual in the straton project properties of
the zenon Editors or in the straton Runtime Manager.
In such cases the dialog helps to determine which parameters were forwarded to the
straton Runtime.
The changes to the settings which were done in this dialog are only effective if the straton
Runtime is started directly (e.g. using the Windows Explorer).
28
Redundancy
In tab Redundancy you can see the redundancy settings for the straton Runtime.
Client Time-out [ms] Time-out in order to determine that the active server is no
longer available. After the time-out expires, the passive
client becomes the active server.
29
Info
You can fing details on configurating the redundancy of straton and zenon in chapter
Redundancy straton and zenon (on page 60).
Advanced users
In the tab Advanced you carry out settings for the on change communication with external
applications (Binding, zenon driver, ...).
System Max. length of the system queue. In this queue e.g. 1024 ... 65520
overflows of the event queue are buffered.
Default: 1024
Alarms Length of the alarm queue (not used at the moment) 0 ... 65520
Default: 0
30
max. connections Number of possible connections (cannot be changed) 4 ... 65535
Default: 256
In this queue the events of the straton Runtime event severs Default: 8192
are written. From there they are sent via TCP.
Messages Length of the info queue. In this queue the messages to the 1024 ... 65520
straton Workbench are buffered.
Default: 32768
max. puffer Buffer size of the events per cycle. This parameter defines 128 ... 65535
how much many variables are handled by the event server
per cycle. Default: 1024
Info
If in large projects more than 1024 variables are transferred between straton and zenon
with the straton32.exe driver, the parameter Max. buffer must be increased
accordingly. An easy method to find out the number of Max. buffer is the value for the
compiled I/Os in the output window of straton compilers. See illustration below.
31
5.1.3 Messages
Runtime messages can be displayed in the straton Runtime user interface. Click on the Messages>>
button to activate the view. The message display opens. Click on the Messages<< button to close the
message display.
For actions in the message display, click in the message display with the left or right mouse button. You
obtain a context menu:
Delete all messages Deletes all messages from the message window.
You administer the settings for straton logging and the drivers with the diagnosis viewer. In doing so,
each straton Runtime and each bus driver receives their own connection to the diagnosis server as a
diagnosis client. This does not include obsolete drivers, for example those from a third-party
manufacturer.
32
The straton Runtime is automatically licenced with the zenon serial number. During the installation enter
the serial number and the activation number in the according dialog. If no licence number is available,
click on Demo Version (on page 34).
For an autarkic installation (straton runs on a PC without the zenon Runtime) you can again enter the
serial number and the activation number directly in the installation dialog.
You also can do the licensing later with the Licence order. Open the license order in the Windows start
menu under Programs -> COPA-DATA -> Licensing. For later licensing the serial
number and the activation number are entered in this dialog. The
procedure is finished with OK.
For soft-licensing the so-called licence number must be read from the hardware configuration of your
PC. Click the button for soft licensing and follow the requests in the following dialogs.
In the zenon Editor you can open the dialog for licensing using File -> Standard configuration -> License
product.... You can enter the serial number and the activation key here.
Open the user interface of the straton Runtime by clicking on the straton Runtime icon in the system
tray. Then click on the top left corner an select About STRATONRT.... A window appears with
information about version and license of the straton Runtime.
33
5.2.1 Demo mode
straton Runtime starts in Demo Mode if you enter a false (or no) serial number or a false (or no)
activation key or if no dongel is connected. The Demo Mode stops the straton Runtime after 15 minutes.
With a special demo serial number the straton Runtime runs continuously for 30 days. After these 30
days then the maximal time of the straton Runtime is again 15 minutes.
You did not buy the straton Runtime license but you own a valid zenon Runtime license. Then a mini
version of the straton Runtime is licensed automatically. With the mini version up to eight TAGs
(=variables) can be used by straton via input/output mechanisms. TAGs are variables of field bus drivers
and variables with profiles (e.g. B&B profile straton).
Calculation example:
The straton Runtime supports multi-instances and therefore needs parameters (transfer parameters),
when it is started.
3. in a DOS Shell/BAT-file
34
Change the Start type (Runtime) as you wish. The properties of Start type are described
in the embedded help in zenon.
You can use the straton Runtime Manger to start the straton Runtime manually. You will find the
straton Runtime Manager in the folder COPA-DATA in the Windows ® start menu. The straton
Runtime manager is used to start straton Runtime instances on a PC. You can for example chose hard
real time here in order to start the straton real time version (straton RTK) or to start a straton
Runtime instance during the booting of the system ("Auto start").
You receive accurate information about the individual elements of the straton Runtime manager by
moving the mouse pointer over them. Then the corresponding help is displayed in the embedded help.
You receive the complete help about this application by clicking ? in the menu bar.
The straton Runtime can be started in a DOS Shell or something similar (.bat file). For the command the
following is true:
35
the following signs are allowed:
-
/
no sign
The following handover parameters are available:
DONTHIDE Do not hide the Runtime after the start (it is the only parameter without '=')
36
REMPATH=<Path> Path for remanent data.
Without parameters: 0
Settings equal to the settings under Settings/Advanced for the event server.
Without parameters: 0
37
REDENABLE=<0,1> Redundancy on/off.
Without parameters: 0
REDCLITIMEOUT=<number> Redundancy client time out [ms]; time out which is used to determine when a
passive client becomes an active server.
REDSRVTIMEOUT=<number> Redundancy server time out [ms]; time out which is used to determine when the
replication is stopped.
Calc. time: Time for data exchange, calculation, save calculated values, read and write modified
values, idle time.
38
These values can be displayed in the straton user interface. Use the shortcut Alt+S or Shift+Alt+A.
Binding exchange Reading of the Binding values which are published in the network and which were
configured by the application (if they were configured).
I/O exchange Data exchange between the I/O drivers (except Modbus slave/server) and the I/O
boards (if they were configured).
Digital sampling trace Execution of the digital sampling (if it was configured).
Events Sending of the events (Binding or straton32.exe driver of zenon) (if they were
configured).
Forced values Reading of the forced values of zenon from the straton Workbench (online
debugging) and data exchange of the Modbus slave/server (if they were configured).
Sleep Wait the remaining time until the cycle time is over.
The Sleep time is used in order to execute tasks of the operation system and of other
39
windows applications.
With the help of the slider in the straton Runtime user interface, you can determine how much time is
reserved for the PLC and for Windows. The value displayed in the bar graph always refers to the ratio
set in the slide control.
The straton Runtime can be closed manually either by using the context menu of the symbol in the
system tray or by using the open window of the straton Runtime:
Right clicking the icon in the system tray opens the following context menu:
40
With a click on End, you open a dialog
Another possibility to close the Runtime is in the open window of the straton Runtime.
The following menu opens after a click to the upper, left corner of the window:
Info
If the straton Runtime was started together with the zenon Runtime and for the straton
project the start type 'autom. start/stop' was selected in the zenon Editor, the straton
Runtime is automatically closed when the zenon Runtime is closed.
This chapter deals with target systems which are not on the local computer. The target system is
accessed via Ethernet TCP/IP.
41
5.6.1 zenon Runtime and straton Runtime on one remote PC
First you install and license the zenon Runtime on the remote PC. The straton Runtime is automatically
installed and licensed.
In order to download the zenon and straton Runtime files, use the Remote Transport function of zenon.
You will find more information in the chapter Overview functions.
The straton Runtime is started and closed together with the zenon Runtime automatically.
If the straton Runtime is started manually on the target PC (e.g. during boot up of the operating system),
the PLC code has to be loaded manually to the target platform with the straton Workbench. For that
enter the correct parameters in the property dialog Workbench in the zenon Editor: Target
host and Target port
with this the straton Workbench establishes a connection to the target system.
now you can transfer the PLC code to the the target system via button Download; the progress
of the download is displayed with the help of a progress bar
after the download the PLC starts automatically with the new application.
if the download was successful and the PLC program runs on the target system faultless, RUN is
displayed in the tool bar
Install the straton on the target system with the autarkic installation.
42
Before downloading the straton project, start it. The best way is to use the straton Runtime Manager.
With this tool you can also carry out the settings so that the straton Runtime starts together with the
operating system.
If the straton Runtime is started manually on the target PC (e.g. during boot up of the operating system),
the PLC code has to be loaded manually to the target platform with the straton Workbench. For that
enter the correct parameters in the property dialog Workbench in the zenon Editor: Target
host and Target port
with this the straton Workbench establishes a connection to the target system.
now you can transfer the PLC code to the the target system via button Download; the progress
of the download is displayed with the help of a progress bar
after the download the PLC starts automatically with the new application.
if the download was successful and the PLC program runs on the target system faultless, RUN is
displayed in the tool bar
The straton RTK (Realtime Kernel) is the straton Runtime system for hard realtime. With that highest determinism
and failure safety towards the operating system are guaranteed.
The straton RTK can only be started with the straton Runtime Manager (flag Hard realtime has to be
activated) or or in a DOS-Shell/BAT-file.
The straton RTK is only available for the Windows operation systems XP (XPe) and VISTA.
The Realtime Kernel is designed, so that it triggers the straton Runtime cycle independent of Windows.
So the straton Runtime cycle is guaranteed to be executed deterministically. Cycle times must be 100 µs
or higher.
43
The PC's part of the calculating capacity can be set with a slider.
Depending on the size of the PLC application and the defined cycle time the slider has to be adjusted to
the PLC load. The slider can be set between 10% and 85%. The current load (bar) indicates whether the
allowed maximum for executing the PLC cycle is sufficient.
If the bar is near 100%, there is a danger of cycle overflows! In this case set the slider higher (towards
85%). If this is not possible because of the applications in Windows (e.g. bad screen opening times of
zenon) the cycle time of the straton application has to be increased.
Attention
If the bar reaches the 100% mark, there is a danger of cycle overflows!
44
Examplee
Slider at 10%, cycle time 10ms:
The straton RTK must process the PLC program in 1 ms which equals 10% of the set
cycle time of 10 ms.
The following formula can be used to find out, if the setting of the slider does not
lead to cycle overflows in combination with the cycle time:
Assumption:
Calculation:
(100/50)*274 = 548µs
This means that the defined cycle time of 1 ms is sufficient.
45
Attention
Please keep in mind: If you do not stick to the described formula, the determinism which is
based in the cycle time is not given anymore!
Current [µs] Current system latency (see also Runtime cycle (on page 38))
Maximum [µs] Maximum system latency (since the start of the Runtime)
Max. cal. time [µs] Maximal calculation time for a PLC cycle (since the the start of the
Runtime)
Min. cycle time [µs] Minimal cycle time (since the start of the Runtime)
46
Max. cycle time [µs] Maximal cycle time (since the start of the Runtime)
Cycle overflow [1] Counter for cycle time exceedance (since the start of the Runtime)
Driver overflow [1] Counter for failed PLC cycles of Windows (non-realtime) drivers (since
the start of the Runtime)
The value of the cycle time can always only be a multiple of the HAL Timer Periode (time basis). The
time basis depends on the selected timer and its time basis (see also straton RTK configuration (on page
49)). That means: A set cycle time of 10 ms of a hardware with a time basis of 122 µs is not executed
with exactly 10,000 ms but with 10,004 ms.
The hardware (PC or IPC) and the operating system (Windows® XP, XPe or Vista) must support ACPI:
ACPI-Multiprocessor-P
ACPI-Uniprocessor-PC
You can check whether your PC supports ACPI in the system control (system/device
manager/computer).
The straton RTK is supported from the following processor generations on:
Pentium II or younger
47
The straton Real Time Kernel (RTK) runs as a separate process on the hardware level independent of the
operating system. The straton Runtime runs on Windows®. The real-time-enabled straton RTK has a few
restrictions compared to the straton Runtime.
The following funciton blocks are not processed directly in the Kernel Mode, but only emulated:
Info
In order to determine exactly which function blocks the straton standard library supports,
use the feature of the configuration of the straton Workbench (main menu:
Project/Configuration/Upload).
After you have selected the configuration, the function blocks which are not supported are
marked red in the library.
The following straton I/O drivers are executed by the straton RTK in Kernel Mode (real time):
There is a small chance that the real time driver of the straton RTK must be registered and de-registered
manually. In order to do this start the command prompt via:
Start > execute > cmd.
48
Use the following syntax:
Register:
<Directory of the straton RTK>:\ stratonrtkvm -regsrv
De-register:
<Directory of the straton RTK>:\ stratonrtkvm -unregsrv
Double click the button for straton RTK Configurator in the windows control panel.
The window for editing the configuration opens. In the left window you see a menu tree with the
following options:
CDrtHAL configuration
Basic settings
Taskmanager
49
Hardware configuration
Log messages
In the right-hand window you can see information about the menu items and configure the RTK.
After the start menu item 'CDrtHal configuration' is active in the left-hand window of the configuration
software. In the right-hand window displays basic information about the configuration and the system:
High precision event timer Support depends on hardware: PCs certified for Windows Vista support this function.
50
RTK basic settings
Basic time as basis for the multiplication factor for the calculation of the cycle time
Which time is displayed on the selection list depends on the used hardware. This information is also
displayed on the start page of the RTK configuration. Available can be:
Interrupt-Controller APIC
Interrupt-Controller PIC
51
Profiles (real-time clock), basic times: 488 µs, 244 µs, 122 µs
Profiles (local APIC), basic times: choose anywhere between 50 - 500 µs
Unused (8254 Timer), basic times: choose anywhere between 50 - 500 µs
Real time source: depends on the operating system Select using list field (drop down).
Real time CPU: Select the CPU on which the process of the RTK should be carried out.
Basic time: Basic time of the timerticks. Depending on the real time source, the basic time is selected
from a list or entered freely. During operation the multiplication factor for the timer ticks refers to the
entered basic time.
Attention
When using Profile: real time source the kernel profiling must not be
activated under any circumstances as long as a straton RTK application is executed. For
more information about kernel profiling see:
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-
b18c4790cffd&displaylang=en
(http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-
b18c4790cffd&displaylang=en)
52
RTK Taskmanager
A seperate reserved storage area is needed for the communictation with the I/O drivers (e.g. Profibus)
which are executed in the kernel mode. straton RTK and the I/O driver system agree on an area on
which both have read and write access.
53
The configuration offers three settings:
Generally prohibit access to the Free access memory areas are a saftey risk with regards to malware. Thus access
physical memory. to the physical memory is prohibited in the shipping state. Basic setting.
Generally allow access to the Allows the communication to use the whole memory, straton RTK und Profibus
physical memory. set their communication areas randomly. Unsafe setting which is not
recommended.
Allow access to a defined . straton RTK and I/O driver have a strictley allocated memory area.
physical memory area.
54
Define memory area
In order to allocate a fixed memory area for straton and I/O driver, click on Access to the
physical memory in the left window and then on Allow access to defined physical memory area
in the right selection window.
Basic address Start address for the free memory. It can for example be determined with the help of the
Hilscher Tool (included in the delivery of the card).
55
RTK Logs
Messages from the RTK are displayed in the area Log messages.
By clicking button OK all changes are saved and the configurator is closed. If the system needs to reboot,
a corresponding message is displayed.
If you close the configurator by clicking the close symbol (X) or by clicking Cancel, a dialog appears
asking whether you want to save the changes.
56
If the straton RTK is configured for stopping in case of a BSOD, the shut down program - if defined - is
executed immediately, i.e. before the theoretically next cycle.
If the straton RTK is configured to continue running, the next cycle is executed after a short delay of ca.
10 ms (switching the graphics mode).
In order to achieve this, the straton function RTK_OnBugCheck of the straton standard library must be
set to TRUE in the straton application.
Attention
In case of a BSOD the execution of the straton application can be limited.
File operations, TCP functions, functions of the serial interface, no real time field bus driver,
system clock functions, RETAIN variables, writing log messages (changes reserved by
product version cycles).
In order to check in the straton application if a BSOD has occurred, use the straton function
RTK_IsBugCheck.
No restart after stop (keeping outputs): If this option is active, the outputs of the Profibus I/Os
remain set after the shut down. Otherwise the outputs would be set to the defined alternate values after
the shut down sequence.
57
0x00000000 If an error occured in the straton RTK, usually the error is explained in a message: The log
message with the error code 0x00000000 can be ignored.
0x00000001 – Is an error code of the straton virtual machine (COPALP error message).
0x0000FFFF
0xFFFF01, 0xFFFF02 Error loading the non-realtime bus drivers: probable reason: incompatible (old) version of
one or more bus driver(s).
0xFFFFF001 Make sure, that the rtHAL driver has been installed correctly. If the problem still exists,
contact your zenon support and tell them the Windows version (service pack, hot fix, ...)
and the used Windows HAL. The name of the used HAL is shown in the device manager
under computer.
0x0 No error
58
0x7 STOP could not be executed.
#define T5RET_OK 0
#define T5RET_ERROR 1
#define T5RET_BADCODE 2 /* invalid app code - bad header */
#define T5RET_BADCODETARGET 3 /* invalid code - bad target id */
#define T5RET_BADCODEVERSION 4 /* invalid code - bad version */
#define T5RET_EXECSIZE 5 /* exec buffer overflow */
#define T5RET_BADREQUEST 6 /* unknown comm request */
#define T5RET_SERVEREAD 7 /* cannot process read request */
#define T5RET_UNKNOWNTIC 8 /* unknocn tic code */
#define T5RET_DATA8OVERFLOW 9 /* too many DATA8 used */
#define T5RET_DATA16OVERFLOW 10 /* too many DATA16 used */
#define T5RET_DATA32OVERFLOW 11 /* too many DATA32 used */
#define T5RET_DIVZERO 12 /* division by 0 in TIC (32bit) */
#define T5RET_TIMEOVERFLOW 13 /* too many TIME variables */
#define T5RET_CANTACTIME 14 /* active timers not supported */
#define T5RET_SAFETICLOOP 15 /* awful loop in TIC (safe mode) */
#define T5RET_OUTOFTIC 16 /* TIC code ointer out of range */
#define T5RET_UNKNOWNSTF 17 /* not supported std function */
#define T5RET_LDIVZERO 18 /* division by 0 in TIC (64bit) */
#define T5RET_DATA64OVERFLOW 19 /* too many DATA64 used */
#define T5RET_STRINGOVERFLOW 20 /* too many strings */
#define T5RET_SDIVZERO 21 /* division by zero in TIC (8 bit) */
#define T5RET_WDIVZERO 22 /* division by zero in TIC (16 bit) */
#define T5RET_HOTRESOURCES 23 /* HOT restart: system resources used */
#define T5RET_HOTMAP 24 /* invalid var map in hot restart */
#define T5RET_HOTACTIME 25 /* change of active timer map */
#define T5RET_HOTSTAMP 26 /* bad build stamp for hot restart */
#define T5RET_HOTSFC 27 /* SFC changed - no hot restart! */
#define T5RET_HOTRETAIN 28 /* retain def has changed - no hot */
#define T5RET_HOTFORMAT 29 /* bad DB format - no hot restart! */
#define T5RET_CYCLEOVERFLOW 30 /* cycle time overflow */
#define T5RET_RETAINSTORING 31 /* cant store retain variables */
#define T5RET_ARRAYBOUND 32 /* array index out of bounds */
#define T5RET_RECURSE 33 /* recursive call of sub-program */
#define T5RET_XVOVERFLOW 34 /* too many external variables used */
#define T5RET_NOBSAMPLING 35 /* sampling trace not supported */
#define T5RET_TASKOVERFLOW 36 /* too many tasks */
#define T5RET_HOTCALLSTACK 37 /* call stack overflow (hot) */
#define T5RET_STACKOVER 38 /* stack overlow */
#define T5RET_HOTASI 39 /* cannot hot restart ASi */
#define T5RET_TOXC 40 /* OXC limit reached */
#define T5RET_WOXC 41 /* OXC info */
59
straton can be used redundantly and offers the possibility to combine the zenon redundancy with the straton
redundancy.
Further terms:
Windows XP
Windows Vista
Windows 7
Windows CE
5.8.1 Requirements
Two PCs are necessary for SCADA logic redundancy. The both PCs are connected via Ethernet TCP/IP
(100 MBit, recommended 1 GBit).
Attention
The SCADA logic redundancy demands that both systems, zenon and straton, are installed
on one PC.
We recommend to set the cycle time of the straton project to twice the cycle time of a single project, but
at least to 50 ms.
60
Since SCADA logic implies that straton and zenon communicate with each other using the shared
memory driver (straton to zenonRT connection), it must be guaranteed that the zenon server and the
active straton Runtime run on the same PC.
In order to prevent a one-sided switching from straton or zenon, a synchronization between the straton
Runtime and the zenon Runtime must be engineered. For this a watchdog is used.
The status of the zenon project (stand alone/server/standby server/client) is transferred via the shared
memory command area and is evaluated by the redundancy function block. It has a freely definable time
out value as input. As output binary values for redundancy switch and active, passive and failed
Runtimes etc. are output. They determine the reaction of the straton Runtime.
To make it clear from which zenon project the watchdog or the status originates,
the zenon Runtime driver or the shared memory area must have the zenon project GUID
the zenon Runtime driver or the shared memory area must have the straton project name
A watchdog generated by the zenon Runtime driver is transferred via the shared memory command area
and evaluated in zenon. This evaluation takes place in accordance with the settings of properties Failure
recognition after [s] and Function for failure recognition. They define a time out time and a
function (normally Exit Runtime).
In order for the correct watchdog to be evaluated, it must be clear for several active straton projects
from which straton project the watchdog originated. For this:
61
the zenon Runtime driver or the shared memory area must have the straton project name
Attention
The start of the zenon Runtime must not be performed from the zenon Editor but with a
direct call from the zenon Runtime!
The zenon redundancy must be set up. Details: See help chapter Network.
62
To activate redundancy:
activate property Redundant operation in group Runtime of the properties of the straton
project in zenon
define
Failure recognition after [s]
Function for failure recognition
The settings for redundancy are made in tab Redundancy (on page 29) auf the driver settings.
With the watchdog each side checks the other for changes to this counter. If the counter for a projected
time is not changed, this is reported to the program:
zenon: a function configured in an integrated project is carried out (Function for failure
recognition)
Info
If straton Runtime is a started manually, the following command line settings (on page 34)
must be made:
zenon path:
ZENPATH=<Pfad>
63
REDZENON=<0,1>
straton Runtime executes code, timeout is <> 0 and Runtime can be assigned to an integrated
straton project
With the Function for failure recognition property, a function is selected that is executed as soon as
the time-out defined in Failure recognition after [s] for the watchdog has expired. The watchdog is
only rechecked if Runtime is registered again.
If a function from another project is used, the project must already have been loaded when the project
with the integrated straton project is loaded.
The straton zenRt driver connection can be logged with the diagnosis Viewer. The module name is
straton. Each message contains the name of the zenon project and the name of the straton project. The
logging includes:
Error
zprj:<z-project> sprj:<s-project> Runtime <Runtime Process ID> watchdog expired.
Runtime watchdog was not operated by Runtime for too long.
zprj:<z-project> sprj: <s-project> Runtime: <Runtime process ID> Unknown straton project.
straton Project cannot be assigned to an integrated zenon project.
64
Warnings
vm: <Vm process ID> zenon project '<Name>' unknown
Name of the straton projects is not known in zenon.
If the zenon time-out failure recognition is <> 0, the zenon watchdog is checked on an ongoing basis.
This check takes place if:
Code is executed
The number of switch attempts count up in the time-out cycle. If the straton Runtime project cannot be
assigned to a zenon network project, the network timeout time (Timeout [s] property in Network
group) is added to the failure recognition time (Failure recognition after [s] property). The time that
the ERROR output is active is now no longer MAX_SWITCH * cycle but MAX_SWITCH *
timeout [+ network timeout].
In this OEM specification the possibilities of the COPA-DATA straton Runtime are described which are
referred to in the straton Workbench help with "see OEM specification".
As a standard the straton Workbench contains several features and an extensive library of functions and
function blocks.. Depending on the Runtime configuration, some features or blocks may be not
available. Therefore it is possible to select configurations for the Workbench in order to highlight the
features which are not supported by the Runtime.
In the straton Workbench a list of this configurations is available under Project -> Configuration.... This can
change with the product/version cycle.
65
This function makes it possible to read and write files sequentially.
CE
RT (PC)
RTK (PC)
CE
RT (PC)
The possible paths vary depending on the operation system (XP,Vista). Keep in mind that under
Windows Vista some directories are write-protected if the UAC (User Account Control) is activated.
The execution of the SFC program equals that of a T5 standard target system und follows the
information of the straton Workbench help.
A maximum of 65535 Binding variables can be published in the network. However this value is reduced
by every variable which is sent to zenon using the event service.
66
This feature is supported by all straton target systems (RT, CE, RTK). All C compilers which are normally
proposed by the straton Workbench can be used. Only use the default name of the created
Runtime-DLL.
PrintF (function) x x x
DTFORMAT (function) x x x
GETSYSINFO (function) - x x x
_SYSINFO_CYCLESTAMP_MS
Variable status bits x -1 x
DAY_TIME (function) x x x
Key:
67
x: Supported
-: Not supported
1: Driver which support the variable status bits are only emulated or not supported by the straton RTK.
Therefore no access is granted to the status bits or the time stamps.
The straton Runtime from COPA-DATA saves its RETAIN variables after every cycle if a value changed.
The place where data is stored can be varying. Normally the values of the RETAIN variable are saved in
the instances path (handover parameter PATH). Depending on the system, it can be the hard disk or a
flash card.
Some straton I/O drivers support saving the RETAIN values to the SRAM (battery buffered RAM), e.g.
the ThinkIO/System758 driver.
In order for the RETAIN values to be loaded when the PLC application is restarted, the straton Runtime
must be started with the corresponding handover parameters/settings (cold start - load RETAIN
variables).
You can find more information about supported I/O drivers here: straton I/O driver support (on page
68)
You can find information about the support of Online Change or Hot Restart here: straton I/O driver:
Hot-Restart/Online Change (on page 70)
68
Anybus Configuration x E -
ApplicomIO Configuration x E -
AS-interface x - -
BECKHOFF CX1000 - - x
Brodersen IOTOOLS x E -
CAN-bus - - -
Interbus-S x E -
PROFINET IO x E x
SoftNet ProfibusDP x E -
Wago 750-860 - - -
69
XFlow - - -
x: Fully supported
-: Not supported
E: Carried out as emulation (performance loss possible, determinism is limited in the PLC cycle, driver
selection at a BSOD)
1: The driver specific function blocks do not work under straton RTK.
The straton I/O drivers support the Hot-Restart or Online Change in different ways:
Anybus Configuration x x x1
ApplicomIO Configuration x x x1
AS-interface x x x1
BECKHOFF CX1000 x x -
Brodersen IOTOOLS x x x1
70
IEC 61850 Client x x -
Interbus-S x x -
PROFINET IO x x -
SoftNet ProfibusDP x x x1
x: Functionality available
1: Online Change including the change of the bus driver configuration is always followed by the
reinitialization of the I/O driver. Because of the reinitialization I/Os can fail for a short period!
71
The straton Runtime Manager administrates all straton Runtime projects, which are stand alone or must
be started manually, on your computer. It does not matter whether there is a zenon Runtime installed on
the computer.
If you created your straton project in zenon and you set the zenon property of the straton
project RT start type to start manually, the straton Runtime Manager is the ideal tool for
organizing the parameters for the manual start.
If you want to start your straton Runtime project during the booting of the Windows operating
system, you can set this with one mouse click in the straton Runtime Manager.
If you want to reorganize your straton project, you can do this with the straton Runtime
Manager.
If you want to run the straton Runtime autarchically (without the zenon Runtime), it is best to
call up the straton Runtime instance using the straton Runtime Manager.
Exit: Exits the program - Do not forget to save the settings before you exit the straton
Runtime Manager!
72
Place the mouse cursor over an element in the straton Runtime Manager in order to see the
corresponding help text in the property help.
In addition all elements of the straton Runtime Managers are described here:
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
73
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
74
6.3.6 Startup
Define the startup behavior of the straton Runtime instance.
Cold start (load RETAIN variables) - The straton Runtime starts initialized with remanent
markers.
Hot restart - The straton Runtime starts with the variable values from the time the Runtime was
stopped.
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
75
Info
We recommend to always have the real time priority activated. First and foremost
deactivating the real time priority is used for testing purposes (e.g. if there may be infinite
loops).
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
76
Info
Writing a log file will influence the performance.
Info
The log file is named "straton RTLOG.txt" and is saved in the straton Runtime project
folder.
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
Info
Before you are able to edit any setting which you have already saved, you must first select
the concerning configuration in the list. After that click on button Edit. In order to save
the changes, click on button Save.
77
6.3.12 Button "New"
If you want to create a configuration, click on button New. After that a dialog opens in which you can
select the folder in which you want to save the <CA_PRODUCTNAME< Runtime files (the PLC code).
Confirm your selection with OK. You can change the name of the configuration. In order to save the
configuration and the name of the configuration, click on Save.
78
Info
If the folder of the configuration does not contain any straton Runtime files (PLC code), the
straton Runtime starts in mode No program.
79