Copadata - IEC870 Driver
Copadata - IEC870 Driver
Copadata - IEC870 Driver
IEC870
v.7.60
©2017 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 qualities in the legal sense. Subject to change, technical or
otherwise.
Contents
2. IEC870 ......................................................................................................................................... 5
5. Requirements .............................................................................................................................. 8
6. Configuration .............................................................................................................................. 8
6.1 Creating a driver .......................................................................................................................................... 9
6.2 Settings in the driver dialog ...................................................................................................................... 12
6.2.1 General ....................................................................................................................................... 13
6.2.2 Com ............................................................................................................................................ 16
6.2.3 Basic setting ................................................................................................................................ 17
6.2.4 Connections ................................................................................................................................ 18
3
10. Interoperability ......................................................................................................................... 58
4
Welcome to COPA-DATA help
ZENON VIDEO-TUTORIALS
You can find practical examples for project configuration with zenon in our YouTube channel
(https://www.copadata.com/tutorial_menu). The tutorials are grouped according to topics and
give an initial insight into working with different zenon modules. All tutorials are available in
English.
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]
(mailto:[email protected]).
PROJECT SUPPORT
You can receive support for any real project you may have from our Support Team, who you can contact
via email at [email protected] (mailto:[email protected]).
If you find that you need other modules or licenses, our staff will be happy to help you. Email
[email protected] (mailto:[email protected]).
2. IEC870
Driver for the IEC 60870-5-101 (serial) and the IEC 60870-5-104 (TCP/IP) protocol.
5
IEC870 - Data sheet
Attention
Only one variable per address can be created.
If several variables are created, this can lead to unwanted behavior in Runtime.
Connections in accordance with 870-104 (TCP/IP) and 870-101 (serial) should not be created together in a
driver instance. The slower serial connection (101) would also slow down the TCP/IP connection (104). It
could even lead to a TCP/IP timeout.
If you need both connections, create the connections for 101 and 104 in two separate instances.
PLC types PLCs supporting the IEC 60870-5-101 or the IEC 60870-5-104
protocol.
Driver supports:
Addressing: Address-based X
Addressing: Name-based --
Spontaneous X
communication
6
IEC870 - Data sheet
Polling communication X
Online browsing X
Offline browsing --
Real-time capable X
Blockwrite --
Modem capable --
Serial logging X
RDA numerical --
RDA String --
Hysteresis X
extended API --
alternative IP address X
Requirements:
Software PC --
Hardware PLC --
Software PLC --
Requires v-dll X
Platforms:
7
Driver history
4. Driver history
Date Driver version Change
07.07.08 4500 Created driver documentation
9/26/2008 4700 Updated interoperability list.
23.03.2010 6000 Values from Buffered Reports are transferred to the archive at
Runtime start.
DRIVER VERSIONING
The versioning of the drivers was changed with zenon 7.10. There is a cross-version build number as of
this version. This is the number in the 4th position of the file version,
For example: 7.10.0.4228 means: The driver is for version 7.10 service pack 0, and has the build number
4228.
Expansions or error rectifications will be incorporated into a build in the future and are then available
from the next consecutive build number.
Example
A driver extension was implemented in build 4228. The driver that you are using is build
number 8322. Because the build number of your driver is higher than the build number
of the extension, the extension is included. The version number of the driver (the first
three digits of the file version) do not have any significance in relation to this. The drivers
are version-agnostic
5. Requirements
This chapter contains information on the requirements that are necessary for use of this driver.
6. Configuration
In this chapter you will learn how to use the driver in a project and which settings you can change.
8
Configuration
Information
Find out more about further settings for zenon variables in the chapter Variables
(main.chm::/15247.htm) of the online manual.
In the Create driver dialog, you create a list of the new drivers that you want to create.
9
Configuration
Parameter Description
Available drivers List of all available drivers.
The display is in a tree structure:
[+] expands the folder structure and shows the drivers
contained therein.
[-] reduces the folder structure
Default: no selection
Driver name Unique Identification of the driver.
Default: Empty
The input field is pre-filled with the pre-defined
Identification after selecting a driver from the list of
available drivers.
Driver information Further information on the selected driver.
Default: Empty
The information on the selected driver is shown in this
area after selecting a driver.
CLOSE DIALOG
Option Description
OK Accepts all settings and opens the driver configuration dialog of
the selected driver.
Cancel Discards all changes and closes the dialog.
Help Opens online help.
Information
The content of this dialog is saved in the file called Treiber_[Language].xml. You can find
this file in the following folder: C:\ProgramData\COPA-DATA\zenon[version
number].
10
Configuration
3. Select the desired driver and name it in the Driver name input field.
This input field corresponds to the Identification property. The name of the selected driver is
automatically inserted into this input field by default.
The following is applicable for the Driver name:
The Driver name must be unique.
If a driver is used more than once in a project, a new name has to be given each time.
This is evaluated by clicking on the OK button. If the driver is already present in the project,
this is shown with a warning dialog.
The Driver name is part of the file name.
Therefore it may only contain characters which are supported by the operating system.
Invalid characters are replaced by an underscore (_).
This name cannot be changed later on.
4. Confirm the dialog by clicking on the OK button.
The configuration dialog for the selected driver is opened.
The language of driver names cannot be switched. They are always shown in the language in
which they have been created, regardless of the language of the Editor. This also applies to driver object
types.
11
Configuration
If there is already a driver in the project, this is shown in a dialog. The warning dialog is closed by clicking
on the OK button. The driver can be named correctly.
Information
Only the required drivers need to be present in a zenon project. Drivers can be
added at a later time if required.
12
Configuration
6.2.1 General
The configuration dialog is opened when a driver is created. In order to be able to open the dialog later
for editing, double click on the driver in the list or click on the Configuration property.
13
Configuration
Option Description
Mode Allows to switch between hardware mode and simulation mode
Hardware:
A connection to the control is established.
Simulation - static:
No communication between to the control is established,
the values are simulated by the driver. In this modus the
values remain constant or the variables keep the values
which were set by zenon Logic. Each variable has its own
memory area. E.g. two variables of the type marker with
offset 79 can have different values in the Runtime and do
not influence each other. Exception: The simulator driver.
Simulation - counting:
No communication between to the control is established,
the values are simulated by the driver. In this modus the
driver increments the values within a value range
automatically.
Simulation - programmed:
No communication is established to the PLC. The values are
calculated by a freely programmable simulation project. The
simulation project is created with the help of the zenon Logic
Workbench and runs in a zenon Logic Runtime which is
integrated in the driver. For details see chapter Driver
simulation (main.chm::/25206.htm).
Keep update list in the memory Variables which were requested once are still requested from the
control even if they are currently not needed.
This has the advantage that e.g. multiple screen switches after
the screen was opened for the first time are executed faster
because the variables need not be requested again. The
disadvantage is a higher load for the communication to the
control.
Output can be written Active: Outputs can be written.
Inactive: Writing of outputs is prevented.
: Not available for every driver.
Variable image remanent This option saves and restores the current value, time stamp and
the states of a data point.
Fundamental requirement: The variable must have a valid value
and time stamp.
The variable image is saved in mode hardware if:
one of the states S_MERKER_1(0) up to S_MERKER8(7),
REVISION(9), AUS(20) or ERSATZWERT(27) is active
14
Configuration
15
Configuration
CLOSE DIALOG
Options Description
OK Applies all changes in all tabs and closes the dialog.
Cancel Discards all changes in all tabs and closes the dialog.
Help Opens online help.
6.2.2 Com
For this driver, only COM port and baud rate for the communication can be changed. All other
communication parameters are defined and fixed in accordance with the IEC 870-5-101 standard.
Values:
Parity: even
Stopbit: 1
Start bit: 1
Data bit: 8
16
Configuration
For details see: 870-5-1 "Part 5: Transmission protocols, Section One - Transmission frame formats".
Parameters Description
Configuration file name Enter the name of the configuration file here. This file is required
for the definition of the driver connection.
Deactivate standard DPI/DCS value Inactive(default): The values of double messages (DPI and
mapping DCS) are adjusted to the operating elements of zenon. Use this
configuration if you want to use the modules of zenon Energy.
The driver converts the values of double messages (DPI and DCS)
for the Runtime:
intermediate | off | on | fault
to: 2 | 0 | 1 | 3,
so that in Runtime, for example, the value 0 means OFF and 1
means ON.
17
Configuration
Default: 60 s
6.2.4 Connections
18
Configuration
Sectors
( : configured sectors must be present in the PLC)
Parameter Description
Devices List of configured devices and sectors.
New Device Opens the dialog to configure new devices (on page 20).
New Sector Opens the dialog to configure new sectors (on page 25).
Delete Deletes selected entry from the list.
Edit Opens the selected entry for editing.
CLOSE DIALOG
Options Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.
Help Opens online help.
Attention
Only one variable per address can be created.
If several variables are created, this can lead to unwanted behavior in Runtime.
19
Configuration
Device
A connection to a Device consists of a physical device connection and several sectors (Common Address
of ASDU) within this device. Each device is identified by the Net address by Runtime side and by the link
address or IP address by the protocol.
DEVICE
20
Configuration
Parameter Description
Net address Net address of Runtime. Serial number of the configured
connection.
Each connection should have a unique number. An
automatic check of whether a number has already been issued is
not carried out by zenon.
Device name Approved name of the device: Name of the device that is displayed
in the list.
Use short names. This name becomes part of the variable
name during online import.
APPLICATION LAYER
Application level of the driver. Match the configuration in this area to that of your PLC. There will be no
communication with the PLC if the configuration is incorrect.
21
Configuration
Parameter Description
ASDU COT size Defines the length of the COT (cause of transmission).
Selection of address size from drop-down list. Valid:
1 octet
2 octets
If the 60870-5-104 (TCP/IP) connection type is selected
for link layer, the value 2 octets is expected in accordance with
the standard. Only change the default value for a connection with
a non-compliant PLC.
ASDU COA size Defines the length of the COA (Common Object Address/Common
Address of ASDU).
Selection of address size from drop-down list:
1 octet
2 octets
If the 60870-5-104 (TCP/IP) connection type is selected
for link layer, the value 2 octets is expected in accordance with
the standard. Only change the default value for a connection with
a non-compliant PLC.
ASDU IOA size Defines the length of the IOA (Information Object Address).
Selection of address size from drop-down list. Valid:
1 octet
2 octets
3 octets
If the 60870-5-104 (TCP/IP) connection type is selected
for link layer, the value 3 octets is expected in accordance with
the standard. Only change the default value for a connection with
a non-compliant PLC.
Originator Numerical identification of the IEC60870 master. The identification
is sent to the controller in commands. The PLC can thus distinguish
commands from different masters.
The value of the originator is only sent if, for ASDU COT-Size, the
value 2 octets is configured.
The entry is validated. An error dialog is called up if the entry is
invalid.
Default: 0
Input range: 0 - 255
Grayed out if, for ASDU COT-Size, the value 1 octet is
configured.
Timestamps are UTC Checkbox to select the expected time format.
If this checkbox is activated, the time stamp in UTC format is
22
Configuration
LINK LAYER
Configuration of the physical connection for communication with serial interface or via TCP/IP.
SERIAL COMMUNICATION
Parameter Description
870-101 Selected: Serial connection is made in accordance with
60870-5-101.
Default: 1 octet
Parameter Description
870-104 Selected: Connection is made via the network in accordance
with 60870-5-104.
Only active if Link layer is 60870-5-101 (Serial).
Primary connection Addressing of the primary connection of the controller.
IP address IP address of PLC.
Only active if Link layer is 60870-5-101 (Serial).
Port Portnumber for primary IP_address.
Default: 2404
23
Configuration
Activate this property only if you are sure that the controller
supports the guidelines of Edition 2 for redundancy.
Only active if Link layer is 60870-5-101 (Serial).
TIMING PARAMETERS
Parameter Description
T1 Timeout for frame confirmation by the master.
Value range: 0 - 4294967295
Default: 15000
T2 Timeout, within which the master should confirm if no data is
exchanged.
Value range: 0 - 4294967295
Default: 10000
T3 Time after which a U-frame is sent to the master if no data is to be
transferred.
Value range: 0 - 4294967295
Default: 20000
K Number of maximum I-frames not yet confirmed by the master.
Value range: 0 - 4294967295
Default: 12
24
Configuration
NAVIGATION
§§Trenner
Attention
Only one variable per address can be created.
If several variables are created, this can lead to unwanted behavior in Runtime.
Sectors
Every device can contain several sectors. Every sector is a structural element by definition and can
contain several data points. The sectors must be defined for special commands (e.g. “„general
interrogation”) in the driver configuration.
25
Creating variables
Parameters Description
SCADA Settings in the SCADA .
Name Sector name.
IEC Settings on protocol side.
COA The COMMON ADDRESS OF ASDUs (IEC 60870-5-101 7.2.4)
by which the sector is addressed. This number must be
unique on the device (1 ... 254).
CLOSE DIALOG
Option Description
OK Applies settings and closes the dialog.
Cancel Discards all changes and closes the dialog.
Information
All sectors configured in the driver dialog (COAs) must be present in the PLC!
7. Creating variables
This is how you can create variables in the zenon Editor:
VARIABLE DIALOG
26
Creating variables
1. Select the New variable command in the Variables node in the context menu
27
Creating variables
Property Description
Name Distinct name of the variable. If a variable with the same name already
exists in the project, no additional variable can be created with this name.
Maximum length: 128 characters
The characters # and @ are not permitted in variable names. If
non-permitted characters are used, creation of variables cannot be
completed and the Finish button remains inactive.
For some drivers, the addressing is possible over the property
Symbolic address, as well.
Driver Object Type Select the appropriate driver object type from the drop-down list.
(cti.chm::/28685.htm)
28
Creating variables
Data Type Select the desired data type. Click on the ... button to open the selection
dialog.
Array settings Expanded settings for array variables. You can find details in the Arrays
chapter.
Addressing options Expanded settings for arrays and structure variables. You can find details
in the respective section.
Automatic element Expanded settings for arrays and structure variables. You can find details
activation in the respective section.
SYMBOLIC ADDRESS
The Symbolic address property can be used for addressing as an alternative to the Name or Identification
of the variables. Selection is made in the driver dialog; configuration is carried out in the variable
property. When importing variables of supported drivers, the property is entered automatically.
7.2 Addressing
The data points are addressed via a COA (common object address), an IOA (information object address)
and the IEC870 Type. The type defines the function of the variable (see interoperability (on page 58)
list). The COA corresponds to the sector of the device in which the variable resides. The IOA determines
the offset in that sector.
29
Creating variables
Property Description
Name Freely definable name.
For every zenon project the name must be unambiguous.
Identification Freely definable identification.
E.g. for Resources label, comments, ...
Net address Network address of variable.
This address is used to define the allocation to the device specified in the driver
configuration. The Net address used there must be entered in the variable configuration
accordingly.
Data block not used for this driver
Offset not used for this driver
Alignment not used for this driver
Bit number not used for this driver
String length Only available for String variables.
Maximum number of characters that the variable can take.
Driver Object type of the variables. Depending on the driver used, is selected when the variable is
connection created and can be changed here.
/Driver Object
Type
Driver Data type of the variable. Is selected during the creation of the variable; the type can be
connection/Data changed here.
Type
If you change the data type later, all other properties of the variable must be
checked and adjusted, if necessary.
IEC870 type Defines the type and function of the variable according to the IEC870 specification.
IEC870 COA1 Corresponds to the sector of the device in which the variable resides.
The current connection status can be requested via a USINT "internal state (T00)" variable. If the
value of this variable is 5, this means that a connection is active and that the general request was
finished successfully.
The communication is spontaneous, This means that all value changes of the PLC are processed by the
driver.
Example:
The PLC sends three value changes at intervals of 5 ms, which are passed on to zenon. If the changes
occur within the update time, in which the driver cyclically reads telegrams, the single telegram contains
30
Creating variables
Driver objects are areas available in the PLC, such as markers, data blocks etc. Here you can find out
which driver objects are provided by the driver and which IEC data types can be assigned to the
respective driver objects.
DRIVER OBJECT TYPES AND SUPPORTED IEC DATA TYPES FOR PROCESS VARIABLES IN
ZENON
X => supported
31
Creating variables
All variables in zenon are derived from IEC data types. The following table compares the IEC datatypes
with the datatypes of the PLC.
32
Creating variables
MAPPING OF THE DATA TYPES FROM THE PLC T O ZENON DATA TYPES
C_DC_NA_1 46 USINT 9
C_DC_TA_1 59 USINT 9
C_RC_NA_1 47 USINT 9
33
Creating variables
C_RC_TA_1 60 USINT 9
C_SE_NA_1 48 REAL 5
C_SE_TA_1 61 REAL 5
C_SE_NB_1 49 INT 1
C_SE_TB_1 62 INT 1
C_SE_NC_1 50 REAL 5
C_SE_TC_1 63 REAL 5
C_BO_NA_1 51 UDINT 4
C_BO_TA_1 64 UDINT 4
1) Time tag CP24Time2a only contains mm:ss.ms; is used for the time stamp of the variable, whereby
the driver uses the PC clock to supplement the missing information. If the minute value is higher than
that of the PC clock, the driver automatically sets the time back one hour.
Time tag CP56Time2a is used for the time stamp of the variable.
The property Data type is the internal numerical name of the data type. It is also used for the
extended DBF import/export of the variables.
Variables can also be imported by importing them. The XML and DBF import is available for every driver.
Information
You can find details on the import and export of variables in the Import-Export
(main.chm::/13028.htm) manual in the Variables (main.chm::/13045.htm) section.
34
Creating variables
During XML import of variables or data types, these are first assigned to a driver and then analyzed.
Before import, the user decides whether and how the respective element (variable or data type) is to be
imported:
Import: The element is imported as a new element.
Overwrite: The element is imported and overwrites a pre-existing element.
Do not import: The element is not imported.
The actions and their durations are shown in a progress bar during import.
REQUIREMENTS
Hint
You can find further information on XML import in the Import - Export manual, in the
XML import (main.chm::/13046.htm) chapter.
35
Creating variables
Information
Import and Export via CSV or dBase supported; no driver specific variable settings, such
as formulas. Use export/import via XML for this.
Information
Note:
Driver object type and data type must be amended to the target driver in the DBF file in
order for variables to be imported.
dBase does not support structures or arrays (complex variables) at import.
36
Creating variables
Attention
DBF files:
must correspond to the 8.3 DOS format for filenames (8 alphanumeric characters for
name, 3 character suffix, no spaces)
must not have dots (.) in the path name.
e.g. the path C:\users\John.Smith\test.dbf is invalid.
Valid: C:\users\JohnSmith\test.dbf
must be stored close to the root directory in order to fulfill the limit for file name length
including path: maximum 255 characters
The format of the file is described in the chapter File structure.
Information
dBase does not support structures or arrays (complex variables) at export.
The dBaseIV file must have the following structure and contents for variable import and export:
37
Creating variables
Attention
dBase does not support structures or arrays (complex variables) at export.
DBF files must:
conform with their name to the 8.3 DOS format (8 alphanumeric characters for name, 3
characters for extension, no space)
Be stored close to the root directory (Root)
STRUCTURE
KANAL_D Log 1 The variable is deleted with the 1 entry (field/column has to be
created by hand).
TAGNR C 128 Identification.
The length can be limited using the MAX_LAENGE entry in
project.ini.
38
Creating variables
LES_SCHR L 1 Write-Read-Authorization
0: Not allowed to set value.
1: Allowed to set value.
MIT_ZEIT R 1 time stamp in zenon (only if supported by the driver)
OBJEKT N 2 Driver-specific ID number of the primitive object
comprises TREIBER-OBJEKTTYP and DATENTYP
SIGMIN Float 16 Non-linearized signal - minimum (signal resolution)
SIGMAX F 16 Non-linearized signal - maximum (signal resolution)
ANZMIN F 16 Technical value - minimum (measuring range)
ANZMAX F 16 Technical value - maximum (measuring range)
ANZKOMMA N 1 Number of decimal places for the display of the values
(measuring range)
UPDATERATE F 19 Update rate for mathematics variables (in sec, one decimal
possible)
not used for all other variables
MEMTIEFE N 7 Only for compatibility reasons
HDRATE F 19 HD update rate for historical values (in sec, one decimal
possible)
HDTIEFE N 7 HD entry depth for historical values (number)
NACHSORT R 1 HD data as postsorted values
DRRATE F 19 Updating to the output (for zenon DDE server, in [s], one
decimal possible)
HYST_PLUS F 16 Positive hysteresis, from measuring range
HYST_MINUS F 16 Negative hysteresis, from measuring range
PRIOR N 16 Priority of the variable
REAMATRIZE C 32 Allocated reaction matrix
ERSATZWERT F 16 Substitute value, from measuring range
SOLLMIN F 16 Minimum for set value actions, from measuring range
SOLLMAX F 16 Maximum for set value actions, from measuring range
VOMSTANDBY R 1 Get value from standby server; the value of the variable is not
requested from the server but from the Standby Server in
redundant networks
RESOURCE C 128 Resources label.
Free string for export and display in lists.
The length can be limited using the MAX_LAENGE entry in
project.ini.
39
Creating variables
Attention
When importing, the driver object type and data type must be amended to the target
driver in the DBF file in order for variables to be imported.
40
Creating variables
Expressions in the column "Comment" refer to the expressions used in the dialog boxes for the
definition of variables. For more information, see chapter Variable definition.
41
Creating variables
Variables can only be create by driver online import in message direction (T01..T39). You must create
variables for the commands (T45..T64) manually, because the commands are write-only in the IEC
60870 protocol. It is not possible to read their addressing using the controller.
You can find the online import in the driver list in the context menu of the driver.
After that, a "general interrogation command" (GI) is sent to the selected device and all contained
variables are displayed in a list.
After the GI is finished, you will see a dialog for selecting the variables to be imported:
Add a variable to the variables to be imported by double-clicking on it or by selecting it and pressing the
"Add" button. Press the button OK to create all selected variables in zenon. The addressing is taken over
from the device.
The driver kit implements a number of driver variables. This variables are part of the driver object type
Communication details. These are divided into:
Information
Configuration
Statistics and
42
Creating variables
Error message
The definitions of the variables implemented in the driver kit are available in the import file drvvar.dbf
(on the installation medium in the \Predefined\Variables folder) and can be imported from
there.
Variable names must be unique in zenon. If driver variables of the driver object type
Communication details are to be imported from drvvar.dbf again, the variables that were imported
beforehand must be renamed.
Information
Not every driver supports all driver variables of the driver object type Communication
details.
For example:
Variables for modem information are only supported by modem-compatible drivers
Variables for the polling cycle only for pure polling drivers
Connection-related information such as ErrorMSG only for drivers that only edit one
connection at a a time
43
Creating variables
INFORMATION
44
Creating variables
0: Connection OK
1: Connection failure
2: Connection simulated
Formating:
<Netzadresse>:<Verbindungszustand
>;…;…;
CONFIGURATION
45
Creating variables
46
Creating variables
STATISTICS
MaxUpdateTimeNormal UDINT 56 Time since the last update of the priority group
Normal in milliseconds (ms).
MaxUpdateTimeHigher UDINT 57 Time since the last update of the priority group
Higher in milliseconds (ms).
MaxUpdateTimeHigh UDINT 58 Time since the last update of the priority group
High in milliseconds (ms).
MaxUpdateTimeHighest UDINT 59 Time since the last update of the priority group
Highest in milliseconds (ms).
ERROR MESSAGE
47
Driver-specific functions
ErrorTimeDW UDINT 2 Time (in seconds since 1.1.1970), when the last error
occurred.
ErrorTimeS STRING 2 Time (in seconds since 1.1.1970), when the last error
occurred.
RdErrPrimObj UDINT 42 Number of the PrimObject, when the last reading error
occurred.
RdErrStationsName STRING 43 Name of the station, when the last reading error occurred.
RdErrBlockCount UINT 44 Number of blocks to read when the last reading error
occurred.
RdErrHwAdresse DINT 45 Hardware address when the last reading error occurred.
RdErrDatablockNo UDINT 46 Block number when the last reading error occurred.
RdErrMarkerNo UDINT 47 Marker number when the last reading error occurred.
RdErrSize UDINT 48 Block size when the last reading error occurred.
8. Driver-specific functions
The driver supports the following functions:
GENERAL QUERY
As envisaged in the IEC 60870 standard, the driver automatically sends the general queries (C_IC_NA_1)
to the PLCs straight after a connection is established.
A general request can be re-executed at a later time. In order to do so, a BOOL variable of type
C_IC_NA_1 (T100) must be written to. The IOA of these variables must be 0. The value of this variable is
1 whilst the general request is running. If the time general request could not be carried out correctly,
this variable will get the status INVALID. Variables of type T100 can be created separately for every
sector (COA). This allows you to check whether the sectors of a device can be reached.
48
Driver-specific functions
CONNECTION STATUS
The current status of the connection to the PLC can be requested via a USINT variable of the type
"internal state" (T00) and COA 0 and IOA 0. If the value of this variable is 5, this means that a connection
is active and that the general request was finished successfully.
The status of the data security layer connection to the PLC can be read with the help of "internal
state" (T00) and COA 0 and IOA 1 variables: The variable relates to the Data Link Layer and at the same
time to both connections to redundancy if the secondary connection was defined in the driver
configuration:
Bit Description
Bit 0 Connection status of the primary connection
Bit 1 Displays whether the primary connection is active (is used for
communication)
Bit 4 Connection status of the secondary connection
Bit 5 Displays whether the secondary connection is active (is used for
communication)
Information
Only available if you have activated the Redundancy according to 60870-104 edition 2.0
option when creating the driver.
You trigger manual switching to the redundant connection with the help of the driver-specific command
104_MANUAL_SWITCH 'net address'. The 'net address' value stands for the corresponding network
address of the connection.
FILETRANSFER
49
Driver-specific functions
To get a file from the PLC, set the value "GET <IOA>.<NOF>" for the command variable (T122).
An active file transfer can be canceled by setting the value "CANCEL" to the command variable (T122).
The driver thus does not expect any further segments of data and will also not request any further
sections of the file. A deactivation is not sent to the PLC however. The file for which the transmission
was cancelled is not saved.
Example
Get the file with IOA 1100 and NOF 'transparent' (1) from sector 151 if the folder was
defined in the driver configuration as "C:\TEMP\IEC870":
Send the target value "GET 1100.1" to a variable of type T122, COA 151 und IOA 0.
The file is stored at C:\TEMP\IEC870\151\1100.1.
50
Driver-specific functions
To send a file to the PLC, set the value "PUT <IOA>.<NOF>" for the command variable (T122).
A file from the COA folder is sent. This folder is a subdirectory of the directory that is defined in the
driver dialog basic settings (on page 17), in the Directory for file transfer in Control Direction input field.
This folder must be created manually by the user.
If the transfer is in progress, "PUT BUSY" is displayed. An active file transfer can be canceled by setting
the value CANCEL to the command variable (T122).
To delete a file on the PLC, set the value "DEL <IOA>.<NOF> for the command variable (T122).
If the file was deleted successfully, the command variable changes its value to "DEL OK"
ERROR TREATMENT
If an error occurs when the file transfer is carried out, the command variable changes its value to "XXX
ERROR" (XXX = DIR, GET, PUT or DEL) and the driver optionally writes an entry into the log file (see also
error analysis (on page 74)).
TIME SYNCHRONIZATION
By writing to a variable of Type C_CS_NA_1 (T103), the current time of the PC is sent to the PLC. The IOA
of these variables must be 0.
The driver can accept and evaluate a T103 telegram in Reverse Direction from the device. If the device
sends a T03 telegram, the time on the PC will be taken from the device, however only if the difference
between the device time and the PC time does not exceed the configured maximum difference (see
driver dialog basic setting).
If, for a Write set value or Write recipe action or command processing, a write confirmation has been
requested (WR_ACK), this status bit is set accordingly after the command has been sent (COT_act).
There is no wait for COT_actcon.
51
Driver-specific functions
Indicates IEC status blocked. The value is blocked for transferring and remains in the status it had
before it was blocked. This status bit can be selected in Multi reaction matrices, in Combined elements
and in the Interlocking formula.
In VBA the top 32 bits can be polled with StatusExtValue(). With SetValueWithStatusEx() all 64
status bits can be polled.
Indicates IEC status substituted. The value was set by an operator or an automatic source. This status
bit can be selected in Multi reaction matrices, in Combined elements and in the Interlocking formula.
In VBA the top 32 bits can be polled with StatusExtValue(). With SetValueWithStatusEx() all 64
status bits can be polled.
Indicates IEC status not topical. The value was not updated or was not available for a certain period
of time. This status bit can be selected in Multi reaction matrices, in Combined elements and in the
Interlocking formula.
In VBA the top 32 bits can be polled with StatusExtValue(). With SetValueWithStatusEx() all 64
status bits can be polled.
Corresponds to IEC Qualifier S/E and is used in conjunction with the Select before operate functionality:
serves to distinguish between Select- and Execute-status of a command.
The received value of the Cause of Transmission - see IEC60870-5-101 7.2.3) is portrayed to the
status bits COTx.
52
Driver-specific functions
The status bit T_INVAL (real time invalid) is set by driver IEC870 if the received real time stamp is
marked as invalid. In this case, the local PC time is stamped.
In the process gateway IEC870 slave, this status bit is forwarded in the direction of messaging in
the time stamp.
The time information of type CP24Time2a only contains minutes, seconds and milliseconds. Date
information (year, month, day) and information about to the hour is not transferred. The driver reverts
to the PC clock in order to complement the missing time information (year, month, day and hour). If a
CP24Time2a with a difference of more than plus/minus 30 minutes is received, the driver corrects the
time stamp automatically by one hour plus/minus. At this a possible date change is also considered.
HYSTERESIS HANDLING
In general the driver supports hysteresis. The hysteresis is only considered for numeric data types if
hysteresis<>0 was configured. For variables with hysteresis=0 and for variables of type BOOL or STRING,
the driver sends all received values to the Runtime.
In order to be able to use "select & execute" a command must be executed. In addition, the Select
Before Operate property must be activated for the command variables. At the first stage of the action,
the driver sends a Select command - an ASDU with IEC Qualifier S/E equals 1 (select). The SE_870
status bit of the command variable is also set. There is then an Execute command - an ASDU with IEC
Qualifier S/E equals 0 (execute), or a Cancel command. A Cancel (deactivation) can only be
triggered from a two-stage action - if the user cancels the command during execution of the action,
instead of confirming it.
LIMITATIONS
53
Driver-specific functions
„select and execute can only be used for command processing. Otherwise "direct
execute" is always used.
Double Point Value Mapping is a standard function of the zenon Energy driver. It only influences
zenon Runtime and has no effect on the driver communication with a device. Configuration is carried
out in the driver settings in the Basic Settings tab.
It is recommended that you leave the Deactivate standard double point value mapping option in
the driver configuration as the default, inactive.
The driver uses Double Point Value Mapping to convert values so that they are displayed in a
user-friendly manner. However this only applies to the HMI.
The driver always communicates with one device with values for Double Points with 2-bit information.
This corresponds to the definitions of the energy standard. That means:
Parameters Double Point Value Meaning
Intermediate 00b 0 Switches are neither open nor closed, for
example the End-Position has not yet been
reached
Off 01b 1 Switch open
On 10b 2 Close switch/switch closed
Fault 11b 3 Error
Double Points are coded with 2-bits in the energy sector for historical reasons: The transmission of a
telegram to a serial connection (RS232) with a series of values that only contain 0 was not safeguarded
against transmission errors. In order to increase the certainty, it was decided in the first standards that
the value for OFF is not to be sent as 0 but as 01b, which corresponds to decimal 1. These Double
Point Values also precisely reflect the type of how two sensors record the physical position of a switch.
However, the values sent this way may be confusing for people:
OFF = 1
ON = 2
At the same time, Single Point Values are also defined with OFF = 0 in the same standard.
54
Driver-specific functions
The user must always be aware of the technical level on which they are acting and receiving or sending
information. In stressful situations, this can very easily lead to serious mistakes. For example, if ON is
sent instead of OFF.
In order to avoid this dangerous error, the zenon Energy driver offers its own Double Point Value
Mapping.
With the Double Point Value Mapping, all Double Points in zenon have the following values:
Intermediate = 2
Off = 0
On = 1
Fault = 3
Information
This function can be deactivated in the driver settings. However some features such
as Command Processing or ALC can no longer be used then.
In general, the following applies: If a set value is written to a command variable, the value is written to
the PLC. The value is normally written to the controller exactly as it is.
Because DCS consists of two bits, all higher values are cut off and not sent. That means:
55
Driver commands
1 = 01b 10b = On
6 = 110b 10b = 2 On
* mapped value
9. Driver commands
This chapter describes standard functions that are valid for most zenon drivers. Not all functions
described here are available for every driver. For example, a driver that does not, according to the data
sheet, support a modem connection also does not have any modem functions.
Driver commands are used to influence drivers using zenon; start and stop for example.
The engineering is implemented with the help of function Driver commands. To do this:
create a new function
select Variables -> Driver commands
The dialog for configuration is opened
56
Driver commands
Parameter Description
Drivers Drop-down list with all drivers which are loaded in the project.
Current status Fixed entry which has no function in the current version.
Driver command Drop-down list for the selection of the command.
Start driver (online Driver is reinitialized and started.
mode)
Stop driver (offline Driver is stopped. No new data is accepted.
mode)
If the driver is in offline mode, all variables that were
created for this driver receive the status switched off (OFF;
Bit 20).
Driver in simulation mode Driver is set into simulation mode.
The values of all variables of the driver are simulated by the
driver. No values from the connected hardware (e.g. PLC, bus
system, ...) are displayed.
Driver in hardware mode Driver is set into hardware mode.
For the variables of the driver the values from the connected
hardware (e.g. PLC, bus system, ...) are displayed.
Driver-specific command Enter driver-specific commands. Opens input field in order to
enter a command.
Driver - activate set Write set value to a driver is allowed.
setpoint value
Driver - deactivate set Write set value to a driver is prohibited.
setpoint value
Establish connecton with Establish connection (for modem drivers) Opens the input fields
modem for the hardware address and for the telephone number.
Disconnect from modem Terminate connection (for modem drivers)
Show this dialog in the Runtime The dialog is shown in Runtime so that changes can be made.
If the computer, on which the driver command function is executed, is part of the zenon network,
additional actions are carried out. A special network command is sent from the computer to the project
server, which then executes the desired action on its driver. In addition, the Server sends the same
driver command to the project standby. The standby also carries out the action on its driver.
This makes sure that Server and Standby are synchronized. This only works if the Server and the Standby
both have a working and independent connection to the hardware.
57
Interoperability
10. Interoperability
This companion standard presents sets of parameters and alternatives from which subsets must be
selected to implement particular telecontrol systems. Certain parameter values, such as the choice of
'structured' or'unstructured' fields of the informationobject address of ASDUs represent mutually
exclusive alternatives. This means that only one value of the defined parameters is admitted per system.
Other parameters, such as the listed set of different process information incommand and in monitor
direction allow the specification of the complete set orsubsets, as appropriate for given applications.
This clause summarizes theparameters of the previous clauses to facilitate a suitable selection for
aspecific application. If a system is composed of equipment stemming from different manufacturers, it is
necessary that all partners agree on the selected parameters.
The interoperability list is defined as in IEC 60870-5-101 and extended with parameters used in this
standard. The text descriptions of parameters which are not applicable to this companion standard are
strike-through (corresponding check box is marked black).
NOTE In addition, the full specification of a system may require individual selection of certain
parameters for certain parts of the system, such as the individual selection of scaling factors for
individually addressable measured values.
The possible selection (blank, X , R , or B ) is specified for each specific clause or parameter.
A black check box indicates that the option cannot be selected in this companion standard.
1. SYSTEM OR DEVICE
(system-specific parameter, indicate definition of a system or a device by marking one of the following
with ' X ')
[ ] System definition
[ X ] Controlling station definition (Master)
[ ] Controlled station definition (Slave)
58
Interoperability
[ X ] Point-to-point [ X ] Multipoint-partyline
[ X ] Multiple [ ] Multipoint-star
point-to-point
(network-specific parameter, all interfaces and data rates that are used are to be marked ' X ')
59
Interoperability
(network-specific parameter, all options that are used are to be marked ' X '. Specify the maximum
frame length. If a non-standard assignment of class 2 messages is implemented for unbalanced
transmission, indicate the Type ID and COT of all messages assigned to class 2.)
Frame format FT 1.2, single character 1 and the fixed time out interval are used exclusively in this
companion standard.
Link transmission Frame length Address field of the link
[ ] Balanced transmission [255] Maximum length L [ ] not present (balanced transmission
(number of only)
octets)
[X] Unbalanced transmission [ X ] One octet
[ X ] Two octets
[ X ] Structured
[ X ] Unstructured
When using an unbalanced link layer, the following ASDU types are returned in class 2 messages (low
priority) with the indicated causes of transmission:
60
Interoperability
Type Cause of
identification transmission
any* any
Note: (In response to a class 2 poll, a controlled station may respond with class 1 data when there is no
class 2 data available).
5. APPLICATION LAYER
Mode 1 (Least significant octet first), as defined in 4.10 of IEC 60870-5-4, is used exclusively in this
companion standard.
COMMON ADDRESS OF AS DU
(system-specific parameter, all configurations that are used are to be marked ' X ')
[ X ] One octet [ X ] Two octets
(system-specific parameter, all configurations that are used are to be marked ' X ')
[ X ] Three octets
CAUSE OF TRANSMISSION
(system-specific parameter, all configurations that are used are to be marked ' X ')
61
Interoperability
LENGTH OF APDU
(system-specific parameter, all configurations that are used are to be marked ' X ')
The maximum length of the APDU is 253 (default). The maximum length may be reduced by the system.
(station-specific parameter, mark each Type ID ' X ' if it is only used in the standard direction, ' R ' if only
used in the reverse direction, and ' B ' if used in both directions).
62
Interoperability
[ X ] <14> := Measured value, short floating point value with time tag M_ME_TC_1
[ ] <18> := Packed start events of protection equipment with time tag M_EP_TB_1
[ X ] <34> := Measured value, normalized value with time tag CP56Time2a M_ME_TD_1
[ X ] <35> := Measured value, scaled value with time tag CP56Time2a M_ME_TE_1
[ X ] <36> := Measured value, short floating point value with time tag M_ME_TF_1
CP56Time2a
63
Interoperability
[ ] <39> := Packed start events of protection equipment with time tag M_EP_TE_1
CP56Time2a
[ ] <40> := Packed output circuit information of protection equipment with M_EP_TF_1
time tag CP56Time2a
Either the ASDUs of the set <2>, <4>, <6>, <8>, <10>, <12>, <14>, <16>, <17>, <18>, <19> or of the set
<30> – <40> are used.
(station-specific parameter, mark each Type ID ' X ' if it is only used in the standard direction, ' R ' if only
used in the reverse direction, and ' B ' if used in both directions).
[ X ] <61> := Set point command, normalized value with time tag CP56Time2a C_SE_TA_1
[ X ] <62> := Set point command, scaled value with time tag CP56Time2a C_SE_TB_1
[ X ] <63> := Set point command, short floating point value with time tag C_SE_TC_1
CP56Time2a
[ X ] <64> := Bitstring of 32 bit with time tag CP56Time2a C_BO_TA_1
Either the ASDUs of the set <45> – <51> or of the set <58> – <64> are used.
64
Interoperability
(station-specific parameter, mark each Type ID ' X ' if it is only used in the standard direction, ' R ' if only
used in the reverse direction, and ' B ' if used in both directions).
(station-specific parameter, mark each Type ID ' X ' if it is only used in the standard direction, ' R ' if only
used in the reverse direction, and ' B ' if used in both directions).
FILE TRANSFER
(station-specific parameter, mark each Type ID ' X ' if it is only used in the standard direction, ' R ' if only
used in the reverse direction, and ' B ' if used in both directions).
65
Interoperability
[ B ] <122> := Call directory, select file, call file, call section F_SC_NA_1
(station-specific parameters)
20 37
1 2 3 4 5 6 7 8 9 10 11 12 13 to to 44
36 41
<1> M_SP_NA_1
<2> M_SP_TA_1
<3> M_DP_NA_1
<4> M_DP_TA_1
<5> M_ST_NA_1
<6> M_ST_TA_1
<7> M_BO_NA_1
<8> M_BO_TA_1
<9> M_ME_NA_1
66
Interoperability
<10> M_ME_TA_1
<11> M_ME_NB_1
<12> M_ME_TB_1
<13> M_ME_NC_1
<14> M_ME_TC_1
<15> M_IT_NA_1
<16> M_IT_TA_1
<17> M_EP_TA_1
<18> M_EP_TB_1
<19> M_EP_TC_1
<20> M_PS_NA_1
<21> M_ME_ND_1
<30> M_SP_TB_1
<31> M_DP_TB_1
<32> M_ST_TB_1
<33> M_BO_TB_1
<34> M_ME_TD_1
<35> M_ME_TE_1
<36> M_ME_TF_1
<37> M_IT_TB_1
<38> M_EP_TD_1
<39> M_EP_TE_1
<40> M_EP_TF_1
<45> C_SC_NA_1
<46> C_DC_NA_1
<47> C_RC_NA_1
<48> C_SE_NA_1
67
Interoperability
<49> C_SE_NB_1
<50> C_SE_NC_1
<51> C_BO_NA_1
<58> C_SC_TA_1
<59> C_DC_TA_1
<60> C_RC_TA_1
<61> C_SE_TA_1
<62> C_SE_TB_1
<63> C_SE_TC_1
<64> C_BO_TA_1
<70> M_EI_NA_1*
<100> C_IC_NA_1
<101> C_CI_NA_1
<102> C_RD_NA_1
<103> C_CS_NA_1
<104> C_TS_NA_1
<105> C_RP_NA_1
<106> C_CD_NA_1
<107> C_TS_TA_1
<110> P_ME_NA_1
<111> P_ME_NB_1
<112> P_ME_NC_1
<113> P_AC_NA_1
<120> F_FR_NA_1
<121> F_SR_NA_1
<122> F_SC_NA_1
<123> F_LS_NA_1
68
Interoperability
<124> F_AF_NA_1
<125> F_SG_NA_1
<126> F_DR_TA_1*
* Blank or X only
STATION INITIALIZATI ON
[ ] Remote initialization
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions)
READ PROCEDURE
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions)
[ ] Read procedure
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions)
[ X ] Spontaneous transmission
(station-specific parameter, mark each information type ' X ' where both a Type ID without time and
corresponding Type ID with time are issued in response to a single spontaneous change of a monitored
object)
69
Interoperability
The following type identifications may be transmitted in succession caused by a single status change of
an information object. The particular information object addresses for which double transmission is
enabled are defined in a project-specific list.
[ ] Single-point information M_SP_NA_1, M_SP_TA_1, M_SP_TB_1 and M_PS_NA_1
[ ] Double-point information M_DP_NA_1, M_DP_TA_1 and M_DP_TB_1
[ ] Step position information M_ST_NA_1, M_ST_TA_1 and M_ST_TB_1
[ ] Bitstring of 32 bit M_BO_NA_1, M_BO_TA_1 and M_BO_TB_1 (if defined for a specific
project)
[ ] Measured value, normalized value M_ME_NA_1, M_ME_TA_1, M_ME_ND_1 and
M_ME_TD_1
[ ] Measured value, scaled value M_ME_NB_1, M_ME_TB_1 and M_ME_TE_1
[ ] Measured value, short floating point number M_ME_NC_1, M_ME_TC_1 and M_ME_TF_1
STATION INTERROGATION
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
[ X ] global
[ ] group 5 [ ] group
11
CLOCK SYNCHRONIZATION
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
[ B ] Clock synchronization
70
Interoperability
COMMAND TRANSMISSION
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
[ X ] No additional definition
[ X*] Short-pulse duration (duration determined by a system parameter in the outstation)
[ X*] Long-pulse duration (duration determined by a system parameter in the outstation)
[ X*] Persistent output
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
[ ] Counter read
[ ] Counter freeze without reset
[ ] Counter freeze with reset
[ ] Counter reset
71
Interoperability
PARAMETER LOADING
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
[ ] Threshold value
[ ] Smoothing factor
[ ] Low limit for transmission of measured values
[ ] High limit for transmission of measured values
PARAMETER ACTIVATION
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
TEST PROCEDURE
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
[ ] Test procedure
FILE TRANSFER
BACKGROUND SCAN
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
[ X ] Background scan
72
Interoperability
(station-specific parameter, mark ' X ' if function is only used in the standard direction, ' R ' if only used
in the reverse direction, and ' B ' if used in both directions).
t3 20s Time-out for sending test frames in case of a long idle state; setting
t3 > t1
73
Error analysis
RFC 2200 is an official Internet Standard which describes the state of standardization of protocols used
in the Internet as determined by the Internet Architecture Board (IAB). It offers a broad spectrum of
actual standards used in the Internet. The suitable selection of documents from RFC 2200 defined in this
standard for given projects has to be chosen by the user of this standard.
[ ] Ethernet 802.3
[ ] Serial X.21 interface
[ ] Other selection from RFC 2200:
All zenon modules such as Editor, Runtime, drivers, etc. write messages to a joint log file. To display
them correctly and clearly, use the Diagnosis Viewer (main.chm::/12464.htm) program that was also
installed with zenon. You can find it under Start/All programs/zenon/Tools 7.60 -> Diagviewer.
zenon driver log all errors in the LOG files. LOG files are text files with a special structure. The default
folder for the LOG files is subfolder LOG in the folder ProgramData. For example:
%ProgramData%\COPA-DATA\LOG.
74
Error analysis
With the default settings, a driver only logs error information. With the Diagnosis Viewer
you can enhance the diagnosis level for most of the drivers to "Debug" and "Deep Debug". With this the
driver also logs all other important tasks and events.
1. The Diagnosis Viewer displays all entries in UTC (coordinated world time) and not in local time.
2. The Diagnosis Viewer does not display all columns of a LOG file per default. To display more
columns activate property Add all columns with entry in the context menu of the column
header.
3. If you only use Error-Logging, the problem description is in the column Error text. For other
diagnosis level the description is in the column General text.
4. For communication problems many drivers also log error numbers which the PLC assigns to
them. They are displayed in Error text or Error code or Driver error parameter (1 and 2). Hints
on the meaning of error codes can be found in the driver documentation and the protocol/PLC
description.
5. At the end of your test set back the diagnosis level from Debug or Deep Debug. At Debug and
Deep Debug there are a great deal of data for logging which are saved to the hard drive and
which can influence your system performance. They are still logged even after you close the
Diagnosis Viewer.
Attention
In Windows CE errors are not logged per default due to performance reasons.
You can find further information on the Diagnosis Viewer in the Diagnose Viewer
(main.chm::/12464.htm) manual.
75
Error analysis
76