How to write a variable from firmware to a PLC address in OpenPLC

Thread Starter


Joined May 25, 2020
Hi all,
I'm having a project which turns a microcontroller(node MCU) into PLC. I've chosen openPLC because of its stability and is easy to use. Everything worked well with the Modbus protocol in terms of sending or receiving between my node and OpenPLC but I want my PLC to be more convenient when transmit at a far distance by adding Lora. The initial idea comes with embedding Lora configuration in firmware for the PLC that has chosen as a gateway then getting data and provide it a PLC address like MW100 or MW101. In that way, I can use this address in my Ladder program to handle or calculate afterward. But the process to adjust the firmware code of OpenPLC really made me headache for days. How can I change the value from the other source into the Modbus register and make OpenPLC identify it? I tried over and over again but it got the same failing result. Hope someone who has experienced in OpenPLC helps me with it. Thanks!