diff --git a/directory.json b/directory.json index 3640696b..e988c511 100644 --- a/directory.json +++ b/directory.json @@ -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" @@ -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", @@ -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" } ] }, @@ -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" @@ -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", @@ -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" } ] }, diff --git a/en_US/configuration/north-apps/mqtt/api.md b/en_US/configuration/north-apps/mqtt/api.md index 1d28cf7d..dc6ea1d0 100644 --- a/en_US/configuration/north-apps/mqtt/api.md +++ b/en_US/configuration/north-apps/mqtt/api.md @@ -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 @@ -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 @@ -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 + } + ] +} +``` \ No newline at end of file diff --git a/en_US/configuration/north-apps/mqtt/overview.md b/en_US/configuration/north-apps/mqtt/overview.md index f9ce45cb..704c6ed4 100644 --- a/en_US/configuration/north-apps/mqtt/overview.md +++ b/en_US/configuration/north-apps/mqtt/overview.md @@ -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:

- *values-format*, data are split into `values` and `errors` sub-objects.
- *tags-format*, tag data are put in a single array.

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. | diff --git a/en_US/configuration/south-devices/df1/df1.md b/en_US/configuration/south-devices/df1/df1.md new file mode 100644 index 00000000..4a62599e --- /dev/null +++ b/en_US/configuration/south-devices/df1/df1.md @@ -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). \ No newline at end of file diff --git a/en_US/configuration/south-devices/dnp3/dnp3.md b/en_US/configuration/south-devices/dnp3/dnp3.md new file mode 100644 index 00000000..044e0599 --- /dev/null +++ b/en_US/configuration/south-devices/dnp3/dnp3.md @@ -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 | diff --git a/en_US/configuration/south-devices/file/file.md b/en_US/configuration/south-devices/file/file.md index 3647f443..28a79799 100644 --- a/en_US/configuration/south-devices/file/file.md +++ b/en_US/configuration/south-devices/file/file.md @@ -18,7 +18,7 @@ File plugin is used to read or write files. ### Address Format -> FILE PATH +> FILE PATH ### Address Example diff --git a/en_US/configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu.md b/en_US/configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu.md new file mode 100644 index 00000000..dd38944b --- /dev/null +++ b/en_US/configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu.md @@ -0,0 +1,106 @@ +# HollySys Modbus RTU + +The Neuron HollySys Modbus RTU plugin is for collecting HollySys PLC tags using the Modbus RTU protocol, + + +## 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 **HollySys Modbus RTU** 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 device. You can also click the device configuration icon on the southbound device card to enter the **Device Configuration** interface. + +| Parameter | Description | +| -------------------------- | -------------------------------------------------------------------------------------- | +| **Physical Link** | Selects the communication medium, either serial or Ethernet. | +| **Connection Timeout** | The time the system waits for a device to respond to a command. | +| **Maximum Retry Times** | The maximum number of retries after a failed attempt to send a read command. | +| **Retry Interval** | Resend reading instruction interval(ms) after a failed attempt to send a read 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 Device** | Only needed in **Serial** mode, the path to the serial device when using a serial connection, e.g., /dev/ttyS0 in Linux systems. | +| **Stop Bits** | Only for the **Serial** mode, the serial connection parameter. | +| **Parity** | Only for the **Serial** mode, the serial connection parameter. | +| **Baud Rate** | Only for the **Serial** mode, the serial connection parameter. | +| **Data Bits** | Only for the **Serial** mode, the serial connection parameter. | +| **Connection Mode** | Only for the **Ethernet** mode, you can choose Neuron as the TCP client or server. | +| **IP Address** | Only for the **Ethernet** mode, the IP address of the device when using TCP connection with Neuron as the client, or the IP address of Neuron when using TCP connection with Neuron as the server. The default value is 0.0.0.0. | +| **Port** | Only for the **Ethernet** mode, the port number of the device when using TCP connection with Neuron as the client, or the port number of Neuron when using TCP connection with Neuron as the server. | +| **Maximum Retry Times** | The maximum number of retries after a failed attempt to send a read command. | +| **Retry Interval** | Resend reading instruction interval(ms) after a failed attempt to send a read command. | + +The HollySys Modbus RTU plugin configuration is similar to that of the [Modbus RTU driver module](../modbus-rtu/modbus-rtu.md). + +## Configure Data Groups and Tags + +After the plugin 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 + +* BIT +* BOOL +* INT16 +* UINT16 +* WORD + +### Address format + +> SLAVE!ADDRESS[#ENDIAN] + +The address format is nearly the same to that of the [Modbus RTU driver module](../modbus-rtu/modbus-rtu.md), the only difference is in the **ADDRESS** part. + +#### **SLAVE** + +Required, Slave is the slave address or site number. + +#### **ADDRESS** + +HollySys PLC maps data units onto the Modbus address space for access through the Modbus RTU protocol. +The Neuron HollySys Modbus RTU plugin frees users from details of the address mapping, and designates the PLC data unit name as the **ADDRESS**. + + +| Area | Data unit example | Attribute | Register Size | Data Type | +| ------------------------------- | ------------------------------------------- | ---------- | ------------- | -------------- | +| IX (Input) | IX0.0 ... IX0.7, IX1.0 ... IX1.7 ... | Read | 1Bit | BOOL/BIT | +| IW (Input Registers) | IW0, IW1, ... | Read | 16Bit,2Byte | INT16/UINT16 | +| QX (Coils) | QX0.0 ... QX0.7, QX1.0 ... QX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| QW (Hold Registers) | QW0, QW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | +| MX (Coils) | MX0.0 ... MX0.7, MX1.0 ... MX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| MW (Hold Registers) | MW0, MW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | + + +#### **#ENDIAN** + +Optional, byte order, applicable to data types int16/uint16, see the table below for details. +| Symbol | Byte Order | Supported Data Types | Note | +| ------ | ---------- | -------------------- | ----------------------------------- | +| #B | 2,1 | int16/uint16 | | +| #L | 1,2 | int16/uint16 | Default byte order if not specified | + +::: tip +The byte order can be illustrated using the notation ABCD, which corresponds directly to the sequence 1234. As an example, the ABCD designation represents the standard or default Endianness 1234. (#LL). +::: + + +### Example Addresses + +| Address | Data Type | Description | +| -------------- | --------- | -------------------------------------------------- | +| 1!IX1.0 | bit | Data unit IX1.0 on slave 1, read only. | +| 1!QW0 | int16 | Data unit QW0 on slave 1, support read/write. | +| 2!MW1 | int16 | Data unit MW1 on slave 1, support read/write. | + + +## 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). diff --git a/en_US/configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp.md b/en_US/configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp.md new file mode 100644 index 00000000..83a430de --- /dev/null +++ b/en_US/configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp.md @@ -0,0 +1,99 @@ +# HollySys Modbus TCP + +The Neuron HollySys Modbus TCP plugin is for collecting HollySys PLC tags using the Modbus TCP protocol, + +Modbus TCP is a version of the Modbus protocol based on Ethernet, which uses TCP/IP for communication. Unlike the traditional Modbus RTU protocol, Modbus TCP allows devices to be interconnected directly through Ethernet without any special hardware or communication interface. Therefore, Modbus TCP has higher communication speed and wider application range. + + +## 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 **HollySys Modbus TCP** 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 device. You can also click the device configuration icon on the southbound device card to enter the **Device Configuration** interface. + +| Parameter | Description | +| -------------------- | ------------------------------------------------------- | +| **Maximum Retry Times** | The maximum number of retries after a failed attempt to send a read command. | +| **Retry Interval** | Resend reading instruction interval(ms) after a failed attempt to send a read command. | +| **Endianness** | Byte order of tags with 32 bits, ABCD corresponds to 1234. | +| **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. | +| **IP Address** | The IP address of the device when using TCP connection with Neuron as the client. | +| **Port** | The port number of the device when using TCP connection with Neuron as the client. | +| **Connection Timeout** | The time the system waits for a device to respond to a command. | +| **Check Header** | Choose whether to verify the message header. After selecting True, when encountering packet header errors, the neuron and device will reconnect. | + +## Configure Data Groups and Tags + +After the plugin 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 + +* BIT +* BOOL +* INT16 +* UINT16 +* WORD + +### Address format + +> SLAVE!ADDRESS[#ENDIAN] + +#### **SLAVE** + +Required, Slave is the slave address or site number. + +#### **ADDRESS** + +HollySys PLC maps data units onto the Modbus address space for access through the Modbus TCP protocol. +The Neuron HollySys Modbus TCP plugin frees users from details of the address mapping, and designates the PLC data unit name as the **ADDRESS**. + + +| Area | Data unit example | Attribute | Register Size | Data Type | +| ------------------------------- | ------------------------------------------- | ---------- | ------------- | -------------- | +| IX (Input) | IX0.0 ... IX0.7, IX1.0 ... IX1.7 ... | Read | 1Bit | BOOL/BIT | +| IW (Input Registers) | IW0, IW1, ... | Read | 16Bit,2Byte | INT16/UINT16 | +| QX (Coils) | QX0.0 ... QX0.7, QX1.0 ... QX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| QW (Hold Registers) | QW0, QW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | +| MX (Coils) | MX0.0 ... MX0.7, MX1.0 ... MX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| MW (Hold Registers) | MW0, MW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | + + +#### **#ENDIAN** + +Optional, byte order, applicable to data types int16/uint16, see the table below for details. + +| Symbol | Byte Order | Supported Data Types | Note | +| ------ | ---------- | -------------------- | ----------------------------------- | +| #B | 2,1 | int16/uint16 | | +| #L | 1,2 | int16/uint16 | Default byte order if not specified | + +::: tip +The byte order of a tag has a higher priority than the byte order configuration of a node. That is to say, once the byte order is configured for a tag, it follows the configuration of that tag and ignores the node configuration. +The byte order can be illustrated using the notation ABCD, which corresponds directly to the sequence 1234. As an example, the ABCD designation represents the standard or default Endianness 1234. (#LL). +::: + + +### Example Addresses + +| Address | Data Type | Description | +| -------------- | --------- | -------------------------------------------------- | +| 1!IX1.0 | bit | Data unit IX1.0 on slave 1, read only. | +| 1!QW0 | int16 | Data unit QW0 on slave 1, support read/write. | +| 2!MW1 | int16 | Data unit MW1 on slave 1, support read/write. | + + +## 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). diff --git a/en_US/configuration/south-devices/modbus/modbus-tcp.md b/en_US/configuration/south-devices/modbus/modbus-tcp.md index e7aea2de..340a719e 100644 --- a/en_US/configuration/south-devices/modbus/modbus-tcp.md +++ b/en_US/configuration/south-devices/modbus/modbus-tcp.md @@ -4,7 +4,7 @@ Modbus is a communication protocol commonly used to connect industrial automation equipment and control systems, and it can be implemented on various physical and transport layers, including serial and Ethernet. Modbus TCP and Modbus RTU are two commonly used implementation methods. -Modbus TCP uses Ethernet communication and is a protocol based on the TCP/IP protocol stack. In Neuron, the modbus-tcp and modbus-plus-tcp modules use the Modbus TCP protocol. When some devices that support Modbus RTU and other protocols need to be converted to Modbus TCP protocol for passthrough or similar functions, these two modules are also required.
+Modbus TCP uses Ethernet communication and is a protocol based on the TCP/IP protocol stack. In Neuron, the modbus-tcp and modbus-plus-tcp modules use the Modbus TCP protocol. When some devices that support Modbus RTU and other protocols need to be converted to Modbus TCP protocol for passthrough or similar functions, these two modules are also required.
The difference between the two modules is that the modbus-tcp module is open source and does not require License authentication, while the modbus-plus-tcp module requires License authentication. The modbus-plus-tcp module supports configuring the Client/Server mode, as well as more data types, and also optimizes the read/write performance. Therefore, the functionality of the modbus-plus-tcp module is stronger than that of the modbus-tcp module. The modbus-tcp module is suitable for users who are familiar with the use of Neuron. ## Parameter Configuration diff --git a/neuron-api.json b/neuron-api.json index b09f74ad..03651daf 100644 --- a/neuron-api.json +++ b/neuron-api.json @@ -7457,6 +7457,123 @@ }, "x-run-in-apifox": "https://apifox.com/web/project/3516282/apis/api-123060905-run" } + }, + "/api/neuron/otel": { + "get": { + "summary": "Get OTEL Trace Configuration", + "x-apifox-folder": "Neuron/trace", + "x-apifox-status": "released", + "deprecated": false, + "description": "Get OTEL Trace Configuration.", + "tags": [ + "Neuron/trace" + ], + "parameters": [], + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "collector_url": { + "type": "string" + }, + "control": { + "type": "boolean" + }, + "data": { + "type": "boolean" + }, + "data_sample_rate": { + "type": "number", + "format": "double" + }, + "service_name": { + "type": "string" + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3516282/apis/api-123060905-run" + }, + "post": { + "summary": "Set OTEL Trace Configuration", + "x-apifox-folder": "Neuron/trace", + "x-apifox-status": "released", + "deprecated": false, + "description": "Set OTEL Trace Configuration.", + "tags": [ + "Neuron/trace" + ], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "collector_url": { + "type": "string" + }, + "control": { + "type": "boolean" + }, + "data": { + "type": "boolean" + }, + "data_sample_rate": { + "type": "number", + "format": "double" + }, + "service_name": { + "type": "string" + } + }, + "example": { + "action": "start", + "collector_url": "127.0.0.1:4318", + "control": true, + "data": true, + "data_sample_rate": 0.01, + "service_name": "neuronex-001" + } + } + } + } + }, + "responses": { + "200": { + "description": "success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/neuron-0" + }, + "examples": { + "1": { + "summary": "success", + "value": { + "error": 0 + } + } + } + } + } + } + }, + "x-run-in-apifox": "https://apifox.com/web/project/3516282/apis/api-123060905-run" + } } }, "components": { diff --git a/zh_CN/configuration/north-apps/mqtt/api.md b/zh_CN/configuration/north-apps/mqtt/api.md index 62cd835b..4264981d 100644 --- a/zh_CN/configuration/north-apps/mqtt/api.md +++ b/zh_CN/configuration/north-apps/mqtt/api.md @@ -135,7 +135,7 @@ Neuron MQTT 插件将采集到的数据以 JSON 形式发布到指定的主题 ### 请求 -通过发送 JSON 形式的请求到**写请求主题**参数指定的 MQTT 主题,您可以写一个点位数据。可在 MQTT 参数配置中配置写请求的主题,默认为为 **/neuron/{node_name}/write/req**。 +通过发送 JSON 形式的请求到**写请求主题**参数指定的 MQTT 主题,您可以写一个点位数据。可在 MQTT 参数配置中配置写请求的主题,默认为为 **/neuron/{random_str}/write/req**。 #### 请求体 @@ -191,7 +191,7 @@ Neuron 提供了对多点位写入的支持。要在一次请求中可以写入 ### 响应 -写响应会发布到**写响应主题**参数指定的 MQTT 主题。默认**写响应主题**参数为 **/neuron/{node_name}/write/resp**。 +写响应会发布到**写响应主题**参数指定的 MQTT 主题。默认**写响应主题**参数为 **/neuron/{random_str}//write/resp**。 #### 响应体 @@ -206,3 +206,41 @@ Neuron 提供了对多点位写入的支持。要在一次请求中可以写入 "error": 0 } ``` + +## 驱动状态上报 + +上报所有南向驱动状态到指定的 MQTT 主题。 + +### 状态上报主题 + +上报主题在北向节点配置中指定,其默认值为 **/neuron/{random_str}/state/update** + +### 状态上报间隔 + +状态上报间隔在北向节点配置中指定,指每条消息之间间隔的秒数,其默认值为 1,允许的范围为 1-3600。 + +### 上报消息格式 + +上报的数据由以下字段构成: +* `timestamp` : 数据采集时的 UNIX 时间戳。 +* `states` : 节点状态信息的数组。 + +以下是一个驱动状态上报消息样例。 + +```json +{ + "timestamp": 1658134132237, + "states": [ + { + "node": "modbus-tcp", + "link": 2, + "running": 3 + }, + { + "node": "modbus-rtu", + "link": 2, + "running": 3 + } + ] +} +``` \ No newline at end of file diff --git a/zh_CN/configuration/north-apps/mqtt/overview.md b/zh_CN/configuration/north-apps/mqtt/overview.md index fc24abcd..d010d8f5 100644 --- a/zh_CN/configuration/north-apps/mqtt/overview.md +++ b/zh_CN/configuration/north-apps/mqtt/overview.md @@ -20,11 +20,15 @@ Neuron 支持 MQTT 插件作为其数据汇聚上报的方式之一,Neuron MQT | 字段 | 说明 | | ------------------ | ------------------------------------------------------------ | +| **MQTT 版本** | MQTT 协议的版本,默认为 v3.1.1。 | | **客户端 ID** | MQTT 通信的客户端 id,必填。 | | **QoS 等级** | MQTT 通信的服务质量等级,可选,默认为 QoS 0 。 | | **上报数据格式** | 上报数据的 JSON 格式:
· *values-format*:数据被分成 `values` 和 `errors` 的子对象。
· *tags-format*:数据被放在一个数组中。关于通信数据格式,见 [数据上下行格式](./api.md#数据上报) | -| **写请求主题** | 接收点位写入请求的 MQTT 主题。关于通信数据格式,见 [数据上下行格式](./api.md#写-tag) | -| **写响应主题** | 发送点位写入响应的 MQTT 主题。 | +| **写请求主题** | 接收点位写入请求的 MQTT 主题。关于通信数据格式,见 [数据上下行格式](./api.md#写-tag)。如开启链路追踪,请按 W3C 标准配置用户属性 `traceparent` 和 `tracestate`。| +| **写响应主题** | 发送点位写入响应的 MQTT 主题。 | +| **驱动状态上报** | 上报所有南向驱动状态到指定的 MQTT 主题。 | +| **状态上报主题** | 状态上报的主题。 | +| **状态上报间隔** | 上报南向节点状态的时间间隔,单位为秒,可填范围为 1-3600,默认1 | | **离线缓存** | 离线缓存开关。连接断开时缓存 MQTT 消息,连接重建时同步缓存的消息到MQTT服务器。(2.4.3 版新增),关于离线缓存功能的详细介绍,见[离线数据缓存](#离线数据缓存) | | **缓存内存大小** | 通信失败时内存消息缓存大小 (MB) 限制,必填;范围:[0, 1024],不能大于缓存磁盘大小。 | | **缓存磁盘大小** | 通信失败时磁盘消息缓存大小 (MB) 限制,必填,范围:[0, 10240]。
设为非零值时,缓存内存大小 也须为非零值。 | diff --git a/zh_CN/configuration/south-devices/df1/df1.md b/zh_CN/configuration/south-devices/df1/df1.md new file mode 100644 index 00000000..041a5be4 --- /dev/null +++ b/zh_CN/configuration/south-devices/df1/df1.md @@ -0,0 +1,110 @@ +# Allen-Bradley DF1 + +DF1 是罗克韦尔自动化(Rockwell Automation)公司的一种专有通信协议,主要用于其 Allen-Bradley 系列 PLC(可编程逻辑控制器)和其他设备之间的数据交换。 + +Neuron Allen-Bradley DF1 插件支持点对点通信,通过串行通信线路进行数据传输。 + +## 添加插件 + +在 **配置 -> 南向设备**,点击**添加设备**来创建设备节点,输入插件名称,插件类型选择 **Allen-Bradley DF1** 启用插件。 + +## 设备配置 + +点击插件卡片或插件列,进入**设备配置**页。配置 Neuron 与设备建立连接所需的参数,下表为插件相关配置项。 + +| 参数 | 说明 | +| -------------------- | ------------------------------------------------------- | +| **接收超时时间** | 等待设备返回指令响应的时间。 | +| **指令发送间隔** | 发送每条读写指令之间的等待时间。某些串口设备在较短时间内接收到连续指令时,可能会丢弃某些指令。 | +| **串口设备** | 使用串口连接时,串口设备的路径,如 Linux 系统中 /dev/ttyS0。| +| **停止位** | 串口连接参数。 | +| **校验位** | 串口连接参数。 | +| **波特率** | 串口连接参数。 | +| **数据位** | 串口连接参数。 | + +## 设置组和点位 + +完成插件的添加和配置后,要建立设备与 Neuron 之间的通信,首先为南向驱动程序添加组和点位。 + +完成设备配置后,在**南向设备**页,点击设备卡片/设备列进入**组列表**页。点击**创建**来创建组,设定组名称以及采集间隔。完成组的创建后,点击组名称进入**点位列表**页,添加需要采集的设备点位,包括点位地址,点位属性,数据类型等。 + +公共配置项部分可参考[连接南向设备](../south-devices.md),本页将介绍支持的数据类型和地址格式部分。 + +### 数据类型 + +* INT16 +* UINT16 +* INT32 +* UINT32 +* FLOAT +* BIT +* STRING + +### 地址格式 + +> FILE NUM:ELEM[.BIT][#ENDIAN]\[.LEN\[H]\[L]] +例如 N7:0 + +#### **FILE** + +必填,指文件类型。 +| 区域 |文件类型 | +| ---- | --------- | +| U | STATUS | +| B | BIT | +| T | TIMER | +| C | COUNTER | +| R | COUNTROL | +| N | INTEGER | +| F | FLOAT | +| S | STRING | +| A | ASCII | + +#### NUM + +必填,指文件号。 + +#### ELEM + +必填,指数据地址。 + +#### **.BIT** + +选填,存储地址中的特定 bit,例如: +| 地址 | 数据类型 | 说明 | +| ----------- | ------- | --------------------------------------------------- | +| N7:0.0 | bit | 指 INT 文件 7,地址为 0,第 0 位。 | +| N7:0.15 | bit | 指 INT 文件 7,地址为 0,第 15 位。 | + +#### **#ENDIAN** + +选填,字节顺序,适用于 int16/uint16/int32/uint32/float 数据类型,详细说明见下表。 +| 符号 | 字节顺序 | 支持的数据类型 | 备注 | +| --- | ------- | ------------------ | ----- | +| #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 | 不填,默认字节顺序 | +| #LL | 1,2,3,4 | int32/uint32/float | 不填,默认字节顺序 | +| #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] + +当数据类型为 STRING 类型时,**.LEN** 是必填项,表示字符串需要占用的字节长度,每个寄存器中包含 **H**,**L** 两种存储方式,如下列表格所示。 +| 符号 | 说明 | +| --- | ------------------------------------- | +| H | 一个寄存器存储两个字节,高字节在前低字节在后。 | +| L | 一个寄存器存储两个字节,低字节在前高字节在后。 | + +::: tip +对于 T C R 区域地址数据为六字节。 +前两字节可使用 bit 或 int16,uint16 类型; +中间两字节数据需用 int16 或 uint16类型,地址后缀加 .PRE; +末尾两字节数据需用 int16 或 uint16类型,地址后缀加 .ACC。 +例如 T2:1.ACC +::: + + +## 数据监控 + +完成点位的配置后,您可点击 **监控** -> **数据监控**查看设备信息以及反控设备,具体可参考[数据监控](../../../admin/monitoring.md)。 \ No newline at end of file diff --git a/zh_CN/configuration/south-devices/dnp3/dnp3.md b/zh_CN/configuration/south-devices/dnp3/dnp3.md new file mode 100644 index 00000000..1605d4b7 --- /dev/null +++ b/zh_CN/configuration/south-devices/dnp3/dnp3.md @@ -0,0 +1,101 @@ +# DNP 3.0 + +DNP 3.0 (Distributed Network Protocol 3.0)是一种通信协议,主要用于工业自动化领域,特别是在电力系统中,用于监控和数据采集(SCADA)系统。它允许远程终端单元(RTU)和主站系统之间进行可靠的数据交换。 + + +## 设备设置 + +| 字段 | 说明 | +| ------------------ | --------------------------------- | +| host | 设备 IP 地址 | +| port | 设备端口号, 默认20000 | +| masterid | 主站 ID, 默认1 | +| slaveid | 从站 ID, 默认2 | +| class0123_interval | Class0123 拉取间隔, 默认20000毫秒 | +| class123_interval | Class123 拉取间隔, 默认1000毫秒 | +| time_sync | 时间同步, 默认 No | + +## 支持的数据类型 + +* uint8 +* uint16 +* int16 +* uint32 +* int32 +* float +* bit + +## 地址格式 + +> obj.var.index(.attribute) +> +> CROB.index:counter:on-time:off-time + +### obj 和 var + +在 DNP 3.0 协议中,使用 obj 和 var 来定义一个对象类型,index 指定一组对象实体的具体的对象,下表索引从0开始。attribute 目前只支持 value,如果不填写,默认为value。 + +目前支持下列对象: + +| obj | var | 对象 | r/w | 类型 | +| --- | --- | ------------------------------------------ | --- | ------------- | +| 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)是一个特殊的对象,用于驱动开关型输出设备 (binary output),只写,类型为 `uint8`, 因为其除了 Control Code 之外,还需要设置 counter,on-time 和 off-time。 +Control Code 取值如下: +| 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 | + + +## 地址示例 + +| 地址 | 数据类型 | 说明 | +| ------------ | -------- | ------------------------------------ | +| 1.2.0 | bit | binary input 下标0的值 | +| 1.2.1 | bit | binary input 下标1的值 | +| 2.2.1 | bit | binary input 下标1的值,带绝对时间戳 | +| CROB.0:0:0:0 | bit | 控制 biary output 下标0输出 | +| 40.1.0 | bit | 32-bit binary output 下标0的值 | \ No newline at end of file diff --git a/zh_CN/configuration/south-devices/file/file.md b/zh_CN/configuration/south-devices/file/file.md index 81f22318..4faf0e64 100644 --- a/zh_CN/configuration/south-devices/file/file.md +++ b/zh_CN/configuration/south-devices/file/file.md @@ -30,7 +30,7 @@ File 插件用于读写文件。 #### 地址格式 -> FILE PATH +> FILE PATH #### 地址示例 diff --git a/zh_CN/configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu.md b/zh_CN/configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu.md new file mode 100644 index 00000000..afbc22ce --- /dev/null +++ b/zh_CN/configuration/south-devices/modbus-hollysys-rtu/modbus-hollysys-rtu.md @@ -0,0 +1,95 @@ +# HollySys Modbus RTU + +Neuron HollySys Modbus RTU 插件使用 Modbus RTU 协议,用于采集和利时 PLC 标签的数据,支持 LK/LE 系列 PLC 型号。 + +## 添加插件 + +在 **配置 -> 南向设备**,点击**添加设备**来创建设备节点,输入插件名称,插件类型选择 **HollySys Modbus RTU** 启用插件。 + +## 设备配置 + +点击插件卡片或插件列,进入**设备配置**页。配置 Neuron 与设备建立连接所需的参数,下表为插件相关配置项。 + +|
参数
| 说明 | +| -------------------- | ---------------------------------------------------------------------------------------------- | +| **物理链路** | 选择使用 Serial (串口)或者是 Ethernet(以太网)通信介质。 | +| **连接超时时间** | 等待设备返回指令响应的时间。 | +| **最大重试次数** | 发送读取指令失败后最大重试次数。 | +| **指令重新发送间隔** | 发送读取指令失败后重新发送读指令时间间隔,单位为毫秒。 | +| **指令发送间隔** | 发送每条读写指令之间的等待时间。某些串口设备在较短时间内接收到连续指令时,可能会丢弃某些指令。 | +| **串口设备** | 串口模式下,串口设备的路径,如 Linux 系统中 /dev/ttyS0。 | +| **停止位** | 串口模式下,串口连接参数。 | +| **校验位** | 串口模式下,串口连接参数。 | +| **波特率** | 串口模式下,串口连接参数。 | +| **数据位** | 串口模式下,串口连接参数。 | +| **连接模式** | Ethernet 模式下,可以选择 Neuron 作为 TCP 的客户端或是服务端。 | +| **IP 地址** | Ethernet 模式下,设备的 IP 地址(Neuron 作为客户端);或是 Neuron 本机的 IP 地址(Neuron 作为服务端),默认可填 0.0.0.0。 | +| **端口** | Ethernet 模式下,设备的端口号(Neuron 作为客户端);或是 Neuron 本机的端口(Neuron 作为服务端)。| +| **最大重试次数** | 发送读取指令失败后最大重试次数。 | +| **指令重新发送间隔** | 发送读取指令失败后重新发送读指令时间间隔,单位为毫秒。 | + +HollySys Modbus RTU 插件的配置与 [Modbus RTU驱动模块](../modbus-rtu/modbus-rtu.md)相似。 + +## 设置组和点位 + +完成插件的添加和配置后,要建立设备与 Neuron 之间的通信,首先为南向驱动程序添加组和点位。 + +完成设备配置后,在**南向设备**页,点击设备卡片/设备列进入**组列表**页。点击**创建**来创建组,设定组名称以及采集间隔。完成组的创建后,点击组名称进入**点位列表**页,添加需要采集的设备点位,包括点位地址,点位属性,数据类型等。 + +公共配置项部分可参考[连接南向设备](../south-devices.md),本页将介绍支持的数据类型和地址格式部分。 + +### 数据类型 + +* BIT +* BOOL +* INT16 +* UINT16 + +### 地址格式 + +> SLAVE!ADDRESS[#ENDIAN] + +#### **SLAVE** + +必填,指从机地址或者是站点号。 + +#### **ADDRESS** + +和利时 PLC 将数据单元映射到 Modbus 地址空间,以通过 Modbus RTU 协议进行访问。 +Neuron HollySys Modbus RTU 插件将 PLC 数据单元名称指定为 **ADDRESS**,用户不需要关心地址映射的细节。 + +| 数据区 | Modbus 地址范围 | 属性 | 寄存器大小 | 数据类型 | +| ------------------------------- | ------------------------------------------- | ---------- | ------------- | --------- | +| IX (Input) | IX0.0 ... IX0.7, IX1.0 ... IX1.7 ... | Read | 1Bit | BOOL/BIT | +| IW (Input Registers) | IW0, IW1, ... | Read | 16Bit,2Byte | INT16/UINT16 | +| QX (Coils) | QX0.0 ... QX0.7, QX1.0 ... QX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| QW (Hold Registers) | QW0, QW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | +| MX (Coils) | MX0.0 ... MX0.7, MX1.0 ... MX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| MW (Hold Registers) | MW0, MW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | + +#### **#ENDIAN** + +选填,字节顺序,适用于 int16/uint16 数据类型,详细说明见下表。 + +| 符号 | 字节顺序 | 支持的数据类型 | 备注 | +| ---- | -------- | ------------------ | ------------------ | +| #B | 2,1 | int16/uint16 | | +| #L | 1,2 | int16/uint16 | 不填,默认字节顺序 | + +::: tip +字节顺序可能用 ABCD 表示,只需将 1234 对应 ABCD 即可。例如 ABCD 对应默认字节序 1234 (#LL)。 +::: + + +### 地址示例 + +| 地址 | 数据类型 | 说明 | +| -------------- | --------- | -------------------------------------------------- | +| 1!IX1.0 | bit | 指站号为 1,PLC 数据单元 IX1.0, 只读。 | +| 1!QW0 | int16 | 指站号为 1,PLC 数据单元 QW0, 支持读写。 | +| 2!MW1 | int16 | 指站号为 2,PLC 数据单元 MW1, 支持读写。 | + + +## 数据监控 + +完成点位的配置后,您可点击 **监控** -> **数据监控**查看设备信息以及反控设备,具体可参考[数据监控](../../../admin/monitoring.md)。 diff --git a/zh_CN/configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp.md b/zh_CN/configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp.md new file mode 100644 index 00000000..64d48c64 --- /dev/null +++ b/zh_CN/configuration/south-devices/modbus-hollysys-tcp/modbus-hollysys-tcp.md @@ -0,0 +1,95 @@ +# Modbus TCP + +Neuron HollySys Modbus TCP 插件使用 Modbus TCP 协议,用于采集和利时 PLC 标签的数据,支持 LK/LE 系列 PLC 型号。 + +Modbus TCP 是一种基于以太网的 Modbus 协议版本,它使用 TCP/IP 协议进行通信。与传统的 Modbus RTU 协议不同,Modbus TCP 允许设备直接通过以太网互联,不需要任何专用的硬件或通信接口。因此,Modbus TCP 具有更高的通信速率和更广泛的应用范围。 + + +## 添加插件 + +在 **配置 -> 南向设备**,点击**添加设备**来创建设备节点,输入插件名称,插件类型选择 **HollySys Modbus TCP** 启用插件。 + + +## 设备配置 + +点击插件卡片或插件列,进入**设备配置**页。配置 Neuron 与设备建立连接所需的参数,下表为插件相关的配置项。 + +|
字段
| 说明 | +| -------------------- | ------------------------------------------------------- | +| **最大重试次数** | 发送读取指令失败后最大重试次数。 | +| **指令重新发送间隔** | 发送读取指令失败后重新发送读指令时间间隔,单位为毫秒。 | +| **字节序** | 32 位数据类型字节序,ABCD 对应 1234。 | +| **指令发送间隔** | 发送每条读写指令之间的等待时间。某些串口设备在较短时间内接收到连续指令时,可能会丢弃某些指令。 | +| **IP 地址** | TCP 连接时,设备的 IP 地址(Neuron 作为客户端)。| +| **端口号** | TCP 连接时,设备的端口号(Neuron 作为客户端)。| +| **连接超时时间** | 等待设备返回指令响应的时间。 | +| **校验报文头** | 选择是否对报文头进行校验。选择校验后,遇到报文头错误时 neuron 与设备会重新连接。 | + + +## 设置组和点位 + +完成插件的添加和配置后,要建立设备与 Neuron 之间的通信,首先为南向驱动程序添加组和点位。 + +完成设备配置后,在**南向设备**页,点击设备卡片/设备列进入**组列表**页。点击**创建**来创建组,设定组名称以及采集间隔。完成组的创建后,点击组名称进入**点位列表**页,添加需要采集的设备点位,包括点位地址,点位属性,数据类型等。 + +公共配置项部分可参考[连接南向设备](../south-devices.md),本页将介绍支持的数据类型和地址格式部分。 + + +### 数据类型 + +* BIT +* BOOL +* INT16 +* UINT16 + + +### 地址格式 + +> SLAVE!ADDRESS[#ENDIAN] + +#### **SLAVE** + +必填,指从机地址或者是站点号。 + +#### **ADDRESS** + +和利时 PLC 将数据单元映射到 Modbus 地址空间,以通过 Modbus TCP 协议进行访问。 +Neuron HollySys Modbus TCP 插件将 PLC 数据单元名称指定为 **ADDRESS**,用户不需要关心地址映射的细节。 + +| 数据区 | Modbus 地址范围 | 属性 | 寄存器大小 | 数据类型 | +| ------------------------------- | ------------------------------------------- | ---------- | ------------- | --------- | +| IX (Input) | IX0.0 ... IX0.7, IX1.0 ... IX1.7 ... | Read | 1Bit | BOOL/BIT | +| IW (Input Registers) | IW0, IW1, ... | Read | 16Bit,2Byte | INT16/UINT16 | +| QX (Coils) | QX0.0 ... QX0.7, QX1.0 ... QX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| QW (Hold Registers) | QW0, QW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | +| MX (Coils) | MX0.0 ... MX0.7, MX1.0 ... MX1.7 ... | Read/Write | 1Bit | BOOL/BIT | +| MW (Hold Registers) | MW0, MW1, ... | Read/Write | 16Bit,2Byte | INT16/UINT16 | + + +#### **#ENDIAN** + +选填,字节顺序,适用于 int16/uint16 数据类型,详细说明见下表。 + +| 符号 | 字节顺序 | 支持的数据类型 | 备注 | +| --- | ------- | ------------------ | ----- | +| #B | 2,1 | int16/uint16 | | +| #L | 1,2 | int16/uint16 | 不填,默认字节顺序 | + +::: tip +点位字节序优先级高于节点字节序配置。即点位配置字节序后,字节序按照点位的配置,忽略节点配置。 +字节顺序可能用 ABCD 表示,只需将 1234 对应 ABCD 即可。例如 ABCD 对应默认字节序 1234 (#LL)。 +::: + + +### 地址示例 + +| 地址 | 数据类型 | 说明 | +| -------------- | --------- | -------------------------------------------------- | +| 1!IX1.0 | bit | 指站号为 1,PLC 数据单元 IX1.0, 只读。 | +| 1!QW0 | int16 | 指站号为 1,PLC 数据单元 QW0, 支持读写。 | +| 2!MW1 | int16 | 指站号为 2,PLC 数据单元 MW1, 支持读写。 | + + +## 数据监控 + +完成点位的配置后,您可点击 **监控** -> **数据监控**查看设备信息以及反控设备,具体可参考[数据监控](../../../admin/monitoring.md)。