IEC 60870 Client

Overview

This feature is available starting with PROCON-Connect v1.4.0.

The IEC 60870 client in PROCON-Connect enables connection to external IEC 60870 servers, such as control or protection devices, telecontrol stations, or network components. It is used to receive measured values, statuses, and events from connected IEC devices, as well as to transmit commands or setpoints in accordance with the IEC standard.

The telegrams sent by the connected IEC server are processed by the client, and their contents are automatically mapped to tags in PROCON-Connect. This makes all data available throughout the system for further processing. The tags can be used for process connections, logic and function modules, visualizations, data logging, and for transmission to other protocols.

Client Overview

Overview of managing existing clients and a starting point for adding new clients.

60870 client overview
  1. Name: The client’s unique name. This can be chosen freely when adding the client and is used solely for identification purposes in the overview.

  2. Server type: The client can be of type 104 (TCP) or 101 (serial). The client type affects the configuration options when adding a client, as well as its communication protocol.

  3. Status: Possible statuses are Active, Stopped, Error or Unlicensed. Only an active client can send and receive messages.

  4. Options menu: The starting point for manually adding information objects, importing information objects, or editing and deleting the client.

Configure the client

You can add a new client and configure it directly using the button (1).
You can adjust the configuration of an existing client via the Options menu (2).
60870 client configuration

The following parameters can be configured in a client:

  • Client type: The client’s protocol type. Cannot be changed.

  • Name: The client’s name is displayed on the overview page and is intended to make it easier to identify them.

  • Origin address: The origin address is included when sending telegrams so that the origin of a request can be identified.

Configure the 104 client

These parameters are specific to 104:

  • Server address: The network address of the server to which the client should connect.

  • Port: The port to which the client should connect. The default port is 2404.

  • T0: Time limit for establishing a connection (in seconds).

  • T1: Timeout for transmitted APDUs in I/U format (in seconds). If the timeout expires without an acknowledgement, the connection is closed. This is used by the sender to determine whether the receiver has failed to acknowledge a message.

  • T2: Time limit for message acknowledgement (in seconds). This time limit is used by the recipient to determine the point in time by which the message acknowledgement must be sent.

  • T3: Time limit for sending test telegrams when the connection is inactive (in seconds).

  • K: Number of unacknowledged APDUs in I-format. The sender terminates the transmission after K unacknowledged I-messages.

  • W: Number of unacknowledged APDUs in I-format. The recipient will acknowledge them after no more than W messages.

Configure the 101 client

These parameters are specific to 101:

  • Serial Port: Specify the serial port to be used for communication, e.g., /dev/ttsS0. PROCON-Connect must be able to access the serial port. For container-based deployments, a corresponding assignment is required in the Docker environment. Ensure that the serial port is not being used by other components at the same time.

  • Baud rate: Transmission speed. The default is 9600 baud.

  • Data bits: Number of data bits [7, 8]. The default is 8 bits.

  • Stop bits: Number of stop bits [1, 2]. The default is 1 bit.

  • Parity: Use of a parity bit [even, odd, none]. The default is even parity.

  • Mode: Connection mode [unbalanced, balanced]. The default is unbalanced.
    • The balanced mode supports communication between a single client and a single server via a dedicated serial line. This mode is balanced in that both sides can send messages spontaneously at any time.

    • The unbalanced mode supports communication between a single client and multiple servers on a serial bus. Each server is addressed via its unique link-layer address. Servers are not permitted to send messages spontaneously; they only respond to requests from the client. The client can address multiple servers simultaneously via a broadcast address.

  • Poll interval (ms): Used only in unbalanced mode. The interval, in milliseconds, at which the connection layer is polled for new messages. The default is 1000 ms.

  • Address size: Length of the address in bytes [1, 2]. The default is 1 byte.

  • Ack timeout (ms): The connection layer’s timeout for acknowledgement, in milliseconds. The default is 200 ms.

  • Repeat timeout (ms): Timeout in milliseconds for retrying message transmission if no acknowledgement has been received. The default is 1000 ms.

  • Link state timeout (ms): The interval, in milliseconds, at which the connection status request (FunctionCode=0) is repeated after the response timeout has expired. The default is 5000 ms.

  • Use single char ACK: Use a single-character acknowledgement for ACK (FunctionCode=0) or RESP_NO_USER_DATA (FunctionCode=9). The default setting is enabled.

  • Own link-layer address: Used only in balanced mode. The client’s address at the link layer. The default is 0.

  • Server link layer address: The address of the server(s) in the link layer. The default is 1.

  • Size of common address (CA): Number of bytes in the Common Address (CA) [1, 2]. The default is 2 bytes.

  • Size of information object address (IOA): Number of bytes in the Information Object Addresses (IOA) [1, 2, 3]. The default is 3 bytes.

  • Size of cause of transmission (COT): Number of bytes in the Cause Of Transmission (COT) [1, 2]. The default is 2 bytes.

Overview of information objects

To access the information object overview, first navigate to the IEC 60870-5 client overview page. Clicking on a client entry opens its information object overview.To access the information object overview, first navigate to the IEC 60870-5 client overview page. Clicking on a client entry opens its information object overview.

60870 client IOA overview
  1. Name: Name of the information object. Displayed in the information object overview. Optional.

  2. IEC data type: The data type of the information object.

  3. CA: The information object’s shared address in dual notation: integer and byte-by-byte.

  4. IOA: Information object address in dual notation: integer and byte-by-byte.

  5. Tags: A list of all tags assigned to the information object.

  6. Options menu: The starting point for editing or deleting an existing information object.

When configuring information objects, multiple tags are assigned. The link between an information object and tags is established via dependencies. The configuration is automatically checked for consistency when the overview is opened. Any inconsistencies are indicated by a warning triangle in the first column of the information object overview. Further information is displayed in a tooltip when the mouse pointer is positioned over the warning triangle. During the check, the value ranges of the assigned tags are examined in conjunction with the IEC data type.

Configure information objects

You can add a new information object via the Options menu of the relevant client. There you will find the option Add information object (1).
You can edit an existing information object via its Options menu (2).
60870 client IOA configuration

General parameters

The following parameters can always be configured in an information object. These parameters are not dependent on the IEC data type.

  • Name: Name of the information object. Displayed in the information object overview. Optional.

  • Common Address (CA): The CA can be entered in the left-hand field as a single number or in the right-hand field byte by byte. [1; 65534] are station addresses; 65535 is the global address.

  • Information Object Address (IOA): The IOA can be entered as a single number in the left-hand field or byte by byte in the right-hand field.

  • IEC data type: The IEC data type can be selected from a drop-down menu. The selection affects the configuration options below, such as the available tag mappings.

Parameters in the monitoring direction

The following parameters are available for all IEC data types in the monitoring direction:

  • General query: The information object is included in the response to the general query.

  • Group interrogation: Information objects in the monitoring direction can be assigned to groups. Any number of groups can be assigned in parallel. It is also possible to combine this with the general query.

  • Cyclic transmission (COT1): Information objects in the monitoring direction can be transmitted cyclically.

  • Event/Spontaneous Transmission (COT3): Information objects in the monitoring direction can be transmitted when their values change. Absolute and percentage thresholds can be defined, by which the value must have changed compared to the last transmission.

Depending on the IEC data type, the following tag mappings in the monitoring direction are possible:

  • Value: The tag whose value is to be transferred.

  • Quality: A field containing quality information. The quality information is represented as an integer. The quality information can be extracted bit by bit, for example at the Codesys level.

  • Transient: A Boolean tag indicating whether the information object is currently in a transitional state. true = transitional, false = steady-state.

  • Timestamp: The tag containing the timestamp. If no tag is selected, the most recent timestamp from the other tag assignments (Value, Quality, Transient) is used. The source of the timestamp depends on the driver. For driver-specific details, see Driver settings.

IEC data type

Value

Quality

Transient

Timestamp

[001] M_SP_NA_1 - Single Point Value

x

x

[003] M_DP_NA_1 - Double Point Value

x

x

[005] M_ST_NA_1 - Step Position Information

x

x

x

[009] M_ME_NA_1 - Measured Value, Normalized

x

x

[011] M_ME_NB_1 - Measured Value, Scaled

x

x

[013] M_ME_NC_1 - Measured Value, Short

x

x

[015] M_IT_NA_1 - Integrated Totals

x

x

[021] M_ME_ND_1 - Measured Value Without Quality

x

[030] M_SP_TB_1 - Single Point Value with CP56Time2a

x

x

x

[031] M_DP_TB_1 - Double Point Value with CP56Time2a

x

x

x

[032] M_ST_TB_1 - Step Position Information with CP56Time2a

x

x

x

x

[034] M_ME_TD_1 - Measured Value, Normalized with CP56Time2a

x

x

x

[035] M_ME_TE_1 - Measured Value, Scaled with CP56Time2a

x

x

x

[036] M_ME_TF_1 - Measured Value, Short with CP56Time2a

x

x

x

[037] M_IT_TB_1 - Integrated Totals with CP56Time2a

x

x

x

Parameters in the command direction

Depending on the IEC data type, the following tag mappings in the command direction are possible:

  • Value: The tag whose value is to be transferred.

  • Qualifier: A tag containing quality information. The quality information is represented by an integer.

  • Select/Execute: A Boolean tag that can be used to prepare messages. true = Execute, false = Select.

  • Transmission cause: A tag containing information on whether the command is an ACTIVATION or a DEACTIVATION. This can be evaluated in the PLC to cancel the execution of a command currently in progress.

  • Timestamp: The tag containing the timestamp. If no tag is selected, the most recent timestamp from the other tag assignments (Value, Quality, Transient) is used. The source of the timestamp depends on the driver. For driver-specific details, see Driver settings.

IEC data type

Value

Qualifier

Select/Execute

Cause of transmission

Timestamp

[045] C_SC_NA_1 - Single Command

x

x

x

x

[046] C_DC_NA_1 - Double Command

x

x

x

x

[047] C_RC_NA_1 - Step Command

x

x

x

x

[048] C_SE_NA_1 - Setpoint Command, Normalized

x

x

x

x

[049] C_SE_NB_1 - Setpoint Command, Scaled

x

x

x

x

[050] C_SE_NC_1 - Setpoint Command, Short

x

x

x

x

[058] C_SC_TA_1 - Single Command with CP56Time2a

x

x

x

x

x

[059] C_DC_TA_1 - Double Command with CP56Time2a

x

x

x

x

x

[060] C_RC_TA_1 - Step Command with CP56Time2a

x

x

x

x

x

[061] C_SE_TA_1 - Setpoint Command, Normalized with CP56Time2a

x

x

x

x

x

[062] C_SE_TB_1 - Setpoint Command, Scaled with CP56Time2a

x

x

x

x

x

[063] C_SE_TC_1 - Setpoint Command, Short with CP56Time2a

x

x

x

x

x

Writing feedback tag assignment

In the command direction, additional tag mappings are required in order to be able to associate a controller’s responses with a specific command.

  • Request counter: The value of this numeric tag is automatically incremented as soon as the associated command is received. Connected controllers can monitor changes to this value to determine whether the command has been triggered.

  • Response counter: Connected controllers should increment the response counter to the value of the request counter once the command has been processed. This informs the IEC 60870 server that processing has been completed. The server then acknowledges the completion of processing to the client with COT_ACTIVATION_TERMINATION (COT10).

  • Response status: Connected controllers should set this Boolean tag to true if the command was executed successfully. Otherwise, the value should be set to false. The response status must be set before the response counter is set. If the status is false, COT_ACTIVATION_TERMINATION (COT10) is sent with the negative flag set.

The Write Feedback Tag Assignment block is used to link a command and its response on the 60870 server:

  • The command is sent to the PLC and the request counter for the PLC is incremented.

  • The PLC executes the command in accordance with its internal logic.

  • The result can be written to the response status.

  • The PLC can then set the response counter equal to the request counter.

  • The 60870 can now evaluate the response Status and forward it to the client.

Import Information Objects

The configuration of 60870 clients is often based on Excel-based lists of data points provided by energy suppliers on a facility-specific basis. The CSV-based import of information objects is designed to facilitate the efficient transfer of this information into the system.

The edited CSV file can then be imported into two systems: Codesys and PROCON-Connect.

An import script is available for Codesys that creates a corresponding variable in the global variable list (GVL) based on the specified variable name and IEC data type. The script is provided as a Codesys package and can be installed accordingly.

For the 60870 client, you can use the “Import Information Objects” option to create the information objects.

During the import process, you can select a previously created Codesys connection. If the CSV file contains tag names, these variable names are automatically imported into the variable list of the selected Codesys connection and mapped to the information object.

For all other drivers, the corresponding tags must first be imported manually. During import, PROCON-Connect searches for tags with the same name and automatically assigns them to the information object.

Although this mechanism is based on the tag name, tags in information objects are referenced by their technical ID; in other words, renaming a tag does not remove the association.

Import Start Point

The starting point is the Client Overview. From the Options menu of an existing 60870 client, you can select the Import Information Objects option. A dialog box will open. From this dialog box, you can download the required CSV template or upload a file that has already been prepared for import.

Configuring the CSV file

The field separator is the character ;
The file and import support the UTF-8 character set.
The CSV file contains the following columns (* = required field):

CSV column

Parameter

Description

name

Name

Purpose of the signal. Displayed in the UI to aid identification. Data type: String.

datatype *

IEC data type

IEC data type number, e.g. 20 for general query. Data type: Numeric, [0; 126].

caLow *

CA Low

Low byte of the Common Address of the ASDU (Application Service Data Unit). If, in serial configurations, a CA is selected using only one byte, only the CA L field should be used for import. The CA H field remains empty and is not a mandatory field. Data type: Numeric, [0, 127].

caHigh *

CA High

Highest byte of the ASDU (Application Service Data Unit) shared address. Data type: Numeric, [0, 127].

ioaLow *

IOA Low

Low byte of the Information Object Address (IOA). Data type: Numeric, [0; 127].

ioaMid *

IOA Mid

Middle byte of the Information Object Address (IOA). If, in serial configurations, the IOA is selected using only two bytes, IOA L and IOA H must be used for the import. In this case, IAM M remains empty and is not a mandatory field. Data type: Numeric, [0; 127].

ioaHigh *

IOA High

High byte of the Information Object Address (IOA). Data type: Numeric, [0; 127].

valueTagName

Value

A tag representing the value. Data type: String.

valueTagComment

Value comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

timestampTagName

Timestamp

Name of the tag representing the CP56Time2a timestamp. Data type: String (CP56Time2a timestamp).

timestampTagComment

Timestamp comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

qualityTagName

Quality

Name of the tag that represents the quality information in the monitoring direction. Data type: Numeric.

qualityTagComment

Quality comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

qualifierTagName

Qualifier

Name of the tag that represents the quality information in the command direction. Data type: Numeric.

qualifierTagComment

Qualifier comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

selectExecuteTagName

Select/Execute

Name of the tag used to prepare messages. Data type: String.

selectExecuteTagComment

Select/execute comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

transientTagName

Transient

Name of the tag representing the transition state. Data type: String.

transientTagComment

Transient comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

causeOfTransmissionTagName

Cause of transmission

Name of the tag that determines whether the command is an ACTIVATION or a DEACTIVATION. Data type: String.

causeOfTransmissionTagComment

Cause of transmission comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

requestCounterTagName

Request counter

Name of the tag representing the request counter. Data type: String.

requestCounterTagComment

Request counter comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

responseCounterTagName

Response counter

Name of the tag representing the response counter. Data type: String.

responseCounterTagComment

Response counter comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

responseStatusTagName

Response status

Name of the tag representing the response status. Data type: String.

responseStatusTagComment

Response status comment

Comment on the tag. When imported into Codesys, this is written as a source code comment after the variable. Data type: String.

spontaneousEnabled

Event/Spontaneous transmission (COT3)

TRUE = Spontaneous transmission enabled. FALSE or [empty] = Spontaneous transmission disabled. Data type: Boolean.

spontaneousThresholdType

Threshold type

The threshold check can be performed as ‘not at all’, ‘absolutely’ or ‘relatively’. Data type: Enum. The following keywords are available during import:
  • Procentual - Enables percentage-based threshold checking based on the most recently transmitted value. A threshold value must be entered.

  • Absolute – Enables percentage-based threshold checking based on the most recently transmitted value. A threshold value must be entered.

  • [empty] - No threshold check is performed.

spontaneousThresholdValue

Threshold

This value must be specified if the threshold type has been set to percentage or absolute. A full stop must be used as the decimal separator, for example: 3.75. Data type: Numeric, positive numbers.

stationInterrogationEnabled

Group interrogation

TRUE = General interrogation (COT 20) or general counter interrogation (COT 37) enabled. False or [empty] = General query/general counter intorrogation disabled. Data type: Boolean.

interrogationGroups

Groups

Configuration for group queries. 1–16 for measured values. 1–4 for counters. Multiple groups can be specified separated by commas, e.g. 1, 16. Data type: String.

cyclicPublishIntervalSec

Cyclic transmission (COT1)

A positive integer can be entered. The unit is seconds. The import automatically enables cyclic transmission if a value is specified. If the field is left blank, cyclic transmission is not enabled. Data type: Numeric, positive numbers.

Import trends

Can I edit the CSV file in Excel?

Yes, this is possible to a limited extent. However, depending on the culture and CSV settings, the file may be automatically adjusted as soon as the CSV file is opened.

Excel automatically adjusts the following data when the file is opened, based on the regional settings:

  • Region-specific list separators (, vs. ;)

  • Region-specific decimal separators (. → ,)

  • Region-specific date formatting (01-02 → 1 February or 2 January)

  • Region-specific number recognition (, vs. .)

  • Remove leading zeros (00123 → 123)

  • Conversion to scientific notation (1234500000000 → 1.2345E+12)

  • Incorrect rendering with UTF-8 without BOM (Ä → Ä)

  • Automatic formatting of percentage or currency formats

  • Removal or misinterpretation of escape sequences

  • Converting empty strings to empty fields (”” → NULL)

The following settings must therefore be adjusted according to the region:

  • Regional settings in the operating system: Windows Control Panel Region Additional settings List separator (;)

  • Excel Options: Excel Options Advanced
    • Use the operating system's separator

    • Automatic number recognition

    • Use number formatting

    • Data conversion when pasting text

    • Comma formatting

    • Automatic scientific notation

    • Depending on the version and region, further settings may be required.

Alternative tools such as Visual Studio Code or Notepad++ can be enhanced with CSV plugins and CSV linters and, unlike Excel, allow you to edit CSV files without accidentally altering the data.

What happens if one or more required fields are left blank?

The record will be ignored during import. The remaining records will be imported. The incident will be displayed as a notification and in the event log after import.

What happens if an information object already exists whose required fields are identical to those in an import record?

The existing record will be deleted and recreated using the data from the import record.

What happens to existing records during an import?

Existing records are ignored. The only exception is when all the required fields in an import record match all the required fields in an existing record.

What happens if you import using a character set other than UTF-8?

The content cannot be recognised and cannot be imported.

What happens if the separator ; is changed?

The structure of the CSV file cannot be recognised. It is not possible to import it.

Can the order of the columns be changed?

Yes, the order doesn’t matter. The columns are identified dynamically based on their headings.

Can I change the headings or remove the first line from the file?

No, the exact header/first row is required, as the columns are mapped dynamically based on the column headers.

Some of the columns aren’t relevant to me – can I delete them from the import file?

Yes, columns can be deleted. Mandatory fields must be retained.

Information objects in the event log

The event log allows you to track the communication of the 60870 server.

60870 event log
  1. Filter: The event log can be filtered to 60870, as shown in the screenshot, so that only relevant events are displayed.

  2. Level: To display communication messages, the log level of the 60870-5 service must be set to debug in the event log configuration.

  3. Content: Details regarding the transmission of the information object and the values transferred are displayed. The information shown depends on the IEC data type. In addition to the parameters already defined, the following parameters may also appear in the log:

    • OA (Origin Address): When updating measured values, the origin address is set to 0. When responding to commands, the origin address of the command is used.

    • Negative: Error bit for responses to commands. 0 = no error, 1 = error. Errors may occur, for example, if the PLC is unreachable or returns an error.