Page 3 of 3

Re: ESP32 MODBUS ASCII

Posted: Tue Apr 20, 2021 8:30 am
by pedrazzi
Hi, thanks for the help, unfortunately I can't get answers from the slave, obviously I made the FC updates, it seems that the serial does not hear incoming data.
I made a test program with the simple serial to remove the doubt of the pins, and it works well.
I did tests with ESP32 wrom32 development board and with AT MEGA 32U4 (with Leonardo loader and also without) ..
I tried with pic 16F877A but it is small!
Now I will try with a Pic 18F2480 ... even if it will take me some more time because I don't have the card ready.
What do you use to test the program?

Thank you !

Re: ESP32 MODBUS ASCII

Posted: Tue Apr 20, 2021 11:02 am
by BenR
Hmm this is odd,

If I send the command using Flowcode then it works and it replies.
FlowcodeMaster.jpg
FlowcodeMaster.jpg (121.13 KiB) Viewed 6612 times

Also if I use a terminal program to send the command then I get a reply with this too.
TermMaster.jpg
TermMaster.jpg (69.97 KiB) Viewed 6612 times

I'm using an Arduino Uno. I'll try again now with an ESP32.

Edit. ESP32 certainyl seems to have a problem at the moment, we are investigating.

Re: ESP32 MODBUS ASCII

Posted: Tue Apr 20, 2021 2:30 pm
by BenR
Hello,

Right the ESP32 is now working too, I've released a new update for the ESP32 CAL UART which should solve the problems here.

Re: ESP32 MODBUS ASCII

Posted: Tue Apr 20, 2021 3:17 pm
by pedrazzi
FANTASTIC!! now the 32U4 works too! ESP32 ok!
Thank you very much, for me this tool is formidable and allows me to test and or produce "simple" works in a short time.
I forgot to add "test and debug" when I placed the order, this morning I bought it, now I don't understand why it is not enabled .. but this is a minor problem.
Thank you again.
(do you know if you can delete my email instead of the username?)

Re: ESP32 MODBUS ASCII

Posted: Tue Apr 20, 2021 3:49 pm
by BenR
Thanks for bearing with us and getting back so fast, really happy it's all working for you now.

You might need to refresh your license in Flowcode by re-entering your username and password.

I've asked David to have a look at your username and see if it can be swapped for your email address that's currently being shown.

Re: ESP32 MODBUS ASCII

Posted: Tue Apr 20, 2021 4:31 pm
by DavidA
Hello,

I have changed your username to just be "pedrazzi", this is both for the website login and the forums, any problems, please let me know.

Re: ESP32 MODBUS ASCII

Posted: Tue Apr 20, 2021 5:33 pm
by pedrazzi
Ok perfect, thanks.
.. but I have to note a problem on the ESP32 when using port 2 or 3:
In file included from C: \ ProgramData \ MatrixTSL \ FlowcodeV9 \ CAL \ includes.c: 1469,
from ../main/esp-project.c:238:
C: \ ProgramData \ MatrixTSL \ FlowcodeV9 \ CAL \ ESP \ ESP_CAL_UART.c: In function 'uart1_event_task':
C: \ ProgramData \ MatrixTSL \ FlowcodeV9 \ CAL \ ESP \ ESP_CAL_UART.c: 155: 42: error: 'i' undeclared (first use in this function)
if (uart1_interrupt_enabled) {for (i = 0; i <event.size; i ++) {uart1_interrupt_task (); }}
.. also because port 1 is dedicated to debugging, so I wouldn't use it for modbus.
(port 1 anyway ok x modbus)
Sorry if I find you other problems.

Re: ESP32 MODBUS ASCII

Posted: Thu Apr 22, 2021 11:08 am
by BenR
Many thanks for letting us know, this bug should now be fixed for you.

Re: ESP32 MODBUS ASCII

Posted: Fri Apr 30, 2021 9:37 am
by pedrazzi
Hello, sorry for the delay, I was able to test the modbus and with utmost satisfaction now everything is OK!

Thank you