thiagoralves / OpenPLC_v3

OpenPLC Runtime version 3
1.07k stars 433 forks source link

Program Compilation Error from Web Interface #246

Closed mccrusader closed 1 month ago

mccrusader commented 1 month ago

Hello,

Last week, I was able to upload structured text files to OpenPLC without any issues. Screenshot 2024-07-18 102913

However, since the recent changes to the openplc.py file, all of my uploads via the compile-program interface fail. Screenshot 2024-07-18 102517

Interestingly, the same structured text files can be compiled manually just fine. Screenshot 2024-07-18 103310

Also, after restarting start_openplc.sh, I get an error relating OpenPLC not being able to fetch the active program from the database. Screenshot 2024-07-18 104404 https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/webserver.py#L2402-L2441

I am able to manually update the database and background install script to force OpenPLC into run mode and launch my structured text file.

# replace blank_program.st with overlord.st in background_installer.sh
sed -i 's/blank_program/overlord/g' /root/OpenPLC_v3/background_installer.sh
sqlite3 /root/OpenPLC_v3/webserver/openplc.db < /root/OpenPLC_v3/plc.sql

cd /root/OpenPLC_v3
chmod +x background_installer.sh
./install.sh linux
mccrusader commented 1 month ago

I am not sure if the issue is related to https://github.com/thiagoralves/OpenPLC_v3/issues/245, but I was able to revert to a version from 2 weeks ago.

cd /root/
git clone https://github.com/thiagoralves/OpenPLC_v3.git
cd /root/OpenPLC_v3
git checkout 9cd8f1b53a50f9d38708096bfc72bcbb1ef47343
cd /root/
thiagoralves commented 1 month ago

The file format has changed. You should just do what the error message says: "Please update your OpenPLC Editor and try again".