IEC 60870

Purpose

The purpose of this plugin is to read from servers that host data using the IEC 60870 protocol. See: https://en.wikipedia.org/wiki/IEC_60870.

IEC 60870 Background

  1. IEC 60870-5 was first published in about 1990. This standard has various "sub-parts". The "-104" sub part (known as 104) is about using "standard transport profiles" for TCP/IP. "101" covers serial communications. Sub part 104, published in 2000, covers the transmission using TCP/IP and was also introduced for optimising bandwidth. In these documents, some naming changes have occurred over various updates, such as; "Controlling Station" replacing "Master" and "Controlled Station" replacing "Outstation". Although sub parts 101 and 104 address different communications mediums, they do provide the same addressing, time stamping, control, and polling.

  2. An ASDU (Application Service Data Unit) is the same for 101 and 104. Each ASDU has a Type ID for various activities such as security, control, single point read, clock synchronisation, etc. An ASDU Common Address (sometimes known as the Station Address) is a single octet (byte) with another optional octet. Each object type can be a boolean, integer, real or bit string. Quality descriptor is included. Time is NOT included natively in an object, but comes as an object of its own. So an ASDU may contain: a. Data type b. Number of objects c. Address for objects d. Why the data is being sent e. The data objects

  3. IEC 60870 has a function to read a single object or to "interrogate" a group of objects at once. Each object within an ASDU has its own Information Object Address (IOA). The common address of the ASDU combined with the IOA combine to make the unique address for each data element. The IOA is 3 x 16 bit address. The IOA is sometimes sent as 3 x 16-bit numbers, encoded as a single decimal number. To encode this as an address, append the 3rd then 2nd then 1st number to get a 6 x byte IOA address. Similarly for the ASDU address, get the 2nd ASDU address then the 1st to get the combined 2 x byte ASDU address.

  4. This plugin is able to discover all ASDU common addresses and all contained IOAs within an IEC 60870 server. See below for details.

Usage

  1. Data is read from the IEC 60870 server via the default TCP port 2404, which can be changed. When running discover, a config file is optional, that is; you can run a discover without a configuration file. In this case, all the variables are displayed along with their current value. All the ASDU common addresses and all the IOAs are listed. If there is a configuration file when running discover, then only the variables within the configuration file are displayed, and everything else is ignored. ALWAYS run discover first to see which variables are available, before developing the configuration file. There must be a configuration file when running log.

  2. The configuration file defines which variables need to be collected, what names they appear on the the Ardexa cloud, units and scaling. An example file as follows:

# Ardexa Table Name,    Ardexa Source Name,     Ardexa Variable Name,   IEC 60870 IOA,      Type,               Units,      Scale
data,                   machine1,               Energy,                 543123,             decimal,            Wh,          1
data,                   machine1,               Pressure,               516234,             decimal,            kPa,         5
data,                   machine1,               Voltage,                234819,             integer,            V,           2
data,                   machine1,               Status,                 123456,             bool,               ,
data,                   machine1,               On,                     345798,             bool,               ,

NOTES:

  1. Anything that starts with # is a comment line, and will be ignored

  2. The Type can be either: decimal, integer, bool, keyword

  3. The IEC 60870 IOA name MUST be as it appears when doing a discovery

  4. Units and Scale can be empty

Arguments

  • Endpoint (Mandatory) eg; 192.168.1.4

  • Configuration File full path: Optional for discover, but Mandatory for logging data

  • Common Address: Optional for discover, but Mandatory for logging data. eg; 2877

  • Port (Optional). The default port is 2404

  • Timeout (Optional, in milliseconds). The default timeout is 1000 milliseconds

Was this helpful?