Pedro Constantino
Dear openPLC users,
 
I am interested in using an Arduino GIGA with openPLC.  I tried to find an openPLC runtime for the Arduino GIGA, but I think that there is no runtime support, at least not within the selection offered in openPLC's "Transfer Program to PLC" window.
 
As information: Arduino Giga uses the same µC as the Portenta series and the same (basic) board settings as the Arduino Mega and Due systems.  Therefore, I could imagine that the definition of a Giga runtime might not so be soooo far away :-).
 
Regards, Pedro.
Reply 0 0
thiagoralves
That should be possible, and maybe you can even add that yourself. It is not a complicated step. All you have to do is edit the hals.json file here:  https://github.com/thiagoralves/OpenPLC_Editor/blob/master/editor/arduino/examples/Baremetal/hals.json and then include an entry for the Arduino Giga board. You’ll have to know the arduino-cli core and platform name for the Giga board. Finally you will have to create a .cpp file to address the IO points. You can take another board .cpp file as example:  https://github.com/thiagoralves/OpenPLC_Editor/tree/master/editor/arduino/src/hal
 
If you succeed, please share your files, or even better, make a PR on GitHub so that everyone can benefit!
Reply 1 0
Pedro Constantino
Dear Thiago,
 
thank you for the information.  It does not seem to be tooooo complicated.  My next steps: I will buy an Ardunio Giga and then do the adaption.  And yes, should I be successful, I would make the adaption available for all, like you do with openPLC.  Desejo o senhor um bom dia de Domingo.  Comprimentos Pedro.
Reply 0 0
Pedro Constantino
Is it also possible to activate or to integrate the embedded Webserver for this implementation?  The Giga/Portenta H7 µC are powerful enough to also run the webserver in a low-frequency task.  Regards, Pedro.
Reply 0 0
thiagoralves
No, the webserver was designed to run on Linux and Windows. As powerful as it seems to be, the Portenta doesn’t have the resources to run an Operating System like that.
Reply 0 0
Pedro Constantino
Okay, then this is probably one of the essential differences, comparing the use an Arduino vs the use of a Raspberry: openPLC@Arduino does not reley on a computer like OS and therefore cannot make use of the TCP/IP stack provided by the OS.  But because Raspberry runs some Linux like OS, openPLC@Raspberry can use the TCP/IP stack and therefore the openPLC-Webserver is also available on Raspberry.  Are these statements correct?  Regards, Pedro.
Reply 0 0
thiagoralves
No. OpenPLC on Arduinos use the TCP/IP stack provided by the Arduino API. The problem is not with the webserver functionality, but how the webserver was written. It was written as a desktop application. A similar webserver could have been written for the Arduino environment and it would work, but I particularly think it would consume a lot of resources and wouldn’t be that much useful. 
Reply 0 0
Reply