From 1d5c2133603e25b7d36ddf3e3d010b93f053a442 Mon Sep 17 00:00:00 2001 From: hxy7yx <1595670487@qq.com> Date: Sun, 29 Jun 2025 18:55:03 -0700 Subject: [PATCH] modbus:support 8-byte Endianness --- .../south-devices/modbus-hc-tcp/modbus-hc-tcp.md | 9 +++++++++ .../configuration/south-devices/modbus-rtu/modbus-rtu.md | 9 +++++++++ .../configuration/south-devices/modbus-tcp/modbus-tcp.md | 9 +++++++++ .../south-devices/modbus-hc-tcp/modbus-hc-tcp.md | 9 +++++++++ .../configuration/south-devices/modbus-rtu/modbus-rtu.md | 9 +++++++++ .../configuration/south-devices/modbus-tcp/modbus-tcp.md | 9 +++++++++ 6 files changed, 54 insertions(+) diff --git a/en_US/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md b/en_US/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md index e54f63fe..3e3aa52c 100644 --- a/en_US/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md +++ b/en_US/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md @@ -22,6 +22,7 @@ After clicking **Create**, you will be redirected to the **Device Configuration* | **PLC IP Address** | The IP address of the device. | | **PLC Port** | The port number of the device.| | **Connection Timeout** | The time the system waits for a device to respond to a command. | +| **8-byte Endianness** | Byte order of tags with 64 bits, with each number representing one byte. | ## Configure Data Groups and Tags @@ -95,6 +96,14 @@ Optional, byte order, applicable to data types int16/uint16/int32/uint32/float, | #BL | 1,2,3,4 | int32/uint32/float | | | #BB | 2,1,4,3 | int32/uint32/float | | +Byte order also applies to int64/uint64/double data types. Each digit represents one byte. See the following table for detailed information. +| Symbol | Byte Order | Supported Data Types | Note | +| --- | ------- | ------------------ | ----- | +| #LL | 12,34,56,78 | int64/uint64/double | Default byte order if not specified | +| #LB | 21,43,65,87 | int64/uint64/double | | +| #BL | 78,56,34,12 | int64/uint64/double | | +| #BB | 87,65,43,21 | int64/uint64/double | | + ::: tip Please note, the default byte order for the Inovance plugin is 3,4,1,2. Therefore, the order represented by the byte order symbol does not conform to the common definition. ::: diff --git a/en_US/configuration/south-devices/modbus-rtu/modbus-rtu.md b/en_US/configuration/south-devices/modbus-rtu/modbus-rtu.md index 47ae9bc8..d5de5ff0 100644 --- a/en_US/configuration/south-devices/modbus-rtu/modbus-rtu.md +++ b/en_US/configuration/south-devices/modbus-rtu/modbus-rtu.md @@ -28,6 +28,7 @@ After clicking **Create**, you will be redirected to the **Device Configuration* | **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. | +| **8-byte Endianness** | Byte order of tags with 64 bits, with each number representing one byte. | | **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.| @@ -108,6 +109,14 @@ Optional, byte order, applicable to data types int16/uint16/int32/uint32/float, | #BL | 3,4,1,2 | int32/uint32/float | | | #BB | 4,3,2,1 | int32/uint32/float | | +Byte order also applies to int64/uint64/double data types. Each digit represents one byte. See the following table for detailed information. +| Symbol | Byte Order | Supported Data Types | Note | +| --- | ------- | ------------------ | ----- | +| #LL | 12,34,56,78 | int64/uint64/double | Default byte order if not specified | +| #LB | 21,43,65,87 | int64/uint64/double | | +| #BL | 78,56,34,12 | int64/uint64/double | | +| #BB | 87,65,43,21 | int64/uint64/double | | + ::: 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). ::: diff --git a/en_US/configuration/south-devices/modbus-tcp/modbus-tcp.md b/en_US/configuration/south-devices/modbus-tcp/modbus-tcp.md index 33f08281..2bd22468 100644 --- a/en_US/configuration/south-devices/modbus-tcp/modbus-tcp.md +++ b/en_US/configuration/south-devices/modbus-tcp/modbus-tcp.md @@ -24,6 +24,7 @@ After clicking **Create**, you will be redirected to the **Device Configuration* | -------------------- | ------------------------------------------------------- | | **Transport Mode** | TCP transfer or UDP transfer | | **Connection Mode** | Only for **TCP** mode, When selecting TCP, you can choose Neuron as the TCP client or server. | +| **8-byte Endianness** | Byte order of tags with 64 bits, with each number representing one byte. | | **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. | @@ -114,6 +115,14 @@ Optional, byte order, applicable to data types int16/uint16/int32/uint32/float, | #BL | 3,4,1,2 | int32/uint32/float | | | #BB | 4,3,2,1 | int32/uint32/float | | +Byte order also applies to int64/uint64/double data types. Each digit represents one byte. See the following table for detailed information. +| Symbol | Byte Order | Supported Data Types | Note | +| --- | ------- | ------------------ | ----- | +| #LL | 12,34,56,78 | int64/uint64/double | Default byte order if not specified | +| #LB | 21,43,65,87 | int64/uint64/double | | +| #BL | 78,56,34,12 | int64/uint64/double | | +| #BB | 87,65,43,21 | int64/uint64/double | | + ::: 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). ::: diff --git a/zh_CN/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md b/zh_CN/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md index 9b67f764..051450a8 100644 --- a/zh_CN/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md +++ b/zh_CN/configuration/south-devices/modbus-hc-tcp/modbus-hc-tcp.md @@ -22,6 +22,7 @@ Neuron 的 Inovance Modbus TCP 插件适配汇川 PLC 点位。 | **PLC IP 地址** | TCP 连接时,设备的 IP 地址。| | **PLC 端口号** | TCP 连接时,设备的端口号。| | **连接超时时间** | 等待设备返回指令响应的时间。 | +| **8 字节字节序** | 64 位数据类型字节序,每个数字代表一字节。 | ## 设置组和点位 @@ -92,6 +93,14 @@ X 和 Y 区域的地址以八进制表示。 | #BL | 1,2,3,4 | int32/uint32/float | | | #BB | 2,1,4,3 | int32/uint32/float | | +字节顺序同样适用于 int64/uint64/double 数据类型,每个数字代表一字节,详细说明见下表。 +| 符号 | 字节顺序 | 支持的数据类型 | 备注 | +| --- | ------- | ------------------ | ----- | +| #LL | 12,34,56,78 | int64/uint64/double | 不填,默认字节顺序 | +| #LB | 21,43,65,87 | int64/uint64/double | | +| #BL | 78,56,34,12 | int64/uint64/double | | +| #BB | 87,65,43,21 | int64/uint64/double | | + ::: tip 请注意,汇川插件默认字节顺序为 3,4,1,2 因此字节序符号代表的顺序和通用定义不一致。 ::: diff --git a/zh_CN/configuration/south-devices/modbus-rtu/modbus-rtu.md b/zh_CN/configuration/south-devices/modbus-rtu/modbus-rtu.md index 7131884a..1c3957ef 100644 --- a/zh_CN/configuration/south-devices/modbus-rtu/modbus-rtu.md +++ b/zh_CN/configuration/south-devices/modbus-rtu/modbus-rtu.md @@ -25,6 +25,7 @@ Modbus RTU 协议采用二进制编码,可以在 RS-232、RS-485 或其他串 | **波特率** | 串口模式下,串口连接参数。 | | **数据位** | 串口模式下,串口连接参数。 | | **连接模式** | Ethernet 模式下,可以选择 Neuron 作为 TCP 的客户端或是服务端。 | +| **8 字节字节序** | 64 位数据类型字节序,每个数字代表一字节。 | | **IP 地址** | Ethernet 模式下,设备的 IP 地址(Neuron 作为客户端);或是 Neuron 本机的 IP 地址(Neuron 作为服务端),默认可填 0.0.0.0。 | | **端口** | Ethernet 模式下,设备的端口号(Neuron 作为客户端);或是 Neuron 本机的端口(Neuron 作为服务端)。 | | **最大重试次数** | 发送读取指令失败后最大重试次数。| @@ -98,6 +99,14 @@ Modbus RTU 协议采用二进制编码,可以在 RS-232、RS-485 或其他串 | #BL | 3,4,1,2 | int32/uint32/float | | | #BB | 4,3,2,1 | int32/uint32/float | | +字节顺序同样适用于 int64/uint64/double 数据类型,每个数字代表一字节,详细说明见下表。 +| 符号 | 字节顺序 | 支持的数据类型 | 备注 | +| --- | ------- | ------------------ | ----- | +| #LL | 12,34,56,78 | int64/uint64/double | 不填,默认字节顺序 | +| #LB | 21,43,65,87 | int64/uint64/double | | +| #BL | 78,56,34,12 | int64/uint64/double | | +| #BB | 87,65,43,21 | int64/uint64/double | | + ::: tip 字节顺序可能用 ABCD 表示,只需将 1234 对应 ABCD 即可。例如 ABCD 对应默认字节序 1234 (#LL)。 ::: diff --git a/zh_CN/configuration/south-devices/modbus-tcp/modbus-tcp.md b/zh_CN/configuration/south-devices/modbus-tcp/modbus-tcp.md index 74747746..cb015c36 100644 --- a/zh_CN/configuration/south-devices/modbus-tcp/modbus-tcp.md +++ b/zh_CN/configuration/south-devices/modbus-tcp/modbus-tcp.md @@ -19,6 +19,7 @@ Neuron 的 Modbus TCP 插件除了支持以 TCP 客户端的模式主动接入 |