ESP32 MODBUS ASCII

For general Flowcode discussion that does not belong in the other sections.
pedrazzi
Posts: 21
http://meble-kuchenne.info.pl
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ESP32 MODBUS ASCII

Post 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 !
Tecnoservice

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 686 times

Re: ESP32 MODBUS ASCII

Post 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 6610 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 6610 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.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 686 times

Re: ESP32 MODBUS ASCII

Post 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.

pedrazzi
Posts: 21
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ESP32 MODBUS ASCII

Post 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?)
Tecnoservice

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 686 times

Re: ESP32 MODBUS ASCII

Post 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.

DavidA
Site Admin
Posts: 25
Joined: Wed Aug 05, 2020 10:07 am
Been thanked: 3 times

Re: ESP32 MODBUS ASCII

Post 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.

pedrazzi
Posts: 21
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ESP32 MODBUS ASCII

Post 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.
Tecnoservice

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 686 times

Re: ESP32 MODBUS ASCII

Post by BenR »

Many thanks for letting us know, this bug should now be fixed for you.

pedrazzi
Posts: 21
Joined: Sat Feb 20, 2021 7:46 am
Location: ITALY
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: ESP32 MODBUS ASCII

Post by pedrazzi »

Hello, sorry for the delay, I was able to test the modbus and with utmost satisfaction now everything is OK!

Thank you
Tecnoservice

Post Reply