Search found 30 matches

by ESP_alisitsyn
Thu Jun 04, 2020 9:38 am
Forum: General Discussion
Topic: modbus issue while reading
Replies: 1
Views: 264

Re: modbus issue while reading

Hi Surendra, Could you provide more information about your implementation? Do you have other tasks whose priority higher than FMB_SERIAL_TASK_PRIO option and how high if it is? Are these task(s) doing flash access (nvs) or disable CPU cache? Is the FMB_TIMER_ISR_IN_IRAM option set in your kconfig? C...
by ESP_alisitsyn
Tue May 12, 2020 9:08 am
Forum: ESP32 IDF
Topic: How to set up simple Modbus communication?
Replies: 2
Views: 1091

Re: How to set up simple Modbus communication?

Hi @waterfox, - How do I set the stop bit to 2? I didn't find any option for this like in uart. The modbus master supports UART_STOP_BITS_1 option set in the serial port components\freemodbus\port\portserial_m.c:xMBMasterPortSerialInit(). However it should not cause any communication issues. Here I ...
by ESP_alisitsyn
Wed Apr 29, 2020 5:16 am
Forum: ESP32 IDF
Topic: Modbus slave data storage [IDFGH-3202]
Replies: 6
Views: 691

Re: Modbus slave data storage [IDFGH-3202]

The master device must knows register map of your slave (parameter structure) then it can set parameter of any type correctly and stack will transfer it to the slave device parameter structure. Good luck!
by ESP_alisitsyn
Tue Apr 28, 2020 4:29 pm
Forum: ESP32 IDF
Topic: Modbus slave data storage [IDFGH-3202]
Replies: 6
Views: 691

Re: Modbus slave data storage [IDFGH-3202]

I agree that it is little bit unclear but this is how standard printf shows the float value made from incorrect bytes. How would you expect to print the float in this case (NAN)? The Modbus stack in this example just transfers the value of registers into its place of concrete parameter but how to pr...
by ESP_alisitsyn
Tue Apr 28, 2020 6:48 am
Forum: ESP32 IDF
Topic: Modbus slave data storage [IDFGH-3202]
Replies: 6
Views: 691

Re: Modbus slave data storage [IDFGH-3202]

Hi Chriserke, The approach you showed in your code must work. I guess the reason for the float value = 0.0000 is that you are writing the incorrect value of registers from mb_addr=1 and they are not correspond to correct float value. The printf("Holding reg value, %f", holding_reg_params.data_chan2)...
by ESP_alisitsyn
Wed Apr 01, 2020 4:45 am
Forum: ESP32 IDF
Topic: Modbus slave
Replies: 13
Views: 3520

Re: Modbus slave

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.
by ESP_alisitsyn
Thu Mar 12, 2020 2:48 pm
Forum: ESP32 IDF
Topic: Modbus slave
Replies: 13
Views: 3520

Re: Modbus slave

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. ...
by ESP_alisitsyn
Thu Mar 12, 2020 7:54 am
Forum: ESP32 IDF
Topic: Modbus slave
Replies: 13
Views: 3520

Re: Modbus slave

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...
by ESP_alisitsyn
Wed Mar 11, 2020 2:43 pm
Forum: ESP32 IDF
Topic: Modbus slave
Replies: 13
Views: 3520

Re: Modbus slave

I still do not know the correct commit ID (it is old preliminary version) but goal of change I provided just to check issue. Could you please rebase your ESP-IDF on master? The latest master has all required fixes and ASCII mode shall work just fine. Please let me know the result.

Thanks.
by ESP_alisitsyn
Wed Mar 11, 2020 10:21 am
Forum: ESP32 IDF
Topic: RS485 UART returns incorrect messages
Replies: 2
Views: 1189

Re: RS485 UART returns incorrect messages

Hi @jaspernorth,

The protocol you provided is not the Modbus protocol but some custom protocol. ESP-IDF does not support this protocol.

--
Alex

Go to advanced search