ed@gsdware
Hello all - I've got a project that opens on V3 of the editor, but won't in V4. Any help is appreciated.
 
 
I get a message 'Cannot open the project' 'Could not read the project. Please check the project directory'.
 
Also, it'd be good to get the version number of the editor in the title window. And the tutorials button isn't working on my PC. Windows 11, fwiw.
Reply 0 0
ed@gsdware
Also, I tried just copying the code over from the 3 version into a new 4 version. I get errors on compile.
 
 
Also, having a .git folder in the root of a V4 app makes it un-openable. Should be addressed.
 
Other notes:
I think that OpenPLC.Editor_4.0.6-beta.exe needs to be named something like OpenPLC.Editor_4.0.6-beta_Setup.exe to give the user some context. I ran the setup again because Windows pulls up the recent OpenPLC files when I type into the start bar.
Reply 0 0
ed@gsdware
Never mind about the PLCV4 copy not working - I flubbed one of the variables in the table, and that flub copy/pasted to some other variables.
 
The issue was I named a variable with a 01 suffix. The auto-increment function took that and cut off the leading zero. So for example:
INPUT_16_1_01
press '+' button
INPUT_16_1_2 is generated.
 
Fixed in my code, now it compiles.
Reply 0 0
thiagoralves
Hi @ed@gsdware ! Projects from the old v3 editor won't open on the new v4 editor. Since v4 is a complete rewrite, it uses a different file architecture than the v3. Unfortunately you will have to redo your project from scratch on v4, which seems like that's what you did. What is the issue you are having with .git inside the project folder? It should open just fine. Can you confirm that the problem is indeed the .git folder and not a bad project file?
Reply 0 0
ed@gsdware
Yes - The OpenPLC4 repo is a copy-paste rewrite. When I try to open the folder that has the .git subfolder within it, the OpenPLC UI won't open the project. But the version that sits within the openPLC folder opens fine.
 
Steps to reproduce:
git clone git@github.com:EdHubbell/OpenPLC4.git
Launch OpenPLC V4.0.6
Open folder OpenPLC4 - OpenPLC app says could not open project.
Open folder OpenPLC4/openPLC/ - App successfully loads the project.
Contents of /OpenPLC4 and /OpenPLC4/openPLC are identical, except for the added .git folder and the added openPLC folder
Remove the .git folder - OpenPLC app will load the project.
 
More feedback - // comments seem to not compile in this version of the editor. Using (* *) to get around it. This may have been true previously - But the V4 editor comments out code using ctrl+k ctrl+c (default for many other editors), which creates the expectation that the comments will work.
 
About to spend my day trying to get Claude Code to write structured text and map P1AM-100 Modbus variables to an importable file for the EasyPro HMI software. Fingers crossed. I'm digging OpenPLC - Thanks for your help.
Reply 0 0
thiagoralves
Awesome! We will check this issue with the .git directory. About the comments, we have an ongoing PR that has the fix to allow // comments. For the P1AM modbus variables, the good news is that v4 only uses pins that you define on the device configuration screen. Since P1AM is a modular platform and most likely you are not using the GPIO pins available in the left side of the unit, you can simply leave the pin mapping table empty and the entire Modbus IO range will be available for you to use without conflicting with GPIO pins (%QX0.0, %QW0, etc and not only %MW0, %ML0, and %MD0).
Reply 0 0
ed@gsdware
>the good news is that v4 only uses pins that you define on the device configuration screen
 
I stared at that Device Configuration screen for a good 2 minutes before I saw that I could scroll down. This is a nice feature - I am indeed not using the GPIO pins or switch/LED that were mapped by default in OpenPLC V3. Thanks!
Reply 0 0
Reply