From 2b3c75436c1c15ba19e9ac795aa7de271e105b30 Mon Sep 17 00:00:00 2001 From: hxy7yx <1595670487@qq.com> Date: Sun, 29 Jun 2025 18:37:46 -0700 Subject: [PATCH] modbus:support 8-byte Endianness --- .../south-devices/modbus-hc-tcp/modbus-hc-tcp.md | 11 ++++++++++- .../south-devices/modbus-rtu/modbus-rtu.md | 11 ++++++++++- .../south-devices/modbus-tcp/modbus-tcp.md | 11 ++++++++++- .../south-devices/modbus-hc-tcp/modbus-hc-tcp.md | 11 ++++++++++- .../south-devices/modbus-rtu/modbus-rtu.md | 11 ++++++++++- .../south-devices/modbus-tcp/modbus-tcp.md | 11 ++++++++++- 6 files changed, 60 insertions(+), 6 deletions(-) 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 adf68e4f..992a4946 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 @@ -18,7 +18,8 @@ After clicking **Create**, you will be redirected to the **Device Configuration* | Parameter | Description | | -------------------- | ------------------------------------------------------- | -| **Endianness** | Byte order of tags with 32 bits, ABCD corresponds to 1234. | +| **4-byte Endianness** | Byte order of tags with 32 bits, ABCD corresponds to 1234. | +| **8-byte Endianness** | Byte order of tags with 64 bits, with each number representing one byte. | | **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. | | **PLC IP Address** | The IP address of the device. | | **PLC Port** | The port number of the device.| @@ -120,6 +121,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 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. ::: 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 5a931ebe..8955fe98 100644 --- a/en_US/configuration/south-devices/modbus-rtu/modbus-rtu.md +++ b/en_US/configuration/south-devices/modbus-rtu/modbus-rtu.md @@ -22,7 +22,8 @@ After clicking **Create**, you will be redirected to the **Device Configuration* | **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. | -| **Endianness** | Byte order of tags with 32 bits, ABCD corresponds to 1234. | +| **4-byte Endianness** | Byte order of tags with 32 bits, ABCD corresponds to 1234. | +| **8-byte Endianness** | Byte order of tags with 64 bits, with each number representing one byte. | | **Start Address** | Address starts from 1 or 0. | | **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. | @@ -109,6 +110,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 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). 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 161b64b0..a6ba51bd 100644 --- a/en_US/configuration/south-devices/modbus-tcp/modbus-tcp.md +++ b/en_US/configuration/south-devices/modbus-tcp/modbus-tcp.md @@ -25,7 +25,8 @@ After clicking **Create**, you will be redirected to the **Device Configuration* | **Connection Mode** | Only for **TCP** mode, When selecting TCP, you can choose Neuron as the TCP client or 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. | -| **Endianness** | Byte order of tags with 32 bits, ABCD corresponds to 1234. | +| **4-byte Endianness** | Byte order of tags with 32 bits, ABCD corresponds to 1234. | +| **8-byte Endianness** | Byte order of tags with 64 bits, with each number representing one byte. | | **Start Address** | Address starts from 1 or 0. | | **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, or the IP address of Neuron when using TCP connection with Neuron as the server. The default value is 0.0.0.0. | @@ -111,6 +112,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 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). 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 5d21f88d..14e1d032 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 @@ -18,7 +18,8 @@ Neuron 的 Inovance Modbus TCP 插件适配汇川 PLC 点位。 |