Swaroop
Hi, I am currently working for my final year project which is making a PLC. I found openPLC via chatGPT and this software is really cool but as per my requirements how to I add a ethernet to spi module namely (W5500) module to esp32 I don't know which pins to use for the module in esp32 can anyone pls help me regarding this and how to connect to openPLC via ethernet and program it via ethernet (MODBUS TCP/IP). I am using esp32 as my arduino nano clones which has CH340G usb chipset does not respond when the openPLC is uploading the code it just doesn't work but with original arduino (Arduino Micro) the program is uploaded with no problem. Is it only me or does openPLC doesn't support CH340G chipset ?
Reply 0 0
thiagoralves
ESP32 only has WiFi implemented. If you want to add Ethernet W5500 support you will have to modify OpenPLC runtime code to make use of that. Then how you connect the W5500 module is up to you, as you will be writing the driver anyway. Might I say, this is not an easy task. You will have to get a pretty good understanding of the runtime code first.
Reply 0 0
CloudHead84
Need to push this because im also wondering how to add Modbus TCP-Support to the Microcontroller runtime.
If i dont want to change somehting, what would be the cheapest microcontroller with Ethernet-Support that can be used with the MCU OpenPLC Runtime as a Modbus TCP-Slave?

There are boards like the WT32-ETH01 (ESP32), the W5500-EVB-PICO or the WaveShare RP2040-ETH that would be really nice to use with openPLC since the are dirty cheap and already have a physical ethernet port.
Wifi is nice, but a ethernet connection would feel more robust and simple (no Router etc.)
I would like to use OpenPLC-Slaves directly connected to a Raspberry Pi without the hassle with setting up a serial connection.
 
Or should i better look into a serial Modbus RTU solution? Can all MCUs be a Modbus RTU slave?
Reply 0 0
thiagoralves
Yes, all MCUs can be RTU slaves, even from the built in USB port. As for Modbus over Ethernet, your mileage will vary. Using official Ethernet shields (or boards based on the same chipset) will give you the best results.
Some PLCs with Ethernet that are supported:
 - P1AM
 - Arduino Opta
 - Controllino 
Reply 1 0
Kullibin52
Hello. Tell me, is it possible to add this code to the openplc library? https://github.com/dtlzp/relay_arduino_demo
Reply 0 0
thiagoralves
If it is possible? Most likely yes. If it is worth it? Most likely no.
Reply 0 0
Reply