Skip to content

[2.8]modbus:support 8-byte Endianness #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: release-2.8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
:::
Expand Down
9 changes: 9 additions & 0 deletions en_US/configuration/south-devices/modbus-rtu/modbus-rtu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.|
Expand Down Expand Up @@ -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).
:::
Expand Down
9 changes: 9 additions & 0 deletions en_US/configuration/south-devices/modbus-tcp/modbus-tcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down Expand Up @@ -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).
:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Neuron 的 Inovance Modbus TCP 插件适配汇川 PLC 点位。
| **PLC IP 地址** | TCP 连接时,设备的 IP 地址。|
| **PLC 端口号** | TCP 连接时,设备的端口号。|
| **连接超时时间** | 等待设备返回指令响应的时间。 |
| **8 字节字节序** | 64 位数据类型字节序,每个数字代表一字节。 |

## 设置组和点位

Expand Down Expand Up @@ -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 因此字节序符号代表的顺序和通用定义不一致。
:::
Expand Down
9 changes: 9 additions & 0 deletions zh_CN/configuration/south-devices/modbus-rtu/modbus-rtu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 作为服务端)。 |
| **最大重试次数** | 发送读取指令失败后最大重试次数。|
Expand Down Expand Up @@ -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)。
:::
Expand Down
9 changes: 9 additions & 0 deletions zh_CN/configuration/south-devices/modbus-tcp/modbus-tcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Neuron 的 Modbus TCP 插件除了支持以 TCP 客户端的模式主动接入

| <div style="width:100pt">字段</div> | 说明 |
| -------------------- | ------------------------------------------------------- |
| **8 字节字节序** | 64 位数据类型字节序,每个数字代表一字节。 |
| **传输模式** | TCP 传输或 UDP 传输。 |
| **连接模式** | 选择以太网 TCP 连接时,可以选择 Neuron 作为 TCP 的客户端或是服务端。|
| **最大重试次数** | 发送读取指令失败后最大重试次数。 |
Expand Down Expand Up @@ -106,6 +107,14 @@ Neuron 的 Modbus TCP 插件除了支持以 TCP 客户端的模式主动接入
| #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)。
:::
Expand Down