Skip to content

Commit

Permalink
Merge pull request #526 from emqx/release-2.10
Browse files Browse the repository at this point in the history
Release 2.10
  • Loading branch information
QQDQ authored Oct 12, 2024
2 parents 1855f00 + 1ddfd1d commit 6d18fa1
Show file tree
Hide file tree
Showing 17 changed files with 1,065 additions and 10 deletions.
32 changes: 32 additions & 0 deletions directory.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
}
]
},
{
"title": "HollySys Modbus RTU",
"path": "configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu"
},
{
"title": "XINJE Modbus RTU",
"path": "configuration/south-devices/modbus-xinje-rtu/modbus-xinje-rtu"
Expand All @@ -117,6 +121,10 @@
}
]
},
{
"title": "HollySys Modbus TCP",
"path": "configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp"
},
{
"title": "Inovance Modbus TCP",
"path": "configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp",
Expand Down Expand Up @@ -444,6 +452,14 @@
"path": "configuration/south-devices/codesys3/demo"
}
]
},
{
"title": "DNP 3.0",
"path": "configuration/south-devices/dnp3/dnp3"
},
{
"title": "DF1",
"path": "configuration/south-devices/df1/df1"
}
]
},
Expand Down Expand Up @@ -773,6 +789,10 @@
}
]
},
{
"title": "HollySys Modbus RTU",
"path": "configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu"
},
{
"title": "XINJE Modbus RTU",
"path": "configuration/south-devices/modbus-xinje-rtu/modbus-xinje-rtu"
Expand All @@ -791,6 +811,10 @@
}
]
},
{
"title": "HollySys Modbus TCP",
"path": "configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp"
},
{
"title": "Inovance Modbus TCP",
"path": "configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp",
Expand Down Expand Up @@ -1108,6 +1132,14 @@
"path": "configuration/south-devices/codesys3/demo"
}
]
},
{
"title": "DNP 3.0",
"path": "configuration/south-devices/dnp3/dnp3"
},
{
"title": "DF1",
"path": "configuration/south-devices/df1/df1"
}
]
},
Expand Down
42 changes: 40 additions & 2 deletions en_US/configuration/north-apps/mqtt/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Tag value is returned only when the tag is read successfully. If something goes
You could write a tag by sending requests in JSON to the MQTT topic designated by the **Write Request Topic** parameter.

::: tip
Before Neuron version 2.4.5, the write request topic was hard-coded to **/neuron/{node_name}/write/req**.
Before Neuron version 2.4.5, the write request topic was hard-coded to **/neuron/{random_str}/write/req**.
:::

#### Body
Expand Down Expand Up @@ -197,7 +197,7 @@ Below is an example write request:
Write response will be published to the MQTT topic designated by the **Write Response Topic** parameter.

::: tip
Before Neuron version 2.4.5, the write response topic was hard-coded to **/neuron/{node_name}/write/resp**.
Before Neuron version 2.4.5, the write response topic was hard-coded to **/neuron/{random_str}//write/resp**.
:::

#### Body
Expand All @@ -214,3 +214,41 @@ Below is an example of write response:
"error": 0
}
```

## Driver Status Report

Reports status of all the southbound nodes to the specified topic.

### Status Report Topic

The status report topic is specified in the northbound node configuration. Its default value is **/neuron/{random_str}/state/update**.

### Status Report Interval

The status report interval is specified in the northbound node configuration, indicating the number of seconds between each message. The default value is 1, with an allowed range of 1-3600.

### Reporting Message Format

The reported data consists of the following fields:
* `timestamp`: The UNIX timestamp when the data was collected.
* `states`: An array of node status information.

Below is an example of a driver status reporting message.

```json
{
"timestamp": 1658134132237,
"states": [
{
"node": "modbus-tcp",
"link": 2,
"running": 3
},
{
"node": "modbus-rtu",
"link": 2,
"running": 3
}
]
}
```
6 changes: 5 additions & 1 deletion en_US/configuration/north-apps/mqtt/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ See the table below for the configuration parameters.

| Parameter | Description |
| ------------------------------- | ------------------------------------------------------------ |
| **MQTT Version** | The version of MQTT protocol. The default is v3.1.1. |
| **Client ID** | MQTT client id for communication, a required field. |
| **QoS Level** | MQTT QoS level for message delivery, optional, default QoS 0. (since 2.4.0) |
| **Upload Format** | JSON format of reported data, a required field: <br /><br /> - *values-format*, data are split into `values` and `errors` sub-objects. <br />- *tags-format*, tag data are put in a single array. <br /><br />For data communication format, see [Upstream/Downstream Data Format](./api.md#write-tag) |
| **Write Request Topic** | MQTT topic to which the plugin subscribes for write requests. For data communication format, see [Upstream/Downstream Data Format](./api.md#write-tag) (since 2.4.5) |
| **Write Request Topic** | MQTT topic to which the plugin subscribes for write requests. For data communication format, see [Upstream/Downstream Data Format](./api.md#write-tag) (since 2.4.5). If tracing is enabled, configure the user properties `traceparent` and `tracestate` according to the W3C standard. |
| **Write Response Topic** | MQTT topic to which the plugin sends write responses. (since 2.4.5) |
| **Driver Status Report** | Reports status of all the southbound nodes to the specified topic. |
| **Status Report Topic** | The topic for status reporting. |
| **Status Report Interval** | The time interval for reporting the status of the southbound node, in seconds. The range is 1-3600, with a default of 1. |
| **Offline Data Caching** | Offline data caching switch. Cache MQTT messages when offline, and sync cached messages when back online. (Since 2.4.3) |
| **Cache Memory Size** | In-memory cache limit (MB) in case of communication failure, a required field. Range in [0, 1024]. Should not be larger than *Cache Disk Size*. For details about the cache feature, see [Offline Data Caching](#offline-data-caching) |
| **Cache Disk Size** | In-disk cache limit (MB) in case of communication failure, a required field. Range in [0, 10240]. If nonzero, *cache-mem-size* should also be nonzero. |
Expand Down
115 changes: 115 additions & 0 deletions en_US/configuration/south-devices/df1/df1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Allen-Bradley DF1

DF1 is a proprietary communication protocol developed by Rockwell Automation, primarily used for data exchange between its Allen Bradley series PLCs (Programmable Logic Controllers) and other devices.
The Neuron Allen Bradley DF1 plugin supports point-to-point communication and data transmission through serial communication lines.

## Add Device

Go to **Configuration -> South Devices**, then click **Add Device** to add the driver. Configure the following settings in the popup dialog box.

- Name: The name of this device node.
- Plugin: Select the **Allen-Bradley DF1** plugin.

## Device Configuration

After clicking **Create**, you will be redirected to the **Device Configuration** page, where we will set up the parameters required for Neuron to establish a connection with the northbound application. You can also click the device configuration icon on the southbound device card to enter the **Device Configuration** interface.

| Parameter | Description |
| -------------------- | ------------------------------------------------------- |
| **Recv Timeout** | The time of the system waits for a device to respond to a command. |
| **Send Interval** | The waiting time between sending each read/write command. Some serial devices may discard certain commands if they receive consecutive commands in a short period of time. |
| **Serial Port** | The path to the serial device when using a serial connection, e.g., /dev/ttyS0 in Linux systems. |
| **Stop Bits** | Serial connection parameter. |
| **Parity** | Serial connection parameter. |
| **Baud Rate** | Serial connection parameter. |
| **Data Size** | Serial connection parameter. |

## Configure Data Groups and Tags

After the plug-in is added and configured, the next step is to establish communication between your device and Neuron by adding groups and tags to the Southbound driver.

Once device configuration is completed, navigate to the **South Devices** page. Click on the device card or device row to access the **Group List** page. Here, you can create a new group by clicking on **Create**, then specifying the group name and data collection interval.

Upon successfully creating a group, click on its name to proceed to the **Tag List** page. This page allows you to add device tags for data collection. You'll need to provide information such as the tag address, attributes, and data type.

For information on general configuration items, see [Connect to Southbound Devices](../south-devices.md). The subsequent section will concentrate on configurations specific to the driver.

### Data Types

* INT16
* UINT16
* INT32
* UINT32
* FLOAT
* BIT
* STRING

### Address format

> FILE NUM:ELEM[.BIT][#ENDIAN]\[.LEN\[H]\[L]]
For example, N7:0

#### **FILE**

Required, File is the type or the file.
| FILE | FILE TYPE |
| ---- | --------- |
| U | STATUS |
| B | BIT |
| T | TIMER |
| C | COUNTER |
| R | COUNTROL |
| N | INTEGER |
| F | FLOAT |
| S | STRING |
| A | ASCII |

#### NUM

Required, NUM is the number or the file.

#### ELEM

Required, ELEM is the number or the elem.


#### **.BIT**

Optional, specify a specific bit in a register, as:
| Address | Data Type | Description |
| ----------- | ------- | --------------------------------------------------- |
| N7:0.0 | bit | Refers to INT FILE 7 , address 0, bit 0. |
| N7:0.15 | bit | Refers to INT FILE 7 , address 0, bit 15. |

#### **#ENDIAN**

Optional, byte order, applicable to data types int16/uint16/int32/uint32/float/, see the table below for details.
| Symbol | Byte Order | Supported Data Types | Note |
| --- | ------- | ------------------ | ----- |
| #B | 2,1 or 8,7,6,5,4,3,2,1 | int16/uint16 | |
| #L | 1,2 or 1,2,3,4,5,6,7,8 | int16/uint16 | Default byte order if not specified |
| #LL | 1,2,3,4 | int32/uint32/float | Default byte order if not specified |
| #LB | 2,1,4,3 | int32/uint32/float | |
| #BB | 3,4,1,2 | int32/uint32/float | |
| #BL | 4,3,2,1 | int32/uint32/float | |

#### .LEN\[H]\[L]

When the data type is STRING, .LEN is a required field, indicating the number of bytes the string occupies. Each register contains two storage methods: H and L, as shown in the table below.
| Symbol | Description |
| --- | ------------------------------------- |
| H | One register stores two bytes, with the high byte first |
| L | One register stores two bytes, with the low byte first |

::: tip
The address data for the T C R region is six bytes.
The first two bytes can use bit or int16, uint16 types;
The middle two bytes of data need to be of type int16 or uint16, with the address suffix added .PRE;
The last two bytes of data should be of type int16 or uint16, with the address suffix added .ACC。
For example, T2:1.ACC
:::

## Data Monitoring

After completing the point configuration, you can click **Monitoring** -> **Data Monitoring** to view device information and control devices. For details, refer to [Data Monitoring](../../../admin/monitoring.md).
101 changes: 101 additions & 0 deletions en_US/configuration/south-devices/dnp3/dnp3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
## DNP 3.0

DNP 3.0 (Distributed Network Protocol 3.0) is a communication protocol primarily used in the industrial automation field, especially in power systems for supervisory control and data acquisition (SCADA) systems. It enables reliable data exchange between remote terminal units (RTUs) and master station systems.

## Device Settings

| Field | Description |
| ------------------ | ----------------------------------------- |
| host | Device IP address |
| port | Device port number, default 20000 |
| masterid | Master station ID, default 1 |
| slaveid | Slave station ID, default 2 |
| class0123_interval | Class0123 pull interval, default 20000 ms |
| class123_interval | Class123 pull interval, default 1000 ms |
| time_sync | Time synchronization, default No |

## Supported Data Types

* uint8
* uint16
* int16
* uint32
* int32
* float
* bit

## Address Format

> obj.var.index(.attribute)
>
> CROB.index:counter:on-time:off-time
### obj and var

In the DNP 3.0 protocol, obj and var are used to define an object type, and index specifies a specific object within a group of objects. The attribute currently only supports value. If not specified, the default is value.

Currently supported objects are as follows:

| obj | var | Object | r/w | Type |
| --- | --- | ------------------------------------------ | --- | ------------- |
| 1 | 1 | binary input | r | bit |
| 1 | 2 | binary input with status | r | bit |
| 2 | 1 | binary input change without time | r | bit |
| 2 | 2 | binary input change with absolute time | r | bit |
| 2 | 3 | binary input change without relative time | r | bit |
| 10 | 1 | binary output | r | bit |
| 10 | 2 | binary output with status | r | bit |
| 10 | 3 | binary output change with time | r | bit |
| 20 | 1 | 32-bit binary counter with flag | r | uint32/int32 |
| 20 | 2 | 16-bit binary counter with flag | r | uint16/uint16 |
| 20 | 5 | 32-bit binary counter without flag | r | uint32/int32 |
| 20 | 6 | 16-bit binary counter without flag | r | uint16/int16 |
| 21 | 1 | 32-bit frozen binary counter | r | uint32/int32 |
| 21 | 2 | 16-bit frozen binary counter | r | uint16/int16 |
| 30 | 1 | 32-bit analog input | r | uint32/int32 |
| 30 | 2 | 16-bit analog input | r | uint16/int16 |
| 30 | 3 | 32-bit analog input without flag | r | uint32/int32 |
| 30 | 5 | 32-bit float analog input | r | float |
| 32 | 1 | 32-bit analog input change without time | r | uint32/int32 |
| 32 | 2 | 16-bit analog input change without time | r | uint16/int16 |
| 32 | 3 | 32-bit analog input change with time | r | uint32/int32 |
| 32 | 4 | 16-bit analog input change with time | r | uint16/int16 |
| 32 | 7 | 32-bit float analog input change with time | r | float |
| 40 | 1 | 32-bit analog output | r | uint32/int32 |
| 40 | 2 | 16-bit analog output | r | uint16/int16 |
| 40 | 3 | 32-bit float analog output | r | flaot |
| 41 | 1 | 32-bit analog output block | w | uint32/int32 |
| 41 | 2 | 16-bit analog output block | w | uint16/int16 |
| 41 | 3 | 32-bit float analog output block | w | float |
| 42 | 7 | 32-bit float analog output event with time | r | float |

CROB (Control Relay Output Block) is a special object associated with actuating on/off type output devices, write-only, type `uint8`, because it requires setting counter, on-time, and off-time in addition to Control Code.

Control Code values are as follows:

| Control Code | Action |
| ------------ | ------------------------- |
| 1 | output pluse on |
| 2 | output pluse off |
| 3 | output latch on |
| 4 | output latch off |
| 65 | output pluse on + close |
| 66 | output pluse off + close |
| 67 | output latch on + close |
| 68 | output latch off + close |
| 129 | output pluse on + trip |
| 130 | output pluse off + trip |
| 131 | output latch on + trip |
| 132 | output latch off + trip |
| +16 | + queue |
| +32 | + clear |

## Address Examples

| Address | Data Type | Description |
| ------------ | --------- | ----------------------------------------------------- |
| 1.2.0 | bit | Value of binary input index 0 |
| 1.2.1 | bit | Value of binary input index 1 |
| 2.2.1 | bit | Value of binary input index 1 with absolute timestamp |
| CROB.0:0:0:0 | bit | Control binary output index 0 output |
| 40.1.0 | bit | Value of 32-bit binary output index 0 |
2 changes: 1 addition & 1 deletion en_US/configuration/south-devices/file/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ File plugin is used to read or write files.

### Address Format

> FILE PATH</span>
> FILE PATH
### Address Example

Expand Down
Loading

0 comments on commit 6d18fa1

Please sign in to comment.