Alfredo_Cervello
Hello everyone!
I've installed this fantastic program on version 4 and I can't compile POU. Any ideas?
Thanks in advance.
 
 
Captura de pantalla 2025-12-27 193224.png
Reply 0 0
thiagoralves
There seems to be a problem with your program that I can’t tell because the screenshot does not show it. Most likely you have an empty program or function block an the compiler can’t compile it
Reply 0 0
Alfredo_Cervello
Thank you so much for your quick response Thiago.
I solved it by deleting the folder of the old version and reinstalling the program.
Thanks!!!
Reply 0 0
yogesh.torvi
Hello,
I am new to using openPLC. getting a similar error to what Alfredo was getting. please let me know if i missing something simple. trying to target Arduino UNO board, using openPLC Editor 4.1.1 on Ubuntu 22.04 and structured text as my input language / program. following is the detailed error.
 
Error generating XML from JSON: Error: XML data is not a string
Stopping compilation process.
 
attached is the error snapshot and my simple ST program.
 
Thanks for your help.
Yogesh
 
Reply 0 0
thiagoralves
Can you please share your project files? What you shared is just the ST code.
Reply 0 0
yogesh.torvi
Hi Thiago,
I also tried the same program / project with openPLC install in windows 10, with the same result. Pls find the attached project zip file.
Thanks for your help.
Yogesh
Reply 0 0
yogesh.torvi
Hi Thiago,
Were you able to reproduce the problem and is there any solution to the same?
Thanks,
Yogesh
Reply 0 0
thiagoralves
I suspect your project was created using an earlier version of the editor and that's causing issues. Create a new project from the latest version of the editor and then copy/paste your code into this new project. This should fix the issue.
Reply 0 0
yogesh.torvi
I downloaded and tried out the latest openPLC editor 4.1.1 version, both on windows and linux. still getting the same error.
Reply 0 0
thiagoralves
Did you create a new project?
Reply 0 0
yogesh.torvi
This is how i got it working
 
  1. system environment: ubuntu 22.04
  2. fresh install of openplc editor and openplc runtime 4.1.1
  3. used only the openplc editor 4.1.1
  4. created new project
  5. created a new program (ladder diagram format) and called it main
  6. configured arduino UNO device in configuration tab, selected the Arduino 1.8.7 option
  7. setup the input and output port pins for arduino, in configuration tab
  8. changed the USB access settings, so all users (root and other users) can access usb port used by arduino
  9. compiled and uploaded the program to arduino. it worked !!
  10. My critical findings
    1. #5 program cannot have any other name other than "main"
    2. #8 critical that all users can access the usb port used by arduino. else you get a DFU error..
  11. Earlier i had tried with a ST code, which had issues. my ladder diagram simple (active low switch + LED) worked. I will later try the ST code again.
Reply 1 0
LuchoBrown
I found the same issue. Yogeshi's post gave me the answer, which was that the POU name needs to 'main', and is case sensitive.
Reply 0 0
yogesh.torvi
I later also tried a simple ST code with this same setup, that worked for me. again the program had to be named main (small case).
Reply 0 0
Ali Haj
Here to confirm the same issue. Got the same "Error generating XML from JSON.."
renamed program to "main" and it worked.
plz fix bug & thnx
Reply 0 0
thiagoralves
That’s not a bug, it is an intentional requirement. The main program must be called main. The editor does that automatically for you when you create a new project. If you rename things around you will end up with this error
Reply 0 0
Reply