241187rezaev
I created a server in OpenPLC Runtime 4 . Then I added the ESP8266 NodeMCU V3 device. How can I add the register addresses of this device now? Or recommend a manual for learning . I have little experience with Open PLC Runtime.
Reply 0 0
thiagoralves
To add a device to runtime you shouldn't add a server. Instead you need to add a Remote Device (on editor click on the blue + button on left panel -> Remote Device -> Modbus). This will allow you to configure the modbus calls you want to use to read or write registers on the remote device (in this case your ESP8266 MCU). The modbus calls you configure (read coils, write coils, etc) will be mapped to IEC addresses automatically, like this:
Screenshot 2026-01-28 at 10.36.16 AM.png
 
Then you can simply use the addresses on your PLC program to access the remote device IOs.
 
Just keep in mind that your ESP8266 MUST have a Modbus/TCP firmware that maps the Modbus requests to actual pins. Without a firmware like that, it won't respond to the Modbus requests. You can write such firmware using Arduino IDE or ESP SDK, or get something self-baked from the community. Alternatively, you can also use OpenPLC to program the ESP8266 with a PLC program with Modbus TCP enabled. Just keep in mind that if you use OpenPLC to program it, it will run OpenPLC firmware on the ESP8266 and you will have to map the pins you want to use for the Modbus requests on the Pin Mapping section. Pins are mapped to IEC locations that are directly mapped to Modbus registers. So if you map pin 3 as digital output on %QX0.0, that means coil 0 is mapped to pin 3.
Reply 1 0
241187rezaev
To add a device to runtime you shouldn't add a server. Instead you need to add a Remote Device (on editor click on the blue + button on left panel -> Remote Device -> Modbus). This will allow you to configure the modbus calls you want to use to read or write registers on the remote device (in this case your ESP8266 MCU). The modbus calls you configure (read coils, write coils, etc) will be mapped to IEC addresses automatically, like this:
Screenshot 2026-01-28 at 10.36.16 AM.png
 
Then you can simply use the addresses on your PLC program to access the remote device IOs.
 
Just keep in mind that your ESP8266 MUST have a Modbus/TCP firmware that maps the Modbus requests to actual pins. Without a firmware like that, it won't respond to the Modbus requests. You can write such firmware using Arduino IDE or ESP SDK, or get something self-baked from the community. Alternatively, you can also use OpenPLC to program the ESP8266 with a PLC program with Modbus TCP enabled. Just keep in mind that if you use OpenPLC to program it, it will run OpenPLC firmware on the ESP8266 and you will have to map the pins you want to use for the Modbus requests on the Pin Mapping section. Pins are mapped to IEC locations that are directly mapped to Modbus registers. So if you map pin 3 as digital output on %QX0.0, that means coil 0 is mapped to pin 3.
Thank you. I will continue to explore and learn. I have found an easy way for myself. I am editing the pin-mapping.json file in the project for flashing the ESP board.
Reply 0 0
Reply