# IEC60870-5-101

IEC 60870-5-101 is an international standard that defines the communication protocol between power substation control and monitoring systems. It is part of the IEC 60870-5 series, which includes various protocols commonly used in the field of power system automation.

Specifically, IEC 60870-5-101 is suitable for point-to-point communication via a serial interface, usually using the EIA-232 or EIA-485 standard. It allows the master station (such as the control center) to exchange real-time data and commands with remote terminal units (RTUs) located in substations. These RTUs are responsible for monitoring and controlling the equipment and processes in the substation.

## Add Device

In **Configuration -> Southbound Devices**, click **Add Device** to create a device node, enter the plugin name, and select **IEC60870-5-101** as the plugin type to enable the plugin.

## Device Configuration

On the **Southbound Devices** page, click the device card to enter the device configuration page and configure the device parameters.

| Parameter          | Description                  |
| ------------ | --------------------- |
| **Serial Device** | The path of the serial device in serial mode, such as /dev/ttyS0 in Linux system. |
| **Stop Bits** | Serial connection parameters in serial mode. |
| **Parity Bits** | Serial connection parameters in serial mode. |
| **Baud Rate** | Serial connection parameters in serial mode. |
| **Data Bits** | Serial connection parameters in serial mode. |
| **Device IP Address** | IPv4 address of the device |
| **Device Port**     | Device port number, default is 2404  |
| **Common Address**       |  Common address, unique identifier for data objects               |
| **General Call Interval** | Interval for sending general call commands         |

## Set Groups and Points

After adding and configuring the plugin, you need to establish communication between the device and Neuron by adding groups and points to the southbound driver.

After completing the device configuration, click the device card/device column to enter the **Group List** page. Click **Create** to create a group, set the group name and acquisition interval. After creating the group, click the group name to enter the **Point List** page and add the device points to be collected, including point address, point attribute, data type, etc.

If the point attribute is configured as `Read`, it means that the point will not only report the value of the data points sent by the 101 Server according to the configured `General Call Interval`, but also report the data regularly according to the group's `Acquisition Interval`.

If the point attribute is configured as `Subscribe`, it means that the point will not only report the value of the data points sent by the 101 Server according to the configured `General Call Interval`, but also when the data point changes, Neuron will receive the changed data point and report it to the northbound application through the northbound application configuration.

::: tip Note
Due to the real-time requirements of the 101 protocol, the points configured as `Subscribe` will immediately report the changed data points to the northbound application when the data points change, and are not limited by the `Acquisition Interval` of the collection group.
:::

::: tip Note
When all the data points in the collection group are configured as `Subscribe`, even if the data points do not change, the general call report will still be triggered.
:::

If the point attribute is configured as `Write`, it means that the point supports Neuron to actively write data to the 101 Server. Note that the read address and write address of the 101 protocol are separate. A point address is either a read point or a write point, and there is no point that can be read and written at the same time. For specific information, please refer to the relevant documents of the 101 protocol.

The point attributes `Subscribe`, `Read`, and `Write` can only be configured separately.

::: tip Note
It is recommended to configure only one type of point attribute in the same collection group. For example, in a collection group, only configure points with the `Subscribe` attribute, or only configure points with the `Read` attribute, or only configure points with the `Write` attribute.
:::

The common configuration items can refer to [Connecting Southbound Devices](../south-devices.md), and this page will introduce the supported data types and address formats.

### Data Types

* UINT8
* INT8
* UINT16
* INT16
* UINT32
* INT32
* FLOAT
* BIT

### Address Format

> IOA

#### IOA
In the IEC 60870-5-101 protocol, IOA (Information Object Address) refers to the information object address, which is used to uniquely identify a data object. It is used to specify the address of an information object (such as remote signaling, remote measurement, remote control, etc.).


| IEC 60870-5-101  TYPE ID         | Data Type|
| :------------------------------ | :------------ |
| M_ME_NA_1、M_ME_TD_1、M_ME_ND_1、M_ME_NB_1、M_ME_TE_1            | uint16/int16 |
| M_IT_NA_1 | int32/uint32|
| M_ME_NC_1、M_ME_TF_1            | float        |
| M_SP_NA_1、M_SP_TB_1            | bit/int8/uint8          |


### Data Subscription

IEC 60870-5-101 supports the point to report the value when the point changes. On the Neuron side, you need to configure the point with the Subscribe attribute. When the device sends the changed data point to Neuron, Neuron will immediately send this change message to the corresponding northbound application.


## Data Monitoring

After the device is successfully added and configured, you can view the data points of the device in the **Data Monitoring** page. Click the device card to enter the device data monitoring page, where you can view the data points of the device in real-time.