ivan_terzo
Good morning everyone,
after updating OpenPLC Editor to the latest version, I noticed that compiling for the microcontroller in question (ESP32-DOIT DEVKIT V1 [3.1.3]), the program (not the simulation) works only if "Enable Modbus RTU (Serial)" is activated.
In reality I believe that by not activating serial communication the non-functioning part is that relating to the outputs, the inputs, but I'm not sure, I think they work.
Any ideas about this? Has anyone else encountered similar things with other microcontrollers?
Thanks everyone and good work!
PS - Then I will update you on a course I'm writing based on OpenPLC.
Reply 0 0
fg71
I do not use the board you have but I do have Arduino Nano Esp32 and when I update ESP-IDF Arduino core to version 3.1.3 I also need to include compile flag
to use GPIO instead of Arduino pin so I made other hals.json entry for Nano Esp32.
 
My understanding is that ESP-IDF Arduino core now use GPIO instead of Arduino pin to make it default to the main core.
 
ex.
 
The Blink sketch in Arduino IDE and with ESP-IDF Arduino core doesn't work with Arduino pin with version 3.1.2 and the latest 3.1.3.
If I change to GPIO number in the Arduino IDE it does work.
 
Maybe you have the same issue, if you do you could add this to your hals.json for your board
"platform": "<YOUR_FQBN>:PinNumbers=byGPIONumber",
 
Ps. I did report it as bug but I never got any respond
Reply 0 0
thiagoralves
I need to set some time to debug this properly, but what intrigues me is that it apparently works when you enable Modbus. What exact version of the editor are you running on? Can you share your full compilation log for the ESP32 here?
Reply 0 0
ivan_terzo
Good evening (actually good night). Tomorrow I will do some more tests and I will try to be more precise.
In the meantime I will give you the link of the work I am carrying out. It is a first revision, already perfectly functional, of a PLC based on OpenPLC with a 3D printed chassis, various electronics, PCB etc. The slides on OpenPLC are from the third part onwards, those from the sixth onwards I am still correcting and I am basically redesigning the electronics for the control of the inputs and outputs.
 
Link to the zip file containing the slides in pdf (you can also find the zip file attached):
 
Thanks to everyone
PS - The slides are in Italian for now.
Reply 0 0
thiagoralves
Wow, even though I don't know Italian, this looks like great content. A full Automation Engineering course. Very nice! Thanks for sharing.
Reply 1 0
ivan_terzo
Good morning Thiago @thiagoralvesa and good morning everyone,
I'll update you on those problems I had. Updating to the latest release (2025-02-14) when I compile I get the error:
 
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found
 
I'm still using Ubuntu 20.04 and the error is therefore due to the fact that that version of Ubuntu uses old libraries that I cannot forcefully update because otherwise applications that I currently use could have problems. I therefore imagine that there is no way to make the latest version of the editor work unless I update Ubuntu
I therefore went back to the previous version (2024-08-12) and I confirm that the operation is correct only if the ModBus is enabled. For now I will therefore resign myself to enabling the ModBus which, objectively, does not cause any problems.
Thank you for your attention and if you want (you want) I will update you with the course that is in progress and that is actually based on OpenPLC
Thank you!
Reply 0 0
fg71
Wow, even though I don't know Italian
You could use Microsoft Edge to translate selected text from PDF file.
Reply 0 0
thiagoralves
Good morning Thiago @thiagoralvesa and good morning everyone,
I'll update you on those problems I had. Updating to the latest release (2025-02-14) when I compile I get the error:
 
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found
 
I'm still using Ubuntu 20.04 and the error is therefore due to the fact that that version of Ubuntu uses old libraries that I cannot forcefully update because otherwise applications that I currently use could have problems. I therefore imagine that there is no way to make the latest version of the editor work unless I update Ubuntu
I therefore went back to the previous version (2024-08-12) and I confirm that the operation is correct only if the ModBus is enabled. For now I will therefore resign myself to enabling the ModBus which, objectively, does not cause any problems.
Thank you for your attention and if you want (you want) I will update you with the course that is in progress and that is actually based on OpenPLC
Thank you!
That's what I suspected. This version is very old, and has a known bug with the ESP32 platform. The code crashes on the MCU unless you enable Modbus due to a NULL pointer deference.
Reply 0 0
Reply