-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #526 from emqx/release-2.10
Release 2.10
- Loading branch information
Showing
17 changed files
with
1,065 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.