Raj Iyer
As we see it, OpenPLC is a great way to implement small solutions on low cost SBCs and even microcontrollers like R-Pi Pico. This has been of great help in rapidly developing small applications especially for low-end automation. 
 
On the other hand, no "solution" is complete without some kind of interface. To this end there are now very low-cost Touchscreens available. I wish to know if people in this forum have had any success in writing logic on a Raspberry Pi Pico and interfacing the variables to LCD Touch-screen displays.
 
I would like to really get started on this path. Any and all guidance is welcome
Raj
Reply 0 0
thiagoralves
If the LCD screen supports Modbus in any way, then integration is quite easy and straightforward. You just need to program your screen to access the relevant Modbus registers in your program. If you’re looking into a more “barebones” screen then maybe an interesting option would be to use the new Arduino Sketch feature:  https://openplc.discussion.community/post/new-feature-arduino-sketch-on-plc-programs-13249303
Reply 1 0
Raj Iyer
If the LCD screen supports Modbus in any way, then integration is quite easy and straightforward. You just need to program your screen to access the relevant Modbus registers in your program. If you’re looking into a more “barebones” screen then maybe an interesting option would be to use the new Arduino Sketch feature:  https://openplc.discussion.community/post/new-feature-arduino-sketch-on-plc-programs-13249303
That's wonderful to know. I'll try it out. This is important. There are methods to use sketch variables in LCD screens. Also possible from Micro-Python. The link between sketch &  Modbus variables is a grey area...
 
Thanks a million
Raj
Reply 0 0
Raj Iyer
The best way ahead, is use a commonly available SPI display with Touchscreen -things like a waveshare 3.5" that cost like $20-  and learn up LVGL. LVGL requires a little more resources so you could try using a Raspberry Pi Pico or better. I am currently burdened with some unfinished work that I need to complete and get payment. But soon, I really want to be doing this. You can too.. and share the outcome with us.
Raj
Reply 1 0
PAJ27
Yes, I can vouch that the PicoW and MicroPython can be used with an IPS led display 1.14” - at this moment, I’m having a little bit of a problem occasionally with the Pico ModBus timing out - but I’m sure it’ s an issue with my code.
 
 
I also used  a C++ sketch to get a serial wired link using a spare PicoW output pin (so not ModBus) to another IPS led display with MicroPython at the display.
Reply 0 0
Raj Iyer
Look.. I've spent a few days making sense of how to use LVGL on a Pico. LVGL looks great when compared to most of the other graphic libraries. But here I ran into some fresh issues. Firstly it is Micropython that is recommended for Raspberry pi  Pico (by Gemini.ai😉) and I don't know how to proceed with C++ which is what is native LVGL! so after 3-4 days of frustrating searches and a lot of assistance from Gemini  I managed to create a firmware file called Firmware.elf.   I think this is good only for micropython projects that need LVGL. Whether it can receive "ordinary" work from Thonny remains to be seen.   While LVGL looks great and it has high level features like buttons, sliders and SCADA-like HMI-screen elements,  I want to explore how to take this ahead along with OpenPLC as well.   In all these things, you set out with a goal and encounter a number of hurdles that require knowing one thing after another. So any help on this forum will be a good thing. If anyone can use the Firmware.elf file, I can share it here.
Raj
Reply 0 0
thiagoralves
The easiest setup would be buying a ready-to-use HMI screen that can talk Modbus. LVGL is a low level library to create graphical screens from scratch. You should expect a lot more obstacles going in that route, as you must create and build everything. Besides, I wouldn't recommend running the PLC program and the HMI on the same device, as the screen updates for the HMI can increase jitter on the PLC program scan cycles. For just a proof of concept, or non-real-time tasks that's ok. For industrial, I wouldn't recommend.
Reply 0 0
Desire
I have already used Kinco and Weintek industrial HMIs in an RP Pico environment with Modbus communication. If anyone is interested, I can help.
Reply 0 0
Raj Iyer
I have already used Kinco and Weintek industrial HMIs in an RP Pico environment with Modbus communication. If anyone is interested, I can help.
Good, thanks for your offer to help & also Congrats. But as this technique is already well known in the Open PLC Community, -So Many examples, a section for Modbus etc.- we are addressing another challenge here.  
 
That challenge is about HOW to use "cheap" 3"-4" LCD touch-screen modules that  cost about $10 each along with very low-cost devices such as Arduinos & R-Pi picos that communicate with the display modules on SPI.. Which of course isn't the same as using Modbus over serial/TCP networks.
 
OpenPLC's goal is to drastically cut down the costs of automation & make it easy for all..  
Raj
Reply 0 0
PAJ27
Good, thanks for your offer to help & also Congrats. But as this technique is already well known in the Open PLC Community, -So Many examples, a section for Modbus etc.- we are addressing another challenge here.  
 
That challenge is about HOW to use "cheap" 3"-4" LCD touch-screen modules that  cost about $10 each along with very low-cost devices such as Arduinos & R-Pi picos that communicate with the display modules on SPI.. Which of course isn't the same as using Modbus over serial/TCP networks.
 
OpenPLC's goal is to drastically cut down the costs of automation & make it easy for all..  
 
Perhaps you could use this uPy version to link to the PLC pico just a thought.
 
 
I have not been able to get the LVGL firmware to build - can you shed some light on that matter.
 
Paj
Reply 0 0
thiagoralves
LVGL is powerful, but as with most things that have great powers, it is complicated to use. Perhaps you should try something simpler like the Adafruit GFX library. This video is in Spanish, but might help you guys get some ideas: https://www.youtube.com/watch?v=-I_vyg0M5jY 
Reply 1 0
thiagoralves
 
They say that the library works with Waveshare cheap LCD touch screens, and looks very simple to use for basic stuff (like drawing lines, circles, text, buttons). Check one of their examples: https://github.com/ImpulseAdventure/Waveshare_ILI9486/tree/master/examples/TouchTest
Reply 0 0
Raj Iyer
Thanks Thiagor,
 
You respond fast with helpful pointers. 
Raj
Reply 0 0
Reply