Modbus slave

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

Re: Modbus slave

Postby ESP_alisitsyn » Thu Mar 12, 2020 7:54 am

Hello,

What I can suggest you is to download the latest release of ESP-IDF and try to make a few changes manually in the components/freemodbus/port/portserial.c, components/freemodbus/modbus/mbascii.c of Visual GDB IDF folder. Unfortunately I don't know the actual commit ID and can't provide a patch. Hope it helps.

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

Re: Modbus slave

Postby ESP_alisitsyn » Thu Mar 12, 2020 2:48 pm

EDIT: I tried the master version (4.1) and the same issue pops up. So i guess ill get back to debugging the data lines for now
I just checked the v4.1 branch, for sure it is free of these issues and modbus_slave can communicate just fine. Probably you have some other (may be hw connection) issues. Please verify your connections and communication options as per readme.md file for the example. The picture attached may be useful for you.
Attachments
modbus_slave_ascii_mb_poll.png
IDF v4.1 mb_slave communication with modbuspoll
modbus_slave_ascii_mb_poll.png (100.19 KiB) Viewed 4163 times

waterfox
Posts: 20
Joined: Sun Mar 22, 2020 10:19 pm

Re: Modbus slave

Postby waterfox » Thu Mar 26, 2020 11:10 am

Hi,

I have the same Problem as described here. Because I don't have an RS485 to pc adapter I used two ESP32 WROOM modules.

My setup is as fowling:
ESP IDF at master branch (updated yesterday)
2 ESP32 WROOM DEV kit connected trough two MAX485 boards.

The echo test with UART to RS485 works just fine.

If I setup one ESP as slave and the other to master and set it to ASCII mode. I get a few Messages on the Slave device but on the Master I only got timeouts.
If I change the mode to RTU on both devices I don't get any message on the slave device.

I've also tried to set the CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND to 400. But it doesn't work for me.

Maybe someone can help me here?

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

Re: Modbus slave

Postby ESP_alisitsyn » Wed Apr 01, 2020 4:45 am

Hi @waterfox,

Let me place the link to github discussion about this issue here:
https://github.com/espressif/esp-idf/issues/5031

Let me know if you have progress in investigation of this issue.

Who is online

Users browsing this forum: No registered users and 114 guests