MODBUS reading even addresses only

xyashpatilx
Posts: 1
Joined: Thu Dec 31, 2020 10:00 am

MODBUS reading even addresses only

Postby xyashpatilx » Thu Dec 31, 2020 10:17 am

Hello everyone. I am new to ESP-IDF environment. I am using VS Code plugin with idf version 4.1. I am trying out Modbus Example and have some what modified it as per my modbus slave device. I am reading 8 consecutive addreses 1561 - 1568 using RTU mode. My communication with slave device is kind of successfull, problem is that I get response for even addresses in mentioned range but timeout error for odd range. I am really confused. I am using 8E1 configuration for UART.
  1. I (326) uart: queue free spaces: 20
  2. I (386) MASTER_TEST: Modbus master stack initialized...
  3. I (486) MASTER_TEST: Start modbus test...
  4. E (636) MB_CONTROLLER_MASTER: mbc_master_get_parameter(111): SERIAL master get parameter failure error=(0x107) (ESP_ERR_TIMEOUT).
  5. E (636) MASTER_TEST: Characteristic #0 (PV0) read fail, err = 263 (ESP_ERR_TIMEOUT).
  6. I (766) MASTER_TEST: Characteristic #1 PV1 (C) value = 304 (0x130) read successful.
  7. I (1266) MASTER_TEST: Alarm triggered by cid #1.
  8. I (1266) MASTER_TEST: Destroy master...

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

Re: MODBUS reading even addresses only

Postby ESP_alisitsyn » Wed Jan 13, 2021 7:50 am

Hi @xyashpatilx,

I need more information about your master data dictionary and slave register descriptors to identify the issue. The existing serial master and slave examples work just fine with default configuration and stress tested. For now i can propose to increase
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND
in your menuconfig.

Could you also let me know the IDF revision you are using?

Thanks.

Who is online

Users browsing this forum: eriksl, Google [Bot] and 244 guests