ESP32 MODBUS协议栈

Moderator: ESP_Bob

YONGWONG
Posts: 12
Joined: Mon Aug 09, 2021 9:47 am

ESP32 MODBUS协议栈

Postby YONGWONG » Mon Aug 09, 2021 9:52 am

ESP32 MODBUS协议栈如何让MODBUS TCP和MODBUS RTU可以同时使用?单独开任务均可执行,但同时开任务就只能执行其中一个?请问应该怎么做呢?

YONGWONG
Posts: 12
Joined: Mon Aug 09, 2021 9:47 am

Re: ESP32 MODBUS协议栈

Postby YONGWONG » Tue Aug 10, 2021 1:03 am

在IDF 4.3中freemodbus组件是否支持多从机多接口类型访问?

ESP_alisitsyn
Posts: 211
Joined: Fri Feb 01, 2019 4:02 pm
Contact:

Re: ESP32 MODBUS协议栈

Postby ESP_alisitsyn » Tue Aug 10, 2021 6:36 am

@YONGWONG,

Unfortunately the ESP_Modbus currently does not support multi master or multi slave communication in one device.
It is possible to install one Modbus slave and one Modbus master simultaneously in one device (the fix is not merged, requires patch to apply). The fix is merged and will be available in github commit 59444334249d4940b59795c8e0df779ec25333bd.
The serial master and slave have been tested and work well simultaneously. The Modbus TCP Slave + RTU Master is not tested enough but it is possible to implement.

The Modbus RTU over TCP support is not yet implemented (is in progress).
Last edited by ESP_alisitsyn on Mon Aug 16, 2021 12:07 pm, edited 1 time in total.

ESP_WangYX
Posts: 97
Joined: Mon Jun 28, 2021 12:48 pm

Re: ESP32 MODBUS协议栈

Postby ESP_WangYX » Fri Aug 13, 2021 2:32 am

YONGWONG wrote:
Mon Aug 09, 2021 9:52 am
ESP32 MODBUS协议栈如何让MODBUS TCP和MODBUS RTU可以同时使用?单独开任务均可执行,但同时开任务就只能执行其中一个?请问应该怎么做呢?
当前,ESP32 Modbus可以同时运行一个Modbus TCP 主机和一个ModBus RTU 从机,或者同时运行Modbus TCP 从机和 Modbus RTU 主机。尚不支持同一个设备运行多个主机、或者从机。不知道你的需求具体指哪些。

YONGWONG
Posts: 12
Joined: Mon Aug 09, 2021 9:47 am

Re: ESP32 MODBUS协议栈

Postby YONGWONG » Thu Sep 02, 2021 7:27 am

我是想实现多个RTU和tcp的从机

ESP_Eavo
Posts: 186
Joined: Tue Jun 08, 2021 6:23 am

Re: ESP32 MODBUS协议栈

Postby ESP_Eavo » Thu Oct 14, 2021 2:56 am

您好,目前不支持多从机的功能。该功能正在内部评估开发中,请您关注相关进展。

谢谢。

sjdczw
Posts: 1
Joined: Thu May 19, 2022 4:36 am

Re: ESP32 MODBUS协议栈

Postby sjdczw » Thu May 19, 2022 4:46 am

ESP_Eavo wrote:
Thu Oct 14, 2021 2:56 am
您好,目前不支持多从机的功能。该功能正在内部评估开发中,请您关注相关进展。

谢谢。
你好,目前的进展如何,项目也遇到同样的问题了

ESP_alisitsyn
Posts: 211
Joined: Fri Feb 01, 2019 4:02 pm
Contact:

Re: ESP32 MODBUS协议栈

Postby ESP_alisitsyn » Wed Jun 15, 2022 12:01 pm

Hello @sjdczw,

Support of multi-master and multi-slave Modbus is not ready.

Who is online

Users browsing this forum: No registered users and 48 guests