Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Overview

The library TcIEC870_5_102Link.Lib implements an interface. Via this interface single ASDUs ( service data units of the application layer) can be sent and received via the serial interfaces of the PC and the Beckhoff KL6xxx or EL6xxx bus terminals. This interface is placed inside the protocol structure above the link layer (2) and implements necessary transport functions and frame formats. Application functions like for example the general request or time synchronisation are not implemented in the interface, but the user can implement them by himself.

The end application is imposed on the software interface of the PLC library. Unlike the implementation of other 101/104 TwinCAT products only one "so called" 'Low level' interface is available. The reason: The IEC 60870-5-102 devices are featuring a lot of vendor specific data. The 'Low level' interface allows the access to this data. The characteristics of both interfaces are described briefly below.

'Low level' interface: IEC 60870-5-102 Serial Link Interface

This interface starts lower down on the protocol stack and enables the sending and/or receipt of individual frames (ASDUs).

Pro: Very flexible; all properties in the ASDU frame can be changed (e.g. an own time stamp, Select/Execute or a special command execution etc.); high performance can be achieved because only the necessary services are implemented; high performance if there are many data points;

Contra: Larger amount of programming work; all services, such as general query, counter query, time synchronisation, command execution, spontaneous data transmission etc. must be implemented by the PLC programmer himself (programmed out); the PLC programmer must be familiar with the protocol standard.

Protocol structure of endsystem:

Selection of application functions from IEC 60870-5-5 | Application process
 | Application layer (7)
Selection of ASDU (service data unit of application layer) from IEC 60870-5-3, IEC 60870-5-4 and IEC 60870-5-102
TwinCAT PLC Library: IEC 60870-5-102 Serial Link (low level) Transport Interface
N/A | Presentation layer (6)
 | Session layer (5)
 | Transport layer (4)
 | Network layer (3)
unbalanced IEC 60870-5-2 IEC 60870-5-1 (FT 1.2) | Link layer (2)
EIA RS485, RS232 (V.24), Fibre Optics | Physical layer (1)

Remark: The layers 3..6 are not used.


Interoperability

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Interoperability list according to IEC 60870-5-102

for TwinCAT PLC Library: IEC 870-5-102 control station (master).

Version: 1.1
Date: 29.03.2011

Here you can open/save the protocol interoperability document (zipped PDF).

Table of contents:

  • General information

    • Project information

  • Compatibility

    • System or device
    • Network configuration
    • Physical layer
    • Link layer
    • Application layer
    • Selection of standardized ASDUs
      • Process information in monitoring direction (slave->master)
      • System information in monitoring direction (slave->master)
      • System information in control direction (master->slave)
    • Basic application functions
      • Transmission of integrated totals
      • Read of list
      • Read of single values

  • Appendix

    • Beckhoff support and service
      • Beckhoff support
      • Beckhoff service
      • Beckhoff company headquarter

General Information

This compatibility list refers to functions supported within IEC 870-5-102.

Compatibility of the individual components has to be agreed for individual projects by all parties involved.

Project information

Project No.: ______________________________________________________________________________

Project: ______________________________________________________________________________

Responsible: ______________________________________________________________________________

Date: ______________________________________________________________________________

Compatibility

Octets
Subsets have to be chosen from the preceding parameter sets and alternatives, to create defined systems of transmission of counter readings.
Certain parameter like the number of octets with in the COMMON ADDRESS OF THE ASDU, exclude themselves reciprocally.
This means only one value of the specified parameter is permitted per system. Other parameters like a listed sets of different information in controller and monitoring devices enable the definition of the whole set or of subset that are suitable for the given aplication.

Octets
The selected parameters should be marked in the white control fields as follows:

Function or ASDU is not used
Function or ASDU is used as specified (preferred option)

System or device

System definition
Specifications for the control station
Specifications for the controlled station

Network configuration

Point-to-point | Multipoint-partyline
Multiple point-to-point | Multipoint-star

Physical layer

Transmission speed:

100 bps | 2400 bps | 56000 bps
200 bps | 4800 bps | 64000 bps
300 bps | 9600 bps |
600 bps | 19200 bps |
1200 bps | 38400 bps |

Link layer

Octets
According to this application-related standard, only telegram format FT 1.2, single character 1 and the time monitoring interval are used.

Address field of the link layer :

Not available (only symmetric transfer)
One octet
Two octets
Structured
Non structured

Octets
Link layer transfer procedure:

Symmetric transfer
Asymmetric transfer

Octets
Telegram length:

Maximum length L: 255

Octets
Link layer services:

Reset of user process is not available

Application layer

Transfer mode for application data

Octets
According to this application-related standard, only mode 1 (octet with the lowest value first) according to 4.10 IEC 60870-5-4 is used.

Manufacturing code

(Vendor specific parameter)

Number | Vendor
1 |
2 |
... |
255 |

Address of the meter DTE (common ASDU address)

( System parameter)

One octet Two octets

Signature

(System parameter)

Signature No signature

Record address

(System parameter)

General |  |
Period 1 | Cycle time: |
Period 2 | Cycle time: |
Period 3 | Cycle time: |
Daily values | Month values | Annual values
Period 1 | Period 1 | Period 1
Period 2 | Period 2 | Period 2
Period 3 | Period 3 | Period 3
Counter readings from the beginning of the account period
monthly account period
yearly account period
quarterly account period (every three months)
Oldest single indication
Complete list with single indications
Partial list 1 with single indications
Partial list 2 withsingle indications
Partial list 3 withsingle indications
Partial list 4 withsingle indications

Octets
rate information

Octets
(System parameter)

rate information no rate information

Selection of standardized ASDUs

Process information in monitoring direction

<1> := Single point information with time tag | M_SP_TA_2
<2> := Accounting integrated totals, four octets each | M_IT_TA_2
<3> := Accounting integrated totals, three octets each | M_IT_TB_2
<4> := Accounting integrated totals, two octets each | M_IT_TC_2
<5> := Periodically reset accounting integrated totals, four octets each | M_IT_TD_2
<6> := Periodically reset accounting integrated totals, three octets each | M_IT_TE_2
<7> := Periodically reset accounting integrated totals, two octets each | M_IT_TF_2
<8> := Operational integrated totals, four octets each | M_IT_TG_2
<9> := Operational integrated totals, three octets each | M_IT_TH_2
<10> := Operational integrated totals, two octets each | M_IT_TI_2
<11> := Periodically reset operational integrated totals, four octets each | M_IT_TK_2
<12> := Periodically reset operational integrated totals, three octets each | M_IT_TL_2
<13> := Periodically reset operational integrated totals, two octets each | M_IT_TM_2

System information in control direction

<70> := End of initialization | M_EI_NA_2
<71> := Manufacturer and product specification of integrated total DTE | P_MP_NA_2
<72> := Current system time of integrated total DTE | M_TI_TA_2

System information in control direction

<100>:= Read manufacturer and product specification | C_RD_NA_2
<101>:= Read record of single -point information with time tag | C_SP_NA_2
<102>:= Read record of single-point information with time tag of selected time range | C_SP_NB_2
<103>:= Read current system time of integrated total DTE | C_TI_NA_2
<104>:= Read accounting integrated totals of the oldest integration period | C_CI_NA_2
<105>:= Read accounting integrated totals of the oldest integration period and of a selected range of addresses | C_CI_NB_2
<106>:= Read accounting integrated totals of a specific past integration period | C_CI_NC_2
<107>:= Read accounting integrated totals of a specific past integration period and of a selected range of addresses | C_CI_ND_2
<108>:= Read periodically reset accounting integrated totals of the oldest integration period | C_CI_NE_2
<109>:= Read periodically reset accounting integrated totals of the oldest integration period and of a selected range of addresses | C_CI_NF_2
<110>:= Read periodically reset accounting integrated totals of a specific past integration period | C_CI_NG_2
<111>:= Read periodically reset accounting integrated totals of a specific past integration period and of a selected range of addresses | C_CI_NH_2
<112>:= Read operational integrated totals of the oldest integration period | C_CI_NI_2
<113>:= Read operational integrated totals of the oldest integration period and of a selected range of addresses | C_CI_NK_2
<114>:= Read operational integrated totals of a specific past integration period | C_CI_NL_2
<115>:= Read operational integrated totals of a specific past integration period and of a selected range of addresses | C_CI_NM_2
<116>:= Read periodically reset operational integrated totals of the oldest integration period | C_CI_NN_2
<117>:= Read periodically reset operational integrated totals of the oldest integration period and of a selected range of addresses | C_CI_NO_2
<118>:= Read periodically reset operational integrated totals of a specific past integration period | C_CI_NP_2
<119>:= Read periodically reset operational integrated totals of a specific past integration period and of a selected range of addresses | C_CI_NQ_2
<120>:= Read accounting integrated totals of a selected time range and of a selected range of addresses | C_CI_NR_2
<121>:= Read periodically reset accounting integrated totals of a selected time range and of a selected range of addresses | C_CI_NS_2
<122>:= Read operational integrated totals of a selected time range and of a selected range of addresses | C_CI_NT_2
<123>:= Read periodically reset operational integrated totals of a selected time range and of a selected range of addresses | C_CI_NU_2

Basic application function

Octets
Transmission of counter readings

Octets
(Station dependent parameter)

Octets
Number ofbilling counter readings:
Octets
Number ofperiodically resetted billing counter readings:
Octets
Number of operation counter readings:
Octets
Number of periodically resetted operation counter readings:
Octets
counter readings are transmitted only by cal functions (including the latest period)

Octets
Calling of lists

Octets
(Station dependent parameter)

Octets Listen umfang:
Octets Complete list | Octets number of single indications:
Octets Partial list 1 | Octets number of single indications:
Octets Partial list 2 | Octets number of single indications:
Octets Partial list 3 | Octets number of single indications:
Octets Partial list 4 | Octets number of single indications:
Octets
No list, single indications are transmitted spontaneously

Octets
Transmission of single indications

Octets
(Station dependent parameter)

Octets
Transmission of locally acknowledged single indications
Octets
No transmission of locally acknowledged single indications

Appendix

Beckhoff support and service

Beckhoff and their partners around the world offer comprehensive service and support,
 making available fast and competent assistance with all questions related to Beckhoff products and system solutions.

Beckhoff Support and Service is available to you wherever you are in the world, and can be reached by telephone, fax or e-mail.
he contact addresses for your country may be found in the list of Beckhoff branches and partner firms.

Beckhoff support

Support offers you comprehensive technical assistance, helping you not only with the application of individual Beckhoff products,
but also with other, wide-ranging services:

  • World-wide support;
  • Design, programming and commissioning of complex automation systems;
  • Extensive training program for Beckhoff system components

Please contact your Beckhoff branch office or representative for local support and service on Beckhoff products!

Beckhoff service

The Beckhoff Service Center supports you in all matters of after-sales service:

  • On-site service;
  • Repair service;
  • Spare parts service;
  • Hotline service

Please contact your Beckhoff branch office or representative for local support and service on Beckhoff products!

Beckhoff company headquarter

Beckhoff Automation
Eiserstr. 5
33415 Verl
Germany

Telefon: + 49 (0) 5246/963-0
Fax: + 49 (0) 5246/963-198
E-Mail: info@beckhoff.de
Web: http://www.beckhoff.com


Einführung

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Introduction

Simple projects with complete sources can be found under: Transport-Interface-Examples.

A PLC application which should communicate with a or sub station via the transport interface needs the following resources:

  • Instance of communication function block: FB_IEC870_5_102TProtocol;
  • Instance of TX/RX data buffer: ST_IEC870_5_102TBuffer;
  • Instance of function block to manipulate the TX/RX data buffer: FB_IEC870_5_102TBufferCtrl;


Introduction: Overview

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Introduction (tutorial)

This introduction explains how to implement and configure an IEC60870-5-102 control station (master) within the TwinCAT PLC.

Further topics under construction...


Introduction: Glossary

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Glossary

Term | Description
substation, slave, server, controlled station | Synonyms for a subordinate station (which is monitored)
central station, master, client, controlling station | Synonyms for a higher-level station (control station, monitors others stations)
control direction | Data transfer direction from the central station to the substation
monitoring direction | Data transfer direction from the substation to the central station
application objects | IEC information objects in the TwinCAT PLC application (single points, double points, measured values, short floating point values etc.)
APDU | Application protocol data unit
APCI | Application protocol control information
ASDU | Application service data unit
IOA, information object address | Address of the single point, double point, measured value, short floating point value etc.
primary station | Primary station sends commands/requests to the secondary station and controls the data transmission of the secondary station.
secondary station | Secondary station anwers to the requests of the primary station.
combined station | Combined stations are able to act as primary and secondary station (balanced mode).
balanced mode | In balanced mode both stations act as primary and secondary stations and are able to initialize the data transmission.
unbalanced mode | In unbalanced mode only the primary station is able to initialize the data transmissions. The central station acts as primary station and the substation acts as secondary station.


Introduction: Troubleshooting and debugging

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Troubleshooting and debugging

Debugging messages written to the application log facilitate troubleshooting of the system. If the "Low level" interface is used then two stages of debugging messages can be activated in an PLC application:

  1. Hexadecimal output of the ASDUs (frames without link layer control header). 32 ASDU data bytes per row are output as hexadecimal numbers. Bigger frames are split into multiple lines. These messages can be activated via the ST_IEC870_5_102TBuffer member variable: eDbg;
  2. Hexadecimal output of the APDUs (serial line frames). 32 APDU data bytes per row are output as hexadecimal numbers. Bigger frames are split into multiple lines. These messages can be activated via the FB_IEC870_5_102TProtocol input variable: bOutDbg;

In order to view the activated debugging messages start the TwinCAT System Manager and activate log view. A debug output is shown below. The two different message types are identified with the respective numbers.

Further diagnostic tools:

  • Portmon for Windows (v3.02, Windows Sysinternals);
  • Diverse protocoll test suite products;


Introduction: Configuration of serial interface

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Configuration of serial interface

  • Configuration of standard PC COMx port
  • Configuration of serial KL6xxx bus terminal
  • Configuration of serial EL6xxx bus terminal

1. Configuration of standard PC COMx port

The serial interface can only be added in PC/CX systems.

Right-click on "I/O devices". Select "Append Device". Select "Serial Interface" under "Miscellaneous". Then set the following settings.

1.1. Serial Port tab settings

Serial interface COM1

1.2. Communication Properties tab settings

Select the option KL6xxx1 Mode (Emulation) and set the communication parameter:

Baud rate, here 19200 Baud, 8 data bits, Parity = even, 1 stop bit

2. Configuration of serial KL6xxx bus terminal

The interface is configured within the TwinCAT PLC by the instance of the FB_IEC870_SerialLineCtrlfunction block. Communication parameters like baud rate, parity etc. have to be set via this function block.

3. Configuration of serial EL6xxx bus terminal

The settings for the serial interface can be found in the CoE Online tab (CoE=CanOpen over EtherCAT). The tab is only available for online access to the terminal, i.e. the settings cannot be modified if the System Manager is not linked to the hardware. The settings are stored in the terminal in a non-volatile manner, i.e. the settings are retained even if the voltage supply fails. These data do not have to be re-entered after a terminal scan. If the terminal is replaced, the data from the new terminal become active and have to be adjusted. To avoid this, the modified data can be entered in the Startup tab. During system startup, the data from the Startup tab are transferred to the terminal. Terminals can then be replaced without problem. After a terminal scan, the data have to be re-entered in the Startup tab.

3.1. CoE tab settings

(1) Baud rate, here 19200 Baud

(2) Date frame, 8E1 corresponds to 8 data bits, Parity = even, 1 stop bit

(3) Feature bits -> Enable RTS/CTS = FALSE for EL6001

Double-clicking on the corresponding row brings up a menu in which the settings can be modified.

3.1.1 RS485 operating mode

In the RS485 mode, the data is exchanged by means of half duplex transfer. The transmit and receive lines are connected to one another in RS485 operating mode. As a result, the terminal receives not only the data from other devices, but also its own transmitted data. The own data may disturb the communication. This can be suppressed with the option "Enable half duplex" in the "COM Settings" object (index 8000:06).

3.2. Startup tab settings

All non-standard settings should be entered in the Startup list. During system startup, the data from the Startup tab are transferred to the terminal. Terminals can then be replaced without problem. After a terminal scan, the data have to be re-entered in the Startup tab.

Baud rate, here 19200 Baud

Date frame, 8E1 corresponds to 8 data bits, Parity = even, 1 stop bit

Feature bits -> Enable RTS/CTS = FALSE for EL6001


Telegram structure

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

IEC 60870-5-102 telegram structure

  • FT 1.2 frame format is used;
  • Frames with fixed and variable block length and single control characters are used;
  • Hamming distance = 4;

Frame with variable length

This frame type is used to transmit user data between controlling and controlled station

byte\bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |  |  |
0 | Start byte 1 (0x68) |  |  |  |  |  |  |  | Header | LPCI | LPDU
1 | Block length |  |  |  |  |  |  |  |
2 | Block length (copy) |  |  |  |  |  |  |  |
3 | Start byte 2 (0x68) |  |  |  |  |  |  |  |
4 | RES | PRM | FCB / ACD | FCV / DFC | Function code |  |  |  | Control field
5 | Link address fields |  |  |  |  |  |  |  |
 | (0, 1 or 2 octets) |  |  |  |  |  |  |  |
 | Type identification |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER | ASDU
 | SQ | Number of object |  |  |  |  |  |  |
 | T | P/N | Cause of transmission |  |  |  |  |  |
 | ASDU address fields |  |  |  |  |  |  |  |
 | (1 or 2 octets) |  |  |  |  |  |  |  |
 | Record address |  |  |  |  |  |  |  |
 | Information object address |  |  |  |  |  |  |  | Info-object
 | Information elements |  |  |  |  |  |  |  |
n-1 | Checksum |  |  |  |  |  |  |  | Tail | LPCI
n | Stop byte (0x16) |  |  |  |  |  |  |  |

Frame with fixed length

This frame type is used for link layer services. Sometimes used as an confirmation.

byte\bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | Start byte 1 (0x10) |  |  |  |  |  |  |  |
1 | RES | PRM | FCB / ACD | FCV / DFC | Function code |  |  |  | Control field
2 | Link address |  |  |  |  |  |  |  |
 | (0, 1 or 2 octets)
n-1 | Checksum
n | Stop byte (0x16)

Single character data

Single characters are used to confirm link layer and user data transmissions.

  • 0xE5 (positive acknowledge);


ASDU-Reference

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Standard IEC 60870-5-102 data types

Type | Dec | Hex | Description
ASDU_TYPEUNDEF_2 | 0 | 0x00 | Not used
M_SP_TA_2 | 1 | 0x01 | Single-point information with time tag
M_IT_TA_2 | 2 | 0x02 | Accounting integrated totals, 4 octets each
M_IT_TB_2 | 3 | 0x03 | Accounting integrated totals, 3 octets each
M_IT_TC_2 | 4 | 0x04 | Accounting integrated totals, 2 octets each
M_IT_TD_2 | 5 | 0x05 | Periodical reset accounting integrated totals, 4 octets each
M_IT_TE_2 | 6 | 0x06 | Periodical reset accounting integrated totals, 3 octets each
M_IT_TF_2 | 7 | 0x07 | Periodical reset accounting integrated totals, 2 octets each
M_IT_TG_2 | 8 | 0x08 | Operational integrated totals, 4 octets each
M_IT_TH_2 | 9 | 0x09 | Operational integrated totals, 3 octets each
M_IT_TI_2 | 10 | 0x0A | Operational integrated totals, 2 octets each
M_IT_TK_2 | 11 | 0x0B | Periodical reset operational integrated totals, 4 octets each
M_IT_TL_2 | 12 | 0x0C | Periodical reset operational integrated totals, 3 octets each
M_IT_TM_2 | 13 | 0x0D | Periodical reset operational integrated totals, 2 octets each
 | 14..69 | 0x0E..0x45 | Reserved (standard area)
M_EI_NA_2 | 70 | 0x46 | End of initialization
P_MP_NA_2 | 71 | 0x47 | Manufacturer and product specification of integrated total DTE
M_TI_TA_2 | 72 | 0x48 | Current system time of integrated total DTE
 | 73..99 | 0x49..0x63 | Reserved (standard area)
C_RD_NA_2 | 100 | 0x64 | Read manufacturer and product specification
C_SP_NA_2 | 101 | 0x65 | Read record of single-point information with time tag
C_SP_NB_2 | 102 | 0x66 | Read record of single-point information with time tag of a selected time range
C_TI_NA_2 | 103 | 0x67 | Read current system time of integrated total DTE
C_CI_NA_2 | 104 | 0x68 | Read accounting integrated totals of the oldest integration period
C_CI_NB_2 | 105 | 0x69 | Read accounting integrated totals of the oldest integration period and of a selected range of addresses
C_CI_NC_2 | 106 | 0x6A | Read accounting integrated totals of a specific past integration period
C_CI_ND_2 | 107 | 0x6B | Read accounting integrated totals of a specific past integration period and of a selected range of addresses
C_CI_NE_2 | 108 | 0x6C | Read periodical reset accounting integrated totals of the oldest integration period
C_CI_NF_2 | 109 | 0x6D | Read periodical reset accounting integrated totals of the oldest integration period and of a selected range of addresses
C_CI_NG_2 | 110 | 0x6E | Read periodical reset accounting integrated totals of a specific past integration period
C_CI_NH_2 | 111 | 0x6F | Read periodical reset accounting integrated totals of a specific past integration period and of a selected range of addresses
C_CI_NI_2 | 112 | 0x70 | Read operational integrated totals of the oldest integration period
C_CI_NK_2 | 113 | 0x71 | Read operational integrated totals of the oldest integration period and of a selected range of addresses
C_CI_NL_2 | 114 | 0x72 | Read operational integrated totals of a specific past integration period
C_CI_NM_2 | 115 | 0x73 | Read operational integrated totals of a specific past integration period and of a selected range of addresses
C_CI_NN_2 | 116 | 0x74 | Read periodical reset operational integrated totals of the oldest integration period
C_CI_NO_2 | 117 | 0x75 | Read periodical reset operational integrated totals of the oldest integration period and of a selected range of addresses
C_CI_NP_2 | 118 | 0x76 | Read periodical reset operational integrated totals of a specific past integration period
C_CI_NQ_2 | 119 | 0x77 | Read periodical reset operational integrated totals of a specific past integration period and of a selected range of addresses
C_CI_NR_2 | 120 | 0x78 | Read accounting integrated totals of a specific past integration period of a selected time range and of a selected range of addresses
C_CI_NS_2 | 121 | 0x79 | Read periodical reset accounting integrated totals of a specific past integration period of a selected time range and of a selected range of addresses
C_CI_NT_2 | 122 | 0x7A | Read operational integrated totals of a specific past integration period of a selected time range and of a selected range of addresses
C_CI_NU_2 | 123 | 0x7B | Read periodical reset operational integrated totals of a specific past integration period of a selected time range and of a selected range of addresses
 | 124..127 | 0x7C..0x7F | Reserved (standard area)
M_DS_TA_2 | 128 | 0x80 | -
P_ME_NA_2 | 129 | 0x81 | Parameters of the measuring point
M_DS_TB_2 | 130 | 0x82 | -
M_CH_TA_2 | 131 | 0x83 | -
C_PK_2 | 132 | 0x84 | Load private key
C_TA_VC_2 | 133 | 0x85 | Read tariff information ( current values )
C_TA_VM_2 | 134 | 0x86 | Read tariff information ( stored values )
M_TA_VC_2 | 135 | 0x87 | Tariff information ( current values )
M_TA_VM_2 | 136 | 0x88 | Tariff information ( stored values )
C_TA_CP_2 | 137 | 0x89 | Close accounting period
M_IB_TG_2 | 139 | 0x8B | Block of operational integrated totals ( absolute values )
M_IB_TK_2 | 140 | 0x8C | Block of periodical reset operational integrated totals ( increment values )
C_RM_NA_2 | 141 | 0x8D | Read configuration data of the meter device
M_RM_NA_2 | 142 | 0x8E | Configuration of the meter device
C_MR_NA_2 | 143 | 0x8F | Change configuration data of the meter device
C_PC_NA_2 | 144 | 0x90 | -
M_PC_NA_2 | 145 | 0x91 | -
C_MC_NA_2 | 146 | 0x92 | -
C_DF_NA_2 | 147 | 0x93 | -
M_DF_NA_2 | 148 | 0x94 | -
C_MF_NA_2 | 149 | 0x95 | -
 | 150..179 | 0x96..0xB3 | Reserved
C_DS_TA_2 | 180 | 0xB4 | -
C_CS_TA_2 | 181 | 0xB5 | Change date and time ( Time syncronization )
C_PI_NA_2 | 182 | 0xB6 | Read parameters of the measuring point
C_AC_NA_2 | 183 | 0xB7 | Start session and send access key
C_DS_TB_2 | 184 | 0xB8 | -
C_CH_TA_2 | 185 | 0xB9 | -
C_MH_TA_2 | 186 | 0xBA | -
C_FS_NA_2 | 187 | 0xBB | Finish session
C_MP_NA_2 | 188 | 0xBC | -
C_CB_NT_2 | 189 | 0xBD | Read a block of operational integrated totals of a time period and a selected address
C_CB_UN_2 | 190 | 0xBE | Read a block of periodical reset operational integrated totals of a time period and a selected address
 | 191..255 | 0xBF..0xFF | Reserved


M_SP_TA_2

Single-point information with time tag.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x1 (1) | = M_SP_TA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * 9 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | SPA |  |  |  |  |  |  |  | Single-point address | Information object 1
 |  |  | |--- | data[1] = | SPQ |  |  |  |  |  |  | SPI | SPQ = Single-point qualifier SPI = Single-point information
 |  |  | |--- | data[2..8] = | CP56Time2b |  |  |  |  |  |  |  | Seven octets binary time tag
 |  |  | |--- | data[9..length - 1] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TA_2

Accounting integrated totals, 4 octets each

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x2 (2) | = M_IT_TA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 6 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..4] = | CR4 |  |  |  |  |  |  |  | Counter reading, 4 octets
 |  |  | |--- | data[5] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[6] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[7..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TB_2

Accounting integrated totals, 3 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x3 (3) | = M_IT_TB_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 5 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..3] = | CR3 |  |  |  |  |  |  |  | Counter reading, 3 octets
 |  |  | |--- | data[4] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[5] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[6..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TC_2

Accounting integrated totals, 2 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x4 (4) | = M_IT_TC_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 4 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..2] = | CR2 |  |  |  |  |  |  |  | Counter reading, 2 octets
 |  |  | |--- | data[3] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[4] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[5..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TD_2

Periodical reset accounting integrated totals, 4 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x5 (5) | = M_IT_TD_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 6 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..4] = | CR4 |  |  |  |  |  |  |  | Counter reading, 4 octets
 |  |  | |--- | data[5] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[6] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[7..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TE_2

Periodical reset accounting integrated totals, 3 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x6 (6) | = M_IT_TE_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 5 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..3] = | CR3 |  |  |  |  |  |  |  | Counter reading, 3 octets
 |  |  | |--- | data[4] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[5] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[6..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TF_2

Periodical reset accounting integrated totals, 2 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x7 (7) | = M_IT_TF_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 4 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..2] = | CR2 |  |  |  |  |  |  |  | Counter reading, 2 octets
 |  |  | |--- | data[3] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[4] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[5..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TG_2

Operational integrated totals, 4 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x8 (8) | = M_IT_TG_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 6 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..4] = | CR4 |  |  |  |  |  |  |  | Counter reading, 4 octets
 |  |  | |--- | data[5] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[6] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[7..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TH_2

Operational integrated totals, 3 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x9 (9) | = M_IT_TH_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 5 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..3] = | CR3 |  |  |  |  |  |  |  | Counter reading, 3 octets
 |  |  | |--- | data[4] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[5] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[6..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TI_2

Operational integrated totals, 2 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0xA (10) | = M_IT_TI_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 4 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..2] = | CR2 |  |  |  |  |  |  |  | Counter reading, 2 octets
 |  |  | |--- | data[3] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[4] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[5..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TK_2

Periodical reset operational integrated totals, 4 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0xB (11) | = M_IT_TK_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 6 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..4] = | CR4 |  |  |  |  |  |  |  | Counter reading, 4 octets
 |  |  | |--- | data[5] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[6] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[7..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TL_2

Periodical reset operational integrated totals, 3 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0xC (12) | = M_IT_TL_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 5 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..3] = | CR3 |  |  |  |  |  |  |  | Counter reading, 3 octets
 |  |  | |--- | data[4] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[5] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[6..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_IT_TM_2

Periodical reset operational integrated totals, 2 octets each.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0xD (13) | = M_IT_TM_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = i |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = i * ( 4 + [ 1 (signature) ] ) + 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | IOA |  |  |  |  |  |  |  | Information object address | Information object 1
 |  |  | |--- | data[1..2] = | CR2 |  |  |  |  |  |  |  | Counter reading, 2 octets
 |  |  | |--- | data[3] = | IV | CA | CY | Sequence |  |  |  |  | Quality descriptor
 |  |  | |--- | data[4] = | Signature |  |  |  |  |  |  |  | Signature (optional)
 |  |  | |--- | data[5..length - 6] = |  |  |  |  |  |  |  |  |  | Information object 2..i
 |  |  | |--- | data[length - 5..length - 1] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[length..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_EI_NA_2

End of initialization.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x46 (70) | = M_EI_NA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  | = 0 |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 2 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | 0 |  |  |  |  |  |  |  | Address of information object
 |  |  | |--- | data[1] = | LPC | COI |  |  |  |  |  |  | COI = Cause of initialization
 |  |  | |--- | data[2..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


P_MP_NA_2

Manufacturer and product specification of integrated total DTE.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x47 (71) | = P_MP_NA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  | = 0 |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 6 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = | YEAR |  |  |  | MONTH |  |  |  | Date of standard
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Manufacturer code
 |  |  | |--- | data[2..5] = |  |  |  |  |  |  |  |  | Product code
 |  |  | |--- | data[6..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


M_TI_TA_2

Current system time of integrated total DTE.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x48 (72) | = M_TI_TA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  | = 0 |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 7 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..6] = | CP56Time2b |  |  |  |  |  |  |  | Seven octets binary time tag
 |  |  | |--- | data[7..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_RD_NA_2

Read manufacturer and product specification.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x64 (100) | = C_RD_NA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 0 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  | = 0 |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 0 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_SP_NA_2

Read record of single-point information with time tag.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x65 (101) | = C_SP_NA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 0 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 0 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_SP_NB_2

Read record of single-point information with time tag of selected time range.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x66 (102) | = C_SP_NB_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 10 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..4] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (from)
 |  |  | |--- | data[5..9] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (until)
 |  |  | |--- | data[10..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_TI_NA_2

Read current system time of integrated total data terminal equipment.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x67 (103) | = C_TI_NA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 0 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  | = 0 |  |  |  |  |  |  |  |  | Record address
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 0 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NA_2

Read accounting integrated totals of the oldest integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x68 (104) | = C_CI_NA_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 0 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 0 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NB_2

Read accounting integrated totals of the oldest integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x69 (105) | = C_CI_NB_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 2 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NC_2

Read accounting integrated totals of a specific past integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x6A (106) | = C_CI_NC_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..4] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[5..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_ND_2

Read accounting integrated totals of a specific past integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x6B (107) | = C_CI_ND_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 7 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[7..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NE_2

Read periodically reset accounting integrated totals of the oldest integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x6C (108) | = C_CI_NE_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 0 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 0 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NF_2

Read periodically reset accounting integrated totals of the oldest integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x6D (109) | = C_CI_NF_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 2 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NG_2

Read periodically reset accounting integrated totals of a specific past integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x6E (110) | = C_CI_NG_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..4] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[5..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NH_2

Read periodically reset accounting integrated totals of a specific past integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x6F (111) | = C_CI_NH_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 7 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[7..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NI_2

Read operational integrated totals of the oldest integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x70 (112) | = C_CI_NI_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 0 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 0 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NK_2

Read operational integrated totals of the oldest integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x71 (113) | = C_CI_NK_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 2 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NL_2

Read operational integrated totals of a specific past integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x72 (114) | = C_CI_NL_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..4] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[5..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NM_2

Read operational integrated totals of a specific past integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x73 (115) | = C_CI_NM_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 7 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[7..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NN_2

Read periodically reset operational integrated totals of the oldest integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x74 (116) | = C_CI_NN_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 0 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 0 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NO_2

Read periodically reset operational integrated totals of the oldest integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x75 (117) | = C_CI_NO_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 2 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NP_2

Read periodically reset operational integrated totals of a specific past integration period.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x76 (118) | = C_CI_NP_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 5 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0..4] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[5..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NQ_2

Read periodically reset operational integrated totals of a specific past integration period and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x77 (119) | = C_CI_NQ_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 7 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag
 |  |  | |--- | data[7..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NR_2

Read accounting integrated totals of selected time and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x78 (120) | = C_CI_NR_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 12 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (from)
 |  |  | |--- | data[7..11] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (to)
 |  |  | |--- | data[12..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NS_2

Read periodically reset accounting integrated totals of selected time and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x79 (121) | = C_CI_NS_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 12 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (from)
 |  |  | |--- | data[7..11] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (to)
 |  |  | |--- | data[12..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NT_2

Read operational integrated totals of selected time and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x7A (122) | = C_CI_NT_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 12 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (from)
 |  |  | |--- | data[7..11] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (to)
 |  |  | |--- | data[12..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


C_CI_NU_2

Read periodically reset operational integrated totals of selected time and of selected range of addresses.

- obj |  |  |  |  |  |  |  |  |  |  |  |  | ASDU object
|--- | + head |  |  |  |  |  |  |  |  |  |  |  | Reserved
|--- | - ident |  |  |  |  |  |  |  |  |  |  |  | DATA UNIT IDENTIFIER
| | |--- | eType | = 0x7B (123) | = C_CI_NU_2 |  |  |  |  |  |  |  |  | Type identification
| | |--- | bSQ |  | = FALSE |  |  |  |  |  |  |  |  | Sequence of information objects
| | |--- | nObj |  | = 1 |  |  |  |  |  |  |  |  | Number of objects
| | |--- | bT |  |  |  |  |  |  |  |  |  |  | Test
| | |--- | bPN |  |  |  |  |  |  |  |  |  |  | Positive/negative confirmation/activation
| | |--- | eCOT |  |  |  |  |  |  |  |  |  |  | Cause of transmission
| | |--- | asduAddr |  |  |  |  |  |  |  |  |  |  | Common address of asdu
| | |--- | eClass |  |  |  |  |  |  |  |  |  |  | Fifo priority class
|--- | - info |  |  |  |  |  |  |  |  |  |  |  | INFORMATION OBJECT
 | |--- | rcdAddr |  |  |  |  |  |  |  |  |  |  | Record address of accounting period
 | |--- | stream |  |  |  |  |  |  |  |  |  |  | Information element/object data
 |  | |--- | length | = 12 |  |  |  |  |  |  |  |  |
 |  | |--- | data |  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
 |  |  | |--- | data[0] = |  |  |  |  |  |  |  |  | Integrated total address (from)
 |  |  | |--- | data[1] = |  |  |  |  |  |  |  |  | Integrated total address (to)
 |  |  | |--- | data[2..6] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (from)
 |  |  | |--- | data[7..11] = | CP40Time2a |  |  |  |  |  |  |  | Five octets binary time tag (to)
 |  |  | |--- | data[12..IEC870_MAX_ASDU_DATA_BYTE] = |  |  |  |  |  |  |  |  | Reserved


SPA

Single-point address: <0..255>

  • <0..127> compatible range
  • <128..255> private range


SPQ

Single-point qualifier: <0..127>

  • <0> not specified
  • <1..127> vendor specific


FB_IEC870_5_102TProtocol

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

FUNCTION_BLOCK FB_IEC870_5_102TProtocol

The FB_IEC870_5_102TProtocol communication block implements the transport functions of the IEC 60870-5-1 and IEC 60870-5-2 link layer. In the event of a protocol error an associated error code is issued at the function block output and the data transfer is interrupted. The data exchange can be reactivated by calling the INIT function block action. The communication block expects a TX/RX data buffer variable. This variable must be transferred to the block via VAR_IN_OUT.

The function block features the following actions:

  • INIT (initialises the function block). In the default configuration the TX/RX data buffer are cleared. The bRetainBuffer member variable of the protPara structure controls the reset bahaviour of TX/RX data buffer.

Protocol configuration

The communication block has a structured protPara variable. Protocol parameters such as timeout times or connection addresses etc. can be configured via this variable.

VAR_IN_OUT

VAR_IN_OUT
        hSerial         : T_HSERIALCTRL;             (* Serial link control handle *)
 buffer          : ST_IEC870_5_102TBuffer; (* TX/RX data buffer *)
END_VAR

hSerial: Connection handle to FB_IEC870_SerialLineCtrl function block. The data to be sent and received are exchanged with the FB_IEC870_SerialLineCtrl function block.

buffer: TX/RX data buffer.

VAR_INPUT

VAR_INPUT
        protPara        : ST_IEC870_5_101ProtocolParams; (* IEC60870-5-101/102 protocol parameters *)
 bOutDbg                 : BOOL;           (* Enable/disable debug output *)
END_VAR

protPara: IEC60870-5-101/102 protocol parameters.

bOutDbg:: Activates/deactivates the debug output of the frames in the TwinCAT System Manager logger view.

VAR_OUTPUT

VAR_OUTPUT
        bError          : BOOL;
        nErrID          : UDINT;
        eDTState        : E_IEC870_5_101SerialLinkState := eSERIALLINK_DISCONNECTED; (* Data transfer state *)
ND_VAR

bError: This output is switched to TRUE if an error occurs during data transfer.

nErrID: Returns an error code if the bError output is set.

eState: Status of the data exchange to the master.

Example:

Sample projects: IEC60870-5-102 Serial Link Interface

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10.0 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


FB_IEC870_5_102TBufferCtrl

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

FUNCTION_BLOCK FB_IEC870_5_102TBufferCtrl

This function block changes the content of the TX/RX data buffer. This data buffer ist used by the communication via the IEC60870-5-102 Serial Link Interface.

The function block has the following actions:

  • RxRemoveObj (removes the oldest Fifo entry from the RX-Fifo);
  • RxReset (deletes all RX-Fifo entries, resets the RX-Fifo);
  • TxAddObj (inserts a new Fifo entry in the TX-Fifo);
  • TxReset (deletes all TX-Fifo entries, resets the TX-Fifo);

The content of the TX/RX data buffer can be changed by the call of one of the listed actions above.

VAR_IN_OUT

VAR_IN_OUT
        buffer  : ST_IEC870_5_102TBuffer; (* TX/RX data buffer *)
END_VAR

buffer: TX/RX data buffer. The TX/RX buffer parameters (like e.g. asduSize ) have to be configured before using.

VAR_INPUT

VAR_INPUT
        putObj  : ST_IEC870_5_102AOGen; (* ASDU to send *)
END_VAR

putObj: Data unit (ASDU) to be sent.

VAR_OUTPUT

VAR_OUTPUT
        getObj  : ST_IEC870_5_102AOGen; (* received ASDU *)
 bOk     : BOOL; (* TRUE = action succesfully, FALSE=Fifo overflow or fifo empty *)
END_VAR

getObj: Received data unit (ASDU).

bOk: This variable becomes TRUE, if a new entry was inserted or removed successfully from the Fifo. This variable becomes FALSE at a buffer overflow and if no entry could be removed, because the Fifo was already empty.

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


F_GetVersionTcIEC870_5_102Link

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

FUNCTION F_GetVersionTcIEC870_5_102Link

This function reads version information from the plc library.

FUNCTION F_GetVersionTcIEC870_5_102Link: UINT

VAR_INPUT
        nVersionElement : INT;
END_VAR

nVersionElement : Version element, that is to be read. Possible parameters:

  • 1 : major number;
  • 2 : minor number;
  • 3 : revision number;
Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib, ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


F_iecApdu102ToAsduLen

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

FUNCTION F_iecApdu102ToAsduLen

The function calculates for the IEC 60870-5-102 protocol the maximum available ASDU byte length with the configurated frame and link address field length. The maximum available ASDU length is for example required for the configuration of the ST_IEC870_5_102T buffer variable. This data structure (TX/RX data buffer) is used for the data exchange via the IEC60870-5-102 Serial Link Interface.

FUNCTION F_iecApdu102ToAsduLen: BYTE

VAR_INPUT
        FRAMELength     : BYTE;
        eLinkAddrSize   : E_IEC870_5_101LinkAddrSize;
END_VAR

FRAMELength : Max. available APDU frame length (see compatibility list).

eLinkAddrSize: Link address field octet length (see compatibility list).

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib, ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


IEC870_5_102_DEFAULT_ASDUFMTPARAMS

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

FUNCTION IEC870_5_102_DEFAULT_ASDUFMTPARAMS

This function sets the default IEC 60870-5-102 frame format parameters:

  • Cause of transfer octet length;
  • Common ASDU address octet length;
  • Information Object address octet length;

FUNCTION IEC870_5_102_DEFAULT_ASDUFMTPARAMS: ST_IEC870_5_101AsduFmtParams

VAR_INPUT
        eAsduAddrSize : E_IEC870_5_101AsduAddrSize;
END_VAR

eAsduAddrSize : Common ASDU address octet length.

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib, ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


ST_IEC870_5_102TBuffer

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE ST_IEC870_5_102TBuffer

This data structure is used for data exchange (TX/RX data buffer) via the IEC60870-5-102 Serial Link Interface.

TYPE ST_IEC870_5_102TBuffer :
STRUCT
        eDbg            : E_IEC870_5_101FifoDbgFlags :=eIEC870_FIFO_DBG_OFF; (* enable/disable log view hex output *)
 eAsduAddrSize   : E_IEC870_5_101AsduAddrSize;(* Common ASDU address field size (1..2 octets) *)
 asduSize        : BYTE := 253; (* max. length of ASDU data ( IEC 60870-5-101/102/103 = 253 octets, IEC 60870-5-104 = 249 octets )*)
 mode            : DWORD := 0;

        dataLink        : ST_IEC870_5_101DataLink; (* internal tx/rx buffer *)
ND_STRUCT
END_TYPE

eDbg: Debug output parameter.

eAsduAddrSize: Common asdu address octet size.

asduSize : Max. octet length of the asdu.

mode: Reserved, not used. This value has to be zero.

dataLink: The access to the elements of this data structure should only occur with an instance of the function block FB_IEC870_5_102TBufferCtrl, not directly.

The TX/RX data buffer uses internal two send Fifos and one receive Fifo:

  1. Class 1 send Fifo with (high prior) data;
  2. Class 2 send Fifo with (low prior) data;
  3. Receive Fifo (for Class 1 and Class 2 data);

The lower transport functions of the library emtpy first the class 1 Fifo and afterwards the class 2 Fifo. The class 2 data are only sent, if the class 1 Fifo contains no data to be sent.

Each internal Fifo hast a fixed size of 10000 bytes. This is enough for the most applications, because the number of frames which can once be sent is limited by the iK and iW protocol parameters.
According to experience it is possible to store 200 ADSUs with an information element (object), or approx. 20 ADSUs with with a sequence of 100 information elements (objects) in each Fifo.

If a higher number of frames (to be sent or to be received) should be buffered ( e.g. ~20000), they can be kept in external buffers/Fifos which are defined by the PLC programmer. The PLC application can refill the TwinCAT send Fifos with own Fifo entries, or empty the TwinCAT receive Fifo.

As an alternative it is possible to use two buffers and to fill/read them alternately and give them to the communication block .

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMLibV2.Lib are included automatically )


ST_IEC870_5_102AOGen

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE ST_IEC870_5_102AOGen

Variables of this type represent an ASDU object.

TYPE ST_IEC870_5_102AOGen:
STRUCT
        head : ST_IEC870_5_101FifoHead :=(      source := ( link := 0, addr := 0 ),
                                        target := ( link := 0, addr := 0 ),
                                        ctrl := 0 ); (* Header *)

        ident   : ST_IEC870_5_102DataUnit_Ident := ( eType := ASDU_TYPEUNDEF_2,
                                                nObj := 0,
                                                bSQ := FALSE,
                                                bT := FALSE,
                                                bPN := FALSE,
                                                eCOT := 0,
                                                asduAddr := 0,
                                                eClass := eIEC870_Class_None ); (* Data unit identifier *)

 info    : ST_IEC870_5_102AOInfoObj  := (    rcdAddr         := 0,
                                                n       := 0,
                                                stream  := ( length := 0 ) ); (* information object *)
END_STRUCT
END_TYPE

head: Header (reserved).

ident: Identification field in the data unit (ASDU).

info: Information object /Information element data field.

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMLibV2.Lib are included automatically )


ST_IEC870_5_102AOInfoObj

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE ST_IEC870_5_102AOInfoObj

Information object description.

TYPE ST_IEC870_5_102AOInfoObj :
STRUCT
        rcdAddr : BYTE; (* Record address <0..255> *)
 stream  : ST_IEC870_5_101Stream; (* Information element of max. length *)
END_STRUCT
END_TYPE

rcdAddr: Record address or list address of accounting period.

stream: Information element data of max. length (byte array buffer).

The list addresses are specified as follows: <0..255>

  • <0> Default, if no other value is specified
  • <1> List address for counter states from the beginning of the accounting period
  • <2..10> Reserved for further compatible specifications
  • <11> List address for counter states from measurement period 1
  • <12> List address for counter states from measurement period 2
  • <13> List address for counter states from measurement period 3
  • <14..20> Reserved for further compatible specifications
  • <21> List address for counter states (daily values) from measurement period 1
  • <22> List address for counter states (daily values) from measurement period 2
  • <23> List address for counter states (daily values) from measurement period 3
  • <24..30> Reserved for further compatible specifications
  • <31> List address for counter states (monthly values) from measurement period 1
  • <32> List address for counter states (monthly values) from measurement period 2
  • <33> List address for counter states (monthly values) from measurement period 3
  • <34..40> Reserved for further compatible specifications
  • <41> List address for counter states (yearly values) from measurement period 1
  • <42> List address for counter states (yearly values) from measurement period 2
  • <43> List address for counter states (yearly values) from measurement period 3
  • <44..49> Reserved for further compatible specifications
  • <50> Oldest single message
  • <51> Complete list with single messages
  • <52> Partial list 1 with single messages
  • <53> Partial list 2 with single messages
  • <54> Partial list 3 with single messages
  • <55> Partial list 4 with single messages
  • <56..127> Reserved for further compatible specifications
  • <128 - 255> For particular applications (private area)

The size of a partial list is a system parameter.

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib (Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMLibV2.Lib are included automatically )


ST_IEC870_5_102DataUnit_Ident

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE ST_IEC870_5_102DataUnit_Ident

Identification field of data unit (ASDU).

TYPE ST_IEC870_5_102DataUnit_Ident:
STRUCT
        eType   : E_IEC870_5_102TypeID; (* ASDU type identifier <0..255> *)
 bSQ     : BOOL; (* Single/Sequence *)
        nObj    : BYTE(0..127); (* Number of information objects or elements <0..127> *)
        bT      : BOOL; (* Test bit *)
        bPN     : BOOL; (* Positive/Negative confirmation, FALSE = positive, TRUE = negative *)
        eCOT    : E_IEC870_5_102COTType; (* Cause of transmission <0..63> *)
        asduAddr : DWORD; (* Common address of ASDU (1..2 octets) *)
        eClass  : E_IEC870_5_101ClassType; (* Object class *)
END_STRUCT
END_TYPE

eType: ASDU type identifier: <0..255>.

bSQ: Sequence flag.

nObj: Number of information objects or information elements: <0..127>.

bT: Test flag.

bPN: Positive/negative confirmation. FALSE = positive, TRUE = negative.

eCOT: Cause of transmission: <0..63>.

asduAddr: Common ASDU address (one or two octets).

eClass: Priority class.

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMLibV2.Lib are included automatically )


E_IEC870_5_102TypeID

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE E_IEC870_5_102TypeID

TYPE E_IEC870_5_102TypeID:
(
        ASDU_TYPEUNDEF_2 := 0, (* (000) not allowed *)(* Process inormation in monitor direction *)
 M_SP_TA_2 := 1, (* (001) Single-point information with time tag *)
 M_IT_TA_2 := 2, (* (002) Accounting integrated totals, 4 octets each *)
        M_IT_TB_2 := 3, (* (003) Accounting integrated totals, 3 octets each *)
        M_IT_TC_2 := 4, (* (004) Accounting integrated totals, 2 octets each *)
        M_IT_TD_2 := 5, (* (005) Periodical reset accounting integrated totals, 4 octets each *)
        M_IT_TE_2 := 6, (* (006) Periodical reset accounting integrated totals, 3 octets each *)
        M_IT_TF_2 := 7, (* (007) Periodical reset accounting integrated totals, 2 octets each *)
        M_IT_TG_2 := 8, (* (008) Operational integrated totals, 4 octets each *)
        M_IT_TH_2 := 9, (* (009) Operational integrated totals, 3 octets each *)
        M_IT_TI_2 := 10, (* (010) Operational integrated totals, 2 octets each *)
        M_IT_TK_2 := 11, (* (011) Periodical reset operational integrated totals, 4 octets each *)
        M_IT_TL_2 := 12, (* (012) Periodical reset operational integrated totals, 3 octets each *)
        M_IT_TM_2 := 13, (* (013) Periodical reset operational integrated totals, 2 octets each *)
        (* System information in monitor direction *)
 M_EI_NA_2 := 70, (* (070) End of initialization *)
 P_MP_NA_2 := 71, (* (071) Manufacturer and product specification of integrated total DTE *)
 M_TI_TA_2 := 72, (* (072) Current system time of integrated total DTE *)
        (* System information in control direction *)
 C_RD_NA_2 := 100, (* (100) Read manufacturer and product specification *)
 C_SP_NA_2 := 101, (* (101) Read record of single-point information with time tag *)
 C_SP_NB_2 := 102, (* (102) Read record of single-point information with time tag of a selected time range *)
 C_TI_NA_2 := 103, (* (103) Read current system time of integrated total DTE *)
 C_CI_NA_2 := 104, (* (104) Read accounting integrated totals of the oldest integration period *)
 C_CI_NB_2 := 105, (* (105) Read accounting integrated totals of the oldest integration period and of a selected range of addresses *)
 C_CI_NC_2 := 106, (* (106) Read accounting integrated totals of a specific past integration period *)
 C_CI_ND_2 := 107, (* (107) Read accounting integrated totals of a specific past integration period and of a selected range of addresses *)
 C_CI_NE_2 := 108, (* (108) Read periodical reset accounting integrated totals of the oldest integration period *)
 C_CI_NF_2 := 109, (* (109) Read periodical reset accounting integrated totals of the oldest integration period and of a selected range of addresses *)
 C_CI_NG_2 := 110, (* (110) Read periodical reset accounting integrated totals of a specific past integration period *)
 C_CI_NH_2 := 111, (* (111) Read periodical reset accounting integrated totals of a specific past integration period and of a selected range of addresses *)
 C_CI_NI_2 := 112, (* (112) Read operational integrated totals of the oldest integration period *)
 C_CI_NK_2 := 113, (* (113) Read operational integrated totals of the oldest integration period and of a selected range of addresses *)
 C_CI_NL_2 := 114, (* (114) Read operational integrated totals of a specific past integration period *)
 C_CI_NM_2 := 115, (* (115) Read operational integrated totals of a specific past integration period and of a selected range of addresses *)
 C_CI_NN_2 := 116, (* (116) Read periodical reset operational integrated totals of the oldest integration period *)
 C_CI_NO_2 := 117, (* (117) Read periodical reset operational integrated totals of the oldest integration period and of a selected range of addresses *)
 C_CI_NP_2 := 118, (* (118) Read periodical reset operational integrated totals of a specific past integration period *)
 C_CI_NQ_2 := 119, (* (119) Read periodical reset operational integrated totals of a specific past integration period and of a selected range of addresses *)
 C_CI_NR_2 := 120, (* (120) Read accounting integrated totals of a specific past integration period of a selected time range and of a selected range of addresses *)
 C_CI_NS_2 := 121, (* (121) Read periodical reset accounting integrated totals of a specific past integration period of a selected time range and of a selected range of addresses *)
 C_CI_NT_2 := 122, (* (122) Read operational integrated totals of a specific past integration period of a selected time range and of a selected range of addresses *)
 C_CI_NU_2 := 123, (* (123) Read periodical reset operational integrated totals of a specific past integration period of a selected time range and of a selected range of addresses *)

        M_DS_TA_2 := 128, (* (128) *)
        P_ME_NA_2 := 129, (* Parameters of the measuring point *)
 M_DS_TB_2 := 130, (**)
        M_CH_TA_2 := 131, (**)
        C_PK_2 := 132, (* Load private key *)
        C_TA_VC_2 := 133, (* Read tariff information ( current values ) *)
        C_TA_VM_2 := 134, (* Read tariff information ( stored values ) *)
        M_TA_VC_2 := 135, (* Tariff information ( current values ) *)
        M_TA_VM_2 := 136, (* Tariff information ( stored values ) *)
        C_TA_CP_2 := 137, (* Close accounting period *)
        M_IB_TG_2 := 139, (* Block of operational integrated totals ( absolute values ) *)
        M_IB_TK_2 := 140, (* Block of periodical reset operational integrated totals ( increment values ) *)
        C_RM_NA_2 := 141, (* Read configuration data of the meter device *)
        M_RM_NA_2 := 142, (* Configuration of the meter device *)
        C_MR_NA_2 := 143, (* Change configuration data of the meter device *)
        C_PC_NA_2 := 144, (* (144) *)
        M_PC_NA_2 := 145, (* (145) *)
        C_MC_NA_2 := 146, (* (146) *)
        C_DF_NA_2 := 147, (* (147) *)
        M_DF_NA_2 := 148, (* (148) *)
        C_MF_NA_2 := 149, (* (149) *)

        C_DS_TA_2 := 180, (* (180) *)
        C_CS_TA_2 := 181, (* (181) Change date and time ( Time syncronization ) *)
        C_PI_NA_2 := 182, (* (182) Read parameters of the measuring point *)
        C_AC_NA_2 := 183, (* (183) Start session and send access key *)

        C_DS_TB_2 := 184, (* (184) *)
        C_CH_TA_2 := 185, (* (185) *)
        C_MH_TA_2 := 186, (* (186) *)
        C_FS_NA_2 := 187, (* (187) Finish session *)
        C_MP_NA_2 := 188, (* (188) *)
        C_CB_NT_2 := 189, (* (189) Read a block of operational integrated totals of a time period and a selected address *)
        C_CB_UN_2 := 190 (* (190) Read a block of periodical reset operational integrated totals of a time period and a selected address *)
);
END_TYPE

ASDU type identifier in monitor and control direction.

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10.0 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


E_IEC870_5_102COTType

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE E_IEC870_5_102COTType

TYPE E_IEC870_5_102COTType:
(
        eIEC870_2COT_0          := 0,
        eIEC870_2COT_1          := 1,
        eIEC870_2COT_2          := 2,
        eIEC870_2COT_SPONTAN    := 3, (* spontanous *)
 eIEC870_2COT_INIT       := 4, (* initialization *)
 eIEC870_2COT_REQ                := 5, (* request or requested *)
 eIEC870_2COT_ACT                := 6, (* command activation *)
 eIEC870_2COT_ACT_CON    := 7, (* command activation confirmation *)
 eIEC870_2COT_DEACT      := 8, (* command deactivation *)
 eIEC870_2COT_DEACT_CON  := 9, (* command deactivation confirmation *)
 eIEC870_2COT_ACT_TERM   := 10, (* command activation termination *)
 eIEC870_2COT_11                 := 11,
        eIEC870_2COT_12                 := 12,
        eIEC870_2COT_RECORD_NOT_FOUND := 13, (* requested record list is not available *)
 eIEC870_2COT_UNKNOWN_ASDU_TYPE := 14, (* unknown ASDU type idetifier *)
 eIEC870_2COT_UNKNOWN_RECORD_NUMBER := 15, (* uknown record number *)
 eIEC870_2COT_UNKNOWN_RECORD_ADDRESS := 16, (* unknown record address *)
 eIEC870_2COT_OBJECT_NOT_FOUND := 17, (* information object not available *)
 eIEC870_2COT_PERIOD_NOT_AVAILABLE := 18, (* requested measurement period not available *)
 eIEC870_2COT_19 := 19,
        eIEC870_2COT_20 := 20,
        eIEC870_2COT_21 := 21,
        eIEC870_2COT_22 := 22,
        eIEC870_2COT_23 := 23,
        eIEC870_2COT_24 := 24,
        eIEC870_2COT_25 := 25,
        eIEC870_2COT_26 := 26,
        eIEC870_2COT_27 := 27,
        eIEC870_2COT_28 := 28,
        eIEC870_2COT_29 := 29,
        eIEC870_2COT_30 := 30,
        eIEC870_2COT_31 := 31,
        eIEC870_2COT_32 := 32,
        eIEC870_2COT_33 := 33,
        eIEC870_2COT_34 := 34,
        eIEC870_2COT_35 := 35,
        eIEC870_2COT_36 := 36,
        eIEC870_2COT_37 := 37,
        eIEC870_2COT_38 := 38,
        eIEC870_2COT_39 := 39,
        eIEC870_2COT_40 := 40,
        eIEC870_2COT_41 := 41,
        eIEC870_2COT_42 := 42,
        eIEC870_2COT_43 := 43,
        eIEC870_2COT_44 := 44,
        eIEC870_2COT_45 := 45,
        eIEC870_2COT_46 := 46,
        eIEC870_2COT_47 := 47,
        eIEC870_2COT_48 := 48,
        eIEC870_2COT_49 := 49,
        eIEC870_2COT_50 := 50,
        eIEC870_2COT_51 := 51,
        eIEC870_2COT_52 := 52,
        eIEC870_2COT_53 := 53,
        eIEC870_2COT_54 := 54,
        eIEC870_2COT_55 := 55,
        eIEC870_2COT_56 := 56,
        eIEC870_2COT_57 := 57,
        eIEC870_2COT_58 := 58,
        eIEC870_2COT_59 := 59,
        eIEC870_2COT_60 := 60,
        eIEC870_2COT_61 := 61,
        eIEC870_2COT_62 := 62,
        eIEC870_2COT_63 := 63
);
END_TYPE

Cause of transfer (in monitoring and/or control direction) according to IEC 60870-5-102 norm.

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10.0 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


T_CP40Time2a

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE T_CP40Time2a

5 octets binary time format.

TYPE T_CP40Time2a :
STRUCT
        IVTisMinute     : BYTE := 16#00; (* Bit 7 = IV (1=invalid time, 0=valid time), Bit 6 = Tarif information, Bit 0..5 = Minutes <0..59> *)
 SURes1Hour      : BYTE := 16#00; (* Bit 7 = SU (1=summer time, 0=normal time), Bits 5..6 = spare bits <0>, Bits 0..4 = Hours <0..23> *)
 DOWDay          : BYTE := 16#01; (* Bits 5..7 = Day of week <0 = not used, 1..7>, Bits 0..4 = Day of month <1..31>*)
 PtiEtiMonth     : BYTE := 16#01; (* Bits 6..7 = Power tarif information <0..3>, Bits 4..5 Energie tarif info <0..3>, Bits 0..3 = Month <1..12> *)
 Res2Year        : BYTE := IEC870_DEFAULT_CP56TIME2A_YEAR; (* Bit 7 = spare bit <0>, Bits 0..6 = Year <0..99> *)
END_STRUCT
END_TYPE

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10.0 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )


T_CP56Time2b

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

TYPE T_CP56Time2b

7 octets binary time format.

TYPE T_CP56Time2b :
STRUCT
        MsSecond        : WORD := 16#00; (* Bits 11.15 Seconds <0..59>, Bits 0..9 Milliseconds <0..999> *)
 IVTisMinute     : BYTE := 16#00; (* Bit 7 = IV (1=invalid time, 0=valid time), Bit 6 = Tarif information, Bit 0..5 = Minutes <0..59> *)
 SURes1Hour      : BYTE := 16#00; (* Bit 7 = SU (1=summer time, 0=normal time), Bits 5..6 = spare bits <0>, Bits 0..4 = Hours <0..23> *)
 DOWDay          : BYTE := 16#01; (* Bits 5..7 = Day of week <0 = not used, 1..7>, Bits 0..4 = Day of month <1..31>*)
 PtiEtiMonth     : BYTE := 16#01; (* Bits 6..7 = Power tarif information <0..3>, Bits 4..5 Energie tarif info <0..3>, Bits 0..3 = Month <1..12> *)
 Res2Year        : BYTE := IEC870_DEFAULT_CP56TIME2A_YEAR; (* Bit 7 = spare bit <0>, Bits 0..6 = Year <0..99> *)
END_STRUCT
END_TYPE

Development Environment | Target System | PLC libraries to include
TwinCAT v2.10.0 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib are included automatically )


Error codes overview

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

IEC 60870-5-102 serial link interface error codes

Codes (hex) | Codes (dec) | Error source | Description
0x00000000-0x00002000 | 0-8192 | Serial communication errors | serial communication error (only if error source = eIEC870_ESRC_IEC60870_5_101LINK ).
0x00000000-0x00007800 | 0-30720 | TwinCAT System error | TwinCAT System error (ADS error codes inclusive only if error error source <> eIEC870_ESRC_IEC60870_5_101LINK ).
0x00008100-0x000081FF | 32768-33023 | IEC60870-5-10x error | IEC60870-5-10x errors


Troubleshooting

TS6502 | TwinCAT PLC Lib: IEC 60870-5-102 Serial Link Interface (master)

Troubleshooting/diagnostics

  1. Check the hardware and software requirements described in this documentation (TwinCAT version, CE image version etc.);
  2. Compare the interoperability check list of control station and substation;
  3. Check the IO configuration and mapping of PLC variables in TwinCAT System Manager (configuration of serial interface, baudrate, parity, stoppbits settings). Compare them to the parameters set in the substation;
  4. Check whether the FB_IEC870_5_102TProtocol() function block issues an error code. The documentation for the error codes can be found here: Overview of error codes;
  5. Check the protocol parameters that are transferred to the function block (link address, FRAMELength etc.). Compare them to the parameters set in the substation;
  6. Check the configured address lengths (instance of ST_IEC870_5_102TBuffer, TX/RX data buffer): ASDU address octet size, max ASDU size. Compare them to the parameters set in the substation;
  7. Check the configured data points (type, information object address etc.);
  8. Check if the substation issues an error code;
  9. Activate the debug output during connection establishment and/or of ASDU data. Open the TwinCAT System Manager and activate the LogView window. Analyze/check the debug output strings;


Examples

Used controlled or controlling station configuration parameters:

  • Standard PC interface: COM1
  • 19200 Baud
  • Link address: 1
  • Link address size: 2 octets
  • Common ASDU address: 1
  • Common ASDU address size: 2 octets
PLC project | TwinCAT System Manager Configuration | Description
LowLevelMasterSample.pro | LowLevelMasterSample.tsm | Simple Master-Applikation which uses the TwinCAT IEC60870-5-102 Serial Link Interface.