VinSystems
i want to program 2, esp32 one for inputs and one for outputs using open plc and use nextion diplay as an HMI. now o havent seen clear infos if this is possible.
is there someone here tried working with these? can you spare some knowlegde on how you do it?

thanks!
Reply 0 0
fg71
There is 2 part in your question.
  1. You like to use OpenPLC and IEC-61131-3 programming language to build your logic to interact with HMI
  2. You like to communicate with 2 device there one is inputs and other is outputs (you need a protocol for this)
You use Nextion display so you need a Arduino compatible library that support it and include your code as Arduino extension. Its the Arduino extension that is bridge between your IEC-61131-3 program and Arduino API. PLC program is your control and your HMI is you view. So when you trigger a action for your HMI it will set the state for your input in your plc program. The output will be updated and you could get feedback to your HMI.
 
What do you need, knowledge in C/C++ and IEC-61131-3 programming.
 
I have GigaDisplay and I have been using lvgl libraries to build HMI that involve C/C++ knowledge and how Arduino extension work in OpenPLC. That is not different from yours. The struggle may be to embedded design of HMI in C/C++ compare to running JavaScript or Python on SBC or local computer. If you use the later one you only need to connect to a server from Arduino extension and it will make your code become less (Arduino extension).
Reply 0 0
thiagoralves
In summary, it is possible, but you would have to write a lot of Arduino code in an Arduino Extension to make it work. OpenPLC does not support communication between two ESP32 boards like this and it also does not support nextion displays natively.
Reply 0 0
Reply