Skip to content

Commit ed8dc62

Browse files
authored
Merge pull request #568 from emqx/release-2.12
merge 2.12
2 parents 9a36e2e + 153bfec commit ed8dc62

File tree

31 files changed

+1308
-2
lines changed

31 files changed

+1308
-2
lines changed

directory.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,28 @@
468468
{
469469
"title": "KND CNC",
470470
"path": "configuration/south-devices/knd/knd"
471+
},
472+
{
473+
"title": "NEURON HUB",
474+
"path": "configuration/south-devices/neuhub/neuhub",
475+
"children": [
476+
{
477+
"title": "OPC DA",
478+
"path": "configuration/south-devices/neuhub/opcda"
479+
},
480+
{
481+
"title": "SYNTEC CNC",
482+
"path": "configuration/south-devices/neuhub/syntec-cnc"
483+
},
484+
{
485+
"title": "MITSUBISHI CNC",
486+
"path": "configuration/south-devices/neuhub/mitsubishi-cnc"
487+
},
488+
{
489+
"title": "连接 KEPServerEX 6 OPC DA Server",
490+
"path": "configuration/south-devices/neuhub/example/kepware-da"
491+
}
492+
]
471493
}
472494
]
473495
},
@@ -553,6 +575,16 @@
553575
{
554576
"title": "Monitor",
555577
"path": "configuration/north-apps/monitor/overview"
578+
},
579+
{
580+
"title": "DataStorage",
581+
"path": "configuration/north-apps/DataStorage/DataStorage",
582+
"children": [
583+
{
584+
"title": "订阅信息查询 API",
585+
"path": "configuration/north-apps/DataStorage/api"
586+
}
587+
]
556588
}
557589
]
558590
},
@@ -1156,6 +1188,28 @@
11561188
{
11571189
"title": "KND CNC",
11581190
"path": "configuration/south-devices/knd/knd"
1191+
},
1192+
{
1193+
"title": "NEURON HUB",
1194+
"path": "configuration/south-devices/neuhub/neuhub",
1195+
"children": [
1196+
{
1197+
"title": "OPC DA",
1198+
"path": "configuration/south-devices/neuhub/opcda"
1199+
},
1200+
{
1201+
"title": "SYNTEC CNC",
1202+
"path": "configuration/south-devices/neuhub/syntec-cnc"
1203+
},
1204+
{
1205+
"title": "MITSUBISHI CNC",
1206+
"path": "configuration/south-devices/neuhub/mitsubishi-cnc"
1207+
},
1208+
{
1209+
"title": "Connect to KEPServerEX 6 OPC DA Server",
1210+
"path": "configuration/south-devices/neuhub/example/kepware-da"
1211+
}
1212+
]
11591213
}
11601214
]
11611215
},
@@ -1247,6 +1301,16 @@
12471301
{
12481302
"title": "Monitor",
12491303
"path": "configuration/north-apps/monitor/overview"
1304+
},
1305+
{
1306+
"title": "DataStorage",
1307+
"path": "configuration/north-apps/DataStorage/DataStorage",
1308+
"children": [
1309+
{
1310+
"title": "Subscription Information Query API",
1311+
"path": "configuration/north-apps/DataStorage/api"
1312+
}
1313+
]
12501314
}
12511315
]
12521316
},

en_US/api/error-code.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ This document describes the errors that neuron will reply to sender when calling
120120
* 4102 file read failure
121121
* 4103 file write failure
122122

123+
## DATALAYERS error codes
124+
125+
* 4200 datalayers error
126+
* 4201 datalayers init failed
127+
* 4202 datalayers connect failed
128+
* 4203 datalayers client is null
129+
123130
## OPCUA error codes
124131

125132
* 10001 opcua tag does not exist
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# DataStorage
2+
3+
The Neuron DataStorage plugin is an open-source northbound plugin that writes data to [Datalayers](https://docs.datalayers.cn/datalayers/latest/) using [Arrow Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html#arrow-flight-sql). It extends Neuron's capability to store time-series data.
4+
5+
Upon startup, Neuron creates a singleton *DataStorage* node automatically. Users cannot manually create or delete this node.
6+
7+
You can view the *DataStorage* node in the **North Apps** tab throw the dashboard.
8+
9+
## Application Configuration
10+
11+
The following parameters are available when configuring the DataStorage node:
12+
13+
| Field | Description |
14+
| ------------------------------- | ------------------------------------------------------------ |
15+
| **Host** | IP address of the Datalayers server |
16+
| **Port** | gRPC service port of the Datalayers server |
17+
| **Username** | Datalayers username |
18+
| **Password** | Datalayers password |
19+
20+
## Add Subscription
21+
22+
After plugin configuration, data forwarding can be enabled via southbound device subscriptions.
23+
24+
Click the device card or row on the **North Apps** page, then **Add Subscription** on the **Group List** page. And set the following:
25+
26+
- **South device**: Select the southbound device you want to subscribe to.
27+
- **Group**: Select a group from the southbound device'.
28+
29+
## Data Upload
30+
31+
Neuron DataStorage uses Arrow's columnar format for data transmission, which eliminates serialization and deserialization during transport. This significantly reduces latency and performance overhead, improving system throughput.
32+
33+
## Operation & Maintenance
34+
35+
On the device card or device row, you can click on the **Data Statistics** icon to mreview the application's operation status and track the data received and sent.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Subscription Information Query API
2+
3+
The following content describes the API service for querying the subscription information of the DataStorage node.
4+
5+
6+
## Get All Subscription Groups
7+
8+
*GET* /api/v2/datalayers/groups
9+
10+
### Request Headers
11+
12+
**Authorization** Bearer \<token\>
13+
14+
### Response Status
15+
16+
* 200 OK
17+
18+
### Response
19+
20+
```json
21+
{
22+
"error": 0,
23+
"children": [
24+
{
25+
"id": "6a0662ef-db11-cdde-6eba-21bff62cb350",
26+
"name": "modbus_node",
27+
"category": 1,
28+
"children": [
29+
{
30+
"id": "ae2601b6-7a11-408d-a815-d493c9e128f0",
31+
"name": "modbus_group",
32+
"category": 2,
33+
"children": []
34+
}
35+
]
36+
}
37+
]
38+
}
39+
```
40+
41+
## Get Tags under a Specified Subscription Group
42+
43+
*GET* /api/v2/datalayers/tags
44+
45+
### Request Params
46+
47+
**driver** required
48+
49+
**group** required
50+
51+
### Request Headers
52+
53+
**Authorization** Bearer \<token\>
54+
55+
### Response Status
56+
57+
* 200 OK
58+
59+
### Response
60+
61+
```json
62+
{
63+
"error": 0,
64+
"children": [
65+
{
66+
"id": "ae2601b6-7a11-408d-a815-d493c9e128f0",
67+
"name": "modbus_group",
68+
"category": 2,
69+
"children": [
70+
{
71+
"id": "6af5975f-171b-28b5-5aaf-cf77ed801cee",
72+
"name": "abc",
73+
"type": 3,
74+
"category": 3,
75+
"leaf": true,
76+
"children": []
77+
},
78+
{
79+
"id": "44ef919e-2e04-7b52-9491-4056ac3da8c6",
80+
"name": "def",
81+
"type": 3,
82+
"category": 3,
83+
"leaf": true,
84+
"children": []
85+
},
86+
{
87+
"id": "a3da88b9-e202-509a-a2aa-b6f3d050ad19",
88+
"name": "abcdef",
89+
"type": 3,
90+
"category": 3,
91+
"leaf": true,
92+
"children": []
93+
}
94+
]
95+
}
96+
]
97+
}
98+
```
99+
100+
## Fuzzy Search for Subscription Tags
101+
102+
*GET* /api/v2/datalayers/tag
103+
104+
### Request Params
105+
106+
**tag** required
107+
108+
### Request Headers
109+
110+
**Authorization** Bearer \<token\>
111+
112+
### Response Status
113+
114+
* 200 OK
115+
116+
### Response
117+
118+
```json
119+
{
120+
"error": 0,
121+
"children": [
122+
{
123+
"id": "6a0662ef-db11-cdde-6eba-21bff62cb350",
124+
"name": "modbus_node",
125+
"category": 1,
126+
"children": [
127+
{
128+
"id": "ae2601b6-7a11-408d-a815-d493c9e128f0",
129+
"name": "modbus_group",
130+
"category": 2,
131+
"children": [
132+
{
133+
"id": "6af5975f-171b-28b5-5aaf-cf77ed801cee",
134+
"name": "abc",
135+
"type": 3,
136+
"category": 3,
137+
"leaf": true,
138+
"children": []
139+
},
140+
{
141+
"id": "a3da88b9-e202-509a-a2aa-b6f3d050ad19",
142+
"name": "abcdef",
143+
"type": 3,
144+
"category": 3,
145+
"leaf": true,
146+
"children": []
147+
}
148+
]
149+
}
150+
]
151+
}
152+
]
153+
}
154+
```

en_US/configuration/north-apps/sparkplugb/overview.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ Click the device card or row on the **North Apps** page, then **Add Subscription
4747
- **South device**: Select the southbound device you want to subscribe to, for example, 'modbus-tcp-1'.
4848
- **Group**: Select a group from the southbound device, for example, 'group-1'.
4949

50+
Add static tags in Json format and report them simultaneously with the southbound data tags:
51+
``` json
52+
{"location":"sh","number":"12345613"}
53+
```
54+
5055
## Use Case
5156

5257
- You can use the Neuron Sparkplug B plugin to report data to EMQX, and decode the complete and accurate data results through the EMQX's encoding and decoding functions. For specific steps, see [Integration with EMQX](sparkplug.md).

en_US/configuration/south-devices/fanuc-focas/fanuc-focas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The address can support up to 3 parameters, with the `@` symbol specifying the c
9595
| hndintrpt.m.n | Handwheel interrupt value | int32/uint32 | m as type, n as number | m=0 for input, m=1 for output, n starts from 1 |
9696
| spdlName.m | Spindle name | int8/uint8 | m as number | m starts from 1 |
9797
| spmeter.m.n | Spindle load percentage | int32/uint32 | m as type, n as number | m=0 for spindle load, m=1 for spindle motor load, n starts from 1 |
98-
| spmeter.m | Servo load percentage | int32/uint32 | m as number | m starts from 1 |
98+
| svmeter.m | Servo load percentage | int32/uint32 | m as number | m starts from 1 |
9999
| almhisno | Number of historical alarms | int16/uint16 | - | |
100100
| almhistry.m.n | Historical alarm content | int16/uint16/string | m as number, n as value parameter | m starts from 1, n=0 for alarm type, n=1 for alarm number, n=2 for alarm content |
101101
| omhisno | Number of historical extra operation information | int16/uint16 | - | |
Loading
Loading
Loading
Loading
Loading
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Example of Connecting to KEPServerEX 6 OPC DA Server
2+
3+
This article demonstrates how to use the Neuron HUB plugin and the NEURON HUB Windows program to connect to the KEPServerEX 6 OPC DA Server, enabling read and write operations on OPC DA Server data.
4+
5+
## Installing KEPServerEX 6
6+
7+
The KEPServerEX installation package can be downloaded from the official website: [KEPServerEX Demo Download](https://www.ptc.com/en/products/kepware/kepserverex/demo-download).
8+
9+
## Installing the NEURON HUB Windows Program
10+
11+
The installation package for the NEURON HUB Windows program can be obtained by contacting technical support personnel. After obtaining the installation package, double-click to run the installer.
12+
13+
## Using the NEURON HUB Windows Program
14+
15+
### Adding an OPC DA Node
16+
1. Click the `File->NewOpcDa` menu item to enter the OPC DA node addition interface.
17+
2. Fill in the `node name`. This parameter serves as the unique identifier for the OPC DA node and cannot be duplicated. It will be used later in the Neuron HUB driver.
18+
3. Fill in the `host`. This can be an IP address or hostname, representing the address of the OPC DA Server host to be connected.
19+
4. Try clicking the dropdown button for `server` to attempt retrieving the list of OPC DA Servers on the target host. If the dropdown is empty, it indicates no OPC DA Servers were detected on the target host.
20+
5. Click the `Add` button to add this OPC DA node.
21+
22+
After successful addition, the newly added OPC DA node, along with its basic information, operational status, and connection status, will be displayed in the `Nodes Table`.
23+
24+
![nodes table](./assets/opcdanode.png)
25+
26+
### Exporting Tags
27+
28+
When the OPC DA node is in a normal connected state, all OPC DA tags can be exported in the format of the Neuron EX tag template file. To do this, hover the mouse over the OPC DA node whose tags need to be exported, right-click, and select `export neuronex tags`.
29+
30+
![export neuronex tags](./assets/export_ex_tags.png)
31+
32+
## Connecting to the OPC DA Node Using the Neuron HUB Driver
33+
34+
* In the **Southbound Devices** section, click `Add Device`, select the `Neuron HUB` plugin to create a node connecting to the NEURON HUB Windows program. Fill in the configuration information:
35+
* `HUB IP Address`: The IP address of the host running the NEURON HUB Windows program.
36+
* `HUB Port`: The port of the NEURON HUB Windows program, default is 17889.
37+
* `Node Type`: Select `OPC DA`.
38+
* `Node Name`: The name of the OPC DA node added in the NEURON HUB Windows program (e.g., `test` in this example).
39+
* In the created southbound device node, import the OPC DA tag table exported earlier.
40+
* Navigate to the **Monitoring Page**, select the corresponding device and group, and view the collected data points, as shown below.
41+
* ![show tags](./assets/show_tags.png)

0 commit comments

Comments
 (0)