# IEC60870-5-102

IEC 60870-5-102 is part of the International Electrotechnical Commission (IEC) 60870 family, which is a set of standards for communication protocols for power system automation. More specifically, IEC 60870-5-102 is a standard for remote communication with measuring and control devices.

For the generic steps, see [Create a Southbound Driver](../south-devices.md) and [Groups and Tags](../../groups-tags/groups-tags.md).

This standard defines how devices using this protocol should exchange information to ensure compatibility and reliability in electric energy control and monitoring systems. It includes definitions of data models, data transmission processes, data content, etc. It also has clear definitions of the physical layer and data link layer of the communication protocol.

EMQX Neuron supports obtaining relevant data from devices by calling I/II level user data.

## Add Driver

In **Data Collection -> South Devices**, click **Add Device** to create a device node, enter the device name, and select the driver to start the driver as **IEC 60870-5-102**.

## Connection Parameters

On the **Southbound Devices** page, click the device card/device column to enter the device configuration page and fill in the device's configuration information.

| Parameters          | Description                  |
| ------------ | --------------------- |
| **Physical Link** | Serial or Ethernet|
| **Link Address**       |  Link Address of device               |
| **Common Address**       | Common address of device|
| **I/II Interrogation Interval** | Interval of sending I/II interrogation(s)|
| **Timeout**     | Send/Recv timeout|
| **IP Address** | device's IPv4 address                |
| **Port**     | device's port|
| **Device**     | Serial device path|
| **Stop**     | Stop Bits  |
| **Parity**     | Parity  |
| **Baud Rate**     | Baud rate  |
| **Data**     | Data Bits |

## Tag Configuration

The data types and address formats supported by this driver are listed below.

After adding and configuring the driver, to establish communication between the device and EMQX Neuron, you need to add groups and tags to the Southbound driver.

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

### Data Types

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

### Address Format

> [RA].[IOA]

#### RA

In the IEC60870-5-102 protocol, RA (Record Address) refers to the information record address, which is used to identify a specific information point address. Each type of information has a fixed range in the information object address space.

#### IOA

In the IEC60870-5-102 protocol, IOA (Information Object Address) refers to the information object address, which is used to uniquely identify a data object address, and is used to specify the address of an information object (remote signaling, remote measurement, remote control, etc.).

### Supported Readable Types

* M_SP_TA_2
* M_IT_TA_2
* M_IT_TB_2
* M_IT_TC_2
* M_IT_TD_2
* M_IT_TE_2
* M_IT_TF_2
* M_IT_TG_2
* M_IT_TH_2
* M_IT_TI_2
* M_IT_TK_2
* M_IT_TL_2
* M_IT_TM_2

### Address Examples

| Address         | Description|
| :-------- | :---- |
| 1.2 | Record Address is 1, IOA is 2 |
| 10.1| Record Address is 10, IOA is 1|
