dormiki
Hello Everyone!
 
I really like OpenPLC, we study with it at school.
I wrote a small Arduino extension. It worked, I was very happy with this option.
Now I would like to continue this program, but the editor won't open it.
I thought I'd write a new one, but when I created it, it indicated an error.
I attached the error file as indicated by the program.
 
OpenPLC Editor 3.0, Release:2024.06.06
It worked fine with this version. The 09.09.2024. version for students (user with limited rights) does not start.
 
What can I do? Thank you for your help.
Reply 0 0
thiagoralves
Programs should be able to open the same way across different versions of the editor. Can you post your project here so I can take a look?
Reply 0 0
dormiki
Thanks for the answer 🙂
Which part? The compressed file cannot be attached.
I took a picture of a primitive. The Windows version can't handle this, it translates to st but runs into an error before uploading.
What I see: what the "kulso" variable becomes "extern", (as it should be) a translation error occurs, at RpiPico. Works on Arduino Mega or ESP32.
The training panels were created and proven with RpiPico.
 
With Linux, 2024-06-06 is flawless. I haven't downloaded the latest one yet.
 
I teach PLC programming at school. Translation also stopped on 30 machines last week (it worked so far).
I teach at school. We put the OpenPLCEditor on a freely writable/readable partition, so at least the basic plc programs work.
I fell in love with this system, it is easy to work with knowing many chips. Really nice work and constantly improving.
 
The Arduino ext:
Képernyőkép 2024-10-11 20-53-32.pngKépernyőkép 2024-10-11 20-55-18.png
Reply 0 0
thiagoralves
If you compress the project folder as a .zip archive you will be able to attach it here. Updates to the pico compiler could've changed how things work. Attach your project here and I'll take a look.
Reply 0 0
thiagoralves
If you compress the project folder as a .zip archive you will be able to attach it here. Updates to the pico compiler could've changed how things work. Attach your project here and I'll take a look.
Reply 0 0
dormiki
Thank you for your attention!
I'm still testing and waiting.
What I see: When setting up RpiPico with the extern variable, it shows an error when compiling before uploading.
Of course, it doesn't load the program.
 
Although this program is uploaded to ESP32 and runs.
The panel built with ESP32 is already being prepared 🙂.
I can see the continuous development, I'm already connecting the I2C to it, so that we can connect e.g. LCD or OLED display...etc.
At the same time, this is available via modbus with the simulator program and livedebug at the same time.
Reply 0 0
thiagoralves
Maybe the Pico compiler requires you to create the global variable under Res0 as well. Double click Res0 in the project tree panel on the left and then at the top of the window create your external variables (same name, same type) as global. Try compiling it then for the Pico and check if that works.
Reply 0 0
dormiki
thanks, i'll try it.
Reply 0 0
dormiki
I added the variable to Res0.
Error already when translating to st:
 
build/plc.st:103-7..103-18: error: invalid global variable(s) declaration.
In section: CONFIGURATION Config0
0103: kulso : BOOL;
 
plc.st:103-7..103-11: error: unexpected token after 'VAR_GLOBAL' in global variable(s) declaration.
In section: CONFIGURATION Config0
0103: kulso : BOOL;
 
Without adding Res0.
It is compiled by LinuMint and OpenPLC editor 20240606 to RpiPico, is flawless.
Even under Windows, the translation goes to st, but before uploading it writes an error to RpiPico, Upload to ESP32.
Tomorrow I will try to add it to Res0, with windows.
We have Windows at school, Linux at home.
 
I'll get back to you.
Reply 0 0
dormiki
If I add the global variables to Res0, the translation to st also shows an error.
If there is no global variable in Res0, translation to RpiPico shows errors, translate to ESP32, upload.
The LiquidCrystal_I2C library is in the appropriate folders.
 
OpenPLC ver: 3.0 (2024-06-06), Windows 11 Pro
OpenPLC ver: 3.0 (2024-10-17), Windows 11 Pro, Same error for RpiPico
Reply 0 0
dormiki
This is amazing! 🙂
 
Version 2025-01-30, handles the extern variable with RpiPico.
You can write Arduino code and transfer data between plc and Arduino codes.
It's a great pleasure for me, thank you, thank you, thank you...
 
You are great!!
Reply 1 0
Write a reply...
Reply