Sunteți pe pagina 1din 83

ACOS 750 Telecontrol and automation

CoDeSys

: PLC Communication Library


Preliminary note
Your safety tips:
DANGER
Insufficient attention or incorrect compliance with this information means serious risk
of injury or even death..


WARNING
Insufficient attention or incorrect compliance with this information means serious risk
of injury or serious property damage.


CAUTION
Insufficient attention or incorrect compliance with this information means risk of injury
or slight damage to property.


Additional note:

TIP
This note highlights you additional information or helpful tips.

Copyright Disclaimer
Copyright IDS GmbH All rights reserved.
Reprints or copies of this document may not be made,
even in part.
This document may not be reproduced in whole or in
part, in any form (photocopying, microfilm or other pro-
cesses), nor may it be electronically processed, repro-
duced or distributed, even for the purpose of lessons
or instruction, without the written consent of IDS
GmbH.
We reserve the right to claim damages in the event of
infringements of the above.
IDS GmbH
Nobelstrae 18
D-76275 Ettlingen

Some of the functions described in this document are
optional, in the sense that only certain product versions
include these functions. Other functions not described
in this document may be capable of running in the sys-
tem, but we are unable to provide any guarantee for
these functions.
The content of the documentation is checked regularly.
Any necessary corrections are contained in subse-
quent editions.
We reserve the right to make technical modifications.
Table of Contents
1 Programming of PLCs via CoDeSys V3
1.1 Notes on PLC Programming ......................................................................................... 1
1.2 First Steps ................................................................................................................... 1
1.2.1 Installation of IEC60870 repository ...................................................................... 2
1.2.2 Integration of Device Description Files ................................................................ 2
1.3 How to Create a New CoDeSys V3 Project ................................................................. 5
1.4 CoDeSys V3 Settings ................................................................................................ 7
1.5 Connect CoDeSys to ACOS 750 SPS ....................................................................... 14
1.6 Load PLC Program to ACOS 750 ............................................................................... 15
1.7 Addressing of the input and output area acc. to IEC 61131-3 ........................................ 16
1.8 Add visualisation ........................................................................................................ 16
1.9 General System Behaviour ......................................................................................... 18
1.9.1 Reset Warm Application ................................................................................... 18
1.9.2 Reset Cold Application ..................................................................................... 18
1.9.3 Reset Source Application .................................................................................. 18
1.9.4 Create Boot Application .................................................................................... 18
1.10 Remanent Variables - RETAIN, PERSISTENT ........................................................... 18
1.10.1 Retain Variables ............................................................................................. 19
1.10.2 Persistent Variables ........................................................................................ 19
1.10.3 Synoptical Table - Behaviour of Remanent Variables ........................................ 20
1.11 Network Variables .................................................................................................... 20
1.11.1 Definition of Network Properties of a Global Variable List (Sender) .................... 21
1.11.2 How to Add a Global Network Variable List (Receiver) ...................................... 22
2 IEC 60870-5 Communication Library
2.1 Operation Sequence .................................................................................................. 26
2.2 Reception of Data in Monitoring Direction .................................................................... 29
2.2.1 GET_SPI - Get Single-Point Information ............................................................ 29
2.2.2 GET_DPI - Get Double-Point Information ........................................................... 30
2.2.3 GET_RSPI - Get Regulating-Step Position Information ....................................... 31
2.2.4 GET_IT - Get Counter Value ............................................................................. 32
2.2.5 GET_MV_REAL - Get Floating-Point Measured Value ........................................ 33
2.2.6 GET_MV_NORM - Get Normalised Measured Value .......................................... 34
2.2.7 GET_MV_SCALED - Get Scaled Measured Value .............................................. 35
2.3 Reception of Data in Command Direction .................................................................... 36
2.3.1 GET_SC - Get Single Command ....................................................................... 36
2.3.2 GET_DC - Double Command ........................................................................... 38
2.3.3 GET_RSC - Get Regulating-Step Command ...................................................... 40
2.3.4 GET_SPC_REAL - Get Floating-Point Setpoint .................................................. 42
2.3.5 GET_SPC_NORM - Get Normalised Setpoint .................................................... 45
2.3.6 GET_SPC_SCALED - Get Scaled Setpoint ........................................................ 48
2.4 Transmission of Data in Monitoring Direction ............................................................... 51
2.4.1 SET_SPI - Send Single-Point Information .......................................................... 51
2.4.2 SET_DPI - Send Double-Point Information ......................................................... 53
2.4.3 SET_RSPI - Send Regulating-Step Position Information ..................................... 55
2.4.4 SET_IT - Send Counter Value ........................................................................... 57
2.4.5 SET_MV_REAL - Send Measured Value ........................................................... 59
2.4.6 SET_MV_NORM - Send Normalised Measured Value ........................................ 61
2.4.7 SET_MV_SCALED - Send Scaled Measured Value ............................................ 63
2.5 Transmission of Data in Command Direction ............................................................... 65
2.5.1 SET_SC - Send Single Command ..................................................................... 65
2.5.2 SET_DC - Send Double Command ................................................................... 68
IDS GmbH, 10/2010 iii
2.5.3 SET_RSC - Send Regulating-Step Command .................................................... 70
2.5.4 SET_SPC_REAL - Send Setpoint ..................................................................... 73
2.5.5 SET_SPC_NORM- Send Normalised Setpoint ................................................... 75
2.5.6 SET_SPC_REAL - Send Setpoint ..................................................................... 77
2.6 System Time ............................................................................................................. 79
2.6.1 GET_SYSTEMTIME02 ..................................................................................... 79
Programming of PLCs via CoDeSys V3 Manual
IDS GmbH, 10/2010 iv
1. Programming of PLCs via CoDeSys

V3
This manual provides information on the programming of ACOS 750 PLCs via CoDeSys

V3 and gives
an overview of the appropriate communication library to enable access to information objects in ac-
cordance with IEC 60870-5-101/104.
For further information on the programming of PLCs via CoDeSys

V3, please refer to the CoDeSys

V3 online Help function.


1.1. Notes on PLC Programming
Integrated PLC
The ACOS 750 automation and telecontrol device features an integrated PLC runtime system. The
following central processor modules are supported:
- CU78A with LCD (128x64 pixels)
- CU78B
- CU78C Compact with integrated power supply unit
The CoDeSys

V3 Programming System
The CoDeSys

V3 programming system can be used for the programming of PLCs in accordance


with the international standard IEC 61131-3.
Note
The PLC can be programmed via the Ethernet interface of the central processor module.
Program Memory
For the PLC program, the central processor module provides 1.5 MB of buffered memory.
The data (variables) are buffered and stored separately in one area of the MRAM. For data storage,
a memory space of 96 kB is reT_SCved.
1.2. First Steps
IDS GmbH, 10/2010 1
1.2.1. Installation of IEC60870 repository
In order to use the telecontrol functions with the PLC, you hat to add the "IDS-library"
Figure 1: Bibliotheksrepository
Install via the menu Tools/library repository the file "iec60870.library".
1.2.2. Integration of Device Description Files
In order to be able to use CoDeSys

V3 for programming of the ACOS 750 PLC, you have to install the
following device description files under Tools/Device Repository:
"acos750cu78.devdesc.xml"
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 2
"acos750ebus.devdesc.xml"
Figure 2: Device repository
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 3
File type
When you install the ACOS 750 device description files in CoDeSys

, switch the file type


from EtherCAT XML (*.xml) to device description file (*.devdesc.xml).
Figure 3: File type
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 4
1.3. How to Create a New CoDeSys

V3 Project
Figure 4: Creating a new project
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 5
If you wish to create a new project, you have to select "ACOS 750-CU78 (IDS GmbH") as the program-
mable device.
Figure 5: Selecting ACOS 750-CU78
You can freely choose one of the following programming languages: SFC, IL, CFC, FBD, LD and ST.
Note
Once you have selected a specific programming language for writing your program it will
not be possible to change it at a later stage.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 6
In the present example, we have chosen CFC as a programming language. After having created a new
project, the Devices and POU (Program Organization Unit) view looks like this:
Figure 6: Device view
Figure 7: POUs view
The POUs window includes the project settings.
The Devices view shows a tree structure which includes the device ("Device (ACOS 750-CU78)" with
an application inserted underneath. The latter contains the program (edited via CFC) "PLC_PRG" and
the obligatory task configurations with a "MainTask" for the operation of the PLC-PRG program.
Additionally, the application contains a Library Manager which, by default, contains the "IoStandard.li-
brary" that is required for I/O configuration, as well as the "Standard.library" which provides all functions
and function blocks required by the IEC61131-3 norm as standard blocks for an IEC programming sys-
tem.
The additional node "PLC Logic" below the "Device (ACOS 750-CU78)" node is only a symbolic node
indicating that the device is actually "programmable".
1.4. CoDeSys

V3 Settings
In a newly created project, you have to add the ACOS_750_E_BUS to the device by right-clicking "Device
-> Add Device". The E-BUS is the interface between the runtime system and the I/O level. The hardware
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 7
(I/O level) only needs to be parametrised in ACOS ET and does not require additional parametrisation
in CoDeSys

.
Figure 8: Add ACOS 750 E_BUS
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 8
The declaration of variables with direct addressing (AT declaration) according to IEC 61131-3 is done
via the Global Variable List. Example:
PumpeSt ar t AT %QX0. 0 : BOOL;
To do this, you have to right-click the Global Variable List (GVL) in order to add it to "Application -> Add
Object -> GVL".
Figure 9: How to add a Global Variable List
Note
You can automatically insert the variable declaration according to the hardware (I/O level)
parametrised in ACOS ET in the GVL of CoDeSys

via the clipboard.


If you want the variables to keep their value even after a system failure, you have to declare them
accordingly in a special variables list as "Persistent Variables". For further information on Persistent
Variables, please refer to Chapt. 1.5 You can add a Persistent Variable List in the same way as a GVL.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 9
Figure 10: How to add a Persistent Variable
Apart from the default program "PLC_PRG", you can also add further POUs, including programs, func-
tion blocks or functions to the application.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 10
Note
Function blocks and functions can also be stored in the POU view, the advantage being that
you can use it in all devices/applications.
Figure 11: How to add a program
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 11
After adding a new program or re-naming the "PLC_PRG" program, you have to call them up in the
appropriate task in the task configuration. Here you can also specify the program execution sequence.
It is advisable, however, to remove programs which you do not intend to use.
Figure 12: Task configuration
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 12

Figure 13: Complete device view
The subdialog "PLC Settings" of the Device editor serves for the configuration of some of the basic
settings for the PLC. The following illustration shows the prescribed configuration of an ACOS 750 de-
vice, unless specified otherwise by the user:
Figure 14: Device dialog, PLC settings
Application for I/O handling: At first, this box contains the standard application that is automatically
inserted into a standard project via default, but the operator can also select any other application from
the drop-down list.
PLC settings
Update I/Os while in stop: When this option is activated (default), the values of the input and output
channels are updated even when the PLC changes over to the Stop status. If the watchdog detects
a fault, the outputs are set to the the default values.
Behaviour for outputs in Stop: The drop-down list offers the following options for the treatment of
output channels when the PLC is in the Stop status:
- Keep values:The current values are kept.
- Set all outputs to default: Here, the system assigns the default values resulting from the I/O
map.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 13
- Execute program: The treatment of output values can be controlled via a program contained in
the project. The name of this program can be specified via the input help function; it is executed
when the PLC changes to the Stop status.
Update all variables in all devices: If this option is activated, all I/O variables are updated for all
devices in the current PLC configuration in each cycle of the bus cycle task. This option is equivalent
to the option "Always update variables" which can also be set individually for each device in the "I/
O map" dialog.
Bus cycle options
Bus cycle task: The drop-down list offers a selection of all tasks that are defined in the task con-
figuration of the active application. (e.g. "MainTask", EtherCAT Master" etc.). The standard setting
that is specified in the device description is already set (default). It is possible to select a different
setting; in this case, however, the following must be considered:
Note
Before changing the setting to "unspecified", one should be aware of the possible effects.
"unspecified" means that the standard behaviour, as defined in the device description,
takes effect. Therefore the description has to be checked accordingly. As a standard, it
is possible to define the task with the shortest cycle time as default setting, but also that
with the longest cycle time!
1.5. Connect CoDeSys

to ACOS 750 SPS


If the programming device (PC, laptop etc.) is connected to the ACOS 750-CU78 device via Ethernet
and both clients have an IP address in the same subnetwork, you have to establish a connection in
CoDeSys

. The Gateway server is automatically started as service during system startup.


Please check the status via the corresponding icon in the bottom icon bar:
Gateway is running.
Gateway is stopped - you have to start it manually.
Open the communication settings in the central window by double-clicking "Device". After that, proceed
as follows:
1. Add gateway
2. Search the network
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 14
3. Select a device and set the active path
Figure 15: Connect CoDeSys with the PLC
In the "idsdev_1[0064]" PLC, 1 stands for the CAASDU address according to IEC 60870-5; the number
64 in the square bracket stands for the host portion of the IP address in hexadecimal writing.
1.6. Load PLC Program to ACOS 750
You can load a PLC program onto the station via "Menu/Online -> Log on 'Application [Device: PLC
Logic]'". If the application is marked green, the CPU status is 'Run'. If the application is still marked red
- i.e. the status is 'Stop' - you can start via the "Start application" button.
Note
It is possible to create several applications in one device. These applications can be loaded,
started and stopped individually. The "RUN" switch of ACOS 750 can be used for simulta-
neously starting and stopping all applications of the device.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 15
1.7. Addressing of the input and output area acc. to IEC 61131-3
Addressing of the input and output area acc. to IEC 61131-3 is based on the hardware (I/O level) par-
ametrised in ACOS ET and the resulting information object model.
Information
object
I/O module Information ob-
ject range
Addr. acc to IEC 61131-3 Quanti-
ty
Data type
Event signals Digital Input 4097 - 6145 dez
1001 - 1801 hex
at%IX0.0
at%IX0.1
...
at%IX255.7
2048 BOOL
Measured val-
ues
Analog input 8193 - 8449 dez
2001 - 2101 hex
at%IW256
at%IW258
...
at%IW2302
1024 INT, REAL
Counter val-
ues
Counter input 12289 - 12545 dez
3001 - 3101 hex
at%ID2304 (ZW)
at%IW2308 (Status)
at%ID2312 (ZW)
at%IW2316 (Status)
...
at%ID4344 (ZW)
at%IW4348 (Status)
256 UDINT
INT
Commands Digital output 24577 - 26625 dez
6001 - 6801 hex
at%QX0.0
at%QX0.1
...
at%QX255.7
2048 BOOL
Setpoints Analog output 20481 - 20737 dez
5001 - 5101 hex
at%QW256
at%QW258
...
at%QW2302
1024 INT, REAL
1.8. Add visualisation
If you are using the central processor module CU78A, you can parametrise the output via LCD (fully-
graphic, resolution 128x64 pixels) by means of CoDeSys

V3. You can add a visualisation to your project


by right-clicking the items "Application -> Add object -> Visualization". When you have inserted a visu-
alisation in the Device tree underneath an Application, a Visualization Manager object with target
visualisation and VISU_Task is added automatically. The "Visualization Manager" defines common set-
tings for all visualisations of the application, e.g. size, start visualisation, settings for Web and target
visualisation. The code that is generated for the visualisation objects of the project can be loaded onto
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 16
the PLC, i.e. on the target system. For further information on how to proceed, please refer to the CoD-
eSys

V3 on-line help.
Figure 16: Add visualisation
After you have created and uploaded a visualisation, you can use the arrow key to navigate and scroll
within the display. You can exit the dialog via the "ESC" key, and confirm the control action via the "RET"
key.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 17
1.9. General System Behaviour
1.9.1. Reset Warm Application
This command (category: on-line) is available in the on-line mode. With the exception of the remanent
(Retain, Persistent) variables, this command resets all variables to their initialisation value.
If variables were initialised with specific values, they are reset exactly to these values. All other values
are reset to the default initialisation value (integer values, for instance, are reset to 0).
As a precaution, CoDeSys

again requests a confirmation from the user before overwriting all variables.
The situation is similar to a power failure or the disconnection and re-start of the PLC while the application
is running (warm restart).
A reset deactivates the breakpoints that are currently set in the project. If the command Reset Warm is
called up while the program stops at a breakpoint, the user is asked whether the current cycle shall be
stopped before the reset is finished or whether the task shall be finished and the reset shall be carried
out immediately. However, not all runtime systems are capable of doing a reset without previously fin-
ishing the current cycle.
Please use the 'Start' command after the reset in order to restart the application.
1.9.2. Reset Cold Application
This command (category: on-line) is available in the on-line mode. It equals the 'Reset' command (reset
warm); apart from the "normal" variables, the Retain variables(!) are also reset to their initialisation
values. The situation is the same as when starting an application program which has just been loaded
onto the PLC ("cold start")
A reset deactivates the breakpoints that are currently set in the project. If the command Reset Cold is
called up while the program stops at a breakpoint, the user is asked whether the current cycle shall be
stopped before the reset is finished or whether the task shall be finished and the reset shall be carried
out immediately. However, not all runtime systems are capable of doing a reset without previously fin-
ishing the current cycle.
1.9.3. Reset Source Application
This command (category: on-line) is available in the on-line mode. It resets the value of all remanent
variables to their initialisation values and deletes the application program on the control.
A reset deactivates the breakpoints that are currently set in the project. If the command Reset
Source is called up while the program stops at a breakpoint, the user is asked whether the current cycle
shall be stopped before the reset is finished or whether the task shall be finished and the reset shall be
carried out immediately. However, not all runtime systems are capable of doing a reset without previously
finishing the current cycle.
1.9.4. Create Boot Application
This command (category: on-line) is available for the creation of boot projects both in the on-line and in
the off-line mode. A boot application (boot project) is started automatically during the PLC start. It is
given the name Applicationname.app. It is generated automatically when a program is downloaded to
the PLC. This, however, is not the case with an on-line change. In this case, the boot application has to
be created manually to make sure that the modified program will be started on the PLC even after a
reset.
1.10. Remanent Variables - RETAIN, PERSISTENT
Remanent variables can keep their value beyond the usual running time of the program. They are re-
ferred to as "retain variables", or even as "persistent variables". These variables have their own memory
area for administration.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 18
The selected mode of declaration determines the degree of "resistence" of a remanent variable in the
event of resets, downloads or a reboot of the PLC. In everyday's practice, a combination of the two
variable types is usually required (see below: Persistent Variables)
Note
When a CoDeSys

V2.3 project is opened, the declarations of retain variables are kept and
remain effective without modification; the declarations of persistent variables, however,
have to be revised or newly created - see below: it is necessary to create a separate global
list of variables!
1.10.1. Retain Variables
Variables that are declared as "retain variables" are organised target system-dependent, but also, typ-
ically, in a separate memory area. In the CoDeSys

project, these variables are marked with the


keyword "RETAIN" in their declaration, in a block or in a global list of variables.
Example:
VAR RETAI N i Rem1 : I NT; ( *1. Ret ai n var i abl e*) END_VAR
Retain variables keep their value after an uncontrolled termination or after the on-line command 'Reset
Warm Application', and also after a normal boot/reboot of the PLC. After a program re-start, operation
is continued using the stored values. In this case, all the other variables are newly initialised, either with
their initialised values or with the standard initialisations.
Application example: A batch counter in a production line shall continue counting after a power failure.
Retain variables, however, are re-initialised after a 'Reset (source)' and - as opposed to persistent
variables - in the event of a 'Reset (cold)' and a renewed program download.
The "Retain" property can be combined with the "Persistent" property. For further information, please
refer to the synoptical table given below.
Note
If a local variable is declared as a RETAIN variable in a program, it is exactly this varia-
ble that is stored in the Retain area (like a global Retain variable).
If, however, a local variable is declared as RETAIN variable in a function block, the com-
plete instance of this function block is stored in the Retain area (all data of the block), but
only the declared Retain variable is actually treated as a Retain variable.
If a local variable in a function is declared as a RETAIN variable, this has no effect what-
soever. The variable is not stored in the Retain area! If a local variable in a function is
declared as PERSISTENT, this has no effect either!
1.10.2. Persistent Variables
Persistent variables are marked with the keyword "PERSISTENT" (VAR_GLOBAL PERSISTENT).
They are re-initialised only after a Reset (source) of the PLC. In contrast to Retain variables, Persistent
variables keep their value after a download. Application example for "persistent Retain variables": an
elapsed-meter that shall continue metering after a power failure or a download. See also below - syn-
optical table.
Persistent variables are treated in the following manner, i.e. different from CoDeSys

V2.3: Persistent
variables can be declared ONLY in a special global list of variables of the object type 'persistent vari-
ables' which belongs to an application. There is only ONE such list per application.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 19
Note
In CoDeSys

V3.3.0.1 or later, a declaration with "VAR_GLOBAL PERSISTENT" has the


same effect as a declaration with "VAR_GLOBAL PERSISTENT RETAIN" or "VAR_GLOB-
AL RETAIN PERSISTENT".
Similar to Retain variables, Persistent variables are organised in a separate memory area.
Example:
VAR GLOBAL PERSI STENT RETAI N di Var Per s1 : DI NT; ( *1. Per si st ent +Ret ai n Var i abl e APP1*) xVar Per s : DI NT; ( *2. Per si st ent +Ret ai n Var i abl e APP1*) xVar Per s :
Note
In the future, it will be possible to map the variables of the POUs of an application to this
list, thus converting them into remanent variables; currently, however, only global persis-
tent variables are available.
The target system has to provide a separate memory area per application for the list of persistent
variables.
With each upload of the application, the list of persistent variables on the PLC is compared to that of the
project. The list of variables on the PLC is also identified by the application name, amongst others. If
there are inconsistencies the user is requested to initialise all persistent variables prior to the download.
Inconsistencies occur, for instance, if existing persistent variable delcarations are renamed, deleted or
otherwise modified.
New declarations can only be added at the end of the list; they are recognised as "new" during a
download and do not require a re-initialisation of the complete list.
1.10.3. Synoptical Table - Behaviour of Remanent Variables
x = Value is kept
- = Value is re-initialised
following an on-line command VAR VAR RETAIN VAR PERSISTENT VAR
RETAIN PERSISTENT
VAR PERSISTENT RE-
TAIN
Reset Warm Application - x x
Reset Cold Application - - x
Reset Source Application - - -
Load (=download) application - - x
On-line change application x x x
Reboot PLC - x x
1.11. Network Variables
If this feature is supported by the target system, it is possible to carry out data exchange within the
network by means of network variables.
This kind of cross-communication is supported by the ACOS 750 automation and telecontrol device.
In "rigid" lists of variables, network variables must be defined both in the transmitter and the receiver.
Their values are transmitted within the network via broadcasting
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 20
Network variables can be managed by means of...
Global Variable Lists (GVL) in the transmitting device (Sender), and in one or several corresponding
Global Network Variable Lists (GNVL) in one or several receiving devices (Receiver).
The GBL and GNVLs belonging together must have the same variable declarations.
A Global Variable List (GVL) that is to define network variables, must have special network properties.
These properties are protocol and transmission parameters according to which the variable values shall
be transmitted within the network and which shall enable the reception of the variable values by all
devices with the appropriate GNVL.
Please not that transmission of network variables invariably takes place in one direction only, i.e. from
the Sender (GVL) to the Receiver (GNVL)! However, due to the fact that each device is capable of
handling both GVLs and GNVLs, it is possible to use a device both as a Sender and a Receiver.
One condition for the exchange of network variables is the installation of the appropriate network li-
braries. This is done automatically for the standard network functionalities, e.g. UDP, once the network
properties of a GVL have been set.
1.11.1. Definition of Network Properties of a Global Variable List (Sender)
Select "Global Variable List" in the navigation tree and then select the command "Properties" from the
context menu. After that, you can make the following settings under Network Properties:
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 21
Figure 17: How to define the network properties of a GVL
1.11.2. How to Add a Global Network Variable List (Receiver)
Your require at least two devices in a project for the definition of an GNVL. Begin by adding a second
device with all the required objects to the project. Select "Application" in your newly added device. Open
the dialog "Add Object" to add a Global Network Variable List that is the counterpart of the defined GVL
of your first device.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 22
Figure 18: How to add a Global Network Variable List
Enter a name of your choice. The "Sender" box contains a drop-down list of all available GVLs in a
project, together with their network properties. In our example, only the "GVL" is available.
Close the dialog via "OK" in order to insert the object "NVL" under "Application" in your newly added
device. This GNVL automatically includes the same variable declarations as the "GVL". GVL and GNVL
are shown with a red arrow in the transmission and the receive direction, provided they have been
configured as described above. If you have any further queries, please use the CoDeSys

V3 on-line
help.
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 23
Figure 19: Device view of the Global Network Variable List - Sender and Receiver
Programming of PLCs via CoDeSys V3
IDS GmbH, 10/2010 24
2. IEC 60870-5 Communication Library
The CoDeSys

V3 programming system includes a standard library which has been supplemented with
the communication library from IDS. This IDS communication library provides function blocks which
enable you to directly access information objects of the IEC 60870-5-101/104 standard in the ACOS 750
automation and telecontrol system, in order to perform communication tasks in telecontrol systems.
Information object types
For the use of function blocks, it is irrelevant whether the information objects are
- registered in the local station,
- sent/received in the monitoring direction or
- sent/received in the command direction.
The following information object types of the IEC 60870-5-101/104 standard are supported:
- Single-point information, double-point information, regulating-step position information
- Measured values (normalised, scaled, floating-point measured values)
- Counter values
- Single commands (persistent/pulse commands), double commands (pulse commands), regulat-
ing-step commands
- Setpoints (normalised, scaled, floating-point setpoints)
IDS GmbH, 10/2010 25
2.1. Operation Sequence
The following illustration gives a schematic overview of the operation sequence:
Figure 20: Operation Sequence
The meaning of the different index entries is listed in the following table:
Index Meaning Function Blocks
1 Reception of event signals, measured val-
ues and counter values in the monitoring
direction.
GET_SPI, GET_DPI, GET_RSPI
GET_MV_NORM, GET_MV_SCALED,
GET_MV_REAL
GET_IT
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 26
Index Meaning Function Blocks
2 Reception of commands and setpoints in the
command direction.
GET_SPI, GET_DPI, GET_RSPI
GET_SPC_NORM, GET_SPC_SCALED,
GET_SPC_REAL
3 Transmission of event signals, measured
values and counter values in the monitoring
direction.
GET_SPI, GET_DPI, GET_RSPI
GET_MV_NORM, GET_MV_SCALED,
GET_MV_REAL
SET_IT
4 Transmission of commands and setpoints in
the command direction.
GET_SPI, GET_DPI, GET_RSPI
GET_SPC_NORM, GET_SPC_SCALED,
GET_SPC_REAL
Note
In contrast to the data elements of the I/O level, the data elements under index entries 2
and 3 are virtual data elements of the PLC. Therefore, they cannot be accessed via variable
declaration with direct addressing, but only via function blocks from the communication li-
brary. Status signals, too, can only be accessed via function blocks. The address ranges of
these status signals and virtual data elements are listed in the following table:
Information ob-
ject
Meaning Information object
range
Addressing
acc. to IEC
61131-3
Quantity Data type
Status signals 0001 - 4095 dec
0001 - 0FFF hex
only via FBs
Event signals Event signals gener-
ated by the PLC pro-
gram
4,097 - 8,191 dec
1,001 - 1FFF hex
only via FBs BOOL
Measured values Measured values gen-
erated by the PLC pro-
gram
8,193 - 12,287 dec
2,001 - 2FFF hex
only via FBs INT, REAL
Counter value Counter contents gen-
erated by the PLC pro-
gram
12,289 - 16,383 dec
3,001 - 3FFF hex
only via FBs UDINT
Commands Commands from the
control centre and other
stations, respectively
24,577 - 28,671 dec
6,001 - 6FFF hex
only via FBs BOOL
Setpoints Commands from the
control centre and other
stations, respectively
20,481 - 24,575 dec
5,001 - 5FFF hex
only via FBs INT, REAL
Basically, the operations sequence is as follows:
Basic structure
The PLC application in the ACOS 750 automation and telecontrol device is able to access both data
elements from the local station (I/O level, system information) and data elements from stations in the
command direction, and it supports communication with control systems, operation and monitoring
devices or with stations in the monitoring direction. There are 2 ways of accessing data elements in
the local station:
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 27
A: IEC 60870-5-101/-104
Access to data elements (I/O level, system information) that are mapped to information objects acc.
to the IEC 60870-5-101/104 standard. These data elements can be accessed via function blocks
acc. to IEC 61131-3 of the IDS-IEC-60870 library which can be for use with CoDeSys

V3 (see
description of the library). The advantage of this method is that enables the utilisation of the complete
information content of a data element (status, quality, cause of transmission etc.) acc. to the IEC
60870-5-101/104 standard.
B: IEC 61131-3
Access to data elements (only I/O level) via variable declaration with direct addressing (AT declara-
tion) acc. to IEC 61131-3. Example: PumpeStart AT %QX0.0:; BOOL; (see list of address assign-
ments). This is the most performant way of accessing data elements on the I/O level. However, one
can only access the status. For this mode of access, data elements do not necessarily have to be
mapped to information objects acc. to. the IEC 60870-5-101/104 standard.
Access to data elements from stations in the command direction is only possible for those data elements
(I/O level, system information, data elements of the PLC application for communication with higher-level
control systems, operation and monitoring devices or stations) that are mapped to information objects
acc. to the IEC 60870-5-101/104 standard. In this context, it is irrelevant via which communication ap-
plication the stations are connnected (IEC 60870-5-101/104, protocol drivers Modbus, Profibus, etc. with
conversion into information objects acc. to IEC 60870-5 ). Additionally, these information objects must
also be parameterised in the information object model (process image) of the station that shall be ac-
cessed from the PLC application.
Communication with control systems, operation and monitoring devices or stations in the monitoring
direction can be done solely via data elements that are mapped to information elements acc. to IEC
60870-5-101/104 in the information object model of the local station. These data elements can be ac-
cessed via function blocks acc. to IEC 61131-3 of the IDS-IEC-60870 library which can be integrated
for use with CoDeSys

V3.
The following paragraph gives a description of the function blocks from the communication library in
alphabetical order:
1. Name of function block with a short description of its communication task
2. Image of the function block
3. Overview table of function block parameters, with IN referring to input parameters and OUT for
output parameters.
4. Conditions required to enable the function block to perform its communication task(s).
5. Further description, if necessary
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 28
2.2. Reception of Data in Monitoring Direction
2.2.1. GET_SPI - Get Single-Point Information
Figure 21: GET_SPI
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xON OUT BOOL INformation object sta-
tus, bit SPI in SIQ
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
byQUAL OUT BYTE Information object quali-
ty, QDS in SIQ
xIV OUT BOOL Invalid Bit IV from information object quality
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to receive single-
point information.
Preconditions
To be able to receive single-point information from a source station, please make sure that the in-
formation objects are parameterised in the source station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 29
2.2.2. GET_DPI - Get Double-Point Information
Figure 22: GET_DPI
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xOFF OUT BOOL Status Double-point information- Status OFF
(State Bit0)
xON OUT BOOL Status Double-point information - Status ON
(State Bit1)
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
byQUAL OUT BYTE Information object quali-
ty, QDS in DIQ
xIV OUT BOOL Invalid Bit IV from information object quality
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to receive double-
point information.
Preconditions
To be able to receive double-point information from a source station, please make sure that the
information objects are parameterised in the source station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 30
2.2.3. GET_RSPI - Get Regulating-Step Position Information
Figure 23: GET_RSPI
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
siVALUE OUT SINT Regulating-step position
information (Value with
transient state indication
(VTI))
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
byQUAL OUT BYTE Information object quali-
ty, QDS, Qualifier of
Command
xIV OUT BOOL Invalid Bit IV from information object quality
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to receive regulating-
step position information.
Preconditions
To be able to receive regulating-step position information from a source station, please make sure
that the information objects are parameterised in the source station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 31
2.2.4. GET_IT - Get Counter Value
Figure 24: GET_IT
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
udiVALUE OUT UDINT Counter value in binary
counter reading (BCR)
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
byQUAL OUT BYTE Information object quali-
ty
xIV OUT BOOL Invalid Bit IV from information object quality
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to receive counter
values.
Preconditions
To be able to receive counter values from a source station, please make sure that the information
objects are parameterised in the source station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 32
2.2.5. GET_MV_REAL - Get Floating-Point Measured Value
Figure 25: GET_MV_REAL
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
rVALUE OUT REAL Floating-point value
(IEEE)
COT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
byQUAL OUT BYTE Information object quali-
ty
xIV OUT BOOL Invalid Bit IV from information object quality
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to receive floating-
point measured values.
Preconditions
To be able to receive floating-point measured values from a source station, please make sure that
the information objects are parameterised in the source station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 33
2.2.6. GET_MV_NORM - Get Normalised Measured Value
Figure 26: GET_MV_NORM
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
iVALUE OUT INT Normalised value
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
byQUAL OUT BYTE Information object quali-
ty
xIV OUT BOOL Invalid Bit IV from information object quality
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to receive normalised
measured values.
Preconditions
To be able to receive normalised measured values from a source station, please make sure that the
information objects are parameterised in the source station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 34
2.2.7. GET_MV_SCALED - Get Scaled Measured Value
Figure 27: GET_MV_SCALED
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
iVALUE OUT INT Scaled value
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
byQUAL OUT BYTE Information object quali-
ty
xIV OUT BOOL Invalid Bit IV from information object quality
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to receive scaled
measured values.
Preconditions
To be able to receive scaled measured values from a source station, please make sure that the
information objects are parameterised in the source station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 35
2.3. Reception of Data in Command Direction
2.3.1. GET_SC - Get Single Command
Figure 28: GET_SC
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the single per-
sistent command is taken over and
acknowledged "positive".
<1>:= not accepted: Block outputs are
not updated, the single persistent
command is not taken over and is ac-
knowledged "negative".
xTERMP IN BOOL positive termination <0>:= no termination
<1>:= Evaluation during next polling
of function block, single-pulse com-
mand is terminated "positive"
xTERMN IN BOOL negative termination <0>:= no termination
<1>:= Evaluation during next polling
of function block, single-pulse com-
mand is terminated "negative"
xON OUT BOOL Status Single command state, Bit 0 (SCS) in
SCO
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOC OUT USINT Qualifier of Command When receiving commands from the
control centre, QOC equalises the
qualifier of command in SCO.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 36
Parameter Typ
e
Data type Short Description Explanation
xUPDATE OUT BOOL Update qualifier <0>:= no new single persistent com-
mand is pending or single persistent
command is not parameterised
<1>:= new single persistent command
is pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of this function block in the PLC program to receive single persistent com-
mands from the control centre.
Preconditions
To be able to receive single persistent commands from the control centre, please make sure that the
addressed information objects are parameterised and that they are in-service.
Note
If a reset takes place during a persistent command, the command is interrupted because
the information objects of the process image are reset to their initial value. Therefore pulse
commands are to be preferred.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 37
2.3.2. GET_DC - Double Command
Figure 29: GET_DC
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the double com-
mand is taken over and acknowl-
edged "positive".
<1>:= not accepted: Block outputs are
not updated, the double command is
not taken over and is acknowledged
"negative".
xTERMP IN BOOL positive termination <0>:= no termination
<1>:= Evaluation during next polling
of function block, double command is
terminated "positive"
xTERMN IN BOOL negative termination <0>:= no termination
<1>:= Evaluation during next polling
of function block, double command is
terminated "negative"
xOFF OUT BOOL Status Double command status 0 (DCS) in
DCO
xON OUT BOOL Status Double command status 1 (DCS) in
DCO
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOC OUT USINT Qualifier of Command When receiving commands from the
control centre, QOC equalises the
qualifier of command in DCO.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 38
Parameter Typ
e
Data type Short Description Explanation
xUPDATE OUT BOOL Update qualifier <0>:= no new double command is
pending or double command is not
parameterised
<1>:= new double command is pend-
ing
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of this function block in the PLC program to receive double commands from
the control centre.
Preconditions
To be able to receive double commands from the control centre, please make sure that the addressed
information objects are parameterised and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 39
2.3.3. GET_RSC - Get Regulating-Step Command
Figure 30: GET_RSC
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the regulating-
step command is taken over and ac-
knowledged "positive".
<1>:= not accepted: Block outputs are
not updated, the regulating-step com-
mand is not taken over and is ac-
knowledged "negative".
xTERMP IN BOOL positive termination <0>:= no termination
<1>:= Evaluation during next polling
of function block, regulating-step com-
mand is terminated "positive"
xTERMN IN BOOL negative termination <0>:= no termination
<1>:= Evaluation during next polling
of function block, regulating-step com-
mand is terminated "negative"
xLOWER OUT BOOL Regulating-step com-
mand status: Low (Step
Low)
xHIGHER OUT BOOL Regulating-step com-
mand status: High (Step
High)
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 40
Parameter Typ
e
Data type Short Description Explanation
usiQOC OUT USINT Qualifier of Command When receiving commands from the
control centre, QOC equalises the
qualifier of command in DCO.
xUPDATE OUT BOOL Update qualifier <0>:= no new regulating-step com-
mand is pending or regulating-step
command is not parameterised
<1>:= new regulating-step command
is pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of this function block in the PLC program to receive regulating-step commands
from the control centre.
Preconditions
To be able to receive regulating-step commands from the control centre, please make sure that the
addressed information objects are parameterised and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 41
2.3.4. GET_SPC_REAL - Get Floating-Point Setpoint
Figure 31: GET_SPC_REAL
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the floating-point
setpoint is taken over and acknowl-
edged "positive".
<1>:= not accepted: Block outputs are
not updated, the floating-point set-
point is not taken over and is acknowl-
edged "negative".
rVALUE OUT REAL Floating-point value
(IEEE)
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOS OUT USINT Setpoint qualifier (Quali-
fier of set-point com-
mand)
xUPDATE OUT BOOL Update qualifier <0>:= no new floating-point setpoint is
pending or floating-point setpoint is
not parameterised
<1>:= new floating-point setpoint is
pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 42
Parameter Typ
e
Data type Short Description Explanation
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of this function block in the PLC program to receive floating-point setpoints
from the control centre.
Preconditions
To be able to receive floating-point setpoints from the control centre, please make sure that the
addressed information objects are parameterised and that they are in-service.
Note
During a system reset, the information object of the process image are reset to their initial
values and the setpoints received in the command direction are deleted accordingly. There-
fore, setpoint variables must be declared in the global persistent variable list. To ensure that
received floating-point setpoints are invariably transmitted to persistent variables, the func-
tion block GET_SPC_REAL_PERSISTENT was developed.
Figure 32: GET_SPC_REAL_PERSISTENT
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the single per-
sistent command is taken over and
acknowledged "positive".
<1>:= not accepted: Block outputs are
not updated, the floating-point set-
point is not taken over and is acknowl-
edged "negative".
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 43
Parameter Typ
e
Data type Short Description Explanation
rVALUE IN_
OUT
REAL Floating-point value
(IEEE)
must be connected to persistent vari-
able
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOS OUT USINT Setpoint qualifier (Quali-
fier of set-point com-
mand)
xUPDATE OUT BOOL Update qualifier <0>:= no new single persistent com-
mand is pending or single persistent
command is not parameterised
<1>:= new single persistent command
is pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Description
GET_SPC_REAL_PERSISTENT receives a floating-point setpoint in the command direction via the
GET_SPC_REAL block. Each time the xUPDATE output is set, this setpoint is written into the variable
that is connected to the IN_OUT variable rVALUE. This variable must be declared as persistent
variable so that the setpoint is available even after a reset.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 44
2.3.5. GET_SPC_NORM - Get Normalised Setpoint
Figure 33: GET_SPC_NORM
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the setpoint is
taken over and acknowledged "posi-
tive".
<1>:= not accepted: Block outputs are
not updated, the setpoint is not taken
over and is acknowledged "negative".
iVALUE OUT INT Normalised value
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOS OUT USINT Setpoint qualifier (Quali-
fier of set-point com-
mand)
xUPDATE OUT BOOL Update qualifier <0>:= no new single persistent com-
mand is pending or single persistent
command is not parameterised
<1>:= new single persistent command
is pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 45
Purpose and Polling
Carry out cyclic polling of this function block in the PLC program to receive normalised setpoints from
the control centre.
Preconditions
To be able to receive setpoints from the control centre, please make sure that the addressed infor-
mation objects are parameterised and that they are in-service.
Note
During a system reset, the information object of the process image are reset to their initial
values and the normalised setpoints received in the command direction are deleted ac-
cordingly. Therefore, setpoint variables must be declared in the global persistent variable
list. To ensure that received setpoints are invariably transmitted to persistent variables, the
function block GET_SPC_NORM_PERSISTENT was developed.
Figure 34: GET_SPC_NORM_PERSISTENT
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the setpoint is
taken over and acknowledged "posi-
tive".
<1>:= not accepted: Block outputs are
not updated, the setpoint is not taken
over and is acknowledged "negative".
iVALUE IN_
OUT
INT normalised value must be connected to persistent vari-
able
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOS OUT USINT Setpoint qualifier (Quali-
fier of set-point com-
mand)
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 46
Parameter Typ
e
Data type Short Description Explanation
xUPDATE OUT BOOL Update qualifier <0>:= no new single persistent com-
mand is pending or single persistent
command is not parameterised
<1>:= new single persistent command
is pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Description
GET_SPC_REAL_PERSISTENT receives a normalised setpoint in the command direction via the
GET_SPC_NORM block. Each time the xUPDATE output is set, this setpoint is written into the var-
iable that is connected to the IN_OUT variable iVALUE. This variable must be declared as persistent
variable so that the setpoint is available even after a reset.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 47
2.3.6. GET_SPC_SCALED - Get Scaled Setpoint
Figure 35: GET_SPC_SCALED
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the setpoint is
taken over and acknowledged "posi-
tive".
<1>:= not accepted: Block outputs are
not updated, the setpoint is not taken
over and is acknowledged "negative".
iVALUE OUT INT Scaled value
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOS OUT USINT Setpoint qualifier (Quali-
fier of set-point com-
mand)
xUPDATE OUT BOOL Update qualifier <0>:= no new single persistent com-
mand is pending or single persistent
command is not parameterised
<1>:= new single persistent command
is pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 48
Purpose and Polling
Carry out cyclic polling of this function block in the PLC program to receive scaled setpoints from the
control centre.
Preconditions
To be able to receive setpoints from the control centre, please make sure that the addressed infor-
mation objects are parameterised and that they are in-service.
Note
During a system reset, the information object of the process image are reset to their initial
values and the scaled setpoints received in the command direction are deleted accordingly.
Therefore, setpoint variables must be declared in the global persistent variable list. To en-
sure that received setpoints are invariably transmitted to persistent variables, the function
block GET_SPC_SCALED_PERSISTENT was developed.
Figure 36: GET_SPC_SCALED_PERSISTENT
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xCONF IN BOOL Confirmation <0>:= accepted (default value): Block
outputs are updated, the setpoint is
taken over and acknowledged "posi-
tive".
<1>:= not accepted: Block outputs are
not updated, the setpoint is not taken
over and is acknowledged "negative".
iVALUE IN_
OUT
INT scaled value must be connected to persistent vari-
able
uiCOT OUT UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
usiQOS OUT USINT Setpoint qualifier (Quali-
fier of set-point com-
mand)
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 49
Parameter Typ
e
Data type Short Description Explanation
xUPDATE OUT BOOL Update qualifier <0>:= no new single persistent com-
mand is pending or single persistent
command is not parameterised
<1>:= new single persistent command
is pending
xUPDATE is pending only for one cy-
cle!
xIV OUT BOOL Invalid Error during reception of command
dtDATETIME OUT DATE_AND_T
IME
Date and time Time stamp acc. to IEC 60870-5 in
format acc. to IEC 61131-3
(DATE_AND_TIME)
xENO OUT BOOL Block enabled (state of
enable)
Description
GET_SPC_SCALED_PERSISTENT receives a scaled setpoint in the command direction via the
GET_SPC_SCALED block. Each time the xUPDATE output is set, this setpoint is written into the
variable that is connected to the IN_OUT variable iVALUE. This variable must be declared as per-
sistent variable so that the setpoint is available even after a reset.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 50
2.4. Transmission of Data in Monitoring Direction
2.4.1. SET_SPI - Send Single-Point Information
Figure 37: SET_SPI
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xON IN BOOL Single-point signal sta-
tus 0 (SPI) in SIQ
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
Default = 3 (spontaneous transmis-
sion)
usiQUAL IN USINT Quality (QDS) in SIQ
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 3- or 7-octet
time tag. This depends on the param-
eterisation of the device's IEC profile
via ACOS ET.
Default = 1
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of status, of the cause of
transmission and of the qualifier of
command are evaluated.
In the event of an xEN status change
from 0 to 1 (positive edge) the same
status is transmitted again
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 51
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to send single-point
signals.
Preconditions
To be able to send single-point signals to a target station, please make sure that the information
objects are parameterised in the target station and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 52
2.4.2. SET_DPI - Send Double-Point Information
Figure 38: SET_DPI
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xOFF OUT BOOL Double-point information
status 0 (DPI) in DIQ
xON OUT BOOL Double-point information
status 1 (DPI) in DIQ
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
Default = 3 (spontaneous transmis-
sion)
usiQUAL IN USINT Quality (QDS) in SIQ
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 3- or 7-octet
time tag. This depends on the param-
eterisation of the device's IEC profile
via ACOS ET.
Default = 1
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of status, of the cause of
transmission and of the qualifier of
command are evaluated.
In the event of an xEN status change
from 0 to 1 (positive edge) the same
status is transmitted again
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 53
Purpose and Polling
Carry out cyclic polling of the function block in the PLC program in order to send a double-point
information signal generated by the PLC program to the control centre.
Preconditions
To be able to send double-point information generated by the PLC program, please make sure that
the addressed information objects are parameterised and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 54
2.4.3. SET_RSPI - Send Regulating-Step Position Information
Figure 39: SET_RSPI
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
usiVALUE IN USINT Regulating-step position
information (Value with
transient state indication
(VTI))
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
Default = 3 (spontaneous transmis-
sion)
usiQUAL IN USINT Quality (QDS) in SIQ
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 3- or 7-octet
time tag. This depends on the param-
eterisation of the device's IEC profile
via ACOS ET.
Default = 1
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of status, of the cause of
transmission and of the qualifier of
command are evaluated.
In the event of an xEN status change
from 0 to 1 (positive edge) the same
status is transmitted again
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 55
Purpose and Polling
Carry out cyclic polling of the function block in the PLC program in order to send a regulating-step
position information generated by the PLC program to the control centre.
Preconditions
To be able to regulating-step position information generated by the PLC program, please make sure
that the addressed information objects are parameterised and that they are in-service.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 56
2.4.4. SET_IT - Send Counter Value
Figure 40: SET_IT
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
udiVALUE IN UDINT Counter value in binary
counter reading (BCR)
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
Default = 3 (spontaneous transmis-
sion)
tCYCLE IN TIME Time pattern for trans-
mission of counter val-
ues
cyclic transmission of counter value -
cycle time is an integer multiple of 1
minute
xCA IN BOOL Counter adjustment Counter adjustment status in BCR (bi-
nary counting)
xIV IN BOOL Invalid "Invalid" qualifier
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 3- or 7-octet
time tag. This depends on the param-
eterisation of the device's IEC profile
via ACOS ET.
Default = 1
usiSQ OUT USINT Sequence number Sequence number in BCR (binary
counting)
xCY OUT BOOL Carry status in BCR
xENO OUT BOOL Block enabled (state of
enable)

IEC 60870-5 Communication Library
IDS GmbH, 10/2010 57
Purpose and Polling
Carry out cyclic polling of the function block in the PLC program in order to send a counter value
generated by the PLC program to the control centre.
Preconditions
To be able to send counter values generated by the PLC program, please make sure that the ad-
dressed information objects are parameterised and that they are in-service.
Description
Transmission of counter values takes place at 60-sec. intervals (default). The sequence number is
generated automatically.
For setting the time pattern, you can only choose integer multiples of 1 minute.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 58
2.4.5. SET_MV_REAL - Send Measured Value
Figure 41: SET_MV_REAL
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
rVALUE IN REAL Floating-point value
(IEEE)

uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
Default = 3 (spontaneous transmis-
sion)
usiQUAL IN USINT IEC quality of the infor-
mation object
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 3- or 7-octet
time tag. This depends on the param-
eterisation of the device's IEC profile
via ACOS ET.
Default = 1
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of measured value's status
and of the IEC quality are evaluated.
Purpose and Polling
Carry out cyclic polling of the function block in the PLC program in order to send a normalised, scaled
or floating-point measured value generated by the PLC program to the control centre.
Preconditions
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 59
To be able to send measured values generated by the PLC program, please make sure that the
addressed information objects are parameterised and that they are in-service.
Description
Evaluation of function block parameters only takes place if the input parameter for evaluation (xEN
= 1) is set.
xEN = 1 with status change from 0 to1 (positive edge). If there is a positive edge, the status of the
measured value MV with IEC quality QUAL and cause of transmission COT is sent to the control
centre as IEC telegram without further examination.
xEN = 1 without status change. If there is no status change, the appropriate IEC telegram will be
sent automatically to the control centre upon every status change of a measured value MV and its
IEC quality QUAL. The generated IEC telegram bears the time tag from the time at which the function
block was polled.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 60
2.4.6. SET_MV_NORM - Send Normalised Measured Value
Figure 42: SET_MV_NORM
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
iVALUE IN INT Normalised value
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
Default = 3 (spontaneous transmis-
sion)
usiQUAL IN USINT IEC quality of the infor-
mation object
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 3- or 7-octet
time tag. This depends on the param-
eterisation of the device's IEC profile
via ACOS ET.
Default = 1
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of measured value's status
and of the IEC quality are evaluated.
Purpose and Polling
Carry out cyclic polling of the function block in the PLC program in order to send a normalised, scaled
or floating-point measured value generated by the PLC program to the control centre.
Preconditions
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 61
To be able to send measured values generated by the PLC program, please make sure that the
addressed information objects are parameterised and that they are in-service.
Description
Evaluation of function block parameters only takes place if the input parameter for evaluation (xEN
= 1) is set.
xEN = 1 with status change from 0 to1 (positive edge). If there is a positive edge, the status of the
measured value MV with IEC quality QUAL and cause of transmission COT is sent to the control
centre as IEC telegram without further examination.
xEN = 1 without status change. If there is no status change, the appropriate IEC telegram will be
sent automatically to the control centre upon every status change of a measured value MV and its
IEC quality QUAL. The generated IEC telegram bears the time tag from the time at which the function
block was polled.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 62
2.4.7. SET_MV_SCALED - Send Scaled Measured Value
Figure 43: SET_MV_SCALED
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
iVALUE IN INT Scaled value
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in monitoring direction.
Default = 3 (spontaneous transmis-
sion)
usiQUAL IN USINT IEC quality of the infor-
mation object
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 3- or 7-octet
time tag. This depends on the param-
eterisation of the device's IEC profile
via ACOS ET.
Default = 1
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of measured value's status
and of the IEC quality are evaluated.
Purpose and Polling
Carry out cyclic polling of the function block in the PLC program in order to send a normalised, scaled
or floating-point measured value generated by the PLC program to the control centre.
Preconditions
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 63
To be able to send measured values generated by the PLC program, please make sure that the
addressed information objects are parameterised and that they are in-service.
Description
Evaluation of function block parameters only takes place if the input parameter for evaluation (xEN
= 1) is set.
xEN = 1 with status change from 0 to1 (positive edge). If there is a positive edge, the status of the
measured value MV with IEC quality QUAL and cause of transmission COT is sent to the control
centre as IEC telegram without further examination.
xEN = 1 without status change. If there is no status change, the appropriate IEC telegram will be
sent automatically to the control centre upon every status change of a measured value MV and its
IEC quality QUAL. The generated IEC telegram bears the time tag from the time at which the function
block was polled.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 64
2.5. Transmission of Data in Command Direction
2.5.1. SET_SC - Send Single Command
Figure 44: SET_SC
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xON IN BOOL Single command status
0 (SCS) in SCO
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
Default = 6 (activation)
usiQOC IN USINT Qualifier of Command <1> := short command excecution
time, excexution time is set through a
system parameter in the RTU
<2> := long command excecution
time, excexution time is set through a
system parameter in the RTU
<3> := Persistent command (Default)
tTIMEOUT IN TIME Timeout Here, the maximum time span for
transmission can be set - if transmis-
sion is not finished before the end of
this interval, the process is terminated
with a fault signal.
Default: TIME#30s0ms
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 7-octet time
tag.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 65
Parameter Typ
e
Data type Short Description Explanation
Default = 1
uiRES OUT UINT Acknowledgement byte
(result)
indicates the status of the transmitted
telegram
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of status, of the cause of
transmission and of the qualifier of
command are evaluated.
In the event of an xEN status change
from 0 to 1 (positive edge) the same
status is transmitted again
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to send single per-
sistent commands.
Preconditions
To be able to send single persistent commands to a target station, please make sure that the infor-
mation objects are parameterised in the target station and that they are in-service.
Description
A time element monitors the arrival of the acknowledgement from the target station:
1. 0x07: positive acknowledgement or
2. 0x47: negative acknowledgement.
The acknowledgement byte (RES) has the following structure:
Bit 0 :=
16#1
<1>:= Telegram was generated and sent to target station; it remains active until a
positive/negative acknowledgement has been received or until the monitoring time is
over.
Bit 1 :=
16#2
<1>:= Acknowledgement of the activation from the target station is positive; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 2 :=
16#4
<1>:= Acknowledgement of the activation from the target station is negative; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 3 :=
16#8
<1>:= Termination of the activation from the target station is positive; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 4 :=
16#10
<1>:= Termination of the activation from the target station is negative; it remains
active until a new command is activated or until the function block is blocked for the
new output xEN = 0
Bit 5 :=
16#20
<1>:= Time-out of the acknowledgement of the activation is over; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 66
Bit 6 unassigned
Bit 7 unassigned
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 67
2.5.2. SET_DC - Send Double Command
Figure 45: SET_DC
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xOFF OUT BOOL Double command status
0 (DCS) in DCO
xON OUT BOOL Double-point information
status 1 (DCS) in DCO
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
Default = 6 (activation)
usiQOC IN USINT Qualifier of Command <1> := short command excecution
time, excexution time is set through a
system parameter in the RTU
<2> := long command excecution
time, excexution time is set through a
system parameter in the RTU
<3> := Persistent command (Default)
tTIMEOUT IN TIME Timeout Here, the maximum time span for
transmission can be set - if transmis-
sion is not finished before the end of
this interval, the process is terminated
with a fault signal.
Default: TIME#30s0ms
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 7-octet time
tag.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 68
Parameter Typ
e
Data type Short Description Explanation
Default = 1
uiRES OUT UINT Acknowledgement byte
(result)
indicates the status of the transmitted
telegram
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of status, of the cause of
transmission and of the qualifier of
command are evaluated.
In the event of an xEN status change
from 0 to 1 (positive edge) the same
status is transmitted again
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to send double com-
mands.
Preconditions
To be able to send double commands to a target station, please make sure that the information
objects are parameterised in the target station and that they are in-service.
Description
A time element monitors the arrival of the acknowledgement from the target station:
1. 0x07: positive acknowledgement or
2. 0x47: negative acknowledgement.
The acknowledgement byte (RES) has the following structure:
Bit 0 :=
16#1
<1>:= Telegram was generated and sent to target station; it remains active until a
positive/negative acknowledgement has been received or until the monitoring time is
over.
Bit 1 :=
16#2
<1>:= Acknowledgement of the activation from the target station is positive; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 2 :=
16#4
<1>:= Acknowledgement of the activation from the target station is negative; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 3 :=
16#8
<1>:= Termination of the activation from the target station is positive; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 4 :=
16#10
<1>:= Termination of the activation from the target station is negative; it remains
active until a new command is activated or until the function block is blocked for the
new output xEN = 0
Bit 5 :=
16#20
<1>:= Time-out of the acknowledgement of the activation is over; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 6 unassigned
Bit 7 unassigned
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 69
2.5.3. SET_RSC - Send Regulating-Step Command
Figure 46: SET_RSC
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
xLOWER IN BOOL Regulating-step com-
mand status: Low (Step
Low)
Regulating step command state 0
(RCS) in RCO
xHIGHER IN BOOL Regulating-step com-
mand status: High (Step
High)
Regulating step command state 1
(RCS) in RCO
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
Default = 6 (activation)
usiQOC IN USINT Qualifier of Command <1> := short command excecution
time, excexution time is set through a
system parameter in the RTU
<2> := long command excecution
time, excexution time is set through a
system parameter in the RTU
<3> := Persistent command (Default)
tTIMEOUT IN TIME Timeout Here, the maximum time span for
transmission can be set - if transmis-
sion is not finished before the end of
this interval, the process is terminated
with a fault signal.
Default: TIME#30s0ms
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 70
Parameter Typ
e
Data type Short Description Explanation
<1>:= Object is sent with 7-octet time
tag.
Default = 1
uiRES OUT UINT Acknowledgement byte
(result)
indicates the status of the transmitted
telegram
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of status, of the cause of
transmission and of the qualifier of
command are evaluated.
In the event of an xEN status change
from 0 to 1 (positive edge) the same
status is transmitted again
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to send regulating-
step commands.
Preconditions
To be able to send regulating-step commands to a target station, please make sure that the infor-
mation objects are parameterised in the target station and that they are in-service.
Description
A time element monitors the arrival of the acknowledgement from the target station:
1. 0x07: positive acknowledgement or
2. 0x47: negative acknowledgement.
The acknowledgement byte (RES) has the following structure:
Bit 0 :=
16#1
<1>:= Telegram was generated and sent to target station; it remains active until a
positive/negative acknowledgement has been received or until the monitoring time is
over.
Bit 1 :=
16#2
<1>:= Acknowledgement of the activation from the target station is positive; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 2 :=
16#4
<1>:= Acknowledgement of the activation from the target station is negative; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 3 :=
16#8
<1>:= Termination of the activation from the target station is positive; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 4 :=
16#10
<1>:= Termination of the activation from the target station is negative; it remains
active until a new command is activated or until the function block is blocked for the
new output xEN = 0
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 71
Bit 5 :=
16#20
<1>:= Time-out of the acknowledgement of the activation is over; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 6 unassigned
Bit 7 unassigned
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 72
2.5.4. SET_SPC_REAL - Send Setpoint
Figure 47: SET_SPC_REAL
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
rVALUE IN REAL Floating-point value
(IEEE)
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
Default = 6 (activation)
usiQOS IN USINT Qualifier of set-point
command
tTIMEOUT IN TIME Timeout Here, the maximum time span for
transmission can be set - if transmis-
sion is not finished before the end of
this interval, the process is terminated
with a fault signal.
Default: TIME#30s0ms
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 7-octet time
tag.
Default = 1
uiRES OUT UINT Acknowledgement byte
(result)
indicates the status of the transmitted
telegram
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of setpoint 's status and of
the IEC quality are evaluated.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 73
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to send setpoints.
Preconditions
To be able to send setpoints to a target station, please make sure that the information objects are
parameterised in the target station and that they are in-service.
Description
A time element monitors the arrival of the acknowledgement from the target station:
1. 0x07: positive acknowledgement or
2. 0x47: negative acknowledgement.
The acknowledgement byte (RES) has the following structure:
Bit 0 :=
16#1
<1>:= Telegram was generated and sent to target station; it remains active until a
positive/negative acknowledgement has been received or until the monitoring time is
over.
Bit 1 :=
16#2
<1>:= Acknowledgement of the activation from the target station is positive; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 2 :=
16#4
<1>:= Acknowledgement of the activation from the target station is negative; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 3 :=
16#8
<1>:= Termination of the activation from the target station is positive; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 4 :=
16#10
<1>:= Termination of the activation from the target station is negative; it remains
active until a new command is activated or until the function block is blocked for the
new output xEN = 0
Bit 5 :=
16#20
<1>:= Time-out of the acknowledgement of the activation is over; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 6 unassigned
Bit 7 unassigned
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 74
2.5.5. SET_SPC_NORM- Send Normalised Setpoint
Figure 48: SET_SPC_NORM
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
iVALUE IN INT Normalised value
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
Default = 6 (activation)
usiQOS IN USINT Qualifier of set-point
command
tTIMEOUT IN TIME Timeout Here, the maximum time span for
transmission can be set - if transmis-
sion is not finished before the end of
this interval, the process is terminated
with a fault signal.
Default: TIME#30s0ms
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 7-octet time
tag.
Default = 1
uiRES OUT UINT Acknowledgement byte
(result)
indicates the status of the transmitted
telegram
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of setpoint's status and of the
IEC quality are evaluated.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 75
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to send setpoints.
Preconditions
To be able to send setpoints to a target station, please make sure that the information objects are
parameterised in the target station and that they are in-service.
Description
A time element monitors the arrival of the acknowledgement from the target station:
1. 0x07: positive acknowledgement or
2. 0x47: negative acknowledgement.
The acknowledgement byte (RES) has the following structure:
Bit 0 :=
16#1
<1>:= Telegram was generated and sent to target station; it remains active until a
positive/negative acknowledgement has been received or until the monitoring time is
over.
Bit 1 :=
16#2
<1>:= Acknowledgement of the activation from the target station is positive; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 2 :=
16#4
<1>:= Acknowledgement of the activation from the target station is negative; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 3 :=
16#8
<1>:= Termination of the activation from the target station is positive; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 4 :=
16#10
<1>:= Termination of the activation from the target station is negative; it remains
active until a new command is activated or until the function block is blocked for the
new output xEN = 0
Bit 5 :=
16#20
<1>:= Time-out of the acknowledgement of the activation is over; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 6 unassigned
Bit 7 unassigned
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 76
2.5.6. SET_SPC_REAL - Send Setpoint
Figure 49: SET_SPC_SCALED
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable xEN determines whether transmis-
sion shall be suppressed or started
again. Status is transmitted to output
parameter xENO.
Default: TRUE
uiCAASDU IN UINT Device address (Com-
mon Address of ASDU)
udiIOA IN UDINT Information Object Ad-
dress
iVALUE IN INT Scaled value
uiCOT IN UINT Cause of Transmission Cause of Transmission acc. to IEC
60870-5-101 in command direction.
Default = 6 (activation)
usiQOS IN USINT Qualifier of set-point
command
tTIMEOUT IN TIME Timeout Here, the maximum time span for
transmission can be set - if transmis-
sion is not finished before the end of
this interval, the process is terminated
with a fault signal.
Default: TIME#30s0ms
siTIMETAG IN SINT Time tag <0>:= Object is sent without time tag
<1>:= Object is sent with 7-octet time
tag.
Default = 1
uiRES OUT UINT Acknowledgement byte
(result)
indicates the status of the transmitted
telegram
xENO OUT BOOL Block enabled (state of
enable)
<0>:= no evaluation, no transmission
<1>:= evaluation is active, i.e.
changes of setpoint's status and of the
IEC quality are evaluated.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 77
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to send setpoints.
Preconditions
To be able to send setpoints to a target station, please make sure that the information objects are
parameterised in the target station and that they are in-service.
Description
A time element monitors the arrival of the acknowledgement from the target station:
1. 0x07: positive acknowledgement or
2. 0x47: negative acknowledgement.
The acknowledgement byte (RES) has the following structure:
Bit 0 :=
16#1
<1>:= Telegram was generated and sent to target station; it remains active until a
positive/negative acknowledgement has been received or until the monitoring time is
over.
Bit 1 :=
16#2
<1>:= Acknowledgement of the activation from the target station is positive; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 2 :=
16#4
<1>:= Acknowledgement of the activation from the target station is negative; it re-
mains active until a new command is activated or until the function block is blocked for
the new output xEN = 0
Bit 3 :=
16#8
<1>:= Termination of the activation from the target station is positive; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 4 :=
16#10
<1>:= Termination of the activation from the target station is negative; it remains
active until a new command is activated or until the function block is blocked for the
new output xEN = 0
Bit 5 :=
16#20
<1>:= Time-out of the acknowledgement of the activation is over; it remains active
until a new command is activated or until the function block is blocked for the new
output xEN = 0
Bit 6 unassigned
Bit 7 unassigned
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 78
2.6. System Time
2.6.1. GET_SYSTEMTIME02
Figure 50: GET_SYSTEMTIME02
Parameter Typ
e
Data type Short Description Explanation
xEN IN BOOL State of enable Enables block processing, input pa-
rameter xEN is transferred to output
parameter xENO.
usiYEAR OUT USINT Year 0...99
usiMONTH OUT USINT Month 0...12
usiDAY OUT USINT Day 0...31
usiHOUR OUT USINT Hour 0...23
usiMINUTE OUT USINT Minute 0...59
usiSEC OUT USINT Second 0...59
usiWEEKDAY OUT USINT Weekday 1 = Monday... 7 = Sunday
xSU OUT BOOL Summer time 0 = Standard time, 1 = Summer time
xIV OUT BOOL Invalid Error during reception of system time
xENO OUT BOOL Block enabled (state of
enable)
Purpose and Polling
Carry out cyclic polling of the corresponding function block in the PLC program to ascertain the
system time.
IEC 60870-5 Communication Library
IDS GmbH, 10/2010 79

S-ar putea să vă placă și