Miguel Rodriguez
Hi, I'm just starting out with OpenPLC. I'm trying to use the online debugger on an ESP32 board.

Is it possible to debug using a Wi-Fi connection?

[203128%2F9390844%2Fmceclip0]

Thanks for the help.
P.S.: OpenPLC is a great tool.
Reply 0 0
thiagoralves
Yes, you just need to enable Modbus TCP on the upload dialog before uploading your PLC program to the ESP32
Reply 1 0
Miguel Rodriguez
Thank you so much, It was easier than I thought.
Reply 0 0
Giorgos M.
Can you describe step by step the what we do ?
Reply 0 0
Giorgos M.
The ip address is the address of the runtime server ? Or i have to connect my esp32 to my wifi through arduino ide ?
Reply 0 0
thiagoralves
The IP address is the IP of the device you want to debug, which in this case is your ESP32. Just as a side-note, you don't need the runtime server to run programs on the ESP32. You can upload the programs directly to the ESP32 and debug them as long as on the upload dialog to the ESP32 you select Modbus TCP.
Reply 1 0
Giorgos M.
The runtime is used for monitoring ?
I use the runtime by the way
[203128%2F9391290%2Fmceclip0]
 
and the relay (output) does not have stability .Does it due to the refresh rate ?
Reply 0 0
thiagoralves
No, the Linux/Windows runtime is not used for monitoring, it is used to run programs. It just happens that the Linux/Windows runtime has a nice web-based monitoring tool to check the state of variables, but you can monitor programs directly from the editor by connecting to the device that is running your program. As I said, you can run the programs on the ESP32 directly instead of running them on the Linux/Windows runtime. The way you're doing, you have your ESP32 simply as a dumb remote IO terminal. If you turn off your computer, the ESP32 will stop working because there is no logic running in it. If you upload your program to the ESP32 with Modbus TCP enabled, you can launch the debugger from the editor and debug the program there.
Reply 1 0
Giorgos M.
Thank you very much !!! You are very helpful !!
Reply 1 0
thiagoralves
Sure! One last thing, once you start the debugger, make sure you click on the glasses in front of Config0.Res0.instance0 (left panel) in order to view the live diagram on the editor.
Reply 1 0
Miguel Rodriguez
Can you describe step by step the what we do ?
According to your request, Here's a little explanation of how I did it.
  • Create a sample program
  • Transfer the program to PLC, enabling Modbus TCP and configuring Wifi SSID and password
  • [203128%2F9393350%2Fmceclip0]
  • Use live debug remote PLC to connect to ESP32, setup the IP Address
  • [203128%2F9393360%2Fmceclip0]
  • Use debug instance to see the variables that you need
  • [203128%2F9393361%2Fmceclip0]
Reply 1 0
Giorgos M.
I tried and works !! Thanks
Reply 0 0
Reply