[Gambas-user] PLC programming with gambas3 IDE

T Lee Davidson t.lee.davidson at gmail.com
Sun Feb 6 19:43:45 CET 2022


On 2/6/22 13:24, Martin Belmonte wrote:
> Hi,
> Does anyone know if there is any IDE project to program PLC made with gambas3? or would it be possible to create a plugin in the 
> gambas IDE to upload code to arduino? etc. etc. etc..
> 
> Using the gcc-avr compiler, from what I read on the web, it would be possible to compile a C program and then write it on the chip.
> As the instructions of a PLC are simple, maybe it would be possible to program in gambas language and then load this code in the 
> chip doing the conversion in a transparent way for the user.
> There is a program (wxPython) called Beremiz [1] that looks great and is gpl3 too, but I can't get it to work on my PC because 
> of problems with python versions (it steel using v2.7),
> I am content to make the code for an arduino board or similar [2].
> How do you see it?
> 
> [1] https://beremiz.org/
> [2] AVR Atmel-8 bits (ATmega8, ATmega168, ATmega328, ATmega1280, ATmega2560)
> 
> Martín.

I am not aware of any such project.

One could use the gb.form.editor component to provide source code editing and then, shell out (or use gb.form.terminal) to 
gcc-avr for compiling and then avrdude for uploading.

I would really like to do embedded programming in BASIC, but, the available packages for that are either for Windows, are 
expensive, or are quite lackluster.

To do so in Gambas, I believe would require a totally new compiler. I have not dared asked for that because it would likely be a 
monumental endeavor, and I have neither the time nor skill to contribute. Perhaps something workable could be created if Gambas 
could output C code as Nim does. But, that would probably also be a project of epic proportions.


-- 
Lee


More information about the User mailing list