Time out Error rs485 modbus

saigajul37
Posts: 7
Joined: Tue Apr 27, 2021 12:07 pm
Location: pune

Time out Error rs485 modbus

Postby saigajul37 » Wed Feb 23, 2022 10:13 am

This is a simple example to test my master-slave modus device
https://github.com/espressif/esp-idf/tr ... /mb_master
https://github.com/espressif/esp-idf/tr ... l/mb_slave

same connection and code as per example still I am getting a timeout error

For slave config :
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND = 2000
---
CONFIG_MB_UART_PORT_NUM=2
CONFIG_MB_UART_BAUD_RATE=115200
CONFIG_MB_UART_RXD=4
CONFIG_MB_UART_TXD=19
CONFIG_MB_UART_RTS=5
CONFIG_MB_COMM_MODE_RTU=y
# CONFIG_MB_COMM_MODE_ASCII is not set
CONFIG_MB_SLAVE_ADDR=1

For master config :
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND = 2000
---
CONFIG_MB_UART_PORT_NUM=2
CONFIG_MB_UART_BAUD_RATE=115200
CONFIG_MB_UART_RXD=4
CONFIG_MB_UART_TXD=19
CONFIG_MB_UART_RTS=18
CONFIG_MB_COMM_MODE_RTU=y
# CONFIG_MB_COMM_MODE_ASCII is not set


Error list:
E (560186) MASTER_TEST: Characteristic #0 (Data_channel_0) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (562196) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (562196) MASTER_TEST: Characteristic #1 (Humidity_1) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (564206) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (564206) MASTER_TEST: Characteristic #2 (Temperature_1) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (566216) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (566216) MASTER_TEST: Characteristic #3 (Humidity_2) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (568226) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (568226) MASTER_TEST: Characteristic #4 (Temperature_2) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (570236) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (570236) MASTER_TEST: Characteristic #5 (Humidity_3) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (572246) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (572246) MASTER_TEST: Characteristic #6 (Test_regs) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (574256) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (574256) MASTER_TEST: Characteristic #7 (RelayP1) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (576266) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (576266) MASTER_TEST: Characteristic #8 (RelayP2) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
Sainath Gajul

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

Re: Time out Error rs485 modbus

Postby ESP_alisitsyn » Fri Mar 04, 2022 8:02 am

Hi @saigajul37,

This error means that the slave device does not receive the request from your master. This issue usually relates to RS485 interface connection.
Please check your connection using the https://github.com/espressif/esp-idf/tr ... echo_rs485 example.

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

Re: Time out Error rs485 modbus

Postby ESP_alisitsyn » Wed Mar 16, 2022 1:01 pm

Hi @saigajul37 ,

Was it possible to solve the issue you described? If not please give me more information about issue: ESP-IDF version, code example.

Thank you.

Who is online

Users browsing this forum: No registered users and 138 guests